diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100644 index 70bd3dd23..000000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx --no-install commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index 9281c6c0d..000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,2 +0,0 @@ -node scripts/secrets-check.js -npm run lint:staged diff --git a/contracts/bridge-compat/src/lib.rs b/contracts/bridge-compat/src/lib.rs index 0799131c5..391743ae8 100644 --- a/contracts/bridge-compat/src/lib.rs +++ b/contracts/bridge-compat/src/lib.rs @@ -30,6 +30,7 @@ use soroban_sdk::{ contract, contractclient, contracterror, contractimpl, contracttype, symbol_short, Address, Bytes, Env, String, Vec, }; +use soroban_sdk::xdr::ToXdr; // ── Error types ──────────────────────────────────────────────────────────── @@ -159,6 +160,7 @@ enum DataKey { EpochStart, Limits, DefaultProvider, + TransferNonceFor(Address, u32), } // ── Constants ────────────────────────────────────────────────────────────── @@ -441,21 +443,23 @@ impl BridgeCompat { return Err(BridgeError::InsufficientBalance); } - // Transfer tokens from sender to this contract - token_client.transfer(&sender, &env.current_contract_address(), &amount); - - // Create transfer record - let transfer_id = env + // Nonces are monotonic within a sender/provider domain. Transfer IDs + // additionally bind that nonce to both identities so they cannot be + // confused with replay nonces or reused across providers. + let nonce_key = DataKey::TransferNonceFor(sender.clone(), pid); + let previous_nonce = env .storage() .instance() - .get::<_, u64>(&DataKey::TransferNonce) - .unwrap_or(0) - + 1; - let nonce = env - .storage() - .instance() - .get::<_, u64>(&DataKey::TransferNonce) + .get::<_, u64>(&nonce_key) .unwrap_or(0); + let nonce = previous_nonce + .checked_add(1) + .ok_or(BridgeError::NonceAlreadyUsed)?; + let transfer_id = Self::derive_transfer_id(&env, &sender, nonce, pid); + let transfer_key = DataKey::Transfer(transfer_id); + if env.storage().instance().has(&transfer_key) { + return Err(BridgeError::NonceAlreadyUsed); + } let transfer = BridgeTransfer { transfer_id, @@ -473,10 +477,10 @@ impl BridgeCompat { env.storage() .instance() - .set(&DataKey::Transfer(transfer_id), &transfer); + .set(&transfer_key, &transfer); env.storage() .instance() - .set(&DataKey::TransferNonce, &(transfer_id)); + .set(&nonce_key, &nonce); // Update user transfer count let user_count: i128 = env @@ -490,10 +494,14 @@ impl BridgeCompat { ); env.events().publish( - (symbol_short!("brgout"), sender), + (symbol_short!("brgout"), sender.clone()), (transfer_id, amount, dest_chain, pid), ); + // Persist the nonce and transfer record before the token interaction. + // A callback therefore cannot observe or reuse an uncommitted nonce. + token_client.transfer(&sender, &env.current_contract_address(), &amount); + Ok(transfer_id) } @@ -602,6 +610,17 @@ impl BridgeCompat { .ok_or(BridgeError::ProviderNotFound) } + fn derive_transfer_id(env: &Env, sender: &Address, nonce: u64, provider_id: u32) -> u64 { + let mut payload = sender.to_xdr(env); + payload.append(&nonce.to_xdr(env)); + payload.append(&provider_id.to_xdr(env)); + let digest = env.crypto().sha256(&payload).to_array(); + u64::from_be_bytes([ + digest[0], digest[1], digest[2], digest[3], + digest[4], digest[5], digest[6], digest[7], + ]) + } + fn check_epoch_volume( env: &Env, amount: i128, @@ -733,6 +752,80 @@ mod tests { assert_eq!(limits.epoch_duration, 86_400); } + #[test] + fn transfer_ids_are_context_bound_and_duplicate_ids_are_rejected() { + let env = Env::default(); + env.mock_all_auths(); + + let bridge_id = env.register(BridgeCompat, ()); + let client = BridgeCompatClient::new(&env, &bridge_id); + let admin = Address::generate(&env); + let token_admin = Address::generate(&env); + let token_id = env + .register_stellar_asset_contract_v2(token_admin.clone()) + .address(); + let token_admin_client = soroban_sdk::token::StellarAssetClient::new(&env, &token_id); + client.initialize(&admin, &token_id); + + let sender_a = Address::generate(&env); + let sender_b = Address::generate(&env); + token_admin_client.mint(&bridge_id, &1_000); + token_admin_client.mint(&sender_a, &300); + token_admin_client.mint(&sender_b, &300); + + let endpoint_a = Address::generate(&env); + let endpoint_b = Address::generate(&env); + let chains = Vec::from_array(&env, &[1u32]); + let provider_a = client.register_provider( + &String::from_str(&env, "provider-a"), + &BridgeProviderKind::Wormhole, + &endpoint_a, + &0, + &1_000, + &chains, + ); + let provider_b = client.register_provider( + &String::from_str(&env, "provider-b"), + &BridgeProviderKind::LayerZero, + &endpoint_b, + &0, + &1_000, + &chains, + ); + let recipient = Bytes::new(&env); + + let id_a = client.transfer_out(&sender_a, &recipient, &100, &1, &Some(provider_a)); + let id_b = client.transfer_out(&sender_b, &recipient, &100, &1, &Some(provider_b)); + let id_a_next = client.transfer_out(&sender_a, &recipient, &100, &1, &Some(provider_a)); + + let transfer_a = client.transfer(&id_a).unwrap(); + let transfer_b = client.transfer(&id_b).unwrap(); + let transfer_a_next = client.transfer(&id_a_next).unwrap(); + assert_eq!(transfer_a.nonce, 1); + assert_eq!(transfer_b.nonce, 1); + assert_eq!(transfer_a_next.nonce, 2); + assert_ne!(id_a, transfer_a.nonce); + assert_ne!(id_a, id_b); + assert_ne!(id_a, id_a_next); + assert_eq!(transfer_a.transfer_id, id_a); + + // Simulate replayed nonce state: the derived ID is already occupied, + // so a transfer must fail instead of replacing the original record. + env.as_contract(&bridge_id, || { + env.storage().instance().set( + &DataKey::TransferNonceFor(sender_a.clone(), provider_a), + &0u64, + ); + }); + let duplicate = client.try_transfer_out( + &sender_a, + &recipient, + &100, + &1, + &Some(provider_a), + ); + assert_eq!(duplicate, Err(Ok(BridgeError::NonceAlreadyUsed))); + assert_eq!(client.transfer(&id_a), Some(transfer_a)); // ── Acceptance Criteria Tests ──────────────────────────────────────────── #[test] diff --git a/contracts/share-price-math/src/fuzz_invariants.rs b/contracts/share-price-math/src/fuzz_invariants.rs index fe208a36e..19b8e1b35 100644 --- a/contracts/share-price-math/src/fuzz_invariants.rs +++ b/contracts/share-price-math/src/fuzz_invariants.rs @@ -1,12 +1,12 @@ //! Share-price math invariants shared by proptest and libFuzzer. -use crate::{try_assets_to_shares, try_shares_to_assets}; +use crate::{try_assets_to_shares, try_shares_to_assets, MathError}; -fn shares_for(assets: i128, total_shares: i128, total_assets: i128) -> Option { +fn shares_for(assets: i128, total_shares: i128, total_assets: i128) -> Result { try_assets_to_shares(assets, total_shares, total_assets) } -fn assets_for(shares: i128, total_shares: i128, total_assets: i128) -> Option { +fn assets_for(shares: i128, total_shares: i128, total_assets: i128) -> Result { try_shares_to_assets(shares, total_shares, total_assets) } @@ -80,19 +80,20 @@ pub fn assert_share_price_invariants( let _ = assets_for(assets.min(total_shares.max(1)), total_shares, total_assets); if total_shares == 0 && total_assets == 0 { - let shares = shares_for(assets, 0, 0).expect("bootstrap shares"); - assert_eq!( - shares, assets, - "first deposit must be 1:1: assets={assets} shares={shares}" - ); + if let Ok(shares) = shares_for(assets, 0, 0) { + assert_eq!( + shares, assets, + "first deposit must be 1:1: assets={assets} shares={shares}" + ); + } } - if let Some(shares) = shares_for(assets, total_shares, total_assets) { + if let Ok(shares) = shares_for(assets, total_shares, total_assets) { if let (Some(new_shares), Some(new_assets)) = ( total_shares.checked_add(shares), total_assets.checked_add(assets), ) { - if let Some(returned) = assets_for(shares, new_shares, new_assets) { + if let Ok(returned) = assets_for(shares, new_shares, new_assets) { assert!( returned <= assets, "round-trip returned more than deposited: {returned} > {assets}" @@ -102,9 +103,9 @@ pub fn assert_share_price_invariants( } let probe_shares = assets.min(total_shares.max(1)); - let before = assets_for(probe_shares, total_shares, total_assets); + let before = assets_for(probe_shares, total_shares, total_assets).ok(); if let Some(after_total_assets) = total_assets.checked_add(yield_amount) { - let after = assets_for(probe_shares, total_shares, after_total_assets); + let after = assets_for(probe_shares, total_shares, after_total_assets).ok(); if let (Some(before), Some(after)) = (before, after) { assert!( after >= before, diff --git a/contracts/share-price-math/src/lib.rs b/contracts/share-price-math/src/lib.rs index f4f3a0361..e27c47ceb 100644 --- a/contracts/share-price-math/src/lib.rs +++ b/contracts/share-price-math/src/lib.rs @@ -16,50 +16,67 @@ pub mod fuzz_invariants; pub mod rounding; -/// Checked variant of [`assets_to_shares`] for fuzzing and property tests. +/// Error returned when checked math cannot produce an i128 result. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub enum MathError { + Overflow, + DivisionByZero, +} + +/// Checked assets-to-shares conversion using round-down arithmetic. /// -/// Returns `None` when intermediate multiplication would overflow i128. -pub fn try_assets_to_shares(assets: i128, total_shares: i128, total_assets: i128) -> Option { +/// An empty vault (zero shares or assets) uses a 1:1 conversion. +pub fn try_assets_to_shares( + assets: i128, + total_shares: i128, + total_assets: i128, +) -> Result { if total_assets == 0 || total_shares == 0 { - return Some(assets); + return Ok(assets); } - assets.checked_mul(total_shares)?.checked_div(total_assets) + let product = assets + .checked_mul(total_shares) + .ok_or(MathError::Overflow)?; + product + .checked_div(total_assets) + .ok_or(MathError::Overflow) } -/// Checked variant of [`shares_to_assets`] for fuzzing and property tests. +/// Checked shares-to-assets conversion using round-down arithmetic. /// -/// Returns `None` when intermediate multiplication would overflow i128. -pub fn try_shares_to_assets(shares: i128, total_shares: i128, total_assets: i128) -> Option { +/// A vault with no outstanding shares redeems to zero. +pub fn try_shares_to_assets( + shares: i128, + total_shares: i128, + total_assets: i128, +) -> Result { if total_shares == 0 { - return Some(0); + return Ok(0); } - shares.checked_mul(total_assets)?.checked_div(total_shares) + let product = shares + .checked_mul(total_assets) + .ok_or(MathError::Overflow)?; + product + .checked_div(total_shares) + .ok_or(MathError::Overflow) } /// Converts assets to shares using the current vault state (round-down). -pub fn assets_to_shares(assets: i128, total_shares: i128, total_assets: i128) -> i128 { - if total_assets == 0 || total_shares == 0 { - return assets; - } - - assets - .checked_mul(total_shares) - .expect("overflow in assets_to_shares multiplication") - .checked_div(total_assets) - .expect("division by zero in assets_to_shares") +pub fn assets_to_shares( + assets: i128, + total_shares: i128, + total_assets: i128, +) -> Result { + try_assets_to_shares(assets, total_shares, total_assets) } /// Converts shares to assets using the current vault state (round-down). -pub fn shares_to_assets(shares: i128, total_shares: i128, total_assets: i128) -> i128 { - if total_shares == 0 { - return 0; - } - - shares - .checked_mul(total_assets) - .expect("overflow in shares_to_assets multiplication") - .checked_div(total_shares) - .expect("division by zero in shares_to_assets") +pub fn shares_to_assets( + shares: i128, + total_shares: i128, + total_assets: i128, +) -> Result { + try_shares_to_assets(shares, total_shares, total_assets) } #[cfg(test)] @@ -68,21 +85,32 @@ mod tests { #[test] fn test_first_deposit_one_to_one() { - let shares = assets_to_shares(1000, 0, 0); + let shares = assets_to_shares(1000, 0, 0).unwrap(); assert_eq!(shares, 1000); } #[test] fn test_round_trip_never_increases_value() { let original_assets = 300; - let shares = assets_to_shares(original_assets, 1000, 1500); - let recovered_assets = shares_to_assets(shares, 1000 + shares, 1500 + original_assets); + let shares = assets_to_shares(original_assets, 1000, 1500).unwrap(); + let recovered_assets = + shares_to_assets(shares, 1000 + shares, 1500 + original_assets).unwrap(); assert!(recovered_assets <= original_assets); } #[test] - #[should_panic(expected = "overflow")] fn test_overflow_protection_assets_to_shares() { - let _ = assets_to_shares(i128::MAX, i128::MAX, 1); + assert_eq!( + try_assets_to_shares(i128::MAX, i128::MAX, 1), + Err(MathError::Overflow) + ); + } + + #[test] + fn test_overflow_protection_shares_to_assets() { + assert_eq!( + try_shares_to_assets(i128::MAX, 1, i128::MAX), + Err(MathError::Overflow) + ); } } diff --git a/contracts/share-price-math/src/rounding.rs b/contracts/share-price-math/src/rounding.rs index 9d6456167..ebe8f5750 100644 --- a/contracts/share-price-math/src/rounding.rs +++ b/contracts/share-price-math/src/rounding.rs @@ -3,6 +3,8 @@ //! The vault must never round in the user's favour: rounding always leaves the //! residual dust with the vault, so `deposit -> withdraw` round trips can never //! mint value out of nothing. + +use crate::MathError; //! //! | Operation | Direction | Rounding | //! |------------|-----------|----------| @@ -66,24 +68,23 @@ impl Op { /// `a * b / denom` with an explicit rounding direction. /// -/// Returns `None` on i128 overflow or a zero denominator so callers can map the -/// failure onto a contract error instead of panicking. -pub fn mul_div(a: i128, b: i128, denom: i128, rounding: Rounding) -> Option { +/// Returns an error on i128 overflow or a zero denominator. +pub fn mul_div(a: i128, b: i128, denom: i128, rounding: Rounding) -> Result { if denom == 0 { - return None; + return Err(MathError::DivisionByZero); } - let product = a.checked_mul(b)?; - let quotient = product.checked_div(denom)?; + let product = a.checked_mul(b).ok_or(MathError::Overflow)?; + let quotient = product.checked_div(denom).ok_or(MathError::Overflow)?; match rounding { - Rounding::Down => Some(quotient), + Rounding::Down => Ok(quotient), Rounding::Up => { - let remainder = product.checked_rem(denom)?; + let remainder = product.checked_rem(denom).ok_or(MathError::Overflow)?; if remainder == 0 { - Some(quotient) + Ok(quotient) } else { - quotient.checked_add(1) + quotient.checked_add(1).ok_or(MathError::Overflow) } } } @@ -97,9 +98,9 @@ pub fn assets_to_shares_rounded( total_shares: i128, total_assets: i128, op: Op, -) -> Option { +) -> Result { if total_assets == 0 || total_shares == 0 { - return Some(assets); + return Ok(assets); } mul_div(assets, total_shares, total_assets, op.rounding()) } @@ -112,9 +113,9 @@ pub fn shares_to_assets_rounded( total_shares: i128, total_assets: i128, op: Op, -) -> Option { +) -> Result { if total_shares == 0 { - return Some(0); + return Ok(0); } mul_div(shares, total_assets, total_shares, op.rounding()) } @@ -218,7 +219,7 @@ pub const FIXTURES: &[RoundingFixture] = &[ ]; /// Evaluates a fixture with the production conversion helpers. -pub fn evaluate(fixture: &RoundingFixture) -> Option { +pub fn evaluate(fixture: &RoundingFixture) -> Result { match fixture.op { Op::Deposit | Op::Withdraw => assets_to_shares_rounded( fixture.amount, @@ -244,7 +245,7 @@ mod tests { for fixture in FIXTURES { assert_eq!( evaluate(fixture), - Some(fixture.expected), + Ok(fixture.expected), "fixture `{}` diverged from the rounding policy", fixture.id ); @@ -253,19 +254,28 @@ mod tests { #[test] fn mul_div_rejects_zero_denominator() { - assert_eq!(mul_div(10, 10, 0, Rounding::Down), None); - assert_eq!(mul_div(10, 10, 0, Rounding::Up), None); + assert_eq!( + mul_div(10, 10, 0, Rounding::Down), + Err(MathError::DivisionByZero) + ); + assert_eq!( + mul_div(10, 10, 0, Rounding::Up), + Err(MathError::DivisionByZero) + ); } #[test] fn mul_div_rejects_overflow() { - assert_eq!(mul_div(i128::MAX, 2, 3, Rounding::Down), None); + assert_eq!( + mul_div(i128::MAX, 2, 3, Rounding::Down), + Err(MathError::Overflow) + ); } #[test] fn rounding_up_only_bumps_on_remainder() { - assert_eq!(mul_div(10, 3, 5, Rounding::Up), Some(6)); - assert_eq!(mul_div(10, 3, 4, Rounding::Up), Some(8)); + assert_eq!(mul_div(10, 3, 5, Rounding::Up), Ok(6)); + assert_eq!(mul_div(10, 3, 4, Rounding::Up), Ok(8)); } #[test] diff --git a/contracts/vault/src/external_calls.rs b/contracts/vault/src/external_calls.rs index cfd52e6de..04936cfe1 100644 --- a/contracts/vault/src/external_calls.rs +++ b/contracts/vault/src/external_calls.rs @@ -3,18 +3,12 @@ //! This module documents all external calls made by the vault and ensures they follow //! the Checks-Effects-Interactions (CEI) pattern to prevent reentrancy vulnerabilities. //! -//! # Reentrancy Notes (Soroban) +//! # CEI Ordering //! -//! Soroban's model provides inherent protection against reentrancy: -//! - Contract calls are atomic within a transaction -//! - State changes are committed atomically -//! - No recursive calls can occur during execution -//! - Each contract invocation gets its own execution frame -//! -//! However, following CEI pattern still applies for: -//! - Logical correctness and state consistency -//! - Preventing state from being observed in invalid intermediate states -//! - Clear audit trail and intent +//! For every external interaction, finish validation first, persist all state +//! effects second, and invoke the external contract last. This keeps callbacks +//! from observing stale accounting. Transaction atomicity rolls these effects +//! back if the interaction fails; it does not replace correct call ordering. //! //! See [`docs/CONTRACTS_ARCHITECTURE.md`](../../docs/CONTRACTS_ARCHITECTURE.md) for details. @@ -26,25 +20,38 @@ pub fn validate_external_call_precondition(condition: bool, msg: &str) { } } -/// Documents that a call follows CEI pattern -/// (Checks → Effects → Interactions) +/// Runs the three CEI phases in order: checks, effects, then interactions. +/// +/// Keep external contract calls exclusively in the `interactions` block. The +/// scoped blocks make the order executable and testable, not just documentary. #[macro_export] macro_rules! cei_pattern { - ($name:expr, checks: $checks:expr, effects: $effects:expr, interactions: $interactions:expr) => { - // This macro documents the CEI pattern for code review - // Structure: - // 1. Checks: $checks - // 2. Effects: $effects - // 3. Interactions: $interactions - }; + ($name:expr, checks: $checks:block, effects: $effects:block, interactions: $interactions:block) => {{ + let _cei_operation = $name; + $checks + $effects + $interactions + }}; } #[cfg(test)] mod tests { #[test] - fn test_external_calls_inventory_documented() { - // This test verifies that all external calls are documented - // Actual reentrancy protections are tested via integration tests + fn test_cei_phases_run_in_order() { + let mut state_updated = false; + + crate::cei_pattern!( + "test operation", + checks: { + assert!(!state_updated); + }, + effects: { + state_updated = true; + }, + interactions: { + assert!(state_updated); + } + ); } } diff --git a/contracts/vault/src/fee_math.rs b/contracts/vault/src/fee_math.rs index 2eaa9502d..067f43baa 100644 --- a/contracts/vault/src/fee_math.rs +++ b/contracts/vault/src/fee_math.rs @@ -16,32 +16,40 @@ pub const BPS_DENOMINATOR: i128 = 10_000; pub const MAX_TREASURY_ACCUMULATOR: i128 = i128::MAX / 2; +use crate::VaultError; + /// Compute protocol fee and net amount using floor rounding. /// /// Returns `(fee_amount, net_amount)` where `fee_amount + net_amount == amount`. -pub fn calculate_protocol_fee(amount: i128, fee_bps: i128) -> (i128, i128) { - assert!(amount >= 0, "amount must be non-negative"); - assert!( - (0..=BPS_DENOMINATOR).contains(&fee_bps), - "fee_bps out of range" - ); +pub fn calculate_protocol_fee( + amount: i128, + fee_bps: i128, +) -> Result<(i128, i128), VaultError> { + if amount < 0 { + return Err(VaultError::InvalidAmount); + } + if !(0..=BPS_DENOMINATOR).contains(&fee_bps) { + return Err(VaultError::InvalidFeeBps); + } if amount == 0 || fee_bps == 0 { - return (0, amount); - } - - let fee_amount = amount.checked_mul(fee_bps).expect("fee overflow") / BPS_DENOMINATOR; - let net_amount = amount - fee_amount; - assert!( - fee_amount >= 0 && net_amount >= 0, - "fee accounting invariant violated: negative fee share" - ); - assert_eq!( - fee_amount + net_amount, - amount, - "fee accounting invariant violated: fee + net != amount" - ); - (fee_amount, net_amount) + return Ok((0, amount)); + } + + let whole_fee = (amount / BPS_DENOMINATOR) + .checked_mul(fee_bps) + .ok_or(VaultError::MathOverflow)?; + let fractional_fee = (amount % BPS_DENOMINATOR) + .checked_mul(fee_bps) + .ok_or(VaultError::MathOverflow)? + / BPS_DENOMINATOR; + let fee_amount = whole_fee + .checked_add(fractional_fee) + .ok_or(VaultError::MathOverflow)?; + let net_amount = amount + .checked_sub(fee_amount) + .ok_or(VaultError::MathOverflow)?; + Ok((fee_amount, net_amount)) } /// Check if accumulating a fee amount would exceed the bounded accumulator. @@ -53,7 +61,16 @@ pub fn would_exceed_accumulator_bound(current_balance: i128, fee_to_add: i128) - #[cfg(test)] mod tests { - use super::*; + use super::{ + calculate_protocol_fee as try_calculate_protocol_fee, would_exceed_accumulator_bound, + MAX_TREASURY_ACCUMULATOR, + }; + use crate::VaultError; + use proptest::prelude::*; + + fn calculate_protocol_fee(amount: i128, fee_bps: i128) -> (i128, i128) { + try_calculate_protocol_fee(amount, fee_bps).unwrap() + } #[test] fn test_zero_amount_zero_fee() { @@ -164,21 +181,56 @@ mod tests { } #[test] - #[should_panic(expected = "fee_bps out of range")] fn test_rejects_negative_bps() { - calculate_protocol_fee(100, -1); + assert_eq!( + try_calculate_protocol_fee(100, -1), + Err(VaultError::InvalidFeeBps) + ); } #[test] - #[should_panic(expected = "fee_bps out of range")] fn test_rejects_bps_above_denominator() { - calculate_protocol_fee(100, 10_001); + assert_eq!( + try_calculate_protocol_fee(100, 10_001), + Err(VaultError::InvalidFeeBps) + ); } #[test] - #[should_panic(expected = "amount must be non-negative")] fn test_rejects_negative_amount() { - calculate_protocol_fee(-1, 100); + assert_eq!( + try_calculate_protocol_fee(-1, 100), + Err(VaultError::InvalidAmount) + ); + } + + #[test] + fn test_maximum_amount_does_not_overflow() { + assert_eq!( + try_calculate_protocol_fee(i128::MAX, 10_000), + Ok((i128::MAX, 0)) + ); + } + + proptest! { + #[test] + fn protocol_fee_is_conservative( + amount in 0i128..=i128::MAX, + fee_bps in 0i128..=10_000, + ) { + let (fee, net) = try_calculate_protocol_fee(amount, fee_bps).unwrap(); + prop_assert!(fee >= 0 && net >= 0); + prop_assert!(fee <= amount && net <= amount); + prop_assert_eq!(fee.checked_add(net), Some(amount)); + } + } + + #[test] + fn test_math_overflow_is_returned() { + assert_eq!( + try_calculate_protocol_fee(i128::MAX, 5_000), + Ok((i128::MAX / 2, i128::MAX - i128::MAX / 2)) + ); } #[test] diff --git a/contracts/vault/src/fuzz_math.rs b/contracts/vault/src/fuzz_math.rs index 1a24c0161..a4275e86c 100644 --- a/contracts/vault/src/fuzz_math.rs +++ b/contracts/vault/src/fuzz_math.rs @@ -67,11 +67,14 @@ proptest! { total_shares in pos_i128(), total_assets in pos_i128(), ) { - // The function returns None on overflow – assert it always returns Some - // for the range where the intermediate product fits in i128. + // The function returns an error on overflow. // For inputs where overflow would occur, checked_mul returns None which // is the correct safe behaviour; we just verify no panic occurs. - let _ = shares_for(assets, total_shares, total_assets); + let expected = assets + .checked_mul(total_shares) + .and_then(|product| product.checked_div(total_assets)) + .ok_or(MathError::Overflow); + prop_assert_eq!(shares_for(assets, total_shares, total_assets), expected); } /// `assets_for` must never overflow for any positive inputs. @@ -81,7 +84,11 @@ proptest! { total_shares in pos_i128(), total_assets in pos_i128(), ) { - let _ = assets_for(shares, total_shares, total_assets); + let expected = shares + .checked_mul(total_assets) + .and_then(|product| product.checked_div(total_shares)) + .ok_or(MathError::Overflow); + prop_assert_eq!(assets_for(shares, total_shares, total_assets), expected); } /// Round-trip: assets_for(shares_for(a)) <= a (no value extraction). @@ -90,8 +97,8 @@ proptest! { assets in 1i128..=1_000_000_000_000i128, (total_shares, total_assets) in vault_state(), ) { - if let Some(shares) = shares_for(assets, total_shares, total_assets) { - if let Some(returned) = assets_for(shares, total_shares + shares, total_assets + assets) { + if let Ok(shares) = shares_for(assets, total_shares, total_assets) { + if let Ok(returned) = assets_for(shares, total_shares + shares, total_assets + assets) { // Due to integer division, returned <= assets always. prop_assert!( returned <= assets, @@ -112,7 +119,7 @@ proptest! { ) { let sa = shares_for(a, total_shares, total_assets); let sb = shares_for(b, total_shares, total_assets); - if let (Some(sa), Some(sb)) = (sa, sb) { + if let (Ok(sa), Ok(sb)) = (sa, sb) { if a < b { prop_assert!(sa <= sb, "shares not monotone: shares({})={} > shares({})={}", a, sa, b, sb); } @@ -128,7 +135,7 @@ proptest! { ) { let a1 = assets_for(s1, total_shares, total_assets); let a2 = assets_for(s2, total_shares, total_assets); - if let (Some(a1), Some(a2)) = (a1, a2) { + if let (Ok(a1), Ok(a2)) = (a1, a2) { if s1 < s2 { prop_assert!(a1 <= a2, "assets not monotone: assets({})={} > assets({})={}", s1, a1, s2, a2); } @@ -152,7 +159,7 @@ proptest! { ) { let before = assets_for(shares, total_shares, total_assets); let after = assets_for(shares, total_shares, total_assets + yield_amount); - if let (Some(before), Some(after)) = (before, after) { + if let (Ok(before), Ok(after)) = (before, after) { prop_assert!( after >= before, "yield accrual decreased redemption value: {} < {}", diff --git a/contracts/vault/src/lib.rs b/contracts/vault/src/lib.rs index 761136c19..c808f6cfa 100644 --- a/contracts/vault/src/lib.rs +++ b/contracts/vault/src/lib.rs @@ -1578,7 +1578,8 @@ impl YieldVault { .get(&DataKeyExt::PerformanceFeeBps) .unwrap_or(0); if perf_fee_bps > 0 { - let (pf, _) = fee_math::calculate_protocol_fee(yield_above_hwm, perf_fee_bps); + let (pf, _) = + fee_math::calculate_protocol_fee(yield_above_hwm, perf_fee_bps)?; perf_fee_amount = pf; if perf_fee_amount > 0 { if let Some(pool) = Self::performance_incentive_pool(env.clone()) { @@ -2089,7 +2090,7 @@ impl YieldVault { pub fn calculate_shares(env: Env, assets: i128) -> Result { let state = Self::get_state(&env); crate::math::try_assets_to_shares(assets, state.total_shares, state.total_assets) - .ok_or(VaultError::MathOverflow) + .map_err(|_| VaultError::MathOverflow) } /// Calculates the number of assets that would be returned for a given share amount. @@ -2108,7 +2109,7 @@ impl YieldVault { pub fn calculate_assets(env: Env, shares: i128) -> Result { let state = Self::get_state(&env); crate::math::try_shares_to_assets(shares, state.total_shares, state.total_assets) - .ok_or(VaultError::MathOverflow) + .map_err(|_| VaultError::MathOverflow) } /// Deposits underlying tokens in exchange for vault shares. @@ -2156,7 +2157,7 @@ impl YieldVault { // Use centralized conversion with deterministic round-down policy let shares_to_mint = crate::math::try_assets_to_shares(amount, state.total_shares, state.total_assets) - .ok_or(VaultError::MathOverflow)?; + .map_err(|_| VaultError::MathOverflow)?; // Prevent silent loss of funds if shares round down to 0 if shares_to_mint == 0 { @@ -2165,7 +2166,9 @@ impl YieldVault { let deposit_key = DataKey::UserDeposit(user.clone()); let current_deposit: i128 = env.storage().instance().get(&deposit_key).unwrap_or(0); - let new_deposit = current_deposit.checked_add(amount).expect("overflow"); + let new_deposit = current_deposit + .checked_add(amount) + .ok_or(VaultError::MathOverflow)?; let cap: i128 = env .storage() @@ -2176,10 +2179,6 @@ impl YieldVault { return Err(VaultError::ExceedsUserCap); } - token_client.transfer(&user, &env.current_contract_address(), &amount); - - env.storage().instance().set(&deposit_key, &new_deposit); - // Update idle state // Dust handling: sweep any deposit truncation dust to the treasury. let effective_assets = if state.total_shares == 0 { @@ -2190,58 +2189,67 @@ impl YieldVault { state.total_shares, state.total_assets, ) - .ok_or(VaultError::MathOverflow)? + .map_err(|_| VaultError::MathOverflow)? }; let dust = amount.checked_sub(effective_assets).unwrap_or(0); - if dust > 0 { - let mut treasury_bal: i128 = env - .storage() - .instance() - .get(&DataKey::TreasuryBalance) - .unwrap_or(0); - treasury_bal = treasury_bal.checked_add(dust).expect("overflow"); - env.storage() - .instance() - .set(&DataKey::TreasuryBalance, &treasury_bal); - } - - // Canonical idle assets live in VaultState. - state.total_assets = state - .total_assets - .checked_add(effective_assets) - .expect("overflow"); - state.total_shares = state - .total_shares - .checked_add(shares_to_mint) - .expect("overflow"); - Self::persist_accounting_state(&env, &state)?; - Self::bump_idle_accounting(&env, effective_assets, shares_to_mint); - let user_key = DataKey::ShareBalance(user.clone()); let user_shares: i128 = env.storage().instance().get(&user_key).unwrap_or(0); - env.storage().instance().set( - &user_key, - &user_shares.checked_add(shares_to_mint).expect("overflow"), - ); - - // Track last deposit time for withdrawal cooldown - env.storage().instance().set( - &DataKey::LastDepositTime(user.clone()), - &env.ledger().timestamp(), - ); + let updated_user_shares = user_shares + .checked_add(shares_to_mint) + .ok_or(VaultError::MathOverflow)?; + crate::cei_pattern!( + "deposit", + checks: { + assert!(shares_to_mint > 0 && new_deposit <= cap); + }, + effects: { + env.storage().instance().set(&deposit_key, &new_deposit); - env.events().publish( - (symbol_short!("deposit"), user.clone()), - (amount, shares_to_mint), - ); + if dust > 0 { + let treasury_bal: i128 = env + .storage() + .instance() + .get(&DataKey::TreasuryBalance) + .unwrap_or(0); + env.storage().instance().set( + &DataKey::TreasuryBalance, + &treasury_bal + .checked_add(dust) + .ok_or(VaultError::MathOverflow)?, + ); + } - crate::audit_events::emit_deposit( - &env, - &user, - amount, - shares_to_mint, - env.ledger().timestamp(), + state.total_assets = state + .total_assets + .checked_add(effective_assets) + .ok_or(VaultError::MathOverflow)?; + state.total_shares = state + .total_shares + .checked_add(shares_to_mint) + .ok_or(VaultError::MathOverflow)?; + Self::persist_accounting_state(&env, &state)?; + Self::bump_idle_accounting(&env, effective_assets, shares_to_mint); + env.storage().instance().set(&user_key, &updated_user_shares); + env.storage().instance().set( + &DataKey::LastDepositTime(user.clone()), + &env.ledger().timestamp(), + ); + env.events().publish( + (symbol_short!("deposit"), user.clone()), + (amount, shares_to_mint), + ); + crate::audit_events::emit_deposit( + &env, + &user, + amount, + shares_to_mint, + env.ledger().timestamp(), + ); + }, + interactions: { + token_client.transfer(&user, &env.current_contract_address(), &amount); + } ); Ok(shares_to_mint) @@ -2346,7 +2354,7 @@ impl YieldVault { // Compute shares using deterministic round-down policy let shares_to_mint = crate::math::try_assets_to_shares(amount, state.total_shares, state.total_assets) - .ok_or(VaultError::MathOverflow)?; + .map_err(|_| VaultError::MathOverflow)?; if shares_to_mint == 0 { return Err(VaultError::InvalidAmount); @@ -2355,7 +2363,9 @@ impl YieldVault { // Per-user deposit cap check let deposit_key = DataKey::UserDeposit(user.clone()); let current_deposit: i128 = env.storage().instance().get(&deposit_key).unwrap_or(0); - let new_deposit = current_deposit.checked_add(amount).expect("overflow"); + let new_deposit = current_deposit + .checked_add(amount) + .ok_or(VaultError::MathOverflow)?; let cap: i128 = env .storage() .instance() @@ -2365,11 +2375,6 @@ impl YieldVault { return Err(VaultError::ExceedsUserCap); } - // User must have pre-authorized the token transfer - token_client.transfer(&user, &env.current_contract_address(), &amount); - - env.storage().instance().set(&deposit_key, &new_deposit); - // Dust handling let effective_assets = if state.total_shares == 0 { amount @@ -2379,49 +2384,58 @@ impl YieldVault { state.total_shares, state.total_assets, ) - .ok_or(VaultError::MathOverflow)? + .map_err(|_| VaultError::MathOverflow)? }; let dust = amount.checked_sub(effective_assets).unwrap_or(0); - if dust > 0 { - let mut treasury_bal: i128 = env - .storage() - .instance() - .get(&DataKey::TreasuryBalance) - .unwrap_or(0); - treasury_bal = treasury_bal.checked_add(dust).expect("overflow"); - env.storage() - .instance() - .set(&DataKey::TreasuryBalance, &treasury_bal); - } - - state.total_assets = state - .total_assets - .checked_add(effective_assets) - .expect("overflow"); - state.total_shares = state - .total_shares - .checked_add(shares_to_mint) - .expect("overflow"); - Self::persist_accounting_state(&env, &state)?; - Self::bump_idle_accounting(&env, effective_assets, shares_to_mint); - let user_key = DataKey::ShareBalance(user.clone()); let user_shares: i128 = env.storage().instance().get(&user_key).unwrap_or(0); - env.storage().instance().set( - &user_key, - &user_shares.checked_add(shares_to_mint).expect("overflow"), - ); - - // Track last deposit time for withdrawal cooldown - env.storage().instance().set( - &DataKey::LastDepositTime(user.clone()), - &env.ledger().timestamp(), - ); - - env.events().publish( - (symbol_short!("glessdep"), relayer.clone()), - (user, amount, shares_to_mint), + let updated_user_shares = user_shares + .checked_add(shares_to_mint) + .ok_or(VaultError::MathOverflow)?; + crate::cei_pattern!( + "gasless_deposit", + checks: { + assert!(shares_to_mint > 0 && new_deposit <= cap); + }, + effects: { + env.storage().instance().set(&deposit_key, &new_deposit); + if dust > 0 { + let treasury_bal: i128 = env + .storage() + .instance() + .get(&DataKey::TreasuryBalance) + .unwrap_or(0); + env.storage().instance().set( + &DataKey::TreasuryBalance, + &treasury_bal + .checked_add(dust) + .ok_or(VaultError::MathOverflow)?, + ); + } + state.total_assets = state + .total_assets + .checked_add(effective_assets) + .ok_or(VaultError::MathOverflow)?; + state.total_shares = state + .total_shares + .checked_add(shares_to_mint) + .ok_or(VaultError::MathOverflow)?; + Self::persist_accounting_state(&env, &state)?; + Self::bump_idle_accounting(&env, effective_assets, shares_to_mint); + env.storage().instance().set(&user_key, &updated_user_shares); + env.storage().instance().set( + &DataKey::LastDepositTime(user.clone()), + &env.ledger().timestamp(), + ); + env.events().publish( + (symbol_short!("glessdep"), relayer.clone()), + (user.clone(), amount, shares_to_mint), + ); + }, + interactions: { + token_client.transfer(&user, &env.current_contract_address(), &amount); + } ); Ok(shares_to_mint) } @@ -2633,7 +2647,7 @@ impl YieldVault { // Compute shares using current in-memory state (updated incrementally) let shares_to_mint = crate::math::try_assets_to_shares(amount, state.total_shares, state.total_assets) - .ok_or(VaultError::MathOverflow)?; + .map_err(|_| VaultError::MathOverflow)?; if shares_to_mint == 0 { return Err(VaultError::InvalidAmount); @@ -2742,7 +2756,7 @@ impl YieldVault { // Use centralized conversion with deterministic round-down policy let assets_to_return = crate::math::try_shares_to_assets(shares, state.total_shares, state.total_assets) - .ok_or(VaultError::MathOverflow)?; + .map_err(|_| VaultError::MathOverflow)?; if assets_to_return > threshold { // Create a pending withdrawal with a 24-hour timelock @@ -2795,7 +2809,7 @@ impl YieldVault { state.total_shares, state.total_assets, ) - .ok_or(VaultError::MathOverflow)?; + .map_err(|_| VaultError::MathOverflow)?; Self::do_withdraw(&env, &mut state, user, pending.shares, assets_to_return) } @@ -3100,21 +3114,28 @@ impl YieldVault { &Self::load_protocol_limits(&env), )?; - // Approve and deposit to strategy let token_client = token::Client::new(&env, &token_addr); - token_client.approve( - &env.current_contract_address(), - &strategy_addr, - &amount, - &env.ledger().sequence(), + crate::cei_pattern!( + "invest", + checks: { + assert!(amount > 0 && state.total_assets >= amount); + assert!(new_total_invested <= cap); + }, + effects: { + Self::raise_strategy_watermark(&env, &strategy_addr, new_total_invested); + state.total_assets = remaining_idle; + env.storage().instance().set(&DataKey::State, &state); + }, + interactions: { + token_client.approve( + &env.current_contract_address(), + &strategy_addr, + &amount, + &env.ledger().sequence(), + ); + strategy_client.deposit(&amount); + } ); - - strategy_client.deposit(&amount); - Self::raise_strategy_watermark(&env, &strategy_addr, new_total_invested); - - // Update idle assets - state.total_assets = remaining_idle; - env.storage().instance().set(&DataKey::State, &state); Ok(()) } @@ -3285,22 +3306,7 @@ impl YieldVault { } let fee_bps: i128 = env.storage().instance().get(&DataKey::FeeBps).unwrap_or(0); - let fee_amount = amount - .checked_mul(fee_bps) - .ok_or(VaultError::MathOverflow)? - / fee_math::BPS_DENOMINATOR; - let net_yield = amount - .checked_sub(fee_amount) - .ok_or(VaultError::MathOverflow)?; - assert!( - fee_amount >= 0 && net_yield >= 0, - "fee accounting invariant violated: negative fee share" - ); - assert_eq!( - fee_amount + net_yield, - amount, - "fee accounting invariant violated: fee + net != amount" - ); + let (fee_amount, net_yield) = fee_math::calculate_protocol_fee(amount, fee_bps)?; let token_addr = Self::token(env.clone()); let token_client = token::Client::new(&env, &token_addr); @@ -3335,7 +3341,9 @@ impl YieldVault { env.events() .publish((symbol_short!("rolvr"), admin.clone()), excess); } else { - treasury_bal = treasury_bal.checked_add(fee_amount).expect("overflow"); + treasury_bal = treasury_bal + .checked_add(fee_amount) + .ok_or(VaultError::MathOverflow)?; } env.storage() @@ -4571,7 +4579,7 @@ impl YieldVault { (utilization, fee_bps, static_fee_bps), ); } - let (fee_amount, net_yield) = fee_math::calculate_protocol_fee(amount, fee_bps); + let (fee_amount, net_yield) = fee_math::calculate_protocol_fee(amount, fee_bps)?; if fee_amount > 0 { let treasury_bal: i128 = env .storage() @@ -4580,7 +4588,9 @@ impl YieldVault { .unwrap_or(0); env.storage().instance().set( &DataKey::TreasuryBalance, - &treasury_bal.checked_add(fee_amount).expect("overflow"), + &treasury_bal + .checked_add(fee_amount) + .ok_or(VaultError::MathOverflow)?, ); } @@ -4601,7 +4611,8 @@ impl YieldVault { .get(&DataKeyExt::PerformanceFeeBps) .unwrap_or(0); if perf_fee_bps > 0 { - let (pf, _) = fee_math::calculate_protocol_fee(yield_above_hwm, perf_fee_bps); + let (pf, _) = + fee_math::calculate_protocol_fee(yield_above_hwm, perf_fee_bps)?; perf_fee_amount = pf; if perf_fee_amount > 0 { if let Some(pool) = Self::performance_incentive_pool(env.clone()) { diff --git a/contracts/vault/src/math.rs b/contracts/vault/src/math.rs index 3eb966a84..33c681c2a 100644 --- a/contracts/vault/src/math.rs +++ b/contracts/vault/src/math.rs @@ -3,12 +3,24 @@ //! See [`share_price_math`] for implementation and rounding guarantees. pub use share_price_math::{ - assets_to_shares, shares_to_assets, try_assets_to_shares, try_shares_to_assets, + assets_to_shares, shares_to_assets, try_assets_to_shares, try_shares_to_assets, MathError, }; #[cfg(test)] mod tests { - use super::*; + use super::{ + assets_to_shares as checked_assets_to_shares, + shares_to_assets as checked_shares_to_assets, + }; + use share_price_math::MathError; + + fn assets_to_shares(assets: i128, total_shares: i128, total_assets: i128) -> i128 { + checked_assets_to_shares(assets, total_shares, total_assets).unwrap() + } + + fn shares_to_assets(shares: i128, total_shares: i128, total_assets: i128) -> i128 { + checked_shares_to_assets(shares, total_shares, total_assets).unwrap() + } #[test] fn test_first_deposit_one_to_one() { @@ -166,14 +178,18 @@ mod tests { } #[test] - #[should_panic(expected = "overflow")] fn test_overflow_protection_assets_to_shares() { - let _ = assets_to_shares(i128::MAX, i128::MAX, 1); + assert_eq!( + checked_assets_to_shares(i128::MAX, i128::MAX, 1), + Err(MathError::Overflow) + ); } #[test] - #[should_panic(expected = "overflow")] fn test_overflow_protection_shares_to_assets() { - let _ = shares_to_assets(i128::MAX, 1, i128::MAX); + assert_eq!( + checked_shares_to_assets(i128::MAX, 1, i128::MAX), + Err(MathError::Overflow) + ); } } diff --git a/contracts/vault/src/rounding_consistency.rs b/contracts/vault/src/rounding_consistency.rs index b55a251a6..a94114585 100644 --- a/contracts/vault/src/rounding_consistency.rs +++ b/contracts/vault/src/rounding_consistency.rs @@ -26,16 +26,14 @@ impl RoundingPolicy { /// - Prevents over-minting and over-withdrawal /// - Maintains vault solvency invariant /// - /// # Panics - /// - Panics if `denominator` is zero - /// /// # Examples /// ```ignore /// let shares = RoundingPolicy::floor_division(100, 1500); // (100 * 1000) / 1500 = 66 /// ``` - pub fn floor_division(numerator: i128, denominator: i128) -> i128 { - assert!(denominator != 0, "division by zero"); - numerator / denominator // Rust's / operator truncates toward zero for integer division + pub fn floor_division(numerator: i128, denominator: i128) -> Result { + numerator + .checked_div(denominator) + .ok_or(VaultError::MathOverflow) } /// Performs floor division with validation for decimal conversion edge cases. @@ -61,35 +59,35 @@ impl RoundingPolicy { denominator: i128, max_allowed_loss_bps: i128, ) -> Result { - assert!(denominator != 0, "division by zero"); + if denominator == 0 || max_allowed_loss_bps < 0 { + return Err(VaultError::InvalidAmount); + } if numerator == 0 { return Ok(0); } - // Exact result using extended precision (i128 * 2 represented as u128) - let exact_numerator = numerator.abs() as u128; - let exact_denominator = denominator.abs() as u128; - - // Compute exact quotient and remainder - let quotient = exact_numerator / exact_denominator; - let remainder = exact_numerator % exact_denominator; + let result = numerator + .checked_div(denominator) + .ok_or(VaultError::MathOverflow)?; + let remainder = numerator + .checked_rem(denominator) + .ok_or(VaultError::MathOverflow)? + .unsigned_abs(); // Compute rounding loss in basis points // loss_bps = (remainder * 10_000) / exact_numerator if remainder > 0 { - let loss_bps = (remainder * 10_000) / exact_numerator; + let loss_bps = remainder + .checked_mul(10_000) + .ok_or(VaultError::MathOverflow)? + / numerator.unsigned_abs(); if loss_bps > max_allowed_loss_bps as u128 { return Err(VaultError::SlippageExceeded); } } - let result = quotient as i128; - if numerator < 0 { - Ok(-result) - } else { - Ok(result) - } + Ok(result) } /// Converts between decimal places with safe rounding and overflow checking. @@ -167,15 +165,22 @@ impl RoundingPolicy { original_amount: i128, max_loss_bps: i128, ) -> Result<(), VaultError> { + if max_loss_bps < 0 { + return Err(VaultError::InvalidAmount); + } if loss_amount == 0 || original_amount == 0 { return Ok(()); } // Compute loss in basis points // loss_bps = (loss * 10_000) / original - let loss_bps = (loss_amount.abs() * 10_000) / original_amount.abs(); + let loss_bps = loss_amount + .unsigned_abs() + .checked_mul(10_000) + .ok_or(VaultError::MathOverflow)? + / original_amount.unsigned_abs(); - if loss_bps > max_loss_bps { + if loss_bps > max_loss_bps as u128 { return Err(VaultError::SlippageExceeded); } @@ -227,6 +232,9 @@ impl RoundingPolicy { amount: i128, basis_points: i128, ) -> Result { + if amount < 0 { + return Err(VaultError::InvalidAmount); + } if amount == 0 || basis_points == 0 { return Ok(0); } @@ -235,7 +243,16 @@ impl RoundingPolicy { return Err(VaultError::InvalidFeeBps); } - let result = (amount * basis_points) / 10_000; + let whole_amount = (amount / 10_000) + .checked_mul(basis_points) + .ok_or(VaultError::MathOverflow)?; + let fractional_amount = (amount % 10_000) + .checked_mul(basis_points) + .ok_or(VaultError::MathOverflow)? + / 10_000; + let result = whole_amount + .checked_add(fractional_amount) + .ok_or(VaultError::MathOverflow)?; Ok(result) } } @@ -246,13 +263,25 @@ mod tests { #[test] fn test_floor_division_exact() { - assert_eq!(RoundingPolicy::floor_division(100, 10), 10); + assert_eq!(RoundingPolicy::floor_division(100, 10), Ok(10)); } #[test] fn test_floor_division_rounds_down() { - assert_eq!(RoundingPolicy::floor_division(99, 10), 9); - assert_eq!(RoundingPolicy::floor_division(100, 1500), 0); + assert_eq!(RoundingPolicy::floor_division(99, 10), Ok(9)); + assert_eq!(RoundingPolicy::floor_division(100, 1500), Ok(0)); + } + + #[test] + fn test_floor_division_reports_invalid_arithmetic() { + assert_eq!( + RoundingPolicy::floor_division(1, 0), + Err(VaultError::MathOverflow) + ); + assert_eq!( + RoundingPolicy::floor_division(i128::MIN, -1), + Err(VaultError::MathOverflow) + ); } #[test] diff --git a/contracts/vault/tests/reentrancy_cei_test.rs b/contracts/vault/tests/reentrancy_cei_test.rs new file mode 100644 index 000000000..06bd410dd --- /dev/null +++ b/contracts/vault/tests/reentrancy_cei_test.rs @@ -0,0 +1,147 @@ +use soroban_sdk::{contract, contractimpl, contracttype, Address, Env}; +use soroban_sdk::testutils::Address as _; +use vault::{YieldVault, YieldVaultClient}; + +#[contracttype] +#[derive(Clone)] +enum TokenKey { + Balance(Address), + CallbackDone, + NestedAmount, + ObservedAssets, + ObservedShares, + ObservedUserDeposit, + ReentrySucceeded, + User, + Vault, +} + +#[contract] +struct ReentrantToken; + +#[contractimpl] +impl ReentrantToken { + pub fn configure(env: Env, vault: Address, user: Address, nested_amount: i128) { + env.storage().instance().set(&TokenKey::Vault, &vault); + env.storage().instance().set(&TokenKey::User, &user); + env.storage() + .instance() + .set(&TokenKey::NestedAmount, &nested_amount); + } + + pub fn mint(env: Env, user: Address, amount: i128) { + let key = TokenKey::Balance(user); + let balance: i128 = env.storage().instance().get(&key).unwrap_or(0); + env.storage() + .instance() + .set(&key, &balance.checked_add(amount).unwrap()); + } + + pub fn observed_user_deposit(env: Env) -> i128 { + env.storage() + .instance() + .get(&TokenKey::ObservedUserDeposit) + .unwrap_or(0) + } + + pub fn observed_assets(env: Env) -> i128 { + env.storage() + .instance() + .get(&TokenKey::ObservedAssets) + .unwrap_or(0) + } + + pub fn observed_shares(env: Env) -> i128 { + env.storage() + .instance() + .get(&TokenKey::ObservedShares) + .unwrap_or(0) + } + + pub fn reentry_succeeded(env: Env) -> bool { + env.storage() + .instance() + .get(&TokenKey::ReentrySucceeded) + .unwrap_or(false) + } + + pub fn transfer(env: Env, from: Address, to: Address, amount: i128) { + let from_key = TokenKey::Balance(from.clone()); + let from_balance: i128 = env.storage().instance().get(&from_key).unwrap_or(0); + env.storage() + .instance() + .set(&from_key, &from_balance.checked_sub(amount).unwrap()); + + let to_key = TokenKey::Balance(to); + let to_balance: i128 = env.storage().instance().get(&to_key).unwrap_or(0); + env.storage() + .instance() + .set(&to_key, &to_balance.checked_add(amount).unwrap()); + + let callback_done: bool = env + .storage() + .instance() + .get(&TokenKey::CallbackDone) + .unwrap_or(false); + if callback_done { + return; + } + env.storage() + .instance() + .set(&TokenKey::CallbackDone, &true); + + let vault: Address = env.storage().instance().get(&TokenKey::Vault).unwrap(); + let user: Address = env.storage().instance().get(&TokenKey::User).unwrap(); + let vault_client = YieldVaultClient::new(&env, &vault); + env.storage().instance().set( + &TokenKey::ObservedUserDeposit, + &vault_client.user_deposit(&user), + ); + env.storage().instance().set( + &TokenKey::ObservedAssets, + &vault_client.total_assets().unwrap(), + ); + env.storage().instance().set( + &TokenKey::ObservedShares, + &vault_client.total_shares(), + ); + + let nested_amount: i128 = env + .storage() + .instance() + .get(&TokenKey::NestedAmount) + .unwrap(); + let result = vault_client.try_deposit(&user, &nested_amount); + env.storage().instance().set( + &TokenKey::ReentrySucceeded, + &matches!(result, Ok(Ok(_))), + ); + } +} + +#[test] +fn deposit_commits_accounting_before_malicious_token_callback() { + let env = Env::default(); + env.mock_all_auths(); + + let admin = Address::generate(&env); + let user = Address::generate(&env); + let token_id = env.register(ReentrantToken, ()); + let vault_id = env.register(YieldVault, ()); + let token = ReentrantTokenClient::new(&env, &token_id); + let vault = YieldVaultClient::new(&env, &vault_id); + + vault.initialize(&admin, &token_id); + token.configure(&vault_id, &user, &50); + token.mint(&user, &150); + + vault.deposit(&user, &100); + + assert_eq!(token.observed_user_deposit(), 100); + assert_eq!(token.observed_assets(), 100); + assert_eq!(token.observed_shares(), 100); + assert!(token.reentry_succeeded()); + assert_eq!(vault.user_deposit(&user), 150); + assert_eq!(vault.total_assets().unwrap(), 150); + assert_eq!(vault.total_shares(), 150); +} \ No newline at end of file diff --git a/node_modules/.bin/commitlint b/node_modules/.bin/commitlint new file mode 120000 index 000000000..561e6ad62 --- /dev/null +++ b/node_modules/.bin/commitlint @@ -0,0 +1 @@ +../@commitlint/cli/cli.js \ No newline at end of file diff --git a/node_modules/.bin/conc b/node_modules/.bin/conc new file mode 120000 index 000000000..e9da68781 --- /dev/null +++ b/node_modules/.bin/conc @@ -0,0 +1 @@ +../concurrently/dist/bin/concurrently.js \ No newline at end of file diff --git a/node_modules/.bin/concurrently b/node_modules/.bin/concurrently new file mode 120000 index 000000000..e9da68781 --- /dev/null +++ b/node_modules/.bin/concurrently @@ -0,0 +1 @@ +../concurrently/dist/bin/concurrently.js \ No newline at end of file diff --git a/node_modules/.bin/conventional-commits-parser b/node_modules/.bin/conventional-commits-parser new file mode 120000 index 000000000..fe4635183 --- /dev/null +++ b/node_modules/.bin/conventional-commits-parser @@ -0,0 +1 @@ +../conventional-commits-parser/dist/cli/index.js \ No newline at end of file diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti new file mode 120000 index 000000000..18f28cf34 --- /dev/null +++ b/node_modules/.bin/jiti @@ -0,0 +1 @@ +../jiti/lib/jiti-cli.mjs \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml new file mode 120000 index 000000000..9dbd010d4 --- /dev/null +++ b/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/.bin/license-checker b/node_modules/.bin/license-checker new file mode 120000 index 000000000..8b86cb3d8 --- /dev/null +++ b/node_modules/.bin/license-checker @@ -0,0 +1 @@ +../license-checker/bin/license-checker \ No newline at end of file diff --git a/node_modules/.bin/lint-staged b/node_modules/.bin/lint-staged new file mode 120000 index 000000000..f29009ba4 --- /dev/null +++ b/node_modules/.bin/lint-staged @@ -0,0 +1 @@ +../lint-staged/bin/lint-staged.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 000000000..017896ceb --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt new file mode 120000 index 000000000..6b6566ea7 --- /dev/null +++ b/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 000000000..b6afda6c7 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 000000000..5aaadf42c --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/tree-kill b/node_modules/.bin/tree-kill new file mode 120000 index 000000000..26dcd2c05 --- /dev/null +++ b/node_modules/.bin/tree-kill @@ -0,0 +1 @@ +../tree-kill/cli.js \ No newline at end of file diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc new file mode 120000 index 000000000..0863208a6 --- /dev/null +++ b/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/node_modules/.bin/yaml b/node_modules/.bin/yaml new file mode 120000 index 000000000..036832479 --- /dev/null +++ b/node_modules/.bin/yaml @@ -0,0 +1 @@ +../yaml/bin.mjs \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 7ea84ee0d..3d7a9f670 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,12 +1,10 @@ { - "name": "YieldVault-RWA", + "name": "yieldvault-rwa", "lockfileVersion": 3, "requires": true, "packages": { "node_modules/@asamuzakjp/css-color": { "version": "5.1.11", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", - "integrity": "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==", "dev": true, "license": "MIT", "dependencies": { @@ -22,8 +20,6 @@ }, "node_modules/@asamuzakjp/dom-selector": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz", - "integrity": "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==", "dev": true, "license": "MIT", "dependencies": { @@ -39,8 +35,6 @@ }, "node_modules/@asamuzakjp/generational-cache": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz", - "integrity": "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==", "dev": true, "license": "MIT", "engines": { @@ -49,15 +43,36 @@ }, "node_modules/@asamuzakjp/nwsapi": { "version": "2.3.9", - "resolved": "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz", - "integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==", "dev": true, "license": "MIT" }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@bramus/specificity": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz", - "integrity": "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==", "dev": true, "license": "MIT", "dependencies": { @@ -67,10 +82,296 @@ "specificity": "bin/cli.js" } }, + "node_modules/@commitlint/cli": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-21.2.3.tgz", + "integrity": "sha512-5yOX6IRjcrIReCxpyAd04hgI/yhUMpVBJ/ouwFV0wk9yx5+fYRDWZWJ5h55Tbedgfol+5m2mU5nqzbB8g3v0vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/config-conventional": "^21.2.3", + "@commitlint/format": "^21.2.3", + "@commitlint/lint": "^21.2.3", + "@commitlint/load": "^21.2.3", + "@commitlint/read": "^21.2.3", + "@commitlint/types": "^21.2.3", + "tinyexec": "^1.0.0", + "yargs": "^18.0.0" + }, + "bin": { + "commitlint": "cli.js" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/config-conventional": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-21.2.3.tgz", + "integrity": "sha512-EP2n5DN2GwRWNVrLX0Jx3mpQlW5PfFi9HnD9OJ8hN/H0xFqpCFyHeGDhg+0P8/21iMMcdkcQgbNqmVklebqYsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^21.2.3", + "conventional-changelog-conventionalcommits": "^10.0.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/config-validator": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-21.2.3.tgz", + "integrity": "sha512-JQ13v0GafSM4fBYX8UowSy++07Was20auq0NcTdnzSEq6/05Cq5GBUMIfKkqjzyBwC9sJFmPpKWgLLhH7cygkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^21.2.3", + "ajv": "^8.11.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/ensure": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-21.2.3.tgz", + "integrity": "sha512-gEjNKgRocbODI5/sMx2Qc9XOf2/zFTNV2aEK1QZ4gKDKxDC/VR7us3QtIX1C5d5xxHxx0I/tEbYbdSP1Am2LwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^21.2.3", + "es-toolkit": "^1.46.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/execute-rule": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-21.0.1.tgz", + "integrity": "sha512-RifH+FmImozKBE6mozhF4K3r2RRKP7SMi/Q/zLCmExtp5e05lhHOUYqGBlFBAGNHaZxU/WYw1XuugYK9jQzqnA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/format": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-21.2.3.tgz", + "integrity": "sha512-KKwCjXYqA8r295uhLnulDXL9yekdXmj2yp2Q0XsBPhxQ2iPuvRE8F43j7g7yexo69wTdmUQmFz15jpderluzUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^21.2.3", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/is-ignored": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-21.2.3.tgz", + "integrity": "sha512-Ng4nRj/LBAOvc+GQu7bsFW4/fL89LvZ14OOC/ERLbUpnG6QBwWRzY/1oXGwPs3C8YHWjJObin4kLYo2YeEn70w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^21.2.3", + "semver": "^7.6.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/lint": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-21.2.3.tgz", + "integrity": "sha512-lUZcSuVLLEDkhge9ERk8Rp+FXQtrUhCK+h328BFnzKXrTuXGdqiYMEpTlNWdZaOrjyMhMJaz354ZaWEGJxcLeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/is-ignored": "^21.2.3", + "@commitlint/parse": "^21.2.3", + "@commitlint/rules": "^21.2.3", + "@commitlint/types": "^21.2.3" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/load": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-21.2.3.tgz", + "integrity": "sha512-cDrL8lOo23Lk7knGzQdjbFcq7z2JgvjwV6PhbESVvEc+Fe21MeLjPKBJi8nKjg7j+jh79CVbVSUbZc104thXRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/config-validator": "^21.2.3", + "@commitlint/execute-rule": "^21.0.1", + "@commitlint/resolve-extends": "^21.2.3", + "@commitlint/types": "^21.2.3", + "cosmiconfig": "^9.0.1", + "cosmiconfig-typescript-loader": "^6.1.0", + "es-toolkit": "^1.46.0", + "is-plain-obj": "^4.1.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/message": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-21.2.0.tgz", + "integrity": "sha512-YxGoiXD/HXNXLJPrQwE5poXa+XH0CBEm+mdvbHQP0g6MV/dmJyUFCzPNzZbxL93GvZ70TmtTK0Z0/IBpAqHv8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/parse": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-21.2.3.tgz", + "integrity": "sha512-Jt61QpF1xA88damCELe8I0FlDZPSpXNc8IhN7z5kZ0EcDYPjdZ+ZHPvsSXl69r2MIlLnNKeHhOn2cmVpziFE9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^21.2.3", + "conventional-changelog-angular": "^9.0.0", + "conventional-commits-parser": "^7.0.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/read": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-21.2.3.tgz", + "integrity": "sha512-szAepuLA1vTTr7fuudEg7jYyVHudf+FH+vptU91bhxE1WnE8TKrfTAi44HVllz8XpI8Pvp4GjR/iP5Nshgh+og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/top-level": "^21.2.0", + "@commitlint/types": "^21.2.3", + "@conventional-changelog/git-client": "^3.0.0", + "tinyexec": "^1.0.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/resolve-extends": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-21.2.3.tgz", + "integrity": "sha512-bqJdmAtXgAQel+l02uIsF7rHgKgx1AGZdGBjam7uK4XW54ZAQtB6XAIUXezYprQiCcRMpBh4fHs5JodXK4mVZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/config-validator": "^21.2.3", + "@commitlint/types": "^21.2.3", + "es-toolkit": "^1.46.0", + "global-directory": "^5.0.0", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/rules": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-21.2.3.tgz", + "integrity": "sha512-5+YnI/LuTx3JDl9GjqfP2z9x96M8KKDrd+4jOel/T0L1BB3oAmBlSN8xppf63QsudiVEgR8C0gRoAMrPVrms6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/ensure": "^21.2.3", + "@commitlint/message": "^21.2.0", + "@commitlint/to-lines": "^21.0.1", + "@commitlint/types": "^21.2.3" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/to-lines": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-21.0.1.tgz", + "integrity": "sha512-bd1BFII7p1EQZre9Kaj+kKaMFP3cFCdt21K7DItVux9XP5WjLgJ0/Uy1pJJh9aPwVJ6SKg62PxqlZaHI8hQAXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/top-level": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-21.2.0.tgz", + "integrity": "sha512-Y5gmQ+KxzqCrBFJfLvFEPvvwD3LDiNZoTT2yeFBm96M8qhmqSzQc5DvX3rheAaAMjyIvMXOCLS/mWfdpONsjyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@commitlint/types": { + "version": "21.2.3", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-21.2.3.tgz", + "integrity": "sha512-sGEA473TlCvhCGNoTBY9OXZVWdscIXdGt0dm8EpB+2MRfmt8LNh/X56P/T3nCtEB+eH5qGEa3odphSAoUxSfSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "conventional-commits-parser": "^7.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@conventional-changelog/git-client": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-3.2.0.tgz", + "integrity": "sha512-sD/E0vzpkoDz/dqM1Hhv0ihC4KBw6RXjefeO8SG1XrX+wGkMxe1pKeedkKDPCtr2JjuhbuS9aJNgOvnT8hbeBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@simple-libs/child-process-utils": "^2.0.0", + "@simple-libs/stream-utils": "^2.0.0", + "verkit": "^0.5.0" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "conventional-commits-filter": "^6.0.1", + "conventional-commits-parser": "^7.1.3" + }, + "peerDependenciesMeta": { + "conventional-commits-filter": { + "optional": true + }, + "conventional-commits-parser": { + "optional": true + } + } + }, + "node_modules/@conventional-changelog/template": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@conventional-changelog/template/-/template-1.4.0.tgz", + "integrity": "sha512-aalGyl7dbB5PArRebDIX43ZvBlXrYm9uWzGJ26t+4SzJVPsOuvfILGGbw5X4yX7i50YEmJ8zvbiWnqH/AAnZqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + } + }, "node_modules/@csstools/color-helpers": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.0.tgz", - "integrity": "sha512-064IFJdjTfUqnjpCVpMOdbr8FLQBhinbZj6yRv2An2E41O/pLEXqfFRWqGq/SxlE5PEUYTlvWsG2r8MswAVvkg==", "dev": true, "funding": [ { @@ -89,8 +390,6 @@ }, "node_modules/@csstools/css-calc": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.2.1.tgz", - "integrity": "sha512-DtdHlgXh5ZkA43cwBcAm+huzgJiwx3ZTWVjBs94kwz2xKqSimDA3lBgCjphYgwgVUMWatSM0pDd8TILB1yrVVg==", "dev": true, "funding": [ { @@ -113,8 +412,6 @@ }, "node_modules/@csstools/css-color-parser": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.9.tgz", - "integrity": "sha512-paQcIaOO53Rk5+YrBaBjm/SgrV4INImjo2BT1DtQRYr+XeTRbeAYlS+jxXp9drqvKmtFnWRJKIalDLhZZDu42A==", "dev": true, "funding": [ { @@ -141,8 +438,6 @@ }, "node_modules/@csstools/css-parser-algorithms": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", - "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==", "dev": true, "funding": [ { @@ -155,6 +450,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" }, @@ -164,8 +460,6 @@ }, "node_modules/@csstools/css-syntax-patches-for-csstree": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.5.tgz", - "integrity": "sha512-oNjBvzLq2GPZtJphCjLqXow/cHySHSgtxvKZb7OqSZ/xHgw6NWNhfad+6AB9cLeVm6eA9d/qMll3JdEHjy6M+A==", "dev": true, "funding": [ { @@ -189,8 +483,6 @@ }, "node_modules/@csstools/css-tokenizer": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz", - "integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==", "dev": true, "funding": [ { @@ -203,14 +495,24 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" } }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/linux-x64": { "version": "0.28.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", - "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", "cpu": [ "x64" ], @@ -226,8 +528,6 @@ }, "node_modules/@exodus/bytes": { "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", - "integrity": "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==", "dev": true, "license": "MIT", "engines": { @@ -244,15 +544,11 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@oxc-project/types": { "version": "0.137.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", - "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", "dev": true, "license": "MIT", "funding": { @@ -261,8 +557,6 @@ }, "node_modules/@rolldown/binding-linux-x64-gnu": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz", - "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==", "cpu": [ "x64" ], @@ -276,41 +570,47 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz", - "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==", - "cpu": [ - "x64" - ], + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/@simple-libs/child-process-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@simple-libs/child-process-utils/-/child-process-utils-2.0.0.tgz", + "integrity": "sha512-dvNoRKLijXnD0XoJAz94pbNuB5GQgDr55UhpSPhffDkTT0Cmcqh9jSCOtwfT2d4H6MI9E7c4SgtMuJXZ6F3c6A==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@simple-libs/stream-utils": "^2.0.0" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=22" + }, + "funding": { + "url": "https://ko-fi.com/dangreen" } }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "node_modules/@simple-libs/stream-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@simple-libs/stream-utils/-/stream-utils-2.0.0.tgz", + "integrity": "sha512-fCTuZK4QBa+39Oz9l4OGfJfz+GpwCp3AqO7Zch3to99xHPgstVsRFpeQ8LNd2o1Gv8raL2mCFwiaHh7bFSp5DQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://ko-fi.com/dangreen" + } }, "node_modules/@standard-schema/spec": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "dev": true, "license": "MIT" }, "node_modules/@types/chai": { "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", "dependencies": { @@ -320,22 +620,44 @@ }, "node_modules/@types/deep-eql": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", "dev": true, "license": "MIT" }, "node_modules/@types/estree": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "26.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.5.tgz", + "integrity": "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, "node_modules/@vitest/expect": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz", - "integrity": "sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==", "dev": true, "license": "MIT", "dependencies": { @@ -352,8 +674,6 @@ }, "node_modules/@vitest/mocker": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.9.tgz", - "integrity": "sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==", "dev": true, "license": "MIT", "dependencies": { @@ -379,8 +699,6 @@ }, "node_modules/@vitest/pretty-format": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.9.tgz", - "integrity": "sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==", "dev": true, "license": "MIT", "dependencies": { @@ -392,8 +710,6 @@ }, "node_modules/@vitest/runner": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.9.tgz", - "integrity": "sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==", "dev": true, "license": "MIT", "dependencies": { @@ -406,8 +722,6 @@ }, "node_modules/@vitest/snapshot": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.9.tgz", - "integrity": "sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==", "dev": true, "license": "MIT", "dependencies": { @@ -422,8 +736,6 @@ }, "node_modules/@vitest/spy": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.9.tgz", - "integrity": "sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==", "dev": true, "license": "MIT", "funding": { @@ -432,8 +744,6 @@ }, "node_modules/@vitest/utils": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.9.tgz", - "integrity": "sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==", "dev": true, "license": "MIT", "dependencies": { @@ -445,92 +755,542 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } + "license": "ISC" }, - "node_modules/bidi-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", - "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "dev": true, "license": "MIT", "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "node_modules/ansi-regex": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.4.0.tgz", + "integrity": "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/css-tree": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", - "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "mdn-data": "2.27.1", - "source-map-js": "^1.2.1" + "color-convert": "^2.0.1" }, "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/data-urls": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", - "integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==", + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/argue-cli": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/argue-cli/-/argue-cli-3.2.0.tgz", + "integrity": "sha512-VipTB0gXgGIFO2Rg9yEVN5wLt2AurJcZqDbgmYSwPwsykhLrQhs240/bfceev4w68lI8JshoOJIk9uW7tFzROw==", "dev": true, "license": "MIT", - "dependencies": { - "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^16.0.0" + "engines": { + "node": ">=22" }, + "funding": { + "url": "https://ko-fi.com/dangreen" + } + }, + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", + "dev": true, + "license": "MIT", "engines": { - "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + "node": ">=0.10.0" } }, - "node_modules/decimal.js": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true, "license": "MIT" }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "node_modules/assertion-error": { + "version": "2.0.1", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/entities": { + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bidi-js": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "require-from-string": "^2.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently": { + "version": "9.2.5", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.5.tgz", + "integrity": "sha512-YMZlvWrTPQEhjKp60XSmMGt60+pffbv6DyRnOMvVO98+J7aF8w8Ui9FhdcOwvSixc/kyR6SoVvmejcn/2lZBqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.12.0", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/concurrently/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/concurrently/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/conventional-changelog-angular": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-9.4.0.tgz", + "integrity": "sha512-HdxRxuS8bBXVIuo4V82gvSwAXT0vYQUizrjs/izmPg5JdDstr8v8I5hduGL3iQbG+o310dUDxC4+LetuS5hu9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@conventional-changelog/template": "^1.4.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/conventional-changelog-conventionalcommits": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-10.4.1.tgz", + "integrity": "sha512-jS1LRFSbRoAr6JbhhRy1JYfNNUj5LM3+v49hRE03CgccsiYqgdVj/RTmrw4J1rylrqijHwdOlJWiJa61JHOgHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "@conventional-changelog/template": "^1.4.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/conventional-commits-parser": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-7.1.3.tgz", + "integrity": "sha512-Q9oWm1o9uy/oEsZQIraoFMZ4RuPD+79KgwWj6mJVP356tazolCB0piRLZ5Kz9te9p027uSEcUW+Gu44Eh+X79g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@simple-libs/stream-utils": "^2.0.0", + "argue-cli": "^3.1.0" + }, + "bin": { + "conventional-commits-parser": "dist/cli/index.js" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.2.tgz", + "integrity": "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/cosmiconfig-typescript-loader": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-6.3.0.tgz", + "integrity": "sha512-Akr82WH1Wfqatyiqpj8HDkO2o2KmJRu1FhKfSNJP3K4IdXwHfEyL7MOb62i1AGQVLtIQM+iCE9CGOtrfhR+mmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jiti": "2.6.1" + }, + "engines": { + "node": ">=v18" + }, + "peerDependencies": { + "@types/node": "*", + "cosmiconfig": ">=9", + "typescript": ">=5" + } + }, + "node_modules/css-tree": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.27.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/data-urls": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "dev": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "dev": true, + "license": "ISC", + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/entities": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-8.0.0.tgz", - "integrity": "sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -540,17 +1300,56 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", - "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", "dev": true, "license": "MIT" }, + "node_modules/es-toolkit": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.52.0.tgz", + "integrity": "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==", + "dev": true, + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks", + "tests/types", + "tests/browser-compat" + ] + }, "node_modules/esbuild": { "version": "0.28.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", - "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -589,10 +1388,28 @@ "@esbuild/win32-x64": "0.28.1" } }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/estree-walker": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", "dependencies": { @@ -601,36 +1418,169 @@ }, "node_modules/expect-type": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.0.0" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", + "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fdir": { "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/global-directory": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-5.0.0.tgz", + "integrity": "sha512-1pgFdhK3J2LeM+dVf2Pd424yHx2ou338lC0ErNP2hPx4j8eW1Sp0XqSjNxtk6Tc4Kr5wlWtSvz8cn2yb7/SG/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "6.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "engines": { + "node": ">= 0.4" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, "node_modules/html-encoding-sniffer": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", - "integrity": "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==", "dev": true, "license": "MIT", "dependencies": { @@ -642,8 +1592,6 @@ }, "node_modules/husky": { "version": "9.1.7", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", - "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "dev": true, "license": "MIT", "bin": { @@ -656,19 +1604,158 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", + "integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.17.0.tgz", + "integrity": "sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true, "license": "MIT" }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsdom": { "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz", - "integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@asamuzakjp/css-color": "^5.1.11", "@asamuzakjp/dom-selector": "^7.1.1", @@ -704,10 +1791,122 @@ } } }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/license-checker": { + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz", + "integrity": "sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "chalk": "^2.4.1", + "debug": "^3.1.0", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "read-installed": "~4.0.3", + "semver": "^5.5.0", + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-satisfies": "^4.0.0", + "treeify": "^1.1.0" + }, + "bin": { + "license-checker": "bin/license-checker" + } + }, + "node_modules/license-checker/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/license-checker/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/license-checker/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/license-checker/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/lightningcss": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -736,8 +1935,6 @@ }, "node_modules/lightningcss-linux-x64-gnu": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", "cpu": [ "x64" ], @@ -755,31 +1952,39 @@ "url": "https://opencollective.com/parcel" } }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", - "cpu": [ - "x64" - ], + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], + "license": "MIT" + }, + "node_modules/lint-staged": { + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.6.0.tgz", + "integrity": "sha512-nOhBfYkZEwkFtNzD5pK9s9LkcWoxJ+whLzEnhqi9nl7zTB5n7tg8+9iYgMGx2Wm3VlLu8cbNj0RACzY+nWi5iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^4.0.7", + "string-argv": "^0.3.2", + "tinyexec": "^1.3.1" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, "engines": { - "node": ">= 12.0.0" + "node": ">=22.22.1" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "url": "https://opencollective.com/lint-staged" + }, + "optionalDependencies": { + "yaml": "^2.9.1" } }, "node_modules/lru-cache": { "version": "11.5.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz", - "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==", "dev": true, "license": "BlueOak-1.0.0", "engines": { @@ -788,8 +1993,6 @@ }, "node_modules/magic-string": { "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -798,15 +2001,54 @@ }, "node_modules/mdn-data": { "version": "2.27.1", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", - "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", "dev": true, "license": "CC0-1.0" }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/nanoid": { "version": "3.3.15", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", - "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", "dev": true, "funding": [ { @@ -822,10 +2064,52 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true, + "license": "ISC" + }, "node_modules/obug": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.3.tgz", - "integrity": "sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==", "dev": true, "funding": [ "https://github.com/sponsors/sxzz", @@ -833,13 +2117,85 @@ ], "license": "MIT", "engines": { - "node": ">=12.20.0" + "node": ">=12.20.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parse5": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", - "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==", "dev": true, "license": "MIT", "dependencies": { @@ -849,24 +2205,37 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, "node_modules/pathe": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -878,8 +2247,6 @@ }, "node_modules/postcss": { "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", "dev": true, "funding": [ { @@ -907,28 +2274,121 @@ }, "node_modules/punycode": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha512-O03wg/IYuV/VtnK2h/KXEt9VIbMUFbk3ERG0Iu4FhLZw0EP0T9znqrYDGn6ncbEsXUFaUjiVAWXHzxwt3lhRPQ==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "debuglog": "^1.0.1", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + } + }, + "node_modules/read-installed/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-package-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "node_modules/readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "license": "ISC", + "dependencies": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.13", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.13.tgz", + "integrity": "sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.17.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/rolldown": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz", - "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==", "dev": true, "license": "MIT", "dependencies": { @@ -959,10 +2419,18 @@ "@rolldown/binding-win32-x64-msvc": "1.1.3" } }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/saxes": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "license": "ISC", "dependencies": { @@ -972,55 +2440,218 @@ "node": ">=v12.22.7" } }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shell-quote": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz", + "integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/siginfo": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, "license": "ISC" }, + "node_modules/slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "*" + } + }, "node_modules/source-map-js": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, + "node_modules/spdx-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", + "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-find-index": "^1.0.2", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.24.tgz", + "integrity": "sha512-cLS9TtWkIQFyLkJ3/5aFQAOHOSKTlOs/7WDut/XPSdjom1fJhUdkepeJAKXa9Y05+FabHd0sti+Et559vDtkpQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/spdx-ranges": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", + "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==", + "dev": true, + "license": "(MIT AND CC-BY-3.0)" + }, + "node_modules/spdx-satisfies": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz", + "integrity": "sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-compare": "^1.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, "node_modules/stackback": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, "license": "MIT" }, "node_modules/std-env": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", - "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", "dev": true, "license": "MIT" }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true, "license": "MIT" }, "node_modules/tinybench": { "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true, "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", - "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", + "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", "dev": true, "license": "MIT", "engines": { @@ -1029,8 +2660,6 @@ }, "node_modules/tinyglobby": { "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { @@ -1046,8 +2675,6 @@ }, "node_modules/tinyrainbow": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", - "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", "dev": true, "license": "MIT", "engines": { @@ -1056,8 +2683,6 @@ }, "node_modules/tldts": { "version": "7.4.4", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.4.tgz", - "integrity": "sha512-kFXFK7O4WPextIUAOk8qtnw9dxR9UIXP9CjuH1cTBVBZMDeQcUPgr/IazGiw1B0Yiw5L75gHLWeW4iD793r90g==", "dev": true, "license": "MIT", "dependencies": { @@ -1069,15 +2694,11 @@ }, "node_modules/tldts-core": { "version": "7.4.4", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.4.tgz", - "integrity": "sha512-vwVLJVvvpslm7vqAH7+XNj/neA/Ynq7DT2EEcMuwc5YzN5XaMyRAqxwU+uX3azZ1FQtB2gvrvnLnAEkvYlVdfg==", "dev": true, "license": "MIT" }, "node_modules/tough-cookie": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", - "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1089,8 +2710,6 @@ }, "node_modules/tr46": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", - "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", "dev": true, "license": "MIT", "dependencies": { @@ -1100,12 +2719,38 @@ "node": ">=20" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, "node_modules/tsx": { "version": "4.22.4", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", - "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "~0.28.0" }, @@ -1119,22 +2764,93 @@ "fsevents": "~2.3.3" } }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, "node_modules/undici": { "version": "7.28.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz", - "integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==", "dev": true, "license": "MIT", "engines": { "node": ">=20.18.1" } }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/verkit": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.5.0.tgz", + "integrity": "sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, "node_modules/vite": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.0.tgz", - "integrity": "sha512-BuJcQK/56NQTWDGn4ABea3q4SSBdNPWwNZKTkkUpcMPnLoquSYH8llRtSUIgoL1KSCpHt5eghLShn50mH36y7Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", @@ -1209,8 +2925,6 @@ }, "node_modules/vitest": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.9.tgz", - "integrity": "sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1299,8 +3013,6 @@ }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", - "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "license": "MIT", "dependencies": { @@ -1312,8 +3024,6 @@ }, "node_modules/webidl-conversions": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", - "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -1322,8 +3032,6 @@ }, "node_modules/whatwg-mimetype": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", - "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", "dev": true, "license": "MIT", "engines": { @@ -1332,8 +3040,6 @@ }, "node_modules/whatwg-url": { "version": "16.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz", - "integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==", "dev": true, "license": "MIT", "dependencies": { @@ -1347,8 +3053,6 @@ }, "node_modules/why-is-node-running": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { @@ -1362,10 +3066,64 @@ "node": ">=8" } }, + "node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, "node_modules/xml-name-validator": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1374,10 +3132,63 @@ }, "node_modules/xmlchars": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, "license": "MIT" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", + "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", + "dev": true, + "license": "ISC", + "optional": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } } } } diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE new file mode 100644 index 000000000..f31575ec7 --- /dev/null +++ b/node_modules/@babel/code-frame/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +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. diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md new file mode 100644 index 000000000..716075511 --- /dev/null +++ b/node_modules/@babel/code-frame/README.md @@ -0,0 +1,19 @@ +# @babel/code-frame + +> Generate errors that contain a code frame that point to source locations. + +See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/code-frame +``` + +or using yarn: + +```sh +yarn add @babel/code-frame --dev +``` diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js new file mode 100644 index 000000000..9c5db4065 --- /dev/null +++ b/node_modules/@babel/code-frame/lib/index.js @@ -0,0 +1,217 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var picocolors = require('picocolors'); +var jsTokens = require('js-tokens'); +var helperValidatorIdentifier = require('@babel/helper-validator-identifier'); + +function isColorSupported() { + return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported + ); +} +const compose = (f, g) => v => f(g(v)); +function buildDefs(colors) { + return { + keyword: colors.cyan, + capitalized: colors.yellow, + jsxIdentifier: colors.yellow, + punctuator: colors.yellow, + number: colors.magenta, + string: colors.green, + regex: colors.magenta, + comment: colors.gray, + invalid: compose(compose(colors.white, colors.bgRed), colors.bold), + gutter: colors.gray, + marker: compose(colors.red, colors.bold), + message: compose(colors.red, colors.bold), + reset: colors.reset + }; +} +const defsOn = buildDefs(picocolors.createColors(true)); +const defsOff = buildDefs(picocolors.createColors(false)); +function getDefs(enabled) { + return enabled ? defsOn : defsOff; +} + +const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); +const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; +const BRACKET = /^[()[\]{}]$/; +let tokenize; +const JSX_TAG = /^[a-z][\w-]*$/i; +const getTokenType = function (token, offset, text) { + if (token.type === "name") { + const tokenValue = token.value; + if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) { + return "keyword"; + } + if (JSX_TAG.test(tokenValue) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === " defs[type](str)).join("\n"); + } else { + highlighted += value; + } + } + return highlighted; +} + +let deprecationWarningShown = false; +const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; +function getMarkerLines(loc, source, opts, startLineBaseZero) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line - startLineBaseZero; + const startColumn = startLoc.column; + const endLine = endLoc.line - startLineBaseZero; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + if (startLine === -1) { + start = 0; + } + if (endLine === -1) { + end = source.length; + } + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + return { + start, + end, + markerLines + }; +} +function codeFrameColumns(rawLines, loc, opts = {}) { + const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; + const startLineBaseZero = (opts.startLine || 1) - 1; + const defs = getDefs(shouldHighlight); + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts, startLineBaseZero); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end + startLineBaseZero).length; + const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; + let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + defs.message(opts.message); + } + } + return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; + } + if (shouldHighlight) { + return defs.reset(frame); + } else { + return frame; + } +} +function index (rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} + +exports.codeFrameColumns = codeFrameColumns; +exports.default = index; +exports.highlight = highlight; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/code-frame/lib/index.js.map b/node_modules/@babel/code-frame/lib/index.js.map new file mode 100644 index 000000000..6b85ae495 --- /dev/null +++ b/node_modules/@babel/code-frame/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/defs.ts","../src/highlight.ts","../src/index.ts"],"sourcesContent":["import picocolors, { createColors } from \"picocolors\";\nimport type { Colors, Formatter } from \"picocolors/types\";\n\nexport function isColorSupported() {\n return (\n // See https://github.com/alexeyraspopov/picocolors/issues/62\n typeof process === \"object\" &&\n (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\")\n ? false\n : picocolors.isColorSupported\n );\n}\n\nexport type InternalTokenType =\n | \"keyword\"\n | \"capitalized\"\n | \"jsxIdentifier\"\n | \"punctuator\"\n | \"number\"\n | \"string\"\n | \"regex\"\n | \"comment\"\n | \"invalid\";\n\ntype UITokens = \"gutter\" | \"marker\" | \"message\";\n\nexport type Defs = Record;\n\nconst compose: (f: (gv: U) => V, g: (v: T) => U) => (v: T) => V =\n (f, g) => v =>\n f(g(v));\n\n/**\n * Styles for token types.\n */\nfunction buildDefs(colors: Colors): Defs {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold),\n\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold),\n\n reset: colors.reset,\n };\n}\n\nconst defsOn = buildDefs(createColors(true));\nconst defsOff = buildDefs(createColors(false));\n\nexport function getDefs(enabled: boolean): Defs {\n return enabled ? defsOn : defsOff;\n}\n","import type { Token as JSToken, JSXToken } from \"js-tokens\";\nimport jsTokens from \"js-tokens\";\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nimport {\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nimport { getDefs, type InternalTokenType } from \"./defs.ts\";\n\n/**\n * Names that are always allowed as identifiers, but also appear as keywords\n * within certain syntactic productions.\n *\n * https://tc39.es/ecma262/#sec-keywords-and-reserved-words\n *\n * `target` has been omitted since it is very likely going to be a false\n * positive.\n */\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\n\ntype Token = {\n type: InternalTokenType | \"uncolored\";\n value: string;\n};\n\n/**\n * RegExp to test for newlines in terminal.\n */\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * RegExp to test for the three types of brackets.\n */\nconst BRACKET = /^[()[\\]{}]$/;\n\nlet tokenize: (\n text: string,\n) => Generator<{ type: InternalTokenType | \"uncolored\"; value: string }>;\n\nif (process.env.BABEL_8_BREAKING) {\n /**\n * Get the type of token, specifying punctuator type.\n */\n const getTokenType = function (\n token: JSToken | JSXToken,\n ): InternalTokenType | \"uncolored\" {\n if (token.type === \"IdentifierName\") {\n const tokenValue = token.value;\n if (\n isKeyword(tokenValue) ||\n isStrictReservedWord(tokenValue, true) ||\n sometimesKeywords.has(tokenValue)\n ) {\n return \"keyword\";\n }\n\n const firstChar = tokenValue.charCodeAt(0);\n if (firstChar < 128) {\n // ASCII characters\n if (\n firstChar >= charCodes.uppercaseA &&\n firstChar <= charCodes.uppercaseZ\n ) {\n return \"capitalized\";\n }\n } else {\n const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));\n if (firstChar !== firstChar.toLowerCase()) {\n return \"capitalized\";\n }\n }\n }\n\n if (token.type === \"Punctuator\" && BRACKET.test(token.value)) {\n return \"uncolored\";\n }\n\n if (token.type === \"Invalid\" && token.value === \"@\") {\n return \"punctuator\";\n }\n\n switch (token.type) {\n case \"NumericLiteral\":\n return \"number\";\n\n case \"StringLiteral\":\n case \"JSXString\":\n case \"NoSubstitutionTemplate\":\n return \"string\";\n\n case \"RegularExpressionLiteral\":\n return \"regex\";\n\n case \"Punctuator\":\n case \"JSXPunctuator\":\n return \"punctuator\";\n\n case \"MultiLineComment\":\n case \"SingleLineComment\":\n return \"comment\";\n\n case \"Invalid\":\n case \"JSXInvalid\":\n return \"invalid\";\n\n case \"JSXIdentifier\":\n return \"jsxIdentifier\";\n\n default:\n return \"uncolored\";\n }\n };\n\n /**\n * Turn a string of JS into an array of objects.\n */\n tokenize = function* (text: string): Generator {\n for (const token of jsTokens(text, { jsx: true })) {\n switch (token.type) {\n case \"TemplateHead\":\n yield { type: \"string\", value: token.value.slice(0, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateMiddle\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateTail\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1) };\n break;\n\n default:\n yield {\n type: getTokenType(token),\n value: token.value,\n };\n }\n }\n };\n} else {\n /**\n * RegExp to test for what seems to be a JSX tag name.\n */\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n\n // The token here is defined in js-tokens@4. However we don't bother\n // typing it since the whole block will be removed in Babel 8\n const getTokenType = function (token: any, offset: number, text: string) {\n if (token.type === \"name\") {\n const tokenValue = token.value;\n if (\n isKeyword(tokenValue) ||\n isStrictReservedWord(tokenValue, true) ||\n sometimesKeywords.has(tokenValue)\n ) {\n return \"keyword\";\n }\n\n if (\n JSX_TAG.test(tokenValue) &&\n (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \" defs[type as InternalTokenType](str))\n .join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n\n return highlighted;\n}\n","import { getDefs, isColorSupported } from \"./defs.ts\";\nimport { highlight } from \"./highlight.ts\";\n\nexport { highlight };\n\nlet deprecationWarningShown = false;\n\ntype Location = {\n column: number;\n line: number;\n};\n\ntype NodeLocation = {\n end?: Location;\n start: Location;\n};\n\nexport interface Options {\n /** Syntax highlight the code as JavaScript for terminals. default: false */\n highlightCode?: boolean;\n /** The number of lines to show above the error. default: 2 */\n linesAbove?: number;\n /** The number of lines to show below the error. default: 3 */\n linesBelow?: number;\n /** The line number corresponding to the first line in `rawLines`. default: 1 */\n startLine?: number;\n /**\n * Forcibly syntax highlight the code as JavaScript (for non-terminals);\n * overrides highlightCode.\n * default: false\n */\n forceColor?: boolean;\n /**\n * Pass in a string to be displayed inline (if possible) next to the\n * highlighted location in the code. If it can't be positioned inline,\n * it will be placed above the code frame.\n * default: nothing\n */\n message?: string;\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * Extract what lines should be marked and highlighted.\n */\n\ntype MarkerLines = Record;\n\nfunction getMarkerLines(\n loc: NodeLocation,\n source: string[],\n opts: Options,\n startLineBaseZero: number,\n): {\n start: number;\n end: number;\n markerLines: MarkerLines;\n} {\n const startLoc: Location = {\n column: 0,\n line: -1,\n ...loc.start,\n };\n const endLoc: Location = {\n ...startLoc,\n ...loc.end,\n };\n const { linesAbove = 2, linesBelow = 3 } = opts || {};\n const startLine = startLoc.line - startLineBaseZero;\n const startColumn = startLoc.column;\n const endLine = endLoc.line - startLineBaseZero;\n const endColumn = endLoc.column;\n\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines: MarkerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return { start, end, markerLines };\n}\n\nexport function codeFrameColumns(\n rawLines: string,\n loc: NodeLocation,\n opts: Options = {},\n): string {\n const shouldHighlight =\n opts.forceColor || (isColorSupported() && opts.highlightCode);\n const startLineBaseZero = (opts.startLine || 1) - 1;\n const defs = getDefs(shouldHighlight);\n\n const lines = rawLines.split(NEWLINE);\n const { start, end, markerLines } = getMarkerLines(\n loc,\n lines,\n opts,\n startLineBaseZero,\n );\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n\n const numberMaxWidth = String(end + startLineBaseZero).length;\n\n const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;\n\n let frame = highlightedLines\n .split(NEWLINE, end)\n .slice(start, end)\n .map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number + startLineBaseZero}`.slice(\n -numberMaxWidth,\n );\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line\n .slice(0, Math.max(hasMarker[0] - 1, 0))\n .replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n\n markerLine = [\n \"\\n \",\n defs.gutter(gutter.replace(/\\d/g, \" \")),\n \" \",\n markerSpacing,\n defs.marker(\"^\").repeat(numberOfMarkers),\n ].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [\n defs.marker(\">\"),\n defs.gutter(gutter),\n line.length > 0 ? ` ${line}` : \"\",\n markerLine,\n ].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n })\n .join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (shouldHighlight) {\n return defs.reset(frame);\n } else {\n return frame;\n }\n}\n\n/**\n * Create a code frame, adding line numbers, code highlighting, and pointing to a given position.\n */\n\nexport default function (\n rawLines: string,\n lineNumber: number,\n colNumber?: number | null,\n opts: Options = {},\n): string {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n\n const message =\n \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n // A string is directly supplied to emitWarning, because when supplying an\n // Error object node throws in the tests because of different contexts\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n\n const location: NodeLocation = {\n start: { column: colNumber, line: lineNumber },\n };\n\n return codeFrameColumns(rawLines, location, opts);\n}\n"],"names":["isColorSupported","process","env","FORCE_COLOR","picocolors","compose","f","g","v","buildDefs","colors","keyword","cyan","capitalized","yellow","jsxIdentifier","punctuator","number","magenta","string","green","regex","comment","gray","invalid","white","bgRed","bold","gutter","marker","red","message","reset","defsOn","createColors","defsOff","getDefs","enabled","sometimesKeywords","Set","NEWLINE","BRACKET","tokenize","JSX_TAG","getTokenType","token","offset","text","type","tokenValue","value","isKeyword","isStrictReservedWord","has","test","slice","firstChar","String","fromCodePoint","codePointAt","toLowerCase","match","jsTokens","default","exec","matchToToken","index","highlight","defs","highlighted","split","map","str","join","deprecationWarningShown","getMarkerLines","loc","source","opts","startLineBaseZero","startLoc","Object","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","i","lineNumber","sourceLength","codeFrameColumns","rawLines","shouldHighlight","forceColor","highlightCode","lines","hasColumns","numberMaxWidth","highlightedLines","frame","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","colNumber","emitWarning","deprecationError","Error","name","console","warn","location"],"mappings":";;;;;;;;AAGO,SAASA,gBAAgBA,GAAG;EACjC,QAEE,OAAOC,OAAO,KAAK,QAAQ,KACxBA,OAAO,CAACC,GAAG,CAACC,WAAW,KAAK,GAAG,IAAIF,OAAO,CAACC,GAAG,CAACC,WAAW,KAAK,OAAO,CAAC,GACtE,KAAK,GACLC,UAAU,CAACJ,gBAAAA;AAAgB,IAAA;AAEnC,CAAA;AAiBA,MAAMK,OAAkE,GACtEA,CAACC,CAAC,EAAEC,CAAC,KAAKC,CAAC,IACTF,CAAC,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAA;AAKX,SAASC,SAASA,CAACC,MAAc,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AACpD,KAAC,MAAM;AACL,MAAA,MAAM8F,gBAAgB,GAAG,IAAIC,KAAK,CAAC/F,OAAO,CAAC,CAAA;MAC3C8F,gBAAgB,CAACE,IAAI,GAAG,oBAAoB,CAAA;MAC5CC,OAAO,CAACC,IAAI,CAAC,IAAIH,KAAK,CAAC/F,OAAO,CAAC,CAAC,CAAA;AAClC,KAAA;AACF,GAAA;EAEA4F,SAAS,GAAG7B,IAAI,CAACC,GAAG,CAAC4B,SAAS,EAAE,CAAC,CAAC,CAAA;AAElC,EAAA,MAAMO,QAAsB,GAAG;AAC7B7C,IAAAA,KAAK,EAAE;AAAEF,MAAAA,MAAM,EAAEwC,SAAS;AAAEvC,MAAAA,IAAI,EAAEiB,UAAAA;AAAW,KAAA;GAC9C,CAAA;AAED,EAAA,OAAOE,gBAAgB,CAACC,QAAQ,EAAE0B,QAAQ,EAAEpD,IAAI,CAAC,CAAA;AACnD;;;;;;"} \ No newline at end of file diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json new file mode 100644 index 000000000..1f21a379d --- /dev/null +++ b/node_modules/@babel/code-frame/package.json @@ -0,0 +1,32 @@ +{ + "name": "@babel/code-frame", + "version": "7.29.7", + "description": "Generate errors that contain a code frame that point to source locations.", + "author": "The Babel Team (https://babel.dev/team)", + "homepage": "https://babel.dev/docs/en/next/babel-code-frame", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-code-frame" + }, + "main": "./lib/index.js", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "devDependencies": { + "charcodes": "^0.2.0", + "import-meta-resolve": "^4.1.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE new file mode 100644 index 000000000..f31575ec7 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +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. diff --git a/node_modules/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md new file mode 100644 index 000000000..05c19e64a --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/README.md @@ -0,0 +1,19 @@ +# @babel/helper-validator-identifier + +> Validate identifier/keywords name + +See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-validator-identifier +``` + +or using yarn: + +```sh +yarn add @babel/helper-validator-identifier +``` diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js new file mode 100644 index 000000000..b12e6e4b9 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js @@ -0,0 +1,70 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isIdentifierChar = isIdentifierChar; +exports.isIdentifierName = isIdentifierName; +exports.isIdentifierStart = isIdentifierStart; +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; +function isInAstralSet(code, set) { + let pos = 0x10000; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; +} +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); +} +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} +function isIdentifierName(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; +} + +//# sourceMappingURL=identifier.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map new file mode 100644 index 000000000..71d32ff26 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088f\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5c\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdc-\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7dc\\ua7f1-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1add\\u1ae0-\\u1aeb\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n"],"mappings":";;;;;;;;AAaA,IAAIA,4BAA4B,GAAG,spIAAspI;AAEzrI,IAAIC,uBAAuB,GAAG,4lFAA4lF;AAE1nF,MAAMC,uBAAuB,GAAG,IAAIC,MAAM,CACxC,GAAG,GAAGH,4BAA4B,GAAG,GACvC,CAAC;AACD,MAAMI,kBAAkB,GAAG,IAAID,MAAM,CACnC,GAAG,GAAGH,4BAA4B,GAAGC,uBAAuB,GAAG,GACjE,CAAC;AAEDD,4BAA4B,GAAGC,uBAAuB,GAAG,IAAI;AAQ7D,MAAMI,0BAA0B,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,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AG,CAAC,EAAEA,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAED,CAAC,EAAE,EAAE;IAKpC,IAAIU,EAAE,GAAGF,IAAI,CAACG,UAAU,CAACX,CAAC,CAAC;IAC3B,IAAI,CAACU,EAAE,GAAG,MAAM,MAAM,MAAM,IAAIV,CAAC,GAAG,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAE;MACnD,MAAMW,KAAK,GAAGJ,IAAI,CAACG,UAAU,CAAC,EAAEX,CAAC,CAAC;MAClC,IAAI,CAACY,KAAK,GAAG,MAAM,MAAM,MAAM,EAAE;QAC/BF,EAAE,GAAG,OAAO,IAAI,CAACA,EAAE,GAAG,KAAK,KAAK,EAAE,CAAC,IAAIE,KAAK,GAAG,KAAK,CAAC;MACvD;IACF;IACA,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,IAAI,CAACP,iBAAiB,CAACQ,EAAE,CAAC,EAAE;QAC1B,OAAO,KAAK;MACd;IACF,CAAC,MAAM,IAAI,CAACJ,gBAAgB,CAACI,EAAE,CAAC,EAAE;MAChC,OAAO,KAAK;IACd;EACF;EACA,OAAO,CAACD,OAAO;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js new file mode 100644 index 000000000..76b22822c --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/index.js @@ -0,0 +1,57 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "isIdentifierChar", { + enumerable: true, + get: function () { + return _identifier.isIdentifierChar; + } +}); +Object.defineProperty(exports, "isIdentifierName", { + enumerable: true, + get: function () { + return _identifier.isIdentifierName; + } +}); +Object.defineProperty(exports, "isIdentifierStart", { + enumerable: true, + get: function () { + return _identifier.isIdentifierStart; + } +}); +Object.defineProperty(exports, "isKeyword", { + enumerable: true, + get: function () { + return _keyword.isKeyword; + } +}); +Object.defineProperty(exports, "isReservedWord", { + enumerable: true, + get: function () { + return _keyword.isReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindOnlyReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindReservedWord; + } +}); +Object.defineProperty(exports, "isStrictReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictReservedWord; + } +}); +var _identifier = require("./identifier.js"); +var _keyword = require("./keyword.js"); + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js.map b/node_modules/@babel/helper-validator-identifier/lib/index.js.map new file mode 100644 index 000000000..d985f3b96 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js new file mode 100644 index 000000000..054cf8474 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isKeyword = isKeyword; +exports.isReservedWord = isReservedWord; +exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; +exports.isStrictBindReservedWord = isStrictBindReservedWord; +exports.isStrictReservedWord = isStrictReservedWord; +const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const keywords = new Set(reservedWords.keyword); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); +} +function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); +} +function isKeyword(word) { + return keywords.has(word); +} + +//# sourceMappingURL=keyword.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map new file mode 100644 index 000000000..3471f78cc --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map @@ -0,0 +1 @@ +{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json new file mode 100644 index 000000000..9904752a3 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/package.json @@ -0,0 +1,31 @@ +{ + "name": "@babel/helper-validator-identifier", + "version": "7.29.7", + "description": "Validate identifier/keywords name", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-validator-identifier" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + }, + "./package.json": "./package.json" + }, + "devDependencies": { + "@unicode/unicode-17.0.0": "^1.6.10", + "charcodes": "^0.2.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/README.md b/node_modules/@commitlint/cli/README.md new file mode 100644 index 000000000..d05f13f17 --- /dev/null +++ b/node_modules/@commitlint/cli/README.md @@ -0,0 +1,11 @@ +# @commitlint/cli + +

+ +

+ +Lint commit messages + +## Documentation + +Consult [CLI reference](https://commitlint.js.org/reference/cli) for comprehensive documentation. diff --git a/node_modules/@commitlint/cli/cli.js b/node_modules/@commitlint/cli/cli.js new file mode 100755 index 000000000..940e27804 --- /dev/null +++ b/node_modules/@commitlint/cli/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import "./lib/cli.js"; diff --git a/node_modules/@commitlint/cli/index.cjs b/node_modules/@commitlint/cli/index.cjs new file mode 100644 index 000000000..8d9ae3a99 --- /dev/null +++ b/node_modules/@commitlint/cli/index.cjs @@ -0,0 +1,5 @@ +"use strict"; + +const path = require("node:path"); + +module.exports = path.join(__dirname, "cli.js"); diff --git a/node_modules/@commitlint/cli/lib/cli-error.d.ts b/node_modules/@commitlint/cli/lib/cli-error.d.ts new file mode 100644 index 000000000..943c5d461 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli-error.d.ts @@ -0,0 +1,14 @@ +export declare enum ExitCode { + CommitlintDefault = 0, + CommitlintErrorDefault = 1, + CommitLintWarning = 2, + CommitLintError = 3, + CommitlintInvalidArgument = 9 +} +export declare class CliError extends Error { + __proto__: ErrorConstructor; + type: string; + error_code: ExitCode; + constructor(message: string, type: string, error_code?: ExitCode); +} +//# sourceMappingURL=cli-error.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli-error.d.ts.map b/node_modules/@commitlint/cli/lib/cli-error.d.ts.map new file mode 100644 index 000000000..e7020811c --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cli-error.d.ts","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IACnB,iBAAiB,IAAI;IACrB,sBAAsB,IAAI;IAC1B,iBAAiB,IAAI;IACrB,eAAe,IAAI;IACnB,yBAAyB,IAAI;CAC7B;AAED,qBAAa,QAAS,SAAQ,KAAK;IAClC,SAAS,mBAAS;IAEX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,QAAQ,CAAC;IAE5B,YAAY,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,WAAkC,EAOtF;CACD"} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli-error.js b/node_modules/@commitlint/cli/lib/cli-error.js new file mode 100644 index 000000000..1d7737008 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli-error.js @@ -0,0 +1,20 @@ +export var ExitCode; +(function (ExitCode) { + ExitCode[ExitCode["CommitlintDefault"] = 0] = "CommitlintDefault"; + ExitCode[ExitCode["CommitlintErrorDefault"] = 1] = "CommitlintErrorDefault"; + ExitCode[ExitCode["CommitLintWarning"] = 2] = "CommitLintWarning"; + ExitCode[ExitCode["CommitLintError"] = 3] = "CommitLintError"; + ExitCode[ExitCode["CommitlintInvalidArgument"] = 9] = "CommitlintInvalidArgument"; +})(ExitCode || (ExitCode = {})); +export class CliError extends Error { + __proto__ = Error; + type; + error_code; + constructor(message, type, error_code = ExitCode.CommitlintErrorDefault) { + super(message); + this.type = type; + this.error_code = error_code; + Object.setPrototypeOf(this, CliError.prototype); + } +} +//# sourceMappingURL=cli-error.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli-error.js.map b/node_modules/@commitlint/cli/lib/cli-error.js.map new file mode 100644 index 000000000..60e45f0c8 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cli-error.js","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IACnB,iEAAqB,CAAA;IACrB,2EAA0B,CAAA;IAC1B,iEAAqB,CAAA;IACrB,6DAAmB,CAAA;IACnB,iFAA6B,CAAA;AAC9B,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,MAAM,OAAO,QAAS,SAAQ,KAAK;IAClC,SAAS,GAAG,KAAK,CAAC;IAEX,IAAI,CAAS;IACb,UAAU,CAAW;IAE5B,YAAY,OAAe,EAAE,IAAY,EAAE,UAAU,GAAG,QAAQ,CAAC,sBAAsB;QACtF,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;CACD"} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli.d.ts b/node_modules/@commitlint/cli/lib/cli.d.ts new file mode 100644 index 000000000..d9ae1944c --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=cli.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli.d.ts.map b/node_modules/@commitlint/cli/lib/cli.d.ts.map new file mode 100644 index 000000000..f022439b1 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli.js b/node_modules/@commitlint/cli/lib/cli.js new file mode 100644 index 000000000..53665c902 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli.js @@ -0,0 +1,445 @@ +import fs from "node:fs"; +import { createRequire } from "node:module"; +import path from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import util from "node:util"; +import lint from "@commitlint/lint"; +import load, { resolveFromSilent, resolveGlobalSilent } from "@commitlint/load"; +import read from "@commitlint/read"; +import { x } from "tinyexec"; +import yargs from "yargs"; +import { CliError, ExitCode } from "./cli-error.js"; +const require = createRequire(import.meta.url); +const __dirname = path.resolve(fileURLToPath(import.meta.url), ".."); +const dynamicImport = async (id) => { + const imported = await import(path.isAbsolute(id) ? pathToFileURL(id).toString() : id); + return ("default" in imported && imported.default) || imported; +}; +const pkg = require("../package.json"); +const gitDefaultCommentChar = "#"; +const defaultConfig = "@commitlint/config-conventional"; +const cli = yargs(process.argv.slice(2)) + .options({ + color: { + alias: "c", + default: true, + description: "toggle colored output", + type: "boolean", + }, + config: { + alias: "g", + description: "path to the config file; result code 9 if config is missing", + type: "string", + }, + "default-config": { + description: "use built-in default config (@commitlint/config-conventional) when no rules are found", + type: "boolean", + }, + "print-config": { + choices: ["", "text", "json"], + description: "print resolved config", + type: "string", + }, + cwd: { + alias: "d", + default: process.cwd(), + defaultDescription: "(Working Directory)", + description: "directory to execute in", + type: "string", + }, + edit: { + alias: "e", + description: "read last commit message from the specified file or fallbacks to ./.git/COMMIT_EDITMSG", + type: "string", + }, + env: { + alias: "E", + description: "check message in the file at path given by environment variable value", + type: "string", + }, + extends: { + alias: "x", + description: "array of shareable configurations to extend", + type: "array", + }, + "help-url": { + alias: "H", + type: "string", + description: "help url in error message", + }, + from: { + alias: "f", + description: "lower end of the commit range to lint; applies if edit=false", + type: "string", + }, + "from-last-tag": { + description: "uses the last tag as the lower end of the commit range to lint; applies if edit=false and from is not set", + type: "boolean", + }, + "git-log-args": { + description: "additional git log arguments as space separated string, example '--first-parent --cherry-pick'", + type: "string", + }, + last: { + alias: "l", + description: "just analyze the last commit; applies if edit=false", + type: "boolean", + }, + format: { + alias: "o", + description: "output format of the results", + type: "string", + }, + "parser-preset": { + alias: "p", + description: "configuration preset to use for conventional-commits-parser", + type: "string", + }, + quiet: { + alias: "q", + default: false, + description: "toggle console output", + type: "boolean", + }, + to: { + alias: "t", + description: "upper end of the commit range to lint; applies if edit=false", + type: "string", + }, + verbose: { + alias: "V", + type: "boolean", + description: "enable verbose output for reports without problems", + }, + "legacy-output": { + description: "use the legacy input output format (single-line 'input: ...')", + type: "boolean", + }, + strict: { + alias: "s", + type: "boolean", + description: "enable strict mode; result code 2 for warnings, 3 for errors", + }, +}) + .version("version", "display version information", `${pkg.name}@${pkg.version}`) + .alias("v", "version") + .help("help") + .alias("h", "help") + .config("options", "path to a JSON file or Common.js module containing CLI options", require) + .usage(`${pkg.name}@${pkg.version} - ${pkg.description}\n`) + .usage(`[input] reads from stdin if --edit, --env, --from and --to are omitted`) + .strict(); +/** + * avoid description words to be divided in new lines when there is enough space + * @see https://github.com/conventional-changelog/commitlint/pull/3850#discussion_r1472251234 + */ +cli.wrap(cli.terminalWidth()); +main(cli.argv).catch((err) => { + setTimeout(() => { + if (err.type === pkg.name) { + process.exit(err.error_code); + } + throw err; + }, 0); +}); +async function stdin() { + let result = ""; + if (process.stdin.isTTY) { + return result; + } + process.stdin.setEncoding("utf8"); + for await (const chunk of process.stdin) { + result += chunk; + } + return result; +} +async function resolveArgs(args) { + return typeof args.then === "function" ? await args : args; +} +async function main(args) { + const options = await resolveArgs(args); + if (typeof options.edit === "undefined") { + options.edit = false; + } + const raw = options._; + const flags = normalizeFlags(options); + try { + if (!fs.statSync(flags.cwd).isDirectory()) { + const err = new CliError(`The specified --cwd path "${flags.cwd}" is not a directory.`, pkg.name); + console.error(err.message); + throw err; + } + } + catch (e) { + if (e instanceof CliError) { + throw e; + } + const code = e.code; + const message = code === "ENOENT" + ? `The specified --cwd directory "${flags.cwd}" does not exist.` + : `Cannot access the specified --cwd directory "${flags.cwd}": ${code ?? e.message}`; + const err = new CliError(message, pkg.name); + console.error(err.message); + throw err; + } + if (typeof options["print-config"] === "string") { + const loaded = await loadConfig(flags); + switch (options["print-config"]) { + case "json": + console.log(JSON.stringify(loaded)); + return; + case "text": + default: + console.log(util.inspect(loaded, false, null, options.color)); + return; + } + } + const fromStdin = checkFromStdin(raw, flags); + if (Object.hasOwn(flags, "last") && + (Object.hasOwn(flags, "from") || Object.hasOwn(flags, "to") || flags.edit)) { + const err = new CliError("Please use the --last flag alone. The --last flag should not be used with --to or --from or --edit.", pkg.name); + cli.showHelp("log"); + console.log(err.message); + throw err; + } + if (Object.hasOwn(flags, "from") && Object.hasOwn(flags, "to") && flags.from === flags.to) { + const err = new CliError(`Invalid input flags: --from and --to point to the same commit. To lint that single commit, use --last (if HEAD) or --from ${flags.from}^ --to ${flags.from}.`, pkg.name, ExitCode.CommitlintInvalidArgument); + cli.showHelp("log"); + console.error(err.message); + throw err; + } + const input = await (fromStdin + ? stdin() + : read({ + to: flags.to, + from: flags.from, + fromLastTag: flags["from-last-tag"], + last: flags.last, + edit: flags.edit, + cwd: flags.cwd, + gitLogArgs: flags["git-log-args"], + })); + const messages = (Array.isArray(input) ? input : [input]) + .filter((message) => typeof message === "string") + .filter((message) => message.trim() !== "") + .filter(Boolean); + if (messages.length === 0 && !checkFromRepository(flags)) { + const err = new CliError("[input] is required: supply via stdin, or --env or --edit or --last or --from and --to", pkg.name); + cli.showHelp("log"); + console.log(err.message); + throw err; + } + const loaded = await loadConfig(flags); + const parserOpts = selectParserOpts(loaded.parserPreset); + const opts = { + parserOpts: {}, + plugins: {}, + ignores: [], + defaultIgnores: true, + }; + if (parserOpts) { + opts.parserOpts = parserOpts; + } + if (loaded.plugins) { + opts.plugins = loaded.plugins; + } + if (loaded.ignores) { + opts.ignores = loaded.ignores; + } + if (loaded.defaultIgnores === false) { + opts.defaultIgnores = false; + } + const format = await loadFormatter(loaded, flags); + // If reading from `.git/COMMIT_EDIT_MSG`, strip comments using + // core.commentChar from git configuration, falling back to '#'. + if (flags.edit) { + const result = x("git", ["config", "core.commentChar"]); + const output = await result; + if (result.exitCode && result.exitCode > 1) { + console.warn("Could not determine core.commentChar git configuration", output.stderr); + opts.parserOpts.commentChar = gitDefaultCommentChar; + } + else { + opts.parserOpts.commentChar = output.stdout.trim() || gitDefaultCommentChar; + } + } + const results = await Promise.all(messages.map((message) => lint(message, loaded.rules, opts))); + let isRulesEmpty = false; + if (Object.keys(loaded.rules).length === 0) { + let input = ""; + if (results.length !== 0) { + input = results[0].input; + } + results.splice(0, results.length, { + valid: false, + errors: [ + { + level: 2, + valid: false, + name: "empty-rules", + message: [ + "Please add rules to your `commitlint.config.js`", + " - Getting started guide: https://commitlint.js.org/guides/getting-started", + " - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts", + " - Or run commitlint with the built-in default config: commitlint --default-config", + ].join("\n"), + }, + ], + warnings: [], + input, + }); + isRulesEmpty = true; + } + const report = results.reduce((info, result) => { + info.valid = result.valid ? info.valid : false; + info.errorCount += result.errors.length; + info.warningCount += result.warnings.length; + info.results.push(result); + return info; + }, { + valid: true, + errorCount: 0, + warningCount: 0, + results: [], + }); + const helpUrl = flags["help-url"]?.trim() || loaded.helpUrl; + const output = format(report, { + color: flags.color, + verbose: flags.verbose, + helpUrl, + legacyOutput: flags["legacy-output"], + }); + if (!flags.quiet && output !== "") { + console.log(output); + } + if (flags.strict) { + if (report.errorCount > 0) { + throw new CliError(output, pkg.name, ExitCode.CommitLintError); + } + if (report.warningCount > 0) { + throw new CliError(output, pkg.name, ExitCode.CommitLintWarning); + } + } + if (isRulesEmpty) { + throw new CliError(output, pkg.name, ExitCode.CommitlintInvalidArgument); + } + if (!report.valid) { + throw new CliError(output, pkg.name); + } +} +function checkFromStdin(input, flags) { + return input.length === 0 && !checkFromRepository(flags); +} +function checkFromRepository(flags) { + return checkFromHistory(flags) || checkFromEdit(flags); +} +function checkFromEdit(flags) { + return Boolean(flags.edit) || Boolean(flags.env); +} +function checkFromHistory(flags) { + return (typeof flags.from === "string" || + typeof flags["from-last-tag"] === "boolean" || + typeof flags.to === "string" || + typeof flags.last === "boolean"); +} +function normalizeFlags(flags) { + const edit = getEditValue(flags); + return { + ...flags, + edit, + }; +} +function getEditValue(flags) { + if (flags.env) { + if (!(flags.env in process.env)) { + throw new Error(`Received '${flags.env}' as value for -E | --env, but environment variable '${flags.env}' is not available globally`); + } + return process.env[flags.env]; + } + const { edit } = flags; + // If the edit flag is set but empty (i.e '-e') we default + // to .git/COMMIT_EDITMSG + if (edit === "") { + return true; + } + if (typeof edit === "boolean") { + return edit; + } + // The recommended method to specify -e with husky was `commitlint -e $HUSKY_GIT_PARAMS` + // This does not work properly with win32 systems, where env variable declarations + // use a different syntax + // See https://github.com/conventional-changelog/commitlint/issues/103 for details + // This has been superseded by the `-E GIT_PARAMS` / `-E HUSKY_GIT_PARAMS` + const isGitParams = edit === "$GIT_PARAMS" || edit === "%GIT_PARAMS%"; + const isHuskyParams = edit === "$HUSKY_GIT_PARAMS" || edit === "%HUSKY_GIT_PARAMS%"; + if (isGitParams || isHuskyParams) { + console.warn(`Using environment variable syntax (${edit}) in -e |\ +--edit is deprecated. Use '{-E|--env} HUSKY_GIT_PARAMS instead'`); + if (isGitParams && "GIT_PARAMS" in process.env) { + return process.env.GIT_PARAMS; + } + if ("HUSKY_GIT_PARAMS" in process.env) { + return process.env.HUSKY_GIT_PARAMS; + } + throw new Error(`Received ${edit} as value for -e | --edit, but GIT_PARAMS or HUSKY_GIT_PARAMS are not available globally.`); + } + return edit; +} +async function loadConfig(flags) { + const loaded = await load(getSeed(flags), { + cwd: flags.cwd, + file: flags.config, + }); + // `--default-config` falls back to the built-in default config when + // config resolution yields no rules (e.g. no config file was found). + // The default config is prepended so user-supplied --extends configs + // keep precedence over it. + if (flags["default-config"] && Object.keys(loaded.rules).length === 0) { + const extendsWithDefault = [resolveDefaultConfig(flags), ...(flags.extends || [])]; + return load(getSeed({ ...flags, extends: extendsWithDefault }), { + cwd: flags.cwd, + file: flags.config, + }); + } + return loaded; +} +function resolveDefaultConfig(flags) { + // Resolve from the cli package itself first so the fallback works without + // @commitlint/config-conventional being installed in the linted project + // (e.g. `npx commitlint --default-config` or strictly isolated node_modules). + return resolveModulePath(defaultConfig, flags) || defaultConfig; +} +function resolveModulePath(moduleName, flags) { + return (resolveFromSilent(moduleName, __dirname) || + resolveFromSilent(moduleName, flags.cwd) || + resolveGlobalSilent(moduleName)); +} +function getSeed(flags) { + const n = (flags.extends || []).filter((i) => typeof i === "string"); + return n.length > 0 + ? { extends: n, parserPreset: flags["parser-preset"] } + : { parserPreset: flags["parser-preset"] }; +} +function selectParserOpts(parserPreset) { + if (typeof parserPreset !== "object") { + return undefined; + } + if (typeof parserPreset.parserOpts !== "object") { + return undefined; + } + return parserPreset.parserOpts; +} +function loadFormatter(config, flags) { + const moduleName = flags.format || config.formatter || "@commitlint/format"; + const modulePath = resolveModulePath(moduleName, flags); + if (modulePath) { + return dynamicImport(modulePath); + } + throw new Error(`Using format ${moduleName}, but cannot find the module.`); +} +// Catch unhandled rejections globally +process.on("unhandledRejection", (reason, promise) => { + console.log("Unhandled Rejection at: Promise ", promise, " reason: ", reason); + throw reason; +}); +//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/cli.js.map b/node_modules/@commitlint/cli/lib/cli.js.map new file mode 100644 index 000000000..7ac4e3ea3 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/cli.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO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SAAS,aAAa,CAAC,MAAuB,EAAE,KAAe;IAC9D,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,IAAI,oBAAoB,CAAC;IAC5E,MAAM,UAAU,GAAG,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAExD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,aAAa,CAAY,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,gBAAgB,UAAU,+BAA+B,CAAC,CAAC;AAC5E,CAAC;AAED,sCAAsC;AACtC,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;IACpD,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9E,MAAM,MAAM,CAAC;AACd,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/types.d.ts b/node_modules/@commitlint/cli/lib/types.d.ts new file mode 100644 index 000000000..9413a8b91 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/types.d.ts @@ -0,0 +1,28 @@ +export interface CliFlags { + color: boolean; + config?: string; + cwd: string; + "default-config"?: boolean; + edit?: string | boolean; + env?: string; + extends?: (string | number)[]; + help?: boolean; + "help-url"?: string; + from?: string; + "from-last-tag"?: boolean; + "git-log-args"?: string; + last?: boolean; + format?: string; + "parser-preset"?: string; + quiet: boolean; + to?: string; + version?: boolean; + verbose?: boolean; + /** @type {'' | 'text' | 'json'} */ + "print-config"?: string; + strict?: boolean; + "legacy-output"?: boolean; + _: (string | number)[]; + $0: string; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/types.d.ts.map b/node_modules/@commitlint/cli/lib/types.d.ts.map new file mode 100644 index 000000000..e306006ed --- /dev/null +++ b/node_modules/@commitlint/cli/lib/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;CACX"} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/types.js b/node_modules/@commitlint/cli/lib/types.js new file mode 100644 index 000000000..718fd38ae --- /dev/null +++ b/node_modules/@commitlint/cli/lib/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/cli/lib/types.js.map b/node_modules/@commitlint/cli/lib/types.js.map new file mode 100644 index 000000000..c768b7900 --- /dev/null +++ b/node_modules/@commitlint/cli/lib/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/cli/license.md b/node_modules/@commitlint/cli/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/cli/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/cli/package.json b/node_modules/@commitlint/cli/package.json new file mode 100644 index 000000000..57e604fb7 --- /dev/null +++ b/node_modules/@commitlint/cli/package.json @@ -0,0 +1,60 @@ +{ + "name": "@commitlint/cli", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint your commit messages", + "keywords": [ + "cli", + "commitlint", + "conventional-changelog" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/cli" + }, + "bin": { + "commitlint": "./cli.js" + }, + "files": [ + "index.cjs", + "cli.js", + "lib" + ], + "type": "module", + "main": "index.cjs", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/config-conventional": "^21.2.3", + "@commitlint/format": "^21.2.3", + "@commitlint/lint": "^21.2.3", + "@commitlint/load": "^21.2.3", + "@commitlint/read": "^21.2.3", + "@commitlint/types": "^21.2.3", + "tinyexec": "^1.0.0", + "yargs": "^18.0.0" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0", + "@types/yargs": "^17.0.29", + "conventional-commits-parser": "^7.0.0", + "es-toolkit": "^1.46.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/config-conventional/README.md b/node_modules/@commitlint/config-conventional/README.md new file mode 100644 index 000000000..b1026029b --- /dev/null +++ b/node_modules/@commitlint/config-conventional/README.md @@ -0,0 +1,231 @@ +# @commitlint/config-conventional + +Lint your conventional commits + +Shareable `commitlint` config enforcing [conventional commits](https://conventionalcommits.org/). +Use with [@commitlint/cli](https://npm.im/@commitlint/cli) and [@commitlint/prompt-cli](https://npm.im/@commitlint/prompt-cli). + +## Getting started + +```sh +npm install --save-dev @commitlint/config-conventional @commitlint/cli +echo "export default {extends: ['@commitlint/config-conventional']};" > commitlint.config.js +``` + +## Beyond the specification + +This config enforces the [Conventional Commits](https://conventionalcommits.org/) convention, plus a few stylistic rules the specification itself does not require. +The stylistic rules are inherited from the [Angular commit convention](https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md) commitlint originates from: + +- `header-max-length`, `body-max-line-length` and `footer-max-line-length` limit lines to 100 characters to keep messages readable in git tooling — body and footer lines containing URLs are exempt +- `type-enum` restricts the type to the list below, while the specification allows any type +- `type-case`, `subject-case` and `subject-full-stop` normalize style: lower-case types, no sentence-case, start-case, pascal-case or upper-case subjects, no trailing full-stop + +These rules narrow the specification — they do not conflict with it. +If you prefer the plain specification, override the rules you do not want in your config: + +```js +export default { + extends: ["@commitlint/config-conventional"], + rules: { + "body-max-line-length": [0], + "footer-max-line-length": [0], + }, +}; +``` + +## Rules + +### Problems + +The following rules are considered problems for `@commitlint/config-conventional` and will yield a non-zero exit code when not met. + +Consult [Rules reference](https://commitlint.js.org/reference/rules) for a list of available rules. + +#### type-enum + +- **condition**: `type` is found in value +- **rule**: `always` +- **level**: `error` +- **value** + + ``` + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test' + ]; + ``` + +```sh +echo "foo: some message" # fails +echo "fix: some message" # passes +``` + +#### type-case + +- **description**: `type` is in case `value` +- **rule**: `always` +- **level**: `error` +- **value** + ``` + 'lowerCase' + ``` + +```sh +echo "FIX: some message" # fails +echo "fix: some message" # passes +``` + +#### type-empty + +- **condition**: `type` is empty +- **rule**: `never` +- **level**: `error` + +```sh +echo ": some message" # fails +echo "fix: some message" # passes +``` + +#### subject-case + +- **condition**: `subject` is in one of the cases `['sentence-case', 'start-case', 'pascal-case', 'upper-case']` +- **rule**: `never` +- **level**: `error` + +```sh +echo "fix(SCOPE): Some message" # fails +echo "fix(SCOPE): Some Message" # fails +echo "fix(SCOPE): SomeMessage" # fails +echo "fix(SCOPE): SOMEMESSAGE" # fails +echo "fix(scope): some message" # passes +echo "fix(scope): some Message" # passes +``` + +#### subject-empty + +- **condition**: `subject` is empty +- **rule**: `never` +- **level**: `error` + +```sh +echo "fix:" # fails +echo "fix: some message" # passes +``` + +#### subject-full-stop + +- **condition**: `subject` ends with `value` +- **rule**: `never` +- **level**: `error` +- **value** + +``` +'.' +``` + +```sh +echo "fix: some message." # fails +echo "fix: some message" # passes +``` + +#### header-max-length + +- **condition**: `header` has `value` or less characters +- **rule**: `always` +- **level**: `error` +- **value** + +``` +100 +``` + +```sh +echo "fix: some message that is way too long and breaks the line max-length by several characters" # fails +echo "fix: some message" # passes +``` + +#### footer-leading-blank + +- **condition**: `footer` should have a leading blank line +- **rule**: `always` +- **level**: `warning` + +```sh +echo "fix: some message +BREAKING CHANGE: It will be significant" # warning + +echo "fix: some message + +BREAKING CHANGE: It will be significant" # passes +``` + +#### footer-max-line-length + +- **condition**: `footer` each line has `value` or less characters +- **rule**: `always` +- **level**: `error` +- **value** + +``` +100 +``` + +```sh +echo "fix: some message + +BREAKING CHANGE: footer with multiple lines +has a message that is way too long and will break the line rule 'line-max-length' by several characters" # fails + +echo "fix: some message + +BREAKING CHANGE: footer with multiple lines +but still no line is too long" # passes +``` + +#### body-leading-blank + +- **condition**: `body` should have a leading blank line +- **rule**: `always` +- **level**: `warning` + +```sh +echo "fix: some message +body" # warning + +echo "fix: some message + +body" # passes +``` + +#### body-max-line-length + +- **condition**: `body` each line has `value` or less characters +- **rule**: `always` +- **level**: `error` +- **value** + +``` +100 +``` + +```sh +echo "fix: some message + +body with multiple lines +has a message that is way too long and will break the line rule 'line-max-length' by several characters" # fails + +echo "fix: some message + +body with multiple lines +but still no line is too long" # passes +``` diff --git a/node_modules/@commitlint/config-conventional/lib/index.d.ts b/node_modules/@commitlint/config-conventional/lib/index.d.ts new file mode 100644 index 000000000..7bc8d0a09 --- /dev/null +++ b/node_modules/@commitlint/config-conventional/lib/index.d.ts @@ -0,0 +1,111 @@ +import { RuleConfigCondition, RuleConfigSeverity, TargetCaseType } from "@commitlint/types"; +declare const _default: { + parserPreset: string; + rules: { + "body-leading-blank": readonly [RuleConfigSeverity.Warning, "always"]; + "body-max-line-length": readonly [RuleConfigSeverity.Error, "always", 100]; + "footer-leading-blank": readonly [RuleConfigSeverity.Warning, "always"]; + "footer-max-line-length": readonly [RuleConfigSeverity.Error, "always", 100]; + "header-max-length": readonly [RuleConfigSeverity.Error, "always", 100]; + "header-trim": readonly [RuleConfigSeverity.Error, "always"]; + "subject-case": [RuleConfigSeverity, RuleConfigCondition, TargetCaseType[]]; + "subject-empty": readonly [RuleConfigSeverity.Error, "never"]; + "subject-full-stop": readonly [RuleConfigSeverity.Error, "never", "."]; + "type-case": readonly [RuleConfigSeverity.Error, "always", "lower-case"]; + "type-empty": readonly [RuleConfigSeverity.Error, "never"]; + "type-enum": [RuleConfigSeverity, RuleConfigCondition, string[]]; + }; + prompt: { + questions: { + type: { + description: string; + enum: { + feat: { + description: string; + title: string; + emoji: string; + }; + fix: { + description: string; + title: string; + emoji: string; + }; + docs: { + description: string; + title: string; + emoji: string; + }; + style: { + description: string; + title: string; + emoji: string; + }; + refactor: { + description: string; + title: string; + emoji: string; + }; + perf: { + description: string; + title: string; + emoji: string; + }; + test: { + description: string; + title: string; + emoji: string; + }; + build: { + description: string; + title: string; + emoji: string; + }; + ci: { + description: string; + title: string; + emoji: string; + }; + chore: { + description: string; + title: string; + emoji: string; + }; + revert: { + description: string; + title: string; + emoji: string; + }; + }; + }; + scope: { + description: string; + }; + subject: { + description: string; + }; + body: { + description: string; + }; + isBreaking: { + description: string; + }; + breakingBody: { + description: string; + }; + breaking: { + description: string; + }; + isIssueAffected: { + description: string; + }; + issuesBody: { + description: string; + }; + issues: { + description: string; + }; + }; + }; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/config-conventional/lib/index.d.ts.map b/node_modules/@commitlint/config-conventional/lib/index.d.ts.map new file mode 100644 index 000000000..9ddfa6c95 --- /dev/null +++ b/node_modules/@commitlint/config-conventional/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;;IAG3F,YAAY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T,WAAW;;YAEZ,YAAY;gBACX,WAAW;;YAGZ,QAAQ;gBACP,WAAW;;YAEZ,eAAe;gBACd,WAAW;;YAEZ,UAAU;gBACT,WAAW;;YAGZ,MAAM;gBACL,WAAW"} \ No newline at end of file diff --git a/node_modules/@commitlint/config-conventional/lib/index.js b/node_modules/@commitlint/config-conventional/lib/index.js new file mode 100644 index 000000000..3d9b049b9 --- /dev/null +++ b/node_modules/@commitlint/config-conventional/lib/index.js @@ -0,0 +1,130 @@ +import { RuleConfigSeverity } from "@commitlint/types"; +export default { + parserPreset: "conventional-changelog-conventionalcommits", + rules: { + "body-leading-blank": [RuleConfigSeverity.Warning, "always"], + "body-max-line-length": [RuleConfigSeverity.Error, "always", 100], + "footer-leading-blank": [RuleConfigSeverity.Warning, "always"], + "footer-max-line-length": [RuleConfigSeverity.Error, "always", 100], + "header-max-length": [RuleConfigSeverity.Error, "always", 100], + "header-trim": [RuleConfigSeverity.Error, "always"], + "subject-case": [ + RuleConfigSeverity.Error, + "never", + ["sentence-case", "start-case", "pascal-case", "upper-case"], + ], + "subject-empty": [RuleConfigSeverity.Error, "never"], + "subject-full-stop": [RuleConfigSeverity.Error, "never", "."], + "type-case": [RuleConfigSeverity.Error, "always", "lower-case"], + "type-empty": [RuleConfigSeverity.Error, "never"], + "type-enum": [ + RuleConfigSeverity.Error, + "always", + [ + "build", + "chore", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "style", + "test", + ], + ], + }, + prompt: { + questions: { + type: { + description: "Select the type of change that you're committing", + enum: { + feat: { + description: "A new feature", + title: "Features", + emoji: "✨", + }, + fix: { + description: "A bug fix", + title: "Bug Fixes", + emoji: "🐛", + }, + docs: { + description: "Documentation only changes", + title: "Documentation", + emoji: "📚", + }, + style: { + description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", + title: "Styles", + emoji: "💎", + }, + refactor: { + description: "A code change that neither fixes a bug nor adds a feature", + title: "Code Refactoring", + emoji: "📦", + }, + perf: { + description: "A code change that improves performance", + title: "Performance Improvements", + emoji: "🚀", + }, + test: { + description: "Adding missing tests or correcting existing tests", + title: "Tests", + emoji: "🚨", + }, + build: { + description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)", + title: "Builds", + emoji: "🛠", + }, + ci: { + description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)", + title: "Continuous Integrations", + emoji: "⚙️", + }, + chore: { + description: "Other changes that don't modify src or test files", + title: "Chores", + emoji: "♻️", + }, + revert: { + description: "Reverts a previous commit", + title: "Reverts", + emoji: "🗑", + }, + }, + }, + scope: { + description: "What is the scope of this change (e.g. component or file name)", + }, + subject: { + description: "Write a short, imperative tense description of the change", + }, + body: { + description: "Provide a longer description of the change", + }, + isBreaking: { + description: "Are there any breaking changes?", + }, + breakingBody: { + description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself", + }, + breaking: { + description: "Describe the breaking changes", + }, + isIssueAffected: { + description: "Does this change affect any open issues?", + }, + issuesBody: { + description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself", + }, + issues: { + description: 'Add issue references (e.g. "fix #123", "re #123".)', + }, + }, + }, +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/config-conventional/lib/index.js.map b/node_modules/@commitlint/config-conventional/lib/index.js.map new file mode 100644 index 000000000..95ec39f32 --- /dev/null +++ b/node_modules/@commitlint/config-conventional/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,kBAAkB,EAAkB,MAAM,mBAAmB,CAAC;AAE5F,eAAe;IACd,YAAY,EAAE,4CAA4C;IAC1D,KAAK,EAAE;QACN,oBAAoB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAU;QACrE,sBAAsB,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE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AAW,EAAE,0CAA0C;aACvD;YACD,UAAU,EAAE;gBACX,WAAW,EACV,0GAA0G;aAC3G;YACD,MAAM,EAAE;gBACP,WAAW,EAAE,oDAAoD;aACjE;SACD;KACD;CACD,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/config-conventional/license.md b/node_modules/@commitlint/config-conventional/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/config-conventional/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/config-conventional/package.json b/node_modules/@commitlint/config-conventional/package.json new file mode 100644 index 000000000..7a67ee2b8 --- /dev/null +++ b/node_modules/@commitlint/config-conventional/package.json @@ -0,0 +1,46 @@ +{ + "name": "@commitlint/config-conventional", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Shareable commitlint config enforcing conventional commits", + "keywords": [ + "angular", + "commitlint", + "commitlint-config", + "conventional-changelog" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": "Mario Nebl ", + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/config-conventional" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "publishConfig": { + "access": "public" + }, + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/types": "^21.2.3", + "conventional-changelog-conventionalcommits": "^10.0.0" + }, + "devDependencies": { + "@commitlint/lint": "^21.2.3", + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/config-validator/lib/commitlint.schema.json b/node_modules/@commitlint/config-validator/lib/commitlint.schema.json new file mode 100644 index 000000000..b0612ceed --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/commitlint.schema.json @@ -0,0 +1,105 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "definitions": { + "rule": { + "oneOf": [ + { + "description": "A rule", + "type": "array", + "items": [ + { + "description": "Level: 0 disables the rule. For 1 it will be considered a warning, for 2 an error", + "type": "number", + "enum": [0, 1, 2] + }, + { + "description": "Applicable: always|never: never inverts the rule", + "type": "string", + "enum": ["always", "never"] + }, + { + "description": "Value: the value for this rule" + } + ], + "minItems": 1, + "maxItems": 3, + "additionalItems": false + }, + { + "description": "A rule", + "typeof": "function" + } + ] + } + }, + "properties": { + "extends": { + "description": "Resolveable ids to commitlint configurations to extend", + "oneOf": [ + { + "type": "array", + "items": { "type": "string" } + }, + { "type": "string" } + ] + }, + "parserPreset": { + "description": "Resolveable id to conventional-changelog parser preset to import and use", + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "path": { "type": "string" }, + "parserOpts": {} + }, + "additionalProperties": true + }, + { "typeof": "function" } + ] + }, + "helpUrl": { + "description": "Custom URL to show upon failure", + "type": "string" + }, + "formatter": { + "description": "Resolveable id to package, from node_modules, which formats the output", + "type": "string" + }, + "rules": { + "description": "Rules to check against", + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "$ref": "#/definitions/rule" } + }, + "plugins": { + "description": "Resolveable ids of commitlint plugins from node_modules", + "type": "array", + "items": { + "anyOf": [ + { "type": "string" }, + { + "type": "object", + "required": ["rules"], + "properties": { + "rules": { + "type": "object" + } + } + } + ] + } + }, + "ignores": { + "type": "array", + "items": { "typeof": "function" }, + "description": "Additional commits to ignore, defined by ignore matchers" + }, + "defaultIgnores": { + "description": "Whether commitlint uses the default ignore rules", + "type": "boolean" + } + } +} diff --git a/node_modules/@commitlint/config-validator/lib/formatErrors.d.ts b/node_modules/@commitlint/config-validator/lib/formatErrors.d.ts new file mode 100644 index 000000000..cbf54116d --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/formatErrors.d.ts @@ -0,0 +1,9 @@ +import type { ErrorObject } from "ajv"; +/** + * Formats an array of schema validation errors. + * @param errors An array of error messages to format. + * @returns Formatted error message + * Based on https://github.com/eslint/eslint/blob/master/lib/shared/config-validator.js#L237-L261 + */ +export declare function formatErrors(errors: ErrorObject[]): string; +//# sourceMappingURL=formatErrors.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/lib/formatErrors.d.ts.map b/node_modules/@commitlint/config-validator/lib/formatErrors.d.ts.map new file mode 100644 index 000000000..c6a03fc38 --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/formatErrors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"formatErrors.d.ts","sourceRoot":"","sources":["../src/formatErrors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CA4B1D"} \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/lib/formatErrors.js b/node_modules/@commitlint/config-validator/lib/formatErrors.js new file mode 100644 index 000000000..e855bed85 --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/formatErrors.js @@ -0,0 +1,33 @@ +/** + * Formats an array of schema validation errors. + * @param errors An array of error messages to format. + * @returns Formatted error message + * Based on https://github.com/eslint/eslint/blob/master/lib/shared/config-validator.js#L237-L261 + */ +export function formatErrors(errors) { + return errors + .map((error) => { + if (error.keyword === "additionalProperties" && "additionalProperty" in error.params) { + const formattedPropertyPath = error.instancePath.length + ? `${error.instancePath.slice(1)}.${error.params.additionalProperty}` + : error.params.additionalProperty; + return `Unexpected top-level property "${formattedPropertyPath}"`; + } + if (error.keyword === "type") { + const formattedField = error.instancePath.slice(1); + if (!formattedField) { + return `Config has the wrong type - ${error.message}`; + } + return `Property "${formattedField}" has the wrong type - ${error.message}`; + } + const field = (error.instancePath[0] === "." ? error.instancePath.slice(1) : error.instancePath) || + "Config"; + if (error.keyword === "typeof") { + return `"${field}" should be a ${error.schema}. Value: ${JSON.stringify(error.data)}`; + } + return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`; + }) + .map((message) => `\t- ${message}.\n`) + .join(""); +} +//# sourceMappingURL=formatErrors.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/lib/formatErrors.js.map b/node_modules/@commitlint/config-validator/lib/formatErrors.js.map new file mode 100644 index 000000000..4ac0b02bb --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/formatErrors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"formatErrors.js","sourceRoot":"","sources":["../src/formatErrors.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAqB;IACjD,OAAO,MAAM;SACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACd,IAAI,KAAK,CAAC,OAAO,KAAK,sBAAsB,IAAI,oBAAoB,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACtF,MAAM,qBAAqB,GAAG,KAAK,CAAC,YAAY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.d.ts b/node_modules/@commitlint/config-validator/lib/validate.d.ts new file mode 100644 index 000000000..94a0379fc --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/validate.d.ts @@ -0,0 +1,3 @@ +import { UserConfig } from "@commitlint/types"; +export declare function validateConfig(source: string, config: unknown): asserts config is UserConfig; +//# sourceMappingURL=validate.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/lib/validate.d.ts.map b/node_modules/@commitlint/config-validator/lib/validate.d.ts.map new file mode 100644 index 000000000..0c2a95c6f --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/validate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,UAAU,CA0B5F"} \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/lib/validate.js b/node_modules/@commitlint/config-validator/lib/validate.js new file mode 100644 index 000000000..1dd3c0d19 --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/validate.js @@ -0,0 +1,31 @@ +import { createRequire } from "node:module"; +import _Ajv from "ajv"; +import { formatErrors } from "./formatErrors.js"; +const require = createRequire(import.meta.url); +const schema = require("./commitlint.schema.json"); +const TYPE_OF = ["undefined", "string", "number", "object", "function", "boolean", "symbol"]; +// FIXME: https://github.com/ajv-validator/ajv/issues/2132 +const Ajv = _Ajv; +export function validateConfig(source, config) { + const ajv = new Ajv({ + meta: false, + strict: false, + useDefaults: true, + validateSchema: false, + verbose: true, + }); + ajv.addKeyword({ + keyword: "typeof", + validate: function typeOfFunc(schema, data) { + return typeof data === schema; + }, + metaSchema: { type: "string", enum: TYPE_OF }, + schema: true, + }); + const validate = ajv.compile(schema); + const isValid = validate(config); + if (!isValid && validate.errors && validate.errors.length) { + throw new Error(`Commitlint configuration in ${source} is invalid:\n${formatErrors(validate.errors)}`); + } +} +//# sourceMappingURL=validate.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/lib/validate.js.map b/node_modules/@commitlint/config-validator/lib/validate.js.map new file mode 100644 index 000000000..f22adc6b1 --- /dev/null +++ b/node_modules/@commitlint/config-validator/lib/validate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,IAAI,MAAM,KAAK,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,MAAM,GAA8C,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAE9F,MAAM,OAAO,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAE7F,0DAA0D;AAC1D,MAAM,GAAG,GAAG,IAAsC,CAAC;AAEnD,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,MAAe;IAC7D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,GAAG,CAAC,UAAU,CAAC;QACd,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,SAAS,UAAU,CAAC,MAAW,EAAE,IAAS;YACnD,OAAO,OAAO,IAAI,KAAK,MAAM,CAAC;QAC/B,CAAC;QACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;QAC7C,MAAM,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CACd,+BAA+B,MAAM,iBAAiB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CACrF,CAAC;IACH,CAAC;AACF,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/config-validator/license.md b/node_modules/@commitlint/config-validator/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/config-validator/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/config-validator/package.json b/node_modules/@commitlint/config-validator/package.json new file mode 100644 index 000000000..745c601f1 --- /dev/null +++ b/node_modules/@commitlint/config-validator/package.json @@ -0,0 +1,47 @@ +{ + "name": "@commitlint/config-validator", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "config validator for commitlint.config.js", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/config-validator" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/validate.js", + "types": "lib/validate.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check --skip-import" + }, + "dependencies": { + "@commitlint/types": "^21.2.3", + "ajv": "^8.11.0" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/ensure/lib/case.d.ts b/node_modules/@commitlint/ensure/lib/case.d.ts new file mode 100644 index 000000000..f7e8af118 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/case.d.ts @@ -0,0 +1,4 @@ +import type { TargetCaseType } from "@commitlint/types"; +export default ensureCase; +declare function ensureCase(raw?: string, target?: TargetCaseType): boolean; +//# sourceMappingURL=case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/case.d.ts.map b/node_modules/@commitlint/ensure/lib/case.d.ts.map new file mode 100644 index 000000000..574a891d3 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../src/case.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;eAIzC,UAAU;AAEzB,iBAAS,UAAU,CAAC,GAAG,GAAE,MAAW,EAAE,MAAM,GAAE,cAA4B,GAAG,OAAO,CAcnF"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/case.js b/node_modules/@commitlint/ensure/lib/case.js new file mode 100644 index 000000000..35fb554ba --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/case.js @@ -0,0 +1,15 @@ +import toCase from "./to-case.js"; +export default ensureCase; +function ensureCase(raw = "", target = "lowercase") { + // We delete any content together with quotes because he can contains proper names (example `refactor: `Eslint` configuration`). + // We need trim string because content with quotes can be at the beginning or end of a line + const input = String(raw) + .replace(/`.*?`|".*?"|'.*?'/g, "") + .trim(); + const transformed = toCase(input, target); + if (transformed === "" || transformed.match(/^\d/)) { + return true; + } + return transformed === input; +} +//# sourceMappingURL=case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/case.js.map b/node_modules/@commitlint/ensure/lib/case.js.map new file mode 100644 index 000000000..e7be70dee --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/case.js.map @@ -0,0 +1 @@ +{"version":3,"file":"case.js","sourceRoot":"","sources":["../src/case.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,eAAe,UAAU,CAAC;AAE1B,SAAS,UAAU,CAAC,GAAG,GAAW,EAAE,EAAE,MAAM,GAAmB,WAAW;IACzE,gIAAgI;IAChI,2FAA2F;IAC3F,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;SACvB,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;SACjC,IAAI,EAAE,CAAC;IAET,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAE1C,IAAI,WAAW,KAAK,EAAE,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,WAAW,KAAK,KAAK,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/enum.d.ts b/node_modules/@commitlint/ensure/lib/enum.d.ts new file mode 100644 index 000000000..149fddec6 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/enum.d.ts @@ -0,0 +1,3 @@ +export default _default; +declare function _default(value: any, enums?: any[]): boolean; +//# sourceMappingURL=enum.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/enum.d.ts.map b/node_modules/@commitlint/ensure/lib/enum.d.ts.map new file mode 100644 index 000000000..db13cddcd --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../src/enum.ts"],"names":[],"mappings":";0BAAgB,KAAK,EAAE,GAAG,EAAE,KAAK,GAAE,GAAG,EAAO,GAAG,OAAO"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/enum.js b/node_modules/@commitlint/ensure/lib/enum.js new file mode 100644 index 000000000..be91ac2a8 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/enum.js @@ -0,0 +1,10 @@ +export default (value, enums = []) => { + if (value === undefined) { + return false; + } + if (!Array.isArray(enums)) { + return false; + } + return enums.indexOf(value) > -1; +}; +//# sourceMappingURL=enum.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/enum.js.map b/node_modules/@commitlint/ensure/lib/enum.js.map new file mode 100644 index 000000000..e77648c06 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"enum.js","sourceRoot":"","sources":["../src/enum.ts"],"names":[],"mappings":"AAAA,eAAe,CAAC,KAAU,EAAE,KAAK,GAAU,EAAE,EAAW,EAAE;IACzD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/index.d.ts b/node_modules/@commitlint/ensure/lib/index.d.ts new file mode 100644 index 000000000..abffa8543 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/index.d.ts @@ -0,0 +1,11 @@ +import ensureCase from "./case.js"; +import ensureEnum from "./enum.js"; +import maxLength from "./max-length.js"; +import maxLineLength from "./max-line-length.js"; +import minLength from "./min-length.js"; +import notEmpty from "./not-empty.js"; +import toCase from "./to-case.js"; +export { ensureCase as case }; +export { ensureEnum as enum }; +export { maxLength, maxLineLength, minLength, notEmpty, toCase }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/index.d.ts.map b/node_modules/@commitlint/ensure/lib/index.d.ts.map new file mode 100644 index 000000000..6f5557c24 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,UAAU,IAAI,IAAI,EAAE,CAAC;AAC9B,OAAO,EAAE,UAAU,IAAI,IAAI,EAAE,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/index.js b/node_modules/@commitlint/ensure/lib/index.js new file mode 100644 index 000000000..e051813ad --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/index.js @@ -0,0 +1,11 @@ +import ensureCase from "./case.js"; +import ensureEnum from "./enum.js"; +import maxLength from "./max-length.js"; +import maxLineLength from "./max-line-length.js"; +import minLength from "./min-length.js"; +import notEmpty from "./not-empty.js"; +import toCase from "./to-case.js"; +export { ensureCase as case }; +export { ensureEnum as enum }; +export { maxLength, maxLineLength, minLength, notEmpty, toCase }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/index.js.map b/node_modules/@commitlint/ensure/lib/index.js.map new file mode 100644 index 000000000..54ab578f9 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,UAAU,IAAI,IAAI,EAAE,CAAC;AAC9B,OAAO,EAAE,UAAU,IAAI,IAAI,EAAE,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-length.d.ts b/node_modules/@commitlint/ensure/lib/max-length.d.ts new file mode 100644 index 000000000..842cdf2e1 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-length.d.ts @@ -0,0 +1,3 @@ +export default _default; +declare function _default(value: string | null, max: number): boolean; +//# sourceMappingURL=max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-length.d.ts.map b/node_modules/@commitlint/ensure/lib/max-length.d.ts.map new file mode 100644 index 000000000..98af61c66 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"max-length.d.ts","sourceRoot":"","sources":["../src/max-length.ts"],"names":[],"mappings":";0BAAgB,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-length.js b/node_modules/@commitlint/ensure/lib/max-length.js new file mode 100644 index 000000000..0c83294b7 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-length.js @@ -0,0 +1,2 @@ +export default (value, max) => typeof value === "string" && value.length <= max; +//# sourceMappingURL=max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-length.js.map b/node_modules/@commitlint/ensure/lib/max-length.js.map new file mode 100644 index 000000000..5a44db3ec --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"max-length.js","sourceRoot":"","sources":["../src/max-length.ts"],"names":[],"mappings":"AAAA,eAAe,CAAC,KAAoB,EAAE,GAAW,EAAW,EAAE,CAC7D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-line-length.d.ts b/node_modules/@commitlint/ensure/lib/max-line-length.d.ts new file mode 100644 index 000000000..14e63a352 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-line-length.d.ts @@ -0,0 +1,3 @@ +export default _default; +declare function _default(value: string, max: number): boolean; +//# sourceMappingURL=max-line-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-line-length.d.ts.map b/node_modules/@commitlint/ensure/lib/max-line-length.d.ts.map new file mode 100644 index 000000000..757cf4f27 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-line-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"max-line-length.d.ts","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":";0BAQgB,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-line-length.js b/node_modules/@commitlint/ensure/lib/max-line-length.js new file mode 100644 index 000000000..370b9a04f --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-line-length.js @@ -0,0 +1,9 @@ +import ensure from "./max-length.js"; +// Allow an exception for long lines which contain URLs. +// +// This is overly lenient, in order to avoid costly regexps which +// have to worry about all the many edge cases of valid URLs. +const URL_REGEX = /\bhttps?:\/\/\S+/; +export default (value, max) => typeof value === "string" && + value.split(/\r?\n/).every((line) => URL_REGEX.test(line) || ensure(line, max)); +//# sourceMappingURL=max-line-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/max-line-length.js.map b/node_modules/@commitlint/ensure/lib/max-line-length.js.map new file mode 100644 index 000000000..1ad7fd8d8 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/max-line-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"max-line-length.js","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,6DAA6D;AAC7D,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAErC,eAAe,CAAC,KAAa,EAAE,GAAW,EAAW,EAAE,CACtD,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/min-length.d.ts b/node_modules/@commitlint/ensure/lib/min-length.d.ts new file mode 100644 index 000000000..38a03806f --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/min-length.d.ts @@ -0,0 +1,3 @@ +export default _default; +declare function _default(value: string | null, min: number): boolean; +//# sourceMappingURL=min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/min-length.d.ts.map b/node_modules/@commitlint/ensure/lib/min-length.d.ts.map new file mode 100644 index 000000000..ee36fa3ad --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"min-length.d.ts","sourceRoot":"","sources":["../src/min-length.ts"],"names":[],"mappings":";0BAAgB,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/min-length.js b/node_modules/@commitlint/ensure/lib/min-length.js new file mode 100644 index 000000000..32f352ae4 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/min-length.js @@ -0,0 +1,2 @@ +export default (value, min) => typeof value === "string" && value.length >= min; +//# sourceMappingURL=min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/min-length.js.map b/node_modules/@commitlint/ensure/lib/min-length.js.map new file mode 100644 index 000000000..445f7c737 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"min-length.js","sourceRoot":"","sources":["../src/min-length.ts"],"names":[],"mappings":"AAAA,eAAe,CAAC,KAAoB,EAAE,GAAW,EAAW,EAAE,CAC7D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/not-empty.d.ts b/node_modules/@commitlint/ensure/lib/not-empty.d.ts new file mode 100644 index 000000000..0c156dd47 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/not-empty.d.ts @@ -0,0 +1,3 @@ +export default _default; +declare function _default(value: string): boolean; +//# sourceMappingURL=not-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/not-empty.d.ts.map b/node_modules/@commitlint/ensure/lib/not-empty.d.ts.map new file mode 100644 index 000000000..c8e2b8324 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/not-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"not-empty.d.ts","sourceRoot":"","sources":["../src/not-empty.ts"],"names":[],"mappings":";0BAAgB,KAAK,EAAE,MAAM,GAAG,OAAO"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/not-empty.js b/node_modules/@commitlint/ensure/lib/not-empty.js new file mode 100644 index 000000000..01051d268 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/not-empty.js @@ -0,0 +1,2 @@ +export default (value) => typeof value === "string" && value.length > 0; +//# sourceMappingURL=not-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/not-empty.js.map b/node_modules/@commitlint/ensure/lib/not-empty.js.map new file mode 100644 index 000000000..0fb4ea351 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/not-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"not-empty.js","sourceRoot":"","sources":["../src/not-empty.ts"],"names":[],"mappings":"AAAA,eAAe,CAAC,KAAa,EAAW,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/to-case.d.ts b/node_modules/@commitlint/ensure/lib/to-case.d.ts new file mode 100644 index 000000000..5d7ef7e28 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/to-case.d.ts @@ -0,0 +1,3 @@ +import { TargetCaseType } from "@commitlint/types"; +export default function toCase(input: string, target: TargetCaseType): string; +//# sourceMappingURL=to-case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/to-case.d.ts.map b/node_modules/@commitlint/ensure/lib/to-case.d.ts.map new file mode 100644 index 000000000..68fb692c0 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/to-case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-case.d.ts","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAyB5E"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/to-case.js b/node_modules/@commitlint/ensure/lib/to-case.js new file mode 100644 index 000000000..02ba261f9 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/to-case.js @@ -0,0 +1,28 @@ +import { camelCase, kebabCase, snakeCase, startCase, upperFirst } from "es-toolkit/compat"; +export default function toCase(input, target) { + switch (target) { + case "camel-case": + return camelCase(input); + case "kebab-case": + return kebabCase(input); + case "snake-case": + return snakeCase(input); + case "pascal-case": + return upperFirst(camelCase(input)); + case "start-case": + return startCase(input); + case "upper-case": + case "uppercase": + return input.toUpperCase(); + case "sentence-case": + case "sentencecase": + return upperFirst(input); + case "lower-case": + case "lowercase": + case "lowerCase": // Backwards compat config-angular v4 + return input.toLowerCase(); + default: + throw new TypeError(`to-case: Unknown target case "${target}"`); + } +} +//# sourceMappingURL=to-case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/lib/to-case.js.map b/node_modules/@commitlint/ensure/lib/to-case.js.map new file mode 100644 index 000000000..9103e0117 --- /dev/null +++ b/node_modules/@commitlint/ensure/lib/to-case.js.map @@ -0,0 +1 @@ +{"version":3,"file":"to-case.js","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3F,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAa,EAAE,MAAsB;IACnE,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,aAAa;YACjB,OAAO,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACrC,KAAK,YAAY;YAChB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW;YACf,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B,KAAK,eAAe,CAAC;QACrB,KAAK,cAAc;YAClB,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1B,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW,CAAC;QACjB,KAAK,WAAW,EAAE,qCAAqC;YACtD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B;YACC,MAAM,IAAI,SAAS,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;IAClE,CAAC;AACF,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/ensure/license.md b/node_modules/@commitlint/ensure/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/ensure/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/ensure/package.json b/node_modules/@commitlint/ensure/package.json new file mode 100644 index 000000000..f4002a19c --- /dev/null +++ b/node_modules/@commitlint/ensure/package.json @@ -0,0 +1,46 @@ +{ + "name": "@commitlint/ensure", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/ensure" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/types": "^21.2.3", + "es-toolkit": "^1.46.0" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/execute-rule/lib/index.d.ts b/node_modules/@commitlint/execute-rule/lib/index.d.ts new file mode 100644 index 000000000..fd143d4a9 --- /dev/null +++ b/node_modules/@commitlint/execute-rule/lib/index.d.ts @@ -0,0 +1,7 @@ +type Rule = readonly [string, Config]; +type Config = T | Promise | ExectableConfig; +type ExectableConfig = (() => T) | (() => Promise); +type ExecutedRule = readonly [string, T]; +export default execute; +export declare function execute(rule?: Rule): Promise | null>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/execute-rule/lib/index.d.ts.map b/node_modules/@commitlint/execute-rule/lib/index.d.ts.map new file mode 100644 index 000000000..f47dbc24d --- /dev/null +++ b/node_modules/@commitlint/execute-rule/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,CAAC,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AACrD,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,KAAK,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAE5C,eAAe,OAAO,CAAC;AAEvB,wBAAsB,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAU1F"} \ No newline at end of file diff --git a/node_modules/@commitlint/execute-rule/lib/index.js b/node_modules/@commitlint/execute-rule/lib/index.js new file mode 100644 index 000000000..d34f6d48d --- /dev/null +++ b/node_modules/@commitlint/execute-rule/lib/index.js @@ -0,0 +1,13 @@ +export default execute; +export async function execute(rule) { + if (!Array.isArray(rule)) { + return null; + } + const [name, config] = rule; + const fn = executable(config) ? config : async () => config; + return [name, await fn()]; +} +function executable(config) { + return typeof config === "function"; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/execute-rule/lib/index.js.map b/node_modules/@commitlint/execute-rule/lib/index.js.map new file mode 100644 index 000000000..cb5927ed2 --- /dev/null +++ b/node_modules/@commitlint/execute-rule/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,eAAe,OAAO,CAAC;AAEvB,MAAM,CAAC,KAAK,UAAU,OAAO,CAAc,IAAc;IACxD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAE5B,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC;IAE5D,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,UAAU,CAAI,MAAiB;IACvC,OAAO,OAAO,MAAM,KAAK,UAAU,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/execute-rule/license.md b/node_modules/@commitlint/execute-rule/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/execute-rule/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/execute-rule/package.json b/node_modules/@commitlint/execute-rule/package.json new file mode 100644 index 000000000..5de6487cb --- /dev/null +++ b/node_modules/@commitlint/execute-rule/package.json @@ -0,0 +1,42 @@ +{ + "name": "@commitlint/execute-rule", + "version": "21.0.1", + "gitHead": "db8d7d6461d721fe2561ce4307e4069eaf6dcc8c", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/execute-rule" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/format/README.md b/node_modules/@commitlint/format/README.md new file mode 100644 index 000000000..66de35763 --- /dev/null +++ b/node_modules/@commitlint/format/README.md @@ -0,0 +1,15 @@ +# @commitlint/format + +Format commitlint reports + +## Getting started + +```shell +npm install --save @commitlint/format +``` + +## Documentation + +Consult [API docs](https://commitlint.js.org/api/format) for comprehensive documentation. + +Documentation generated from [`docs` folder](../../docs/api/format.md). diff --git a/node_modules/@commitlint/format/lib/format.d.ts b/node_modules/@commitlint/format/lib/format.d.ts new file mode 100644 index 000000000..65eea0195 --- /dev/null +++ b/node_modules/@commitlint/format/lib/format.d.ts @@ -0,0 +1,5 @@ +import { FormattableReport, FormatOptions, FormattableResult } from "@commitlint/types"; +export declare function format(report?: FormattableReport, options?: FormatOptions): string; +export declare function formatResult(result?: FormattableResult, options?: FormatOptions): string[]; +export default format; +//# sourceMappingURL=format.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/format.d.ts.map b/node_modules/@commitlint/format/lib/format.d.ts.map new file mode 100644 index 000000000..9f4714b38 --- /dev/null +++ b/node_modules/@commitlint/format/lib/format.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EAEjB,MAAM,mBAAmB,CAAC;AAS3B,wBAAgB,MAAM,CAAC,MAAM,GAAE,iBAAsB,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAU1F;AA4BD,wBAAgB,YAAY,CAC3B,MAAM,GAAE,iBAAsB,EAC9B,OAAO,GAAE,aAAkB,GACzB,MAAM,EAAE,CAmCV;eAEc,MAAM"} \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/format.js b/node_modules/@commitlint/format/lib/format.js new file mode 100644 index 000000000..740d3b880 --- /dev/null +++ b/node_modules/@commitlint/format/lib/format.js @@ -0,0 +1,78 @@ +import pc from "picocolors"; +const DEFAULT_SIGNS = [" ", "⚠", "✖"]; +const DEFAULT_COLORS = [ + "white", + "yellow", + "red", +]; +export function format(report = {}, options = {}) { + const { results = [] } = report; + const fi = (result) => formatInput(result, options); + const fr = (result) => formatResult(result, options); + return results + .filter((r) => Array.isArray(r.warnings) || Array.isArray(r.errors)) + .map((result) => [...fi(result), ...fr(result)]) + .reduce((acc, item) => (Array.isArray(item) ? [...acc, ...item] : [...acc, item]), []) + .join("\n"); +} +function formatInput(result, options = {}) { + const { color: enabled = true, legacyOutput = false } = options; + const { errors = [], warnings = [], input = "" } = result; + if (!input) { + return [""]; + } + const sign = "⧗"; + const decoration = enabled ? pc.gray(sign) : sign; + const decoratedInput = enabled ? pc.bold(input) : input; + const hasProblems = errors.length > 0 || warnings.length > 0; + if (!(options.verbose || hasProblems)) { + return []; + } + if (legacyOutput) { + // legacy: single line with 'input: ' prefix, no extra newlines or dashes + return [`${decoration} input: ${decoratedInput}`]; + } + return [`${decoration} --- input ---\n${decoratedInput}`]; +} +export function formatResult(result = {}, options = {}) { + const { signs = DEFAULT_SIGNS, colors = DEFAULT_COLORS, color: enabled = true } = options; + const { errors = [], warnings = [] } = result; + const problems = [...errors, ...warnings].map((problem) => { + const sign = signs[problem.level] || ""; + const colorName = colors[problem.level] || "white"; + const colorFn = pc[colorName]; + const decoration = enabled ? colorFn(sign) : sign; + const name = enabled ? pc.gray(`[${problem.name}]`) : `[${problem.name}]`; + return `${decoration} ${problem.message} ${name}`; + }); + const sign = selectSign(result); + const colorName = selectColor(result); + const deco = enabled ? pc[colorName](sign) : sign; + const el = errors.length; + const wl = warnings.length; + const hasProblems = problems.length > 0; + const summary = options.verbose || hasProblems ? `${deco} found ${el} problems, ${wl} warnings` : undefined; + const fmtSummary = enabled && typeof summary === "string" ? pc.bold(summary) : summary; + const help = hasProblems && options.helpUrl ? `ⓘ Get help: ${options.helpUrl}` : undefined; + return [ + ...problems, + hasProblems ? "" : undefined, + fmtSummary, + help, + hasProblems ? "" : undefined, + ].filter((line) => typeof line === "string"); +} +export default format; +function selectSign(result) { + if ((result.errors || []).length > 0) { + return "✖"; + } + return (result.warnings || []).length ? "⚠" : "✔"; +} +function selectColor(result) { + if ((result.errors || []).length > 0) { + return "red"; + } + return (result.warnings || []).length ? "yellow" : "green"; +} +//# sourceMappingURL=format.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/format.js.map b/node_modules/@commitlint/format/lib/format.js.map new file mode 100644 index 000000000..d1f432828 --- /dev/null +++ b/node_modules/@commitlint/format/lib/format.js.map @@ -0,0 +1 @@ +{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAS5B,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAC/C,MAAM,cAAc,GAAiE;IACpF,OAAO;IACP,QAAQ;IACR,KAAK;CACI,CAAC;AAEX,MAAM,UAAU,MAAM,CAAC,MAAM,GAAsB,EAAE,EAAE,OAAO,GAAkB,EAAE;IACjF,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAChC,MAAM,EAAE,GAAG,CAAC,MAAqC,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnF,MAAM,EAAE,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExE,OAAO,OAAO;SACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;SACnE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;SAC/C,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC;SACrF,IAAI,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O,CAAC;AAC5D,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/index.d.ts b/node_modules/@commitlint/format/lib/index.d.ts new file mode 100644 index 000000000..00f43f31b --- /dev/null +++ b/node_modules/@commitlint/format/lib/index.d.ts @@ -0,0 +1,3 @@ +export { default } from "./format.js"; +export * from "./format.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/index.d.ts.map b/node_modules/@commitlint/format/lib/index.d.ts.map new file mode 100644 index 000000000..7b2c04b9e --- /dev/null +++ b/node_modules/@commitlint/format/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/index.js b/node_modules/@commitlint/format/lib/index.js new file mode 100644 index 000000000..6ccd2b0ee --- /dev/null +++ b/node_modules/@commitlint/format/lib/index.js @@ -0,0 +1,3 @@ +export { default } from "./format.js"; +export * from "./format.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/format/lib/index.js.map b/node_modules/@commitlint/format/lib/index.js.map new file mode 100644 index 000000000..4283f6179 --- /dev/null +++ b/node_modules/@commitlint/format/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/format/license.md b/node_modules/@commitlint/format/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/format/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/format/package.json b/node_modules/@commitlint/format/package.json new file mode 100644 index 000000000..da3a08f8c --- /dev/null +++ b/node_modules/@commitlint/format/package.json @@ -0,0 +1,46 @@ +{ + "name": "@commitlint/format", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Format commitlint reports", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/format" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check --skip-import" + }, + "dependencies": { + "@commitlint/types": "^21.2.3", + "picocolors": "^1.1.1" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/is-ignored/lib/defaults.d.ts b/node_modules/@commitlint/is-ignored/lib/defaults.d.ts new file mode 100644 index 000000000..66626e769 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/defaults.d.ts @@ -0,0 +1,3 @@ +import { Matcher } from "@commitlint/types"; +export declare const wildcards: Matcher[]; +//# sourceMappingURL=defaults.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/defaults.d.ts.map b/node_modules/@commitlint/is-ignored/lib/defaults.d.ts.map new file mode 100644 index 000000000..68ed58249 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/defaults.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAmB5C,eAAO,MAAM,SAAS,EAAE,OAAO,EAW9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/defaults.js b/node_modules/@commitlint/is-ignored/lib/defaults.js new file mode 100644 index 000000000..43e11b32c --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/defaults.js @@ -0,0 +1,27 @@ +import semver from "semver"; +const isSemver = (c) => { + const firstLine = c.split("\n").shift(); + if (typeof firstLine !== "string") { + return false; + } + const stripped = firstLine + .replace(/^chore(\([^)]+\))?:/, "") + .replace(/\[(skip|ci)(-|\s)(ci|skip)\]/i, "") + .replace(/\((skip|ci)(-|\s)(ci|skip)\)/i, "") + .trim(); + return semver.valid(stripped) !== null; +}; +const test = (r) => r.test.bind(r); +export const wildcards = [ + test(/^((Merge pull request)|(Merge (.*?) into (.*?)|(Merge branch (.*?)))(?:\r?\n)*$)/m), + test(/^(Merge tag (.*?))(?:\r?\n)*$/m), + test(/^(R|r)evert (.*)/), + test(/^(R|r)eapply (.*)/), + test(/^(amend|fixup|squash)!/), + isSemver, + test(/^(Merged (.*?)(in|into) (.*)|Merged PR (.*): (.*))/), + test(/^Merge remote-tracking branch(\s*)(.*)/), + test(/^Automatic merge(.*)/), + test(/^Auto-merged (.*?) into (.*)/), +]; +//# sourceMappingURL=defaults.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/defaults.js.map b/node_modules/@commitlint/is-ignored/lib/defaults.js.map new file mode 100644 index 000000000..72956d4ef --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/defaults.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAW,EAAE;IACvC,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;IAExC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,QAAQ,GAAG,SAAS;SACxB,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC;SAClC,OAAO,CAAC,+BAA+B,EAAE,EAAE,CAAC;SAC5C,OAAO,CAAC,+BAA+B,EAAE,EAAE,CAAC;SAC5C,IAAI,EAAE,CAAC;IACT,OAAO,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,CAAS,EAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,SAAS,GAAc;IACnC,IAAI,CAAC,mFAAmF,CAAC;IACzF,IAAI,CAAC,gCAAgC,CAAC;IACtC,IAAI,CAAC,kBAAkB,CAAC;IACxB,IAAI,CAAC,mBAAmB,CAAC;IACzB,IAAI,CAAC,wBAAwB,CAAC;IAC9B,QAAQ;IACR,IAAI,CAAC,oDAAoD,CAAC;IAC1D,IAAI,CAAC,wCAAwC,CAAC;IAC9C,IAAI,CAAC,sBAAsB,CAAC;IAC5B,IAAI,CAAC,8BAA8B,CAAC;CACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/index.d.ts b/node_modules/@commitlint/is-ignored/lib/index.d.ts new file mode 100644 index 000000000..d45676a00 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/index.d.ts @@ -0,0 +1,3 @@ +export * from "./is-ignored.js"; +export { default } from "./is-ignored.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/index.d.ts.map b/node_modules/@commitlint/is-ignored/lib/index.d.ts.map new file mode 100644 index 000000000..79ccf92c4 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/index.js b/node_modules/@commitlint/is-ignored/lib/index.js new file mode 100644 index 000000000..1c36c690e --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/index.js @@ -0,0 +1,3 @@ +export * from "./is-ignored.js"; +export { default } from "./is-ignored.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/index.js.map b/node_modules/@commitlint/is-ignored/lib/index.js.map new file mode 100644 index 000000000..254c25231 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/is-ignored.d.ts b/node_modules/@commitlint/is-ignored/lib/is-ignored.d.ts new file mode 100644 index 000000000..d9ecfcada --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/is-ignored.d.ts @@ -0,0 +1,3 @@ +import { IsIgnoredOptions } from "@commitlint/types"; +export default function isIgnored(commit?: string, opts?: IsIgnoredOptions): boolean; +//# sourceMappingURL=is-ignored.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/is-ignored.d.ts.map b/node_modules/@commitlint/is-ignored/lib/is-ignored.d.ts.map new file mode 100644 index 000000000..3bf32f617 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/is-ignored.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is-ignored.d.ts","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,MAAM,GAAE,MAAW,EAAE,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAmB3F"} \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/is-ignored.js b/node_modules/@commitlint/is-ignored/lib/is-ignored.js new file mode 100644 index 000000000..6913b341e --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/is-ignored.js @@ -0,0 +1,16 @@ +import { wildcards } from "./defaults.js"; +export default function isIgnored(commit = "", opts = {}) { + const ignores = typeof opts.ignores === "undefined" ? [] : opts.ignores; + if (!Array.isArray(ignores)) { + throw new Error(`ignores must be of type array, received ${ignores} of type ${typeof ignores}`); + } + const invalids = ignores.filter((c) => typeof c !== "function"); + if (invalids.length > 0) { + throw new Error(`ignores must be array of type function, received items of type: ${invalids + .map((i) => typeof i) + .join(", ")}`); + } + const base = opts.defaults === false ? [] : wildcards; + return [...base, ...ignores].some((w) => w(commit)); +} +//# sourceMappingURL=is-ignored.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/lib/is-ignored.js.map b/node_modules/@commitlint/is-ignored/lib/is-ignored.js.map new file mode 100644 index 000000000..55c10e27c --- /dev/null +++ b/node_modules/@commitlint/is-ignored/lib/is-ignored.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is-ignored.js","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,MAAM,GAAW,EAAE,EAAE,IAAI,GAAqB,EAAE;IACjF,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IAExE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,2CAA2C,OAAO,YAAY,OAAO,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;IAEhE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACd,mEAAmE,QAAQ;aACzE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,EAAE,CACd,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/is-ignored/license.md b/node_modules/@commitlint/is-ignored/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/is-ignored/package.json b/node_modules/@commitlint/is-ignored/package.json new file mode 100644 index 000000000..c43f66cd4 --- /dev/null +++ b/node_modules/@commitlint/is-ignored/package.json @@ -0,0 +1,49 @@ +{ + "name": "@commitlint/is-ignored", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/is-ignored" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/types": "^21.2.3", + "semver": "^7.6.0" + }, + "devDependencies": { + "@commitlint/parse": "^21.2.3", + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1", + "@types/semver": "^7.5.7" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/lint/README.md b/node_modules/@commitlint/lint/README.md new file mode 100644 index 000000000..7849251ff --- /dev/null +++ b/node_modules/@commitlint/lint/README.md @@ -0,0 +1,15 @@ +# @commitlint/lint + +Lint a string against commitlint rules + +## Getting started + +```shell +npm install --save @commitlint/lint +``` + +## Documentation + +Consult [API docs](https://commitlint.js.org/api/lint) for comprehensive documentation. + +Documentation generated from [`docs` folder](../../docs/api/format.md). diff --git a/node_modules/@commitlint/lint/lib/commit-message.d.ts b/node_modules/@commitlint/lint/lib/commit-message.d.ts new file mode 100644 index 000000000..4d8c57f9c --- /dev/null +++ b/node_modules/@commitlint/lint/lib/commit-message.d.ts @@ -0,0 +1,7 @@ +export interface CommitMessageData { + header: string | null; + body?: string | null; + footer?: string | null; +} +export declare const buildCommitMessage: ({ header, body, footer }: CommitMessageData) => string; +//# sourceMappingURL=commit-message.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/commit-message.d.ts.map b/node_modules/@commitlint/lint/lib/commit-message.d.ts.map new file mode 100644 index 000000000..3f75efa36 --- /dev/null +++ b/node_modules/@commitlint/lint/lib/commit-message.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commit-message.d.ts","sourceRoot":"","sources":["../src/commit-message.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,6BAA8B,iBAAiB,KAAG,MAOhF,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/commit-message.js b/node_modules/@commitlint/lint/lib/commit-message.js new file mode 100644 index 000000000..0378dac4a --- /dev/null +++ b/node_modules/@commitlint/lint/lib/commit-message.js @@ -0,0 +1,7 @@ +export const buildCommitMessage = ({ header, body, footer }) => { + let message = header; + message = body ? `${message}\n\n${body}` : message; + message = footer ? `${message}\n\n${footer}` : message; + return message || ""; +}; +//# sourceMappingURL=commit-message.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/commit-message.js.map b/node_modules/@commitlint/lint/lib/commit-message.js.map new file mode 100644 index 000000000..2a994e955 --- /dev/null +++ b/node_modules/@commitlint/lint/lib/commit-message.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commit-message.js","sourceRoot":"","sources":["../src/commit-message.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAqB,EAAU,EAAE;IACzF,IAAI,OAAO,GAAG,MAAM,CAAC;IAErB,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACnD,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,OAAO,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAEvD,OAAO,OAAO,IAAI,EAAE,CAAC;AACtB,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/lint.d.ts b/node_modules/@commitlint/lint/lib/lint.d.ts new file mode 100644 index 000000000..73944872c --- /dev/null +++ b/node_modules/@commitlint/lint/lib/lint.d.ts @@ -0,0 +1,3 @@ +import type { LintOptions, LintOutcome, QualifiedRules } from "@commitlint/types"; +export default function lint(message: string, rawRulesConfig?: QualifiedRules, rawOpts?: LintOptions): Promise; +//# sourceMappingURL=lint.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/lint.d.ts.map b/node_modules/@commitlint/lint/lib/lint.d.ts.map new file mode 100644 index 000000000..c604d892a --- /dev/null +++ b/node_modules/@commitlint/lint/lib/lint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACX,WAAW,EACX,WAAW,EAKX,cAAc,EACd,MAAM,mBAAmB,CAAC;AAK3B,wBAA8B,IAAI,CACjC,OAAO,EAAE,MAAM,EACf,cAAc,CAAC,EAAE,cAAc,EAC/B,OAAO,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,CAsKtB"} \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/lint.js b/node_modules/@commitlint/lint/lib/lint.js new file mode 100644 index 000000000..8cfbe08d8 --- /dev/null +++ b/node_modules/@commitlint/lint/lib/lint.js @@ -0,0 +1,114 @@ +import util from "node:util"; +import isIgnored from "@commitlint/is-ignored"; +import parse from "@commitlint/parse"; +import defaultRules from "@commitlint/rules"; +import { RuleConfigSeverity } from "@commitlint/types"; +import { buildCommitMessage } from "./commit-message.js"; +export default async function lint(message, rawRulesConfig, rawOpts) { + const opts = rawOpts ? rawOpts : { defaultIgnores: undefined, ignores: undefined }; + const rulesConfig = rawRulesConfig || {}; + // Found a wildcard match, skip. Matchers see the message without the trailing + // newlines git leaves behind. Only the end is trimmed, since the default matchers + // are anchored to the start, and `message` itself is left alone because rules such + // as body-leading-blank read its blank lines back off `parsed.raw`. + if (isIgnored(message?.trimEnd(), { defaults: opts.defaultIgnores, ignores: opts.ignores })) { + return { + valid: true, + errors: [], + warnings: [], + input: message, + }; + } + // Parse the commit message + const parsed = message === "" + ? { header: null, body: null, footer: null } + : await parse(message, opts.parser, opts.parserOpts); + if (parsed.header === null && parsed.body === null && parsed.footer === null) { + // Commit is empty, skip + return { + valid: true, + errors: [], + warnings: [], + input: message, + }; + } + const allRules = new Map(Object.entries(defaultRules)); + if (opts.plugins) { + Object.values(opts.plugins).forEach((plugin) => { + if (plugin.rules) { + Object.keys(plugin.rules).forEach((ruleKey) => allRules.set(ruleKey, plugin.rules[ruleKey])); + } + }); + } + // Find invalid rules configs + const missing = Object.keys(rulesConfig).filter((name) => typeof allRules.get(name) !== "function"); + if (missing.length > 0) { + const names = [...allRules.keys()]; + throw new RangeError([ + `Found rules without implementation: ${missing.join(", ")}.`, + `Supported rules are: ${names.join(", ")}.`, + ].join("\n")); + } + const invalid = Object.entries(rulesConfig) + .map(([name, config]) => { + if (!Array.isArray(config)) { + return new Error(`config for rule ${name} must be array, received ${util.inspect(config)} of type ${typeof config}`); + } + const [level] = config; + if (level === RuleConfigSeverity.Disabled && config.length === 1) { + return null; + } + const [, when] = config; + if (typeof level !== "number" || isNaN(level)) { + return new Error(`level for rule ${name} must be number, received ${util.inspect(level)} of type ${typeof level}`); + } + if (config.length < 2 || config.length > 3) { + return new Error(`config for rule ${name} must be 2 or 3 items long, received ${util.inspect(config)} of length ${config.length}`); + } + if (level < 0 || level > 2) { + return new RangeError(`level for rule ${name} must be between 0 and 2, received ${util.inspect(level)}`); + } + if (typeof when !== "string") { + return new Error(`condition for rule ${name} must be string, received ${util.inspect(when)} of type ${typeof when}`); + } + if (when !== "never" && when !== "always") { + return new Error(`condition for rule ${name} must be "always" or "never", received ${util.inspect(when)}`); + } + return null; + }) + .filter((item) => item instanceof Error); + if (invalid.length > 0) { + throw new Error(invalid.map((i) => i.message).join("\n")); + } + // Validate against all rules + const pendingResults = Object.entries(rulesConfig) + // Level 0 rules are ignored + .filter(([, config]) => !!config && config.length && config[0] > 0) + .map(async (entry) => { + const [name, config] = entry; + const [level, when, value] = config; // + const rule = allRules.get(name); + if (!rule) { + throw new Error(`Could not find rule implementation for ${name}`); + } + const executableRule = rule; + const [valid, message] = await executableRule(parsed, when, value); + return { + level, + valid, + name, + message, + }; + }); + const results = (await Promise.all(pendingResults)).filter((result) => result !== null); + const errors = results.filter((result) => result.level === RuleConfigSeverity.Error && !result.valid); + const warnings = results.filter((result) => result.level === RuleConfigSeverity.Warning && !result.valid); + const valid = errors.length === 0; + return { + valid, + errors, + warnings, + input: buildCommitMessage(parsed), + }; +} +//# sourceMappingURL=lint.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/lint/lib/lint.js.map b/node_modules/@commitlint/lint/lib/lint.js.map new file mode 100644 index 000000000..873196e4b --- /dev/null +++ b/node_modules/@commitlint/lint/lib/lint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lint.js","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAU7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,CACjC,OAAe,EACf,cAA+B,EAC/B,OAAqB;IAErB,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IACnF,MAAM,WAAW,GAAG,cAAc,IAAI,EAAE,CAAC;IAEzC,8EAA8E;IAC9E,kFAAkF;IAClF,mFAAmF;IACnF,oEAAoE;IACpE,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC7F,OAAO;YACN,KAAK,E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,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;IAElC,OAAO;QACN,KAAK;QACL,MAAM;QACN,QAAQ;QACR,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC;KACjC,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/lint/license.md b/node_modules/@commitlint/lint/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/lint/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/lint/package.json b/node_modules/@commitlint/lint/package.json new file mode 100644 index 000000000..69bf1c39b --- /dev/null +++ b/node_modules/@commitlint/lint/package.json @@ -0,0 +1,50 @@ +{ + "name": "@commitlint/lint", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint a string against commitlint rules", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/lint" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/lint.js", + "types": "lib/lint.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check --skip-import" + }, + "dependencies": { + "@commitlint/is-ignored": "^21.2.3", + "@commitlint/parse": "^21.2.3", + "@commitlint/rules": "^21.2.3", + "@commitlint/types": "^21.2.3" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/load/README.md b/node_modules/@commitlint/load/README.md new file mode 100644 index 000000000..a65da640c --- /dev/null +++ b/node_modules/@commitlint/load/README.md @@ -0,0 +1,15 @@ +# @commitlint/load + +Load shared commitlint configuration + +## Getting started + +```shell +npm install --save-dev @commitlint/load +``` + +## Documentation + +Consult [API docs](https://commitlint.js.org/api/load) for comprehensive documentation. + +Documentation generated from [`docs` folder](../../docs/api/format.md). diff --git a/node_modules/@commitlint/load/lib/load.d.ts b/node_modules/@commitlint/load/lib/load.d.ts new file mode 100644 index 000000000..cb0fdf339 --- /dev/null +++ b/node_modules/@commitlint/load/lib/load.d.ts @@ -0,0 +1,5 @@ +import { resolveFrom, resolveFromSilent, resolveGlobalSilent } from "@commitlint/resolve-extends"; +import { LoadOptions, QualifiedConfig, UserConfig } from "@commitlint/types"; +export default function load(seed?: UserConfig, options?: LoadOptions): Promise; +export { resolveFrom, resolveFromSilent, resolveGlobalSilent }; +//# sourceMappingURL=load.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/load.d.ts.map b/node_modules/@commitlint/load/lib/load.d.ts.map new file mode 100644 index 000000000..1cc29bd5c --- /dev/null +++ b/node_modules/@commitlint/load/lib/load.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAIA,OAAuB,EACtB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,WAAW,EAEX,eAAe,EAEf,UAAU,EACV,MAAM,mBAAmB,CAAC;AAyB3B,wBAA8B,IAAI,CACjC,IAAI,GAAE,UAAe,EACrB,OAAO,GAAE,WAAgB,GACvB,OAAO,CAAC,eAAe,CAAC,CA8F1B;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/load.js b/node_modules/@commitlint/load/lib/load.js new file mode 100644 index 000000000..7b120a04f --- /dev/null +++ b/node_modules/@commitlint/load/lib/load.js @@ -0,0 +1,106 @@ +import path from "node:path"; +import { validateConfig } from "@commitlint/config-validator"; +import executeRule from "@commitlint/execute-rule"; +import resolveExtends, { resolveFrom, resolveFromSilent, resolveGlobalSilent, loadParserPreset, } from "@commitlint/resolve-extends"; +import isPlainObject from "is-plain-obj"; +import { merge } from "es-toolkit/compat"; +import { loadConfig } from "./utils/load-config.js"; +import { loadParserOpts } from "./utils/load-parser-opts.js"; +import loadPlugin from "./utils/load-plugin.js"; +/** + * Resolve relative formatter paths (e.g. "./my-formatter.js") from the + * config directory. Package specifiers and absolute paths are kept as-is + * so the runtime resolves them via standard module resolution at import + * time. + */ +const resolveFormatter = (formatter, parent) => { + if (!formatter.startsWith(".")) { + return formatter; + } + try { + return resolveFrom(formatter, parent); + } + catch (error) { + return formatter; + } +}; +export default async function load(seed = {}, options = {}) { + const cwd = typeof options.cwd === "undefined" ? process.cwd() : options.cwd; + const loaded = await loadConfig(cwd, options.file); + const baseDirectory = loaded?.filepath ? path.dirname(loaded.filepath) : cwd; + const configFilePath = loaded?.filepath; + let config = {}; + if (loaded) { + const resolvedConfig = typeof loaded.config === "function" ? await loaded.config() : await loaded.config; + validateConfig(loaded.filepath || "", resolvedConfig); + config = resolvedConfig; + } + // Merge passed config with file based options + config = merge({ + extends: [], + plugins: [], + rules: {}, + }, config, seed); + // Resolve parserPreset key + if (typeof config.parserPreset === "string") { + const resolvedParserPreset = resolveFrom(config.parserPreset, configFilePath); + config.parserPreset = { + name: config.parserPreset, + ...(await loadParserPreset(resolvedParserPreset)), + }; + } + // Resolve extends key + const extended = await resolveExtends(config, { + prefix: "commitlint-config", + cwd: baseDirectory, + parserPreset: await config.parserPreset, + }); + if (!extended.formatter || typeof extended.formatter !== "string") { + extended.formatter = "@commitlint/format"; + } + let plugins = {}; + if (Array.isArray(extended.plugins)) { + const deduplicatedPlugins = [...new Set(extended.plugins)]; + for (const plugin of deduplicatedPlugins) { + if (typeof plugin === "string") { + plugins = await loadPlugin(plugins, plugin, { + debug: process.env.DEBUG === "true", + }); + } + else { + plugins.local = plugin; + } + } + } + const rules = (await Promise.all(Object.entries(extended.rules || {}).map((entry) => executeRule(entry)))).reduce((registry, item) => { + // type of `item` can be null, but Object.entries always returns key pair + const [key, value] = item; + registry[key] = value; + return registry; + }, {}); + const helpUrl = typeof extended.helpUrl === "string" + ? extended.helpUrl + : typeof config.helpUrl === "string" + ? config.helpUrl + : "https://github.com/conventional-changelog/commitlint/#what-is-commitlint"; + const prompt = extended.prompt && isPlainObject(extended.prompt) ? extended.prompt : {}; + return { + extends: Array.isArray(extended.extends) + ? extended.extends + : typeof extended.extends === "string" + ? [extended.extends] + : [], + // Resolve config-relative formatter module + formatter: resolveFormatter(extended.formatter, configFilePath), + // Resolve parser-opts from preset + parserPreset: await loadParserOpts(extended.parserPreset), + ignores: extended.ignores, + defaultIgnores: extended.defaultIgnores, + plugins: plugins, + rules: rules, + helpUrl: helpUrl, + prompt, + }; +} +export { resolveFrom, resolveFromSilent, resolveGlobalSilent }; +//# sourceMappingURL=load.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/load.js.map b/node_modules/@commitlint/load/lib/load.js.map new file mode 100644 index 000000000..5baf1cc52 --- /dev/null +++ b/node_modules/@commitlint/load/lib/load.js.map @@ -0,0 +1 @@ +{"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,cAAc,EAAE,EACtB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,MAAe,EAAU,EAAE;IACvE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,IAAI,CAAC;QACJ,OAAO,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,CACjC,IAAI,GAAe,EAAE,EACrB,OAAO,GAAgB,EAAE;IAEzB,MAAM,GAAG,GAAG,OAAO,OAAO,CAAC,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC7E,MAAM,MAAM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CAAC,CAAC,QAAQ,CAAC,OAAO;QAClB,CAAC,CAAC,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,OAAO;YAChB,CAAC,CAAC,0EAA0E,CAAC;IAEhF,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAExF,OAAO;QACN,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,QAAQ,CAAC,OAAO;YAClB,CAAC,CAAC,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ;gBACrC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACpB,CAAC,CAAC,EAAE;QACN,2CAA2C;QAC3C,SAAS,EAAE,gBAAgB,CAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;QAC/D,kCAAkC;QAClC,YAAY,EAAE,MAAM,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;QACzD,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,cAAc,EAAE,QAAQ,CAAC,cAAc;QACvC,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,OAAO;QAChB,MAAM;KACN,CAAC;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-config.d.ts b/node_modules/@commitlint/load/lib/utils/load-config.d.ts new file mode 100644 index 000000000..94b28ee5b --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-config.d.ts @@ -0,0 +1,7 @@ +export interface LoadConfigResult { + config: unknown; + filepath: string; + isEmpty?: boolean; +} +export declare function loadConfig(cwd: string, configPath?: string): Promise; +//# sourceMappingURL=load-config.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-config.d.ts.map b/node_modules/@commitlint/load/lib/utils/load-config.d.ts.map new file mode 100644 index 000000000..1d35b260e --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../src/utils/load-config.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAKD,wBAAsB,UAAU,CAC/B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAsDlC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-config.js b/node_modules/@commitlint/load/lib/utils/load-config.js new file mode 100644 index 000000000..7b25ef3d8 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-config.js @@ -0,0 +1,56 @@ +import path from "node:path"; +import { cosmiconfig, defaultLoaders } from "cosmiconfig"; +import { TypeScriptLoader } from "cosmiconfig-typescript-loader"; +const moduleName = "commitlint"; +const searchStrategy = "global"; +export async function loadConfig(cwd, configPath) { + let tsLoaderInstance; + const tsLoader = (...args) => { + if (!tsLoaderInstance) { + tsLoaderInstance = TypeScriptLoader(); + } + return tsLoaderInstance(...args); + }; + const explorer = cosmiconfig(moduleName, { + searchStrategy, + searchPlaces: [ + // cosmiconfig overrides default searchPlaces if any new search place is added (For e.g. `*.ts` files), + // we need to manually merge default searchPlaces from https://github.com/davidtheclark/cosmiconfig#searchplaces + "package.json", + "package.yaml", + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.cjs`, + `.${moduleName}rc.mjs`, + `${moduleName}.config.js`, + `${moduleName}.config.cjs`, + `${moduleName}.config.mjs`, + // files supported by TypescriptLoader + `.${moduleName}rc.ts`, + `.${moduleName}rc.cts`, + `.${moduleName}rc.mts`, + `${moduleName}.config.ts`, + `${moduleName}.config.cts`, + `${moduleName}.config.mts`, + ], + loaders: { + ".ts": tsLoader, + ".cts": tsLoader, + ".mts": tsLoader, + ".cjs": defaultLoaders[".cjs"], + ".js": defaultLoaders[".js"], + }, + }); + const explicitPath = configPath ? path.resolve(cwd, configPath) : undefined; + const explore = explicitPath ? explorer.load : explorer.search; + const searchPath = explicitPath ? explicitPath : cwd; + const local = await explore(searchPath); + if (local) { + return local; + } + return null; +} +//# sourceMappingURL=load-config.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-config.js.map b/node_modules/@commitlint/load/lib/utils/load-config.js.map new file mode 100644 index 000000000..58caa087a --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../src/utils/load-config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC,MAAM,CAAC,KAAK,UAAU,UAAU,CAC/B,GAAW,EACX,UAAmB;IAEnB,IAAI,gBAAoC,CAAC;IACzC,MAAM,QAAQ,GAAW,CAAC,GAAG,IAAI,EAAE,EAAE;QACpC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACvB,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;QACvC,CAAC;QACD,OAAO,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC;IAEF,MAAM,QAAQ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@commitlint/load/lib/utils/load-parser-opts.d.ts b/node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts new file mode 100644 index 000000000..8b16ebe93 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts @@ -0,0 +1,5 @@ +import { ParserPreset } from "@commitlint/types"; +type Awaitable = T | PromiseLike; +export declare function loadParserOpts(pendingParser: string | Awaitable | (() => Awaitable) | undefined): Promise; +export {}; +//# sourceMappingURL=load-parser-opts.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts.map b/node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts.map new file mode 100644 index 000000000..d9f6e653d --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load-parser-opts.d.ts","sourceRoot":"","sources":["../../src/utils/load-parser-opts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AA8BvC,wBAAsB,cAAc,CACnC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,SAAS,CAAC,YAAY,CAAC,CAAC,GAAG,SAAS,GAC3F,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAyDnC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-parser-opts.js b/node_modules/@commitlint/load/lib/utils/load-parser-opts.js new file mode 100644 index 000000000..fc3929fc2 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-parser-opts.js @@ -0,0 +1,68 @@ +function isObjectLike(obj) { + return Boolean(obj) && typeof obj === "object"; // typeof null === 'object' +} +/** + * Presets published under a scope keep the conventional prefix after the + * scope, e.g. `@scope/conventional-changelog-preset` (#2488). + */ +function isConventionalChangelogPreset(name) { + if (typeof name !== "string") { + return false; + } + const unscoped = name.startsWith("@") ? name.slice(name.indexOf("/") + 1) : name; + return unscoped.startsWith("conventional-changelog-"); +} +function isParserOptsFunction(obj) { + return typeof obj.parserOpts === "function"; +} +export async function loadParserOpts(pendingParser) { + if (typeof pendingParser === "function") { + return loadParserOpts(pendingParser()); + } + if (!pendingParser || typeof pendingParser !== "object") { + return undefined; + } + // Await for the module, loaded with require + const parser = await pendingParser; + // exit early, no opts to resolve + if (!parser.parserOpts) { + return parser; + } + // Pull nested parserOpts, might happen if overwritten with a module in main config + if (typeof parser.parserOpts === "object") { + // Await parser opts if applicable + parser.parserOpts = await parser.parserOpts; + if (isObjectLike(parser.parserOpts) && isObjectLike(parser.parserOpts.parserOpts)) { + // Preserve any user-provided properties (e.g. issuePrefixes) that + // were merged at the outer parserOpts level during config resolution, + // while unwrapping the inner module-provided parserOpts (#4640). + const { parserOpts: inner, ...rest } = parser.parserOpts; + parser.parserOpts = { ...inner, ...rest }; + } + return parser; + } + // Create parser opts from factory + if (isParserOptsFunction(parser) && isConventionalChangelogPreset(parser.name)) { + return new Promise((resolve) => { + const result = parser.parserOpts((_, opts) => { + resolve({ + ...parser, + parserOpts: opts?.parserOpts, + }); + }); + // If result has data or a promise, the parser doesn't support factory-init + // due to https://github.com/nodejs/promises-debugging/issues/16 it just quits, so let's use this fallback + if (result) { + Promise.resolve(result).then((opts) => { + resolve({ + ...parser, + parserOpts: opts?.parserOpts || opts?.parser, + }); + }); + } + return; + }); + } + return parser; +} +//# sourceMappingURL=load-parser-opts.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-parser-opts.js.map b/node_modules/@commitlint/load/lib/utils/load-parser-opts.js.map new file mode 100644 index 000000000..32de7ae0a --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-parser-opts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"load-parser-opts.js","sourceRoot":"","sources":["../../src/utils/load-parser-opts.ts"],"names":[],"mappings":"AAIA,SA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AAY,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACnF,kEAAkE;YAClE,sEAAsE;YACtE,iEAAiE;YACjE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,UAE7C,CAAC;YACF,MAAM,CAAC,UAAU,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,EAAE,CAAC;QAC3C,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,kCAAkC;IAClC,IAAI,oBAAoB,CAAC,MAAM,CAAC,IAAI,6BAA6B,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAChF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAQ,EAAE,IAAI,EAAE,EAAE;gBACnD,OAAO,CAAC;oBACP,GAAG,MAAM;oBACT,UAAU,EAAE,IAAI,EAAE,UAAU;iBAC5B,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,2EAA2E;YAC3E,0GAA0G;YAC1G,IAAI,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;oBACrC,OAAO,CAAC;wBACP,GAAG,MAAM;wBACT,UAAU,EAAE,IAAI,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM;qBAC5C,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC;YACJ,CAAC;YACD,OAAO;QACR,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-plugin.d.ts b/node_modules/@commitlint/load/lib/utils/load-plugin.d.ts new file mode 100644 index 000000000..eccc83ac4 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-plugin.d.ts @@ -0,0 +1,7 @@ +import { PluginRecords } from "@commitlint/types"; +export interface LoadPluginOptions { + debug?: boolean; + searchPaths?: string[]; +} +export default function loadPlugin(plugins: PluginRecords, pluginName: string, options?: LoadPluginOptions | boolean): Promise; +//# sourceMappingURL=load-plugin.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-plugin.d.ts.map b/node_modules/@commitlint/load/lib/utils/load-plugin.d.ts.map new file mode 100644 index 000000000..436f16133 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-plugin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load-plugin.d.ts","sourceRoot":"","sources":["../../src/utils/load-plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAU,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAiC1D,MAAM,WAAW,iBAAiB;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AASD,wBAA8B,UAAU,CACvC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,iBAAiB,GAAG,OAAY,GACvC,OAAO,CAAC,aAAa,CAAC,CAmIxB"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-plugin.js b/node_modules/@commitlint/load/lib/utils/load-plugin.js new file mode 100644 index 000000000..e2f780d24 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-plugin.js @@ -0,0 +1,155 @@ +import { createRequire } from "node:module"; +import fs from "node:fs"; +import path from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import pc from "picocolors"; +import { normalizePackageName, getShorthandName } from "./plugin-naming.js"; +import { WhitespacePluginError, MissingPluginError } from "./plugin-errors.js"; +import { resolveFromNpxCache } from "@commitlint/resolve-extends"; +const require = createRequire(import.meta.url); +const __dirname = path.resolve(fileURLToPath(import.meta.url), ".."); +const dynamicImport = async (id) => { + const imported = await import(path.isAbsolute(id) ? pathToFileURL(id).toString() : id); + return ("default" in imported && imported.default) || imported; +}; +function sanitizeErrorMessage(message) { + return message.replace(/\/[^/]+\/node_modules/g, "...").replace(/\\[^\\]+\\node_modules/g, "..."); +} +function findPackageJson(dir) { + let current = dir; + const root = path.parse(dir).root; + while (current !== root) { + const pkgPath = path.join(current, "package.json"); + if (fs.existsSync(pkgPath)) { + return pkgPath; + } + current = path.dirname(current); + } + return null; +} +function normalizeOptions(options) { + if (typeof options === "boolean") { + return { debug: options }; + } + return options; +} +export default async function loadPlugin(plugins, pluginName, options = {}) { + const normalized = normalizeOptions(options); + const { debug = false, searchPaths = [] } = normalized; + for (const searchPath of searchPaths) { + if (typeof searchPath !== "string" || !path.isAbsolute(searchPath)) { + throw new Error(`Invalid searchPath "${searchPath}": must be an absolute path`); + } + if (!fs.existsSync(searchPath)) { + throw new Error(`Invalid searchPath "${searchPath}": directory does not exist`); + } + if (!fs.statSync(searchPath).isDirectory()) { + throw new Error(`Invalid searchPath "${searchPath}": must be a directory, not a file`); + } + } + const longName = normalizePackageName(pluginName); + const shortName = getShorthandName(longName); + if (pluginName.match(/\s+/u)) { + throw new WhitespacePluginError(pluginName, { + pluginName: longName, + }); + } + const pluginKey = longName === pluginName ? shortName : pluginName; + if (!plugins[pluginKey]) { + let plugin; + let resolvedPath; + // Try to load from npx cache directories using require.resolve + const npxResolvedPath = resolveFromNpxCache(longName); + if (npxResolvedPath) { + try { + plugin = await dynamicImport(npxResolvedPath); + resolvedPath = npxResolvedPath; + } + catch (err) { + if (debug) { + console.debug(`Failed to load plugin ${longName} from npx cache: ${err.message}`); + } + } + } + // Try to load from additional search paths (extended config's node_modules) + if (!plugin) { + for (const searchPath of searchPaths) { + try { + resolvedPath = require.resolve(longName, { paths: [searchPath] }); + plugin = await dynamicImport(resolvedPath); + break; + } + catch (err) { + if (debug) { + console.debug(`Failed to load plugin ${longName} from ${searchPath}: ${err.message}`); + } + } + } + } + // Try default resolution as last resort + if (!plugin) { + try { + plugin = await dynamicImport(longName); + // Try to resolve path for debug logging + try { + resolvedPath = require.resolve(longName); + } + catch { + // Ignore - path not critical + } + } + catch (err) { + let resolutionError; + try { + resolvedPath = require.resolve(longName); + } + catch (resolveErr) { + resolutionError = resolveErr; + } + if (resolutionError) { + // Resolution failed - throw MissingPluginError + if (debug) { + console.debug(`Failed to resolve plugin ${longName}: ${resolutionError.message}`); + } + throw new MissingPluginError(pluginName, sanitizeErrorMessage(resolutionError.message), { + pluginName: longName, + commitlintPath: path.resolve(__dirname, "../.."), + }); + } + // Resolution succeeded but import failed - rethrow original error + throw err; + } + } + // This step is costly, so skip if debug is disabled + if (debug) { + let version = null; + if (resolvedPath) { + try { + const pkgPath = findPackageJson(path.dirname(resolvedPath)); + if (pkgPath) { + version = require(pkgPath).version; + } + } + catch { + // Do nothing + } + } + const loadedPluginAndVersion = version + ? `${longName}@${version}` + : `${longName}, version unknown`; + const fromPath = resolvedPath ? ` (from ${resolvedPath})` : ""; + console.log(pc.blue(`Loaded plugin ${pluginName} (${loadedPluginAndVersion})${fromPath}`)); + } + if (plugin) { + plugins[pluginKey] = plugin; + } + else { + throw new MissingPluginError(pluginName, "Plugin loaded but is undefined", { + pluginName: longName, + commitlintPath: path.resolve(__dirname, "../.."), + }); + } + } + return plugins; +} +//# sourceMappingURL=load-plugin.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/load-plugin.js.map b/node_modules/@commitlint/load/lib/utils/load-plugin.js.map new file mode 100644 index 000000000..7101c49e0 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/load-plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"load-plugin.js","sourceRoot":"","sources":["../../src/utils/load-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,U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AC,CAAC,CAAC;oBAC5D,IAAI,OAAO,EAAE,CAAC;wBACb,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;oBACpC,CAAC;gBACF,CAAC;gBAAC,MAAM,CAAC;oBACR,aAAa;gBACd,CAAC;YACF,CAAC;YAED,MAAM,sBAAsB,GAAG,OAAO;gBACrC,CAAC,CAAC,GAAG,QAAQ,IAAI,OAAO,EAAE;gBAC1B,CAAC,CAAC,GAAG,QAAQ,mBAAmB,CAAC;YAElC,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,UAAU,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,UAAU,KAAK,sBAAsB,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC5F,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACZ,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;QAC7B,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,kBAAkB,CAAC,UAAU,EAAE,gCAAgC,EAAE;gBAC1E,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC;aAChD,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts b/node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts new file mode 100644 index 000000000..f53cad475 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts @@ -0,0 +1,13 @@ +export declare class WhitespacePluginError extends Error { + __proto__: ErrorConstructor; + messageTemplate: string; + messageData: any; + constructor(pluginName?: string, data?: any); +} +export declare class MissingPluginError extends Error { + __proto__: ErrorConstructor; + messageTemplate: string; + messageData: any; + constructor(pluginName?: string, errorMessage?: string, data?: any); +} +//# sourceMappingURL=plugin-errors.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts.map b/node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts.map new file mode 100644 index 000000000..30b8aefa5 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin-errors.d.ts","sourceRoot":"","sources":["../../src/utils/plugin-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAsB,SAAQ,KAAK;IAC/C,SAAS,mBAAS;IAEX,eAAe,EAAE,MAAM,CAAsB;IAC7C,WAAW,EAAE,GAAG,CAAM;IAE7B,YAAY,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,GAAQ,EAM9C;CACD;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC5C,SAAS,mBAAS;IAEX,eAAe,EAAE,MAAM,CAAoB;IAC3C,WAAW,EAAE,GAAG,CAAC;IAExB,YAAY,UAAU,CAAC,EAAE,MAAM,EAAE,YAAY,GAAE,MAAW,EAAE,IAAI,GAAE,GAAQ,EAMzE;CACD"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-errors.js b/node_modules/@commitlint/load/lib/utils/plugin-errors.js new file mode 100644 index 000000000..ce364d1a8 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-errors.js @@ -0,0 +1,21 @@ +export class WhitespacePluginError extends Error { + __proto__ = Error; + messageTemplate = "whitespace-found"; + messageData = {}; + constructor(pluginName, data = {}) { + super(`Whitespace found in plugin name '${pluginName}'`); + this.messageData = data; + Object.setPrototypeOf(this, WhitespacePluginError.prototype); + } +} +export class MissingPluginError extends Error { + __proto__ = Error; + messageTemplate = "plugin-missing"; + messageData; + constructor(pluginName, errorMessage = "", data = {}) { + super(`Failed to load plugin ${pluginName}: ${errorMessage}`); + this.messageData = data; + Object.setPrototypeOf(this, MissingPluginError.prototype); + } +} +//# sourceMappingURL=plugin-errors.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-errors.js.map b/node_modules/@commitlint/load/lib/utils/plugin-errors.js.map new file mode 100644 index 000000000..7a4be3713 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin-errors.js","sourceRoot":"","sources":["../../src/utils/plugin-errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC/C,SAAS,GAAG,KAAK,CAAC;IAEX,eAAe,GAAW,kBAAkB,CAAC;IAC7C,WAAW,GAAQ,EAAE,CAAC;IAE7B,YAAY,UAAmB,EAAE,IAAI,GAAQ,EAAE;QAC9C,KAAK,CAAC,oCAAoC,UAAU,GAAG,CAAC,CAAC;QAEzD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;CACD;AAED,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC5C,SAAS,GAAG,KAAK,CAAC;IAEX,eAAe,GAAW,gBAAgB,CAAC;IAC3C,WAAW,CAAM;IAExB,YAAY,UAAmB,EAAE,YAAY,GAAW,EAAE,EAAE,IAAI,GAAQ,EAAE;QACzE,KAAK,CAAC,yBAAyB,UAAU,KAAK,YAAY,EAAE,CAAC,CAAC;QAE9D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;CACD"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-naming.d.ts b/node_modules/@commitlint/load/lib/utils/plugin-naming.d.ts new file mode 100644 index 000000000..2ec365baf --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-naming.d.ts @@ -0,0 +1,20 @@ +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @returns {string} Normalized name of the package + * @private + */ +export declare function normalizePackageName(name: string): string; +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @returns {string} The term without prefix. + */ +export declare function getShorthandName(fullname: string): string; +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +export declare function getNamespaceFromTerm(term: string): string; +//# sourceMappingURL=plugin-naming.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-naming.d.ts.map b/node_modules/@commitlint/load/lib/utils/plugin-naming.d.ts.map new file mode 100644 index 000000000..f3393ed8d --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-naming.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin-naming.d.ts","sourceRoot":"","sources":["../../src/utils/plugin-naming.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,UAkChD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,UAiBhD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,UAIhD"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-naming.js b/node_modules/@commitlint/load/lib/utils/plugin-naming.js new file mode 100644 index 000000000..3483bcf8b --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-naming.js @@ -0,0 +1,80 @@ +import path from "node:path"; +// largely adapted from eslint's plugin system +const NAMESPACE_REGEX = /^@.*\//u; +// In eslint this is a parameter - we don't need to support the extra options +const prefix = "commitlint-plugin"; +// Replace Windows with posix style paths +function convertPathToPosix(filepath) { + const normalizedFilepath = path.normalize(filepath); + const posixFilepath = normalizedFilepath.replace(/\\/gu, "/"); + return posixFilepath; +} +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @returns {string} Normalized name of the package + * @private + */ +export function normalizePackageName(name) { + let normalizedName = name; + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (normalizedName.indexOf("\\") > -1) { + normalizedName = convertPathToPosix(normalizedName); + } + if (normalizedName.charAt(0) === "@") { + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"), scopedPackageNameRegex = new RegExp(`^${prefix}(?:-|$)`, "u"); + if (scopedPackageShortcutRegex.test(normalizedName)) { + normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } + else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`); + } + } + else if (normalizedName.indexOf(`${prefix}-`) !== 0) { + normalizedName = `${prefix}-${normalizedName}`; + } + return normalizedName; +} +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @returns {string} The term without prefix. + */ +export function getShorthandName(fullname) { + if (fullname[0] === "@") { + let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname); + if (matchResult) { + return matchResult[1]; + } + matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname); + if (matchResult) { + return `${matchResult[1]}/${matchResult[2]}`; + } + } + else if (fullname.startsWith(`${prefix}-`)) { + return fullname.slice(prefix.length + 1); + } + return fullname; +} +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +export function getNamespaceFromTerm(term) { + const match = NAMESPACE_REGEX.exec(term); + return match ? match[0] : ""; +} +//# sourceMappingURL=plugin-naming.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/load/lib/utils/plugin-naming.js.map b/node_modules/@commitlint/load/lib/utils/plugin-naming.js.map new file mode 100644 index 000000000..0f86ba8b7 --- /dev/null +++ b/node_modules/@commitlint/load/lib/utils/plugin-naming.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin-naming.js","sourceRoot":"","sources":["../../src/utils/plugin-naming.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,8CAA8C;AAC9C,MAAM,eAAe,GAAG,SAAS,CAAC;AAClC,6EAA6E;AAC7E,MAAM,MAAM,GAAG,mBAAmB,CAAC;AAEnC,yCAAyC;AACzC,SAAS,kBAAkB,CAAC,QAAgB;IAC3C,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE9D,OAAO,aAAa,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAChD,IAAI,cAAc,GAAG,IAAI,CAAC;IAE1B;;;;OAIG;IACH,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACvC,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACtC;;;WAGG;QACH,MAAM,0BAA0B,GAAG,IAAI,MAAM,CAAC,mBAAmB,MAAM,OAAO,EAAE,GAAG,CAAC,EACnF,sBAAsB,GAAG,IAAI,MAAM,CAAC,IAAI,MAAM,SAAS,EAAE,GAAG,CAAC,CAAC;QAE/D,IAAI,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;YACrD,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,0BAA0B,EAA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AAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAChD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/load/license.md b/node_modules/@commitlint/load/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/load/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/load/package.json b/node_modules/@commitlint/load/package.json new file mode 100644 index 000000000..5894c0740 --- /dev/null +++ b/node_modules/@commitlint/load/package.json @@ -0,0 +1,57 @@ +{ + "name": "@commitlint/load", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Load shared commitlint configuration", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/load" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/load.js", + "types": "lib/load.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check --skip-import" + }, + "dependencies": { + "@commitlint/config-validator": "^21.2.3", + "@commitlint/execute-rule": "^21.0.1", + "@commitlint/resolve-extends": "^21.2.3", + "@commitlint/types": "^21.2.3", + "cosmiconfig": "^9.0.1", + "cosmiconfig-typescript-loader": "^6.1.0", + "es-toolkit": "^1.46.0", + "is-plain-obj": "^4.1.0", + "picocolors": "^1.1.1" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0", + "conventional-changelog-atom": "^5.0.0", + "typescript": "^7.0.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/message/lib/index.d.ts b/node_modules/@commitlint/message/lib/index.d.ts new file mode 100644 index 000000000..3aa4a32f9 --- /dev/null +++ b/node_modules/@commitlint/message/lib/index.d.ts @@ -0,0 +1,2 @@ +export default function message(input?: (string | null | undefined)[]): string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/message/lib/index.d.ts.map b/node_modules/@commitlint/message/lib/index.d.ts.map new file mode 100644 index 000000000..fc01cc2b6 --- /dev/null +++ b/node_modules/@commitlint/message/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,GAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAO,UAExE"} \ No newline at end of file diff --git a/node_modules/@commitlint/message/lib/index.js b/node_modules/@commitlint/message/lib/index.js new file mode 100644 index 000000000..2cd2b1e70 --- /dev/null +++ b/node_modules/@commitlint/message/lib/index.js @@ -0,0 +1,4 @@ +export default function message(input = []) { + return input.filter(Boolean).join(" "); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/message/lib/index.js.map b/node_modules/@commitlint/message/lib/index.js.map new file mode 100644 index 000000000..36f6145b5 --- /dev/null +++ b/node_modules/@commitlint/message/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,QAAuC,EAAE;IACxE,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/message/license.md b/node_modules/@commitlint/message/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/message/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/message/package.json b/node_modules/@commitlint/message/package.json new file mode 100644 index 000000000..fc0d48d32 --- /dev/null +++ b/node_modules/@commitlint/message/package.json @@ -0,0 +1,43 @@ +{ + "name": "@commitlint/message", + "version": "21.2.0", + "gitHead": "1b4e5bc0e095294ad421b3ac83f6b66665429e60", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/message" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/parse/README.md b/node_modules/@commitlint/parse/README.md new file mode 100644 index 000000000..802145246 --- /dev/null +++ b/node_modules/@commitlint/parse/README.md @@ -0,0 +1,29 @@ +> Parse commit messages to structured data + +# @commitlint/parse + +## Install + +``` +npm install --save @commitlint/parse +``` + +## Use + +```js +const parse = require("@commitlint/parse"); +``` + +## API + +### parse(message: string, parser: Function, parserOpts: Object) + +- **message**: Commit message to parser +- **parser**: Sync parser function to use. Defaults to `sync` of `conventional-commits-parser` +- **parserOpts**: Options to pass to `parser` + ``` + { + commentChar: null, // character indicating comment lines + issuePrefixes: ['#'] // prefix characters for issue references + } + ``` diff --git a/node_modules/@commitlint/parse/lib/index.d.ts b/node_modules/@commitlint/parse/lib/index.d.ts new file mode 100644 index 000000000..1237841b6 --- /dev/null +++ b/node_modules/@commitlint/parse/lib/index.d.ts @@ -0,0 +1,5 @@ +import type { Parser } from "@commitlint/types"; +import { type Commit, type ParserOptions } from "conventional-commits-parser"; +export declare function parse(message: string, parser?: Parser, parserOpts?: ParserOptions): Promise; +export default parse; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/parse/lib/index.d.ts.map b/node_modules/@commitlint/parse/lib/index.d.ts.map new file mode 100644 index 000000000..55229c923 --- /dev/null +++ b/node_modules/@commitlint/parse/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAgB,MAAM,6BAA6B,CAAC;AAe5F,wBAAsB,KAAK,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAsB,EAC9B,UAAU,CAAC,EAAE,aAAa,GACxB,OAAO,CAAC,MAAM,CAAC,CAkBjB;eAEc,KAAK"} \ No newline at end of file diff --git a/node_modules/@commitlint/parse/lib/index.js b/node_modules/@commitlint/parse/lib/index.js new file mode 100644 index 000000000..8963f5875 --- /dev/null +++ b/node_modules/@commitlint/parse/lib/index.js @@ -0,0 +1,31 @@ +import { CommitParser } from "conventional-commits-parser"; +import defaultChangelogOpts from "conventional-changelog-angular"; +const defaultParser = (message, options) => { + if (message === undefined || message === null) { + throw new TypeError("Expected a raw commit"); + } + const parser = new CommitParser(options); + const result = parser.parse(message); + result.scope = result.scope ?? null; + result.subject = result.subject ?? null; + result.type = result.type ?? null; + return result; +}; +export async function parse(message, parser = defaultParser, parserOpts) { + // conventional-changelog-angular@>=9 ships typings that declare the preset as + // `{}`; the parser options live under `.parser` at runtime. + const preset = (await defaultChangelogOpts()); + const defaultOpts = preset.parser || preset.parserOpts; + // Support user-provided parser options passed either flat or nested under a 'parser' key + const userOpts = parserOpts?.parser || parserOpts || {}; + const opts = { + ...defaultOpts, + fieldPattern: null, + ...userOpts, + }; + const parsed = parser(message, opts); + parsed.raw = message; + return parsed; +} +export default parse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/parse/lib/index.js.map b/node_modules/@commitlint/parse/lib/index.js.map new file mode 100644 index 000000000..d390ca2e1 --- /dev/null +++ b/node_modules/@commitlint/parse/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmC,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,oBAAoB,MAAM,gCAAgC,CAAC;AAElE,MAAM,aAAa,GAAW,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IAClD,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC/C,MAAM,IAAI,SAAS,CAAC,uBAAuB,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC;IACpC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC;IACxC,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC;IAClC,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,KAAK,CAC1B,OAAe,EACf,MAAM,GAAW,aAAa,EAC9B,UAA0B;IAE1B,8EAA8E;IAC9E,4DAA4D;IAC5D,MAAM,MAAM,GAAG,CAAC,MAAM,oBAAoB,EAAE,CAG3C,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC;IACvD,yFAAyF;IACzF,MAAM,QAAQ,GAAI,UAAkB,EAAE,MAAM,IAAI,UAAU,IAAI,EAAE,CAAC;IACjE,MAAM,IAAI,GAAG;QACZ,GAAG,WAAW;QACd,YAAY,EAAE,IAAI;QAClB,GAAG,QAAQ;KACX,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,IAAI,CAAW,CAAC;IAC/C,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,OAAO,MAAM,CAAC;AACf,CAAC;AAED,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/parse/license.md b/node_modules/@commitlint/parse/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/parse/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/parse/package.json b/node_modules/@commitlint/parse/package.json new file mode 100644 index 000000000..acfd6c01a --- /dev/null +++ b/node_modules/@commitlint/parse/package.json @@ -0,0 +1,48 @@ +{ + "name": "@commitlint/parse", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/parse" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/types": "^21.2.3", + "conventional-changelog-angular": "^9.0.0", + "conventional-commits-parser": "^7.0.0" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/read/README.md b/node_modules/@commitlint/read/README.md new file mode 100644 index 000000000..3d8c06e1a --- /dev/null +++ b/node_modules/@commitlint/read/README.md @@ -0,0 +1,15 @@ +# @commitlint/read + +Read commit messages from a specified range or last edit + +## Getting started + +```shell +npm install --save @commitlint/read +``` + +## Documentation + +Consult [API docs](https://commitlint.js.org/api/read) for comprehensive documentation. + +Documentation generated from [`docs` folder](../../docs/api/read.md). diff --git a/node_modules/@commitlint/read/lib/get-edit-commit.d.ts b/node_modules/@commitlint/read/lib/get-edit-commit.d.ts new file mode 100644 index 000000000..b90bee95c --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-commit.d.ts @@ -0,0 +1,2 @@ +export declare function getEditCommit(cwd?: string, edit?: boolean | string): Promise; +//# sourceMappingURL=get-edit-commit.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-commit.d.ts.map b/node_modules/@commitlint/read/lib/get-edit-commit.d.ts.map new file mode 100644 index 000000000..62b473162 --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-commit.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-edit-commit.d.ts","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"AAMA,wBAAsB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAwB5F"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-commit.js b/node_modules/@commitlint/read/lib/get-edit-commit.js new file mode 100644 index 000000000..c376d657b --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-commit.js @@ -0,0 +1,26 @@ +import toplevel from "@commitlint/top-level"; +import fs from "fs/promises"; +import { getEditFilePath } from "./get-edit-file-path.js"; +// Get recently edited commit message +export async function getEditCommit(cwd, edit) { + const top = await toplevel(cwd); + if (typeof top !== "string") { + throw new TypeError(`Could not find git root from ${cwd}`); + } + const editFilePath = await getEditFilePath(top, edit); + let editFile; + try { + editFile = await fs.readFile(editFilePath); + } + catch (err) { + if (err.code === "ENOENT") { + const hint = typeof edit === "string" + ? `Check that the path passed to --edit exists and is readable.` + : `--edit reads the message prepared by 'git commit' and is intended to run from a commit-msg hook. If you want to lint existing history, use --from / --to instead; to lint a specific file, pass its path as --edit .`; + throw new Error(`No commit message file found at ${editFilePath}. ${hint}`, { cause: err }); + } + throw err; + } + return [`${editFile.toString("utf-8")}\n`]; +} +//# sourceMappingURL=get-edit-commit.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-commit.js.map b/node_modules/@commitlint/read/lib/get-edit-commit.js.map new file mode 100644 index 000000000..dcd2cc697 --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-commit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-edit-commit.js","sourceRoot":"","sources":["../src/get-edit-commit.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,qCAAqC;AACrC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAY,EAAE,IAAuB;IACxE,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEhC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,SAAS,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAEtD,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACJ,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtD,MAAM,IAAI,GACT,OAAO,IAAI,KAAK,QAAQ;gBACvB,CAAC,CAAC,8DAA8D;gBAChE,CAAC,CAAC,4NAA4N,CAAC;YACjO,MAAM,IAAI,KAAK,CAAC,mCAAmC,YAAY,KAAK,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,MAAM,GAAG,CAAC;IACX,CAAC;IAED,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-file-path.d.ts b/node_modules/@commitlint/read/lib/get-edit-file-path.d.ts new file mode 100644 index 000000000..c2bf008a7 --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-file-path.d.ts @@ -0,0 +1,2 @@ +export declare function getEditFilePath(top: string, edit?: boolean | string): Promise; +//# sourceMappingURL=get-edit-file-path.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-file-path.d.ts.map b/node_modules/@commitlint/read/lib/get-edit-file-path.d.ts.map new file mode 100644 index 000000000..52ec817a5 --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-file-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-edit-file-path.d.ts","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"AAKA,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB3F"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-file-path.js b/node_modules/@commitlint/read/lib/get-edit-file-path.js new file mode 100644 index 000000000..31e2bd325 --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-file-path.js @@ -0,0 +1,19 @@ +import path from "node:path"; +import fs from "fs/promises"; +// Get path to recently edited commit message file +export async function getEditFilePath(top, edit) { + if (typeof edit === "string") { + return path.resolve(top, edit); + } + const dotgitPath = path.join(top, ".git"); + const dotgitStats = await fs.lstat(dotgitPath); + if (dotgitStats.isDirectory()) { + return path.join(top, ".git/COMMIT_EDITMSG"); + } + const gitFile = await fs.readFile(dotgitPath, { + encoding: "utf-8", + }); + const relativeGitPath = gitFile.replace("gitdir: ", "").replace("\n", ""); + return path.resolve(top, relativeGitPath, "COMMIT_EDITMSG"); +} +//# sourceMappingURL=get-edit-file-path.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-edit-file-path.js.map b/node_modules/@commitlint/read/lib/get-edit-file-path.js.map new file mode 100644 index 000000000..c5f9942fc --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-edit-file-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-edit-file-path.js","sourceRoot":"","sources":["../src/get-edit-file-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,kDAAkD;AAClD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW,EAAE,IAAuB;IACzE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAU,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtD,IAAI,WAAW,CAAC,WAAW,EAAE,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE;QACrD,QAAQ,EAAE,OAAO;KACjB,CAAC,CAAC;IACH,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAC7D,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-history-commits.d.ts b/node_modules/@commitlint/read/lib/get-history-commits.d.ts new file mode 100644 index 000000000..1ae1aae01 --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-history-commits.d.ts @@ -0,0 +1,6 @@ +import { type GitLogParams } from "@conventional-changelog/git-client"; +export type HistoryCommitsOptions = GitLogParams & Record; +export declare function getHistoryCommits(options: HistoryCommitsOptions, opts?: { + cwd?: string; +}): Promise; +//# sourceMappingURL=get-history-commits.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-history-commits.d.ts.map b/node_modules/@commitlint/read/lib/get-history-commits.d.ts.map new file mode 100644 index 000000000..cb28442bf --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-history-commits.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-history-commits.d.ts","sourceRoot":"","sources":["../src/get-history-commits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAG3E,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,qBAAqB,EAC9B,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GACzB,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BnB"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-history-commits.js b/node_modules/@commitlint/read/lib/get-history-commits.js new file mode 100644 index 000000000..dd6c606cf --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-history-commits.js @@ -0,0 +1,27 @@ +import { GitClient } from "@conventional-changelog/git-client"; +// Get commit messages from history +export async function getHistoryCommits(options, opts = {}) { + // Note: @conventional-changelog/git-client doesn't support arbitrary git + // log arguments. We extract and handle 'skip' manually here to preserve + // backward compatibility. Other arbitrary arguments passed via gitLogArgs + // may be silently ignored. + const { skip: skipRaw, ...gitOptions } = options; + let skipNum = 0; + if (skipRaw !== undefined) { + skipNum = Number(skipRaw); + if (!Number.isInteger(skipNum) || skipNum < 0) { + throw new TypeError(`Invalid skip value: ${skipRaw}`); + } + } + const client = new GitClient(opts.cwd ?? process.cwd()); + const data = []; + for await (const commit of client.getRawCommits(gitOptions)) { + if (skipNum > 0) { + skipNum--; + continue; + } + data.push(commit); + } + return data; +} +//# sourceMappingURL=get-history-commits.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/get-history-commits.js.map b/node_modules/@commitlint/read/lib/get-history-commits.js.map new file mode 100644 index 000000000..63650fe5d --- /dev/null +++ b/node_modules/@commitlint/read/lib/get-history-commits.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-history-commits.js","sourceRoot":"","sources":["../src/get-history-commits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,oCAAoC,CAAC;AAIlF,mCAAmC;AACnC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,OAA8B,EAC9B,IAAI,GAAqB,EAAE;IAE3B,yEAAyE;IACzE,wEAAwE;IACxE,0EAA0E;IAC1E,2BAA2B;IAC3B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC;IAEjD,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,SAAS,CAAC,uBAAuB,OAAO,EAAE,CAAC,CAAC;QACvD,CAAC;IACF,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAExD,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7D,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,SAAS;QACV,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/read.d.ts b/node_modules/@commitlint/read/lib/read.d.ts new file mode 100644 index 000000000..9653c29e5 --- /dev/null +++ b/node_modules/@commitlint/read/lib/read.d.ts @@ -0,0 +1,12 @@ +interface GetCommitMessageOptions { + cwd?: string; + from?: string; + fromLastTag?: boolean; + to?: string; + last?: boolean; + edit?: boolean | string; + gitLogArgs?: string; +} +export default function getCommitMessages(settings: GetCommitMessageOptions): Promise; +export {}; +//# sourceMappingURL=read.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/read.d.ts.map b/node_modules/@commitlint/read/lib/read.d.ts.map new file mode 100644 index 000000000..a3eb169e1 --- /dev/null +++ b/node_modules/@commitlint/read/lib/read.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAOA,UAAU,uBAAuB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAA8B,iBAAiB,CAC9C,QAAQ,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC,CA4EnB"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/read.js b/node_modules/@commitlint/read/lib/read.js new file mode 100644 index 000000000..1efdc2543 --- /dev/null +++ b/node_modules/@commitlint/read/lib/read.js @@ -0,0 +1,71 @@ +import { parseArgs } from "node:util"; +import { getHistoryCommits } from "./get-history-commits.js"; +import { getEditCommit } from "./get-edit-commit.js"; +import { x } from "tinyexec"; +// Get commit messages +export default async function getCommitMessages(settings) { + const { cwd, fromLastTag, to, last, edit, gitLogArgs } = settings; + let from = settings.from; + if (edit) { + return getEditCommit(cwd, edit); + } + if (last) { + const gitCommandResult = await x("git", ["log", "-1", "--pretty=format:%B"], { + nodeOptions: { cwd }, + }); + let output = gitCommandResult.stdout.trim(); + // strip output of extra quotation marks ("") + if (output[0] == '"' && output[output.length - 1] == '"') + output = output.slice(1, -1); + return [output]; + } + if (!from && fromLastTag) { + const output = await x("git", ["describe", "--abbrev=40", "--always", "--first-parent", "--long", "--tags"], { nodeOptions: { cwd } }); + const stdout = output.stdout.trim(); + if (stdout.length === 40) { + // Hash only means no last tag. Use that as the from ref which + // results in a no-op. + from = stdout; + } + else { + // Description will be in the format: --g + // Example: v3.2.0-11-g9057371a52adaae5180d93fe4d0bb808d874b9fb + // Minus zero based (1), dash (1), "g" prefix (1), hash (40) = -43 + const tagSlice = stdout.lastIndexOf("-", stdout.length - 43); + from = stdout.slice(0, tagSlice); + } + } + // Verify the two refs share a merge-base before handing off the range + // walk to the git client. In a shallow clone the common ancestor may + // be missing, in which case `git log from..to` silently returns only + // the commits that happen to be present, hiding invalid commits in the + // unfetched portion of history. + if (from) { + // `to` is left undefined here when no --to was given; the git client + // defaults it to HEAD, so we mirror that for the merge-base check. + const effectiveTo = to ?? "HEAD"; + const mergeBase = await x("git", ["merge-base", from, effectiveTo], { + nodeOptions: { cwd }, + }); + if (mergeBase.exitCode === 1) { + throw new Error(`Cannot find merge-base between '${from}' and '${effectiveTo}'. ` + + `This typically indicates incomplete git history (e.g., a shallow clone). ` + + `Consider fetching more history.`); + } + } + let gitOptions = { from, to }; + if (gitLogArgs) { + const { values, positionals } = parseArgs({ + args: gitLogArgs.split(" "), + strict: false, + }); + gitOptions = { + ...values, + _: positionals, + from, + to, + }; + } + return getHistoryCommits(gitOptions, { cwd }); +} +//# sourceMappingURL=read.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/read/lib/read.js.map b/node_modules/@commitlint/read/lib/read.js.map new file mode 100644 index 000000000..d1d3310fe --- /dev/null +++ b/node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M,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;YACzC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;YAC3B,MAAM,EAAE,KAAK;SACb,CAAC,CAAC;QACH,UAAU,GAAG;YACZ,GAAG,MAAM;YACT,CAAC,EAAE,WAAW;YACd,IAAI;YACJ,EAAE;SACF,CAAC;IACH,CAAC;IAED,OAAO,iBAAiB,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/read/license.md b/node_modules/@commitlint/read/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/read/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/read/package.json b/node_modules/@commitlint/read/package.json new file mode 100644 index 000000000..43fa8d166 --- /dev/null +++ b/node_modules/@commitlint/read/package.json @@ -0,0 +1,49 @@ +{ + "name": "@commitlint/read", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Read commit messages from a specified range or last edit", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/read" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/read.js", + "types": "lib/read.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check --skip-import" + }, + "dependencies": { + "@commitlint/top-level": "^21.2.0", + "@commitlint/types": "^21.2.3", + "@conventional-changelog/git-client": "^3.0.0", + "tinyexec": "^1.0.0" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/resolve-extends/lib/index.d.ts b/node_modules/@commitlint/resolve-extends/lib/index.d.ts new file mode 100644 index 000000000..a1c3bd3b0 --- /dev/null +++ b/node_modules/@commitlint/resolve-extends/lib/index.d.ts @@ -0,0 +1,32 @@ +import type { ParserPreset, UserConfig } from "@commitlint/types"; +export declare const resolveFrom: (lookup: string, parent?: string) => string; +/** + * + * @param resolvedParserPreset path resolved by {@link resolveFrom} + * @returns path and parserOpts function retrieved from `resolvedParserPreset` + */ +export declare const loadParserPreset: (resolvedParserPreset: string) => Promise>; +export interface ResolveExtendsContext { + cwd?: string; + parserPreset?: string | ParserPreset; + prefix?: string; + resolve?(id: string, ctx?: { + prefix?: string; + cwd?: string; + }): string; + resolveGlobal?: (id: string) => string; + dynamicImport?(id: string): T | Promise; +} +export default function resolveExtends(config?: UserConfig, context?: ResolveExtendsContext): Promise; +export declare function resolveFromSilent(specifier: string, parent: string): string | undefined; +/** + * Resolve a module specifier from npx cache directories. + * Iterates all npx cache directories and returns the first successful resolution. + * Uses require.resolve for proper Node module resolution (respects package.json main/exports). + */ +export declare function resolveFromNpxCache(specifier: string): string | undefined; +/** + * @see https://github.com/sindresorhus/resolve-global/blob/682a6bb0bd8192b74a6294219bb4c536b3708b65/index.js#L7 + */ +export declare function resolveGlobalSilent(specifier: string): string | undefined; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/resolve-extends/lib/index.d.ts.map b/node_modules/@commitlint/resolve-extends/lib/index.d.ts.map new file mode 100644 index 000000000..69ff2857b --- /dev/null +++ b/node_modules/@commitlint/resolve-extends/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAyIlE,eAAO,MAAM,WAAW,WAAY,MAAM,WAAW,MAAM,KAAG,MA2C7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,yBACN,MAAM,KAC1B,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC,CASnD,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;IACtE,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC9C;AAED,wBAA8B,cAAc,CAC3C,MAAM,GAAE,UAAe,EACvB,OAAO,GAAE,qBAA0B,GACjC,OAAO,CAAC,UAAU,CAAC,CAiBrB;AA8FD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIvF;AAqED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWzE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAazE"} \ No newline at end of file diff --git a/node_modules/@commitlint/resolve-extends/lib/index.js b/node_modules/@commitlint/resolve-extends/lib/index.js new file mode 100644 index 000000000..68f7cbba3 --- /dev/null +++ b/node_modules/@commitlint/resolve-extends/lib/index.js @@ -0,0 +1,352 @@ +import { createRequire } from "node:module"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { pathToFileURL, fileURLToPath } from "node:url"; +import globalDirectory from "global-directory"; +import { mergeWith } from "es-toolkit/compat"; +import resolveFrom_ from "resolve-from"; +import { validateConfig } from "@commitlint/config-validator"; +const require = createRequire(import.meta.url); +const dynamicImport = async (id) => { + if (id.endsWith(".json")) { + return require(id); + } + const imported = await import(path.isAbsolute(id) ? pathToFileURL(id).toString() : id); + return ("default" in imported && imported.default) || imported; +}; +const pathSuffixes = ["", ".js", ".json", `${path.sep}index.js`, `${path.sep}index.json`]; +const specifierSuffixes = ["", ".js", ".json", "/index.js", "/index.json"]; +/** + * Recover the entry point from a package manifest, preferring the ESM + * (`import`) condition of the `exports` map and falling back to `module`/`main`. + */ +const resolveExportsEntry = (manifest) => { + const fromConditions = (value) => { + if (typeof value === "string") { + return value; + } + if (value && typeof value === "object" && !Array.isArray(value)) { + const conditions = value; + for (const key of ["import", "module", "node", "default"]) { + if (key in conditions) { + const resolved = fromConditions(conditions[key]); + if (resolved) { + return resolved; + } + } + } + } + return undefined; + }; + let exp = manifest.exports; + if (exp && typeof exp === "object" && !Array.isArray(exp) && "." in exp) { + exp = exp["."]; + } + return (fromConditions(exp) || + (typeof manifest.module === "string" ? manifest.module : undefined) || + (typeof manifest.main === "string" ? manifest.main : undefined) || + "index.js"); +}; +const resolveEsmPackage = (pkgDir, subpath) => { + const manifestPath = path.join(pkgDir, "package.json"); + if (!fs.existsSync(manifestPath)) { + return undefined; + } + if (subpath) { + for (const suffix of pathSuffixes) { + const filename = path.join(pkgDir, subpath) + suffix; + if (fs.existsSync(filename)) { + return filename; + } + } + return undefined; + } + const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8")); + const resolved = path.join(pkgDir, resolveExportsEntry(manifest)); + return fs.existsSync(resolved) ? resolved : undefined; +}; +/** + * Pure-ESM presets such as conventional-changelog-angular@>=9 and + * conventional-changelog-conventionalcommits@>=10 declare only the `import` + * condition in their `exports` map (no `require`/`default`/`main`), so the + * CommonJS resolvers above fail with ERR_PACKAGE_PATH_NOT_EXPORTED. Walk + * node_modules from the requesting location and read the manifest ourselves. + */ +const resolveEsmOnly = (lookup, parentPath, localRequire) => { + if (path.isAbsolute(lookup) || lookup.startsWith(".")) { + return undefined; + } + const segments = lookup.split("/"); + const pkgName = lookup.startsWith("@") ? segments.slice(0, 2).join("/") : segments[0]; + const subpath = lookup.slice(pkgName.length).replace(/^\//, ""); + if ("pnp" in process.versions) { + try { + const pnpApi = localRequire("pnpapi"); + const pkgDir = pnpApi.resolveToUnqualified(pkgName, parentPath, { + considerBuiltins: false, + }); + if (pkgDir) { + const resolved = resolveEsmPackage(pkgDir, subpath); + if (resolved) { + return resolved; + } + } + } + catch (err) { + if (process.env.DEBUG === "true") { + console.debug(`Failed to resolve ${lookup} through Yarn PnP: ${err.message}`); + } + } + } + let dir = path.dirname(parentPath); + for (;;) { + const pkgDir = path.join(dir, "node_modules", pkgName); + const manifestPath = path.join(pkgDir, "package.json"); + if (fs.existsSync(manifestPath)) { + return resolveEsmPackage(pkgDir, subpath); + } + const parentDir = path.dirname(dir); + if (parentDir === dir) { + return undefined; + } + dir = parentDir; + } +}; +export const resolveFrom = (lookup, parent) => { + if (path.isAbsolute(lookup)) { + for (const suffix of pathSuffixes) { + const filename = lookup + suffix; + if (fs.existsSync(filename)) { + return filename; + } + } + } + let resolveError; + const parentPath = parent + ? fs.statSync(parent).isDirectory() + ? path.join(parent, "noop.js") + : parent + : fileURLToPath(import.meta.url); + const localRequire = createRequire(parentPath); + for (const suffix of specifierSuffixes) { + try { + return localRequire.resolve(lookup + suffix); + } + catch (err) { + if (!resolveError) { + resolveError = err; + } + } + } + try { + /** + * Yarn P'n'P does not support pure ESM well, this is only a workaround for + * @see https://github.com/conventional-changelog/commitlint/issues/3936 + */ + return resolveFrom_(path.dirname(parentPath), lookup); + } + catch { + const esmResolved = resolveEsmOnly(lookup, parentPath, localRequire); + if (esmResolved) { + return esmResolved; + } + throw resolveError; + } +}; +/** + * + * @param resolvedParserPreset path resolved by {@link resolveFrom} + * @returns path and parserOpts function retrieved from `resolvedParserPreset` + */ +export const loadParserPreset = async (resolvedParserPreset) => { + const finalParserOpts = await dynamicImport(resolvedParserPreset); + const relativeParserPath = path.relative(process.cwd(), resolvedParserPreset); + return { + path: `./${relativeParserPath}`.split(path.sep).join("/"), + parserOpts: finalParserOpts, + }; +}; +export default async function resolveExtends(config = {}, context = {}) { + const { extends: e } = config; + const extended = await loadExtends(config, context); + extended.push(config); + return extended.reduce((r, { extends: _, ...c }) => mergeWith(r, c, (objValue, srcValue, key) => { + if (key === "plugins") { + if (Array.isArray(objValue)) { + return objValue.concat(srcValue); + } + } + else if (Array.isArray(objValue)) { + return srcValue; + } + }), e ? { extends: e } : {}); +} +async function loadExtends(config = {}, context = {}) { + const { extends: e } = config; + const ext = e ? (Array.isArray(e) ? e : [e]) : []; + return await ext.reduce(async (configs, raw) => { + const resolved = resolveConfig(raw, context); + // Shallow-copy so we never mutate an ESM namespace object (#4647). + const c = { + ...(await (context.dynamicImport || dynamicImport)(resolved)), + }; + const cwd = path.dirname(resolved); + const ctx = { ...context, cwd }; + // Always resolve string parser presets from extended configs so that + // their parserOpts (headerPattern, etc.) are available for merging. + // Previously this was skipped when the user provided any parserPreset, + // which caused partial user overrides (e.g. just issuePrefixes) to + // lose the extended preset's headerPattern (see #4640). + if (typeof c === "object" && typeof c.parserPreset === "string") { + const resolvedParserPreset = resolveFrom(c.parserPreset, cwd); + const parserPreset = { + name: c.parserPreset, + ...(await loadParserPreset(resolvedParserPreset)), + }; + ctx.parserPreset = parserPreset; + c.parserPreset = parserPreset; + } + validateConfig(resolved, config); + return [...(await configs), ...(await loadExtends(c, ctx)), c]; + }, Promise.resolve([])); +} +function getId(raw = "", prefix = "") { + const first = raw.charAt(0); + const scoped = first === "@"; + const relative = first === "."; + const absolute = path.isAbsolute(raw); + if (scoped) { + return raw.includes("/") ? raw : [raw, prefix].filter(String).join("/"); + } + return relative || absolute ? raw : [prefix, raw].filter(String).join("-"); +} +function resolveConfig(raw, context = {}) { + const resolve = context.resolve || resolveId; + const id = getId(raw, context.prefix); + let resolved; + try { + resolved = resolve(id, context); + } + catch (err) { + const legacy = getId(raw, "conventional-changelog-lint-config"); + resolved = resolve(legacy, context); + console.warn(`Resolving ${raw} to legacy config ${legacy}. To silence this warning raise an issue at 'npm repo ${legacy}' to rename to ${id}.`); + } + return resolved; +} +function resolveId(specifier, context = {}) { + const cwd = context.cwd || process.cwd(); + const localPath = resolveFromSilent(specifier, cwd); + if (typeof localPath === "string") { + return localPath; + } + const resolveGlobal = context.resolveGlobal || resolveGlobalSilent; + const globalPath = resolveGlobal(specifier); + if (typeof globalPath === "string") { + return globalPath; + } + const err = new Error(`Cannot find module "${specifier}" from "${cwd}"`); + throw Object.assign(err, { code: "MODULE_NOT_FOUND" }); +} +export function resolveFromSilent(specifier, parent) { + try { + return resolveFrom(specifier, parent); + } + catch { } +} +/** + * Get the npm cache directory. + * Respects npm config (npm_config_cache env var or npm config get cache). + */ +function getNpmCacheDir() { + if (process.env.npm_config_cache) { + return process.env.npm_config_cache; + } + try { + const { execSync } = require("child_process"); + const cacheDir = execSync("npm config get cache", { + encoding: "utf8", + stdio: ["pipe", "pipe", "ignore"], + }).trim(); + if (cacheDir) { + return cacheDir; + } + } + catch { + // Ignore errors + } + const home = os.homedir(); + return path.join(home, ".npm"); +} +let npxCachePathsCache; +/** + * Get the npx cache directory paths. + * npx stores packages in a subdirectory of the npm cache (e.g., ~/.npm/_npx). + * Results are memoized and sorted by mtime (most recent first) for deterministic resolution. + */ +function getNpxCachePaths() { + if (npxCachePathsCache) { + return npxCachePathsCache; + } + const npmCache = getNpmCacheDir(); + const npxPath = path.join(npmCache, "_npx"); + if (!fs.existsSync(npxPath)) { + npxCachePathsCache = []; + return []; + } + try { + const entries = fs.readdirSync(npxPath, { withFileTypes: true }); + const dirs = entries + .filter((entry) => entry.isDirectory()) + .map((entry) => ({ + path: path.join(npxPath, entry.name, "node_modules"), + mtime: fs.statSync(path.join(npxPath, entry.name)).mtime, + })) + .sort((a, b) => b.mtime.getTime() - a.mtime.getTime()); + npxCachePathsCache = dirs.map((d) => d.path); + } + catch (err) { + if (process.env.DEBUG === "true") { + console.debug(`Failed to read npx cache: ${err.message}`); + } + npxCachePathsCache = []; + } + return npxCachePathsCache; +} +/** + * Resolve a module specifier from npx cache directories. + * Iterates all npx cache directories and returns the first successful resolution. + * Uses require.resolve for proper Node module resolution (respects package.json main/exports). + */ +export function resolveFromNpxCache(specifier) { + for (const npxDir of getNpxCachePaths()) { + try { + return require.resolve(specifier, { paths: [npxDir] }); + } + catch (err) { + if (process.env.DEBUG === "true") { + console.debug(`Failed to resolve ${specifier} from ${npxDir}: ${err.message}`); + } + } + } + return undefined; +} +/** + * @see https://github.com/sindresorhus/resolve-global/blob/682a6bb0bd8192b74a6294219bb4c536b3708b65/index.js#L7 + */ +export function resolveGlobalSilent(specifier) { + for (const globalPackages of [globalDirectory.npm.packages, globalDirectory.yarn.packages]) { + try { + return resolveFrom(specifier, globalPackages); + } + catch (err) { + if (process.env.DEBUG === "true") { + console.debug(`Failed to resolve ${specifier} from global: ${err.message}`); + } + } + } + // Check npx cache directories + return resolveFromNpxCache(specifier); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/resolve-extends/lib/index.js.map b/node_modules/@commitlint/resolve-extends/lib/index.js.map new file mode 100644 index 000000000..b343877d4 --- /dev/null +++ b/node_modules/@commitlint/resolve-extends/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,aAAa,GAAG,KAAK,EAAK,EAAU,EAAc,EAAE;IACzD,IAAI,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvF,OAAO,CAAC,SAAS,IAAI,QAAQ,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,EAAE,CAAC;YACd,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;gBAClC,OAAO,CAAC,KAAK,CAAC,qBAAqB,SAAS,iBAAkB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;YACxF,CAAC;QACF,CAAC;IACF,CAAC;IAED,8BAA8B;IAC9B,OAAO,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/resolve-extends/license.md b/node_modules/@commitlint/resolve-extends/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/resolve-extends/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/resolve-extends/package.json b/node_modules/@commitlint/resolve-extends/package.json new file mode 100644 index 000000000..42a02652b --- /dev/null +++ b/node_modules/@commitlint/resolve-extends/package.json @@ -0,0 +1,50 @@ +{ + "name": "@commitlint/resolve-extends", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/resolve-extends" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/config-validator": "^21.2.3", + "@commitlint/types": "^21.2.3", + "es-toolkit": "^1.46.0", + "global-directory": "^5.0.0", + "resolve-from": "^5.0.0" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/rules/lib/body-case.d.ts b/node_modules/@commitlint/rules/lib/body-case.d.ts new file mode 100644 index 000000000..f8c75e297 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-case.d.ts @@ -0,0 +1,3 @@ +import { TargetCaseType, SyncRule } from "@commitlint/types"; +export declare const bodyCase: SyncRule; +//# sourceMappingURL=body-case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-case.d.ts.map b/node_modules/@commitlint/rules/lib/body-case.d.ts.map new file mode 100644 index 000000000..e5bf050e1 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-case.d.ts","sourceRoot":"","sources":["../src/body-case.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7D,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,cAAc,GAAG,cAAc,EAAE,CAsChE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-case.js b/node_modules/@commitlint/rules/lib/body-case.js new file mode 100644 index 000000000..519b40f54 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-case.js @@ -0,0 +1,33 @@ +import { case as ensureCase } from "@commitlint/ensure"; +import message from "@commitlint/message"; +const negated = (when) => when === "never"; +export const bodyCase = (parsed, when = "always", value = []) => { + const { body } = parsed; + if (!body) { + return [true]; + } + const checks = (Array.isArray(value) ? value : [value]).map((check) => { + if (typeof check === "string") { + return { + when: "always", + case: check, + }; + } + return check; + }); + const matches = checks.filter((check) => { + const r = ensureCase(body, check.case); + return negated(check.when) ? !r : r; + }); + const result = matches.length > 0; + // A `never` rule fails because a case matched, so report the case(s) that + // did. An `always` rule fails because none matched, so it keeps reporting + // every configured case. + const reported = negated(when) && result ? matches : checks; + const list = reported.map((c) => c.case).join(", "); + return [ + negated(when) ? !result : result, + message([`body must`, negated(when) ? `not` : null, `be ${list}`]), + ]; +}; +//# sourceMappingURL=body-case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-case.js.map b/node_modules/@commitlint/rules/lib/body-case.js.map new file mode 100644 index 000000000..499b9dab2 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-case.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-case.js","sourceRoot":"","sources":["../src/body-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,OAAO,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC;AAEpD,MAAM,CAAC,MAAM,QAAQ,GAAgD,CACpE,MAAM,EACN,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACT,EAAE;IACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAExB,IAAI,CAAC,IAAI,EAA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CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;KAClE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-empty.d.ts b/node_modules/@commitlint/rules/lib/body-empty.d.ts new file mode 100644 index 000000000..d094cbd87 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-empty.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const bodyEmpty: SyncRule; +//# sourceMappingURL=body-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-empty.d.ts.map b/node_modules/@commitlint/rules/lib/body-empty.d.ts.map new file mode 100644 index 000000000..eee7cde38 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-empty.d.ts","sourceRoot":"","sources":["../src/body-empty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,QAQvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-empty.js b/node_modules/@commitlint/rules/lib/body-empty.js new file mode 100644 index 000000000..cf38b85f5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-empty.js @@ -0,0 +1,11 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const bodyEmpty = (parsed, when = "always") => { + const negated = when === "never"; + const notEmpty = ensure.notEmpty(parsed.body || ""); + return [ + negated ? notEmpty : !notEmpty, + message(["body", negated ? "may not" : "must", "be empty"]), + ]; +}; +//# sourceMappingURL=body-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-empty.js.map b/node_modules/@commitlint/rules/lib/body-empty.js.map new file mode 100644 index 000000000..cd2785326 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-empty.js","sourceRoot":"","sources":["../src/body-empty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,SAAS,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IAC9D,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAC3D,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-full-stop.d.ts b/node_modules/@commitlint/rules/lib/body-full-stop.d.ts new file mode 100644 index 000000000..36312def3 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-full-stop.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const bodyFullStop: SyncRule; +//# sourceMappingURL=body-full-stop.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-full-stop.d.ts.map b/node_modules/@commitlint/rules/lib/body-full-stop.d.ts.map new file mode 100644 index 000000000..b0df0af80 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-full-stop.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-full-stop.d.ts","sourceRoot":"","sources":["../src/body-full-stop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAczC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-full-stop.js b/node_modules/@commitlint/rules/lib/body-full-stop.js new file mode 100644 index 000000000..38c5c8d7b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-full-stop.js @@ -0,0 +1,14 @@ +import message from "@commitlint/message"; +export const bodyFullStop = (parsed, when = "always", value = ".") => { + const input = parsed.body; + if (!input) { + return [true]; + } + const negated = when === "never"; + const hasStop = input[input.length - 1] === value; + return [ + negated ? !hasStop : hasStop, + message(["body", negated ? "may not" : "must", "end with full stop"]), + ]; +}; +//# sourceMappingURL=body-full-stop.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-full-stop.js.map b/node_modules/@commitlint/rules/lib/body-full-stop.js.map new file mode 100644 index 000000000..be3bbc303 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-full-stop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-full-stop.js","sourceRoot":"","sources":["../src/body-full-stop.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,YAAY,GAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,GAAG,EAAE,EAAE;IACtF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAElD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;QAC5B,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KACrE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-leading-blank.d.ts b/node_modules/@commitlint/rules/lib/body-leading-blank.d.ts new file mode 100644 index 000000000..a5477e811 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-leading-blank.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const bodyLeadingBlank: SyncRule; +//# sourceMappingURL=body-leading-blank.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-leading-blank.d.ts.map b/node_modules/@commitlint/rules/lib/body-leading-blank.d.ts.map new file mode 100644 index 000000000..9b3a3aee8 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-leading-blank.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-leading-blank.d.ts","sourceRoot":"","sources":["../src/body-leading-blank.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,gBAAgB,EAAE,QAgB9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-leading-blank.js b/node_modules/@commitlint/rules/lib/body-leading-blank.js new file mode 100644 index 000000000..4358ee7e6 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-leading-blank.js @@ -0,0 +1,17 @@ +import toLines from "@commitlint/to-lines"; +import message from "@commitlint/message"; +export const bodyLeadingBlank = (parsed, when) => { + // Flunk if no body is found + if (!parsed.body) { + return [true]; + } + const negated = when === "never"; + const [leading] = toLines(parsed.raw).slice(1); + // Check if the first line of body is empty + const succeeds = leading === ""; + return [ + negated ? !succeeds : succeeds, + message(["body", negated ? "may not" : "must", "have leading blank line"]), + ]; +}; +//# sourceMappingURL=body-leading-blank.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-leading-blank.js.map b/node_modules/@commitlint/rules/lib/body-leading-blank.js.map new file mode 100644 index 000000000..3e7701dee --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-leading-blank.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-leading-blank.js","sourceRoot":"","sources":["../src/body-leading-blank.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,gBAAgB,GAAa,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;IAC1D,4BAA4B;IAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE/C,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,OAAO,KAAK,EAAE,CAAC;IAEhC,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;KAC1E,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-length.d.ts b/node_modules/@commitlint/rules/lib/body-max-length.d.ts new file mode 100644 index 000000000..cc19dec8b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const bodyMaxLength: SyncRule; +//# sourceMappingURL=body-max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-length.d.ts.map b/node_modules/@commitlint/rules/lib/body-max-length.d.ts.map new file mode 100644 index 000000000..5b2b40919 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-max-length.d.ts","sourceRoot":"","sources":["../src/body-max-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAQ1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-length.js b/node_modules/@commitlint/rules/lib/body-max-length.js new file mode 100644 index 000000000..2e5ba3f13 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-length.js @@ -0,0 +1,9 @@ +import { maxLength } from "@commitlint/ensure"; +export const bodyMaxLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.body; + if (!input) { + return [true]; + } + return [maxLength(input, value), `body must not be longer than ${value} characters`]; +}; +//# sourceMappingURL=body-max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-length.js.map b/node_modules/@commitlint/rules/lib/body-max-length.js.map new file mode 100644 index 000000000..637719b5a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-max-length.js","sourceRoot":"","sources":["../src/body-max-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,aAAa,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACvF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,gCAAgC,KAAK,aAAa,CAAC,CAAC;AACtF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-line-length.d.ts b/node_modules/@commitlint/rules/lib/body-max-line-length.d.ts new file mode 100644 index 000000000..7b3e2c6b7 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-line-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const bodyMaxLineLength: SyncRule; +//# sourceMappingURL=body-max-line-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-line-length.d.ts.map b/node_modules/@commitlint/rules/lib/body-max-line-length.d.ts.map new file mode 100644 index 000000000..a264d8102 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-line-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-max-line-length.d.ts","sourceRoot":"","sources":["../src/body-max-line-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAQ9C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-line-length.js b/node_modules/@commitlint/rules/lib/body-max-line-length.js new file mode 100644 index 000000000..3954a83c5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-line-length.js @@ -0,0 +1,9 @@ +import { maxLineLength } from "@commitlint/ensure"; +export const bodyMaxLineLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.body; + if (!input) { + return [true]; + } + return [maxLineLength(input, value), `body's lines must not be longer than ${value} characters`]; +}; +//# sourceMappingURL=body-max-line-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-max-line-length.js.map b/node_modules/@commitlint/rules/lib/body-max-line-length.js.map new file mode 100644 index 000000000..4639df3e3 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-max-line-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-max-line-length.js","sourceRoot":"","sources":["../src/body-max-line-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,CAAC,MAAM,iBAAiB,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC3F,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,wCAAwC,KAAK,aAAa,CAAC,CAAC;AAClG,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-min-length.d.ts b/node_modules/@commitlint/rules/lib/body-min-length.d.ts new file mode 100644 index 000000000..9f1f86d7d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-min-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const bodyMinLength: SyncRule; +//# sourceMappingURL=body-min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-min-length.d.ts.map b/node_modules/@commitlint/rules/lib/body-min-length.d.ts.map new file mode 100644 index 000000000..0783aa266 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body-min-length.d.ts","sourceRoot":"","sources":["../src/body-min-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAM1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-min-length.js b/node_modules/@commitlint/rules/lib/body-min-length.js new file mode 100644 index 000000000..0fb0f360f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-min-length.js @@ -0,0 +1,8 @@ +import { minLength } from "@commitlint/ensure"; +export const bodyMinLength = (parsed, _when = undefined, value = 0) => { + if (!parsed.body) { + return [true]; + } + return [minLength(parsed.body, value), `body must not be shorter than ${value} characters`]; +}; +//# sourceMappingURL=body-min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/body-min-length.js.map b/node_modules/@commitlint/rules/lib/body-min-length.js.map new file mode 100644 index 000000000..2f5a5108f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/body-min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body-min-length.js","sourceRoot":"","sources":["../src/body-min-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,aAAa,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACvF,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,iCAAiC,KAAK,aAAa,CAAC,CAAC;AAC7F,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.d.ts b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.d.ts new file mode 100644 index 000000000..4b0220d00 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const breakingChangeExclamationMark: SyncRule; +//# sourceMappingURL=breaking-change-exclamation-mark.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.d.ts.map b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.d.ts.map new file mode 100644 index 000000000..d0e2f86ed --- /dev/null +++ b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"breaking-change-exclamation-mark.d.ts","sourceRoot":"","sources":["../src/breaking-change-exclamation-mark.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,6BAA6B,EAAE,QA4B3C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.js b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.js new file mode 100644 index 000000000..a5ed205da --- /dev/null +++ b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.js @@ -0,0 +1,27 @@ +import message from "@commitlint/message"; +export const breakingChangeExclamationMark = (parsed, when = "always") => { + const header = parsed.header; + const footer = parsed.footer; + // It is the correct behavior to return true only when both the header and footer are empty, + // but still run the usual checks if one or neither are empty. + // The reasoning is that if one is empty and the other contains a breaking change marker, + // then the check fails as it is not possible for the empty one to indicate a breaking change. + if (!header && !footer) { + return [true]; + } + const hasExclamationMark = !!header && /^(\w*)(?:\((.*)\))?!: (.*)$/.test(header); + const hasBreakingChange = !!footer && /^BREAKING[ -]CHANGE:/m.test(footer); + const negated = when === "never"; + const check = hasExclamationMark === hasBreakingChange; + return [ + negated ? !check : check, + message([ + "breaking changes", + negated ? "must not" : "must", + "have both an exclamation mark in the header", + "and BREAKING CHANGE in the footer", + "to identify a breaking change", + ]), + ]; +}; +//# sourceMappingURL=breaking-change-exclamation-mark.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.js.map b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.js.map new file mode 100644 index 000000000..fa9da0e69 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/breaking-change-exclamation-mark.js.map @@ -0,0 +1 @@ +{"version":3,"file":"breaking-change-exclamation-mark.js","sourceRoot":"","sources":["../src/breaking-change-exclamation-mark.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,6BAA6B,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IAClF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,4FAA4F;IAC5F,8DAA8D;IAC9D,yFAAyF;IACzF,8FAA8F;IAC9F,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,IAAI,6BAA6B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClF,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,IAAI,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE3E,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,KAAK,GAAG,kBAAkB,KAAK,iBAAiB,CAAC;IAEvD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;QACxB,OAAO,CAAC;YACP,kBAAkB;YAClB,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;YAC7B,6CAA6C;YAC7C,mCAAmC;YACnC,+BAA+B;SAC/B,CAAC;KACF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-empty.d.ts b/node_modules/@commitlint/rules/lib/footer-empty.d.ts new file mode 100644 index 000000000..8bbf911af --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-empty.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const footerEmpty: SyncRule; +//# sourceMappingURL=footer-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-empty.d.ts.map b/node_modules/@commitlint/rules/lib/footer-empty.d.ts.map new file mode 100644 index 000000000..b4b524c85 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-empty.d.ts","sourceRoot":"","sources":["../src/footer-empty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,QAQzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-empty.js b/node_modules/@commitlint/rules/lib/footer-empty.js new file mode 100644 index 000000000..b5fcbd083 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-empty.js @@ -0,0 +1,11 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const footerEmpty = (parsed, when = "always") => { + const negated = when === "never"; + const notEmpty = ensure.notEmpty(parsed.footer || ""); + return [ + negated ? notEmpty : !notEmpty, + message(["footer", negated ? "may not" : "must", "be empty"]), + ]; +}; +//# sourceMappingURL=footer-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-empty.js.map b/node_modules/@commitlint/rules/lib/footer-empty.js.map new file mode 100644 index 000000000..f41f07427 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-empty.js","sourceRoot":"","sources":["../src/footer-empty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IAChE,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAEtD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAC7D,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-leading-blank.d.ts b/node_modules/@commitlint/rules/lib/footer-leading-blank.d.ts new file mode 100644 index 000000000..06bab9b37 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-leading-blank.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const footerLeadingBlank: SyncRule; +//# sourceMappingURL=footer-leading-blank.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-leading-blank.d.ts.map b/node_modules/@commitlint/rules/lib/footer-leading-blank.d.ts.map new file mode 100644 index 000000000..9e5b7f328 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-leading-blank.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-leading-blank.d.ts","sourceRoot":"","sources":["../src/footer-leading-blank.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,kBAAkB,EAAE,QAmBhC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-leading-blank.js b/node_modules/@commitlint/rules/lib/footer-leading-blank.js new file mode 100644 index 000000000..5fd70aad9 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-leading-blank.js @@ -0,0 +1,20 @@ +import toLines from "@commitlint/to-lines"; +import message from "@commitlint/message"; +export const footerLeadingBlank = (parsed, when = "always") => { + // Flunk if no footer is found + if (!parsed.footer) { + return [true]; + } + const negated = when === "never"; + const rawLines = toLines(parsed.raw); + const footerLines = toLines(parsed.footer); + const footerOffset = rawLines.indexOf(footerLines[0]); + const [leading] = rawLines.slice(footerOffset - 1); + // Check if the first line of footer is empty + const succeeds = leading === ""; + return [ + negated ? !succeeds : succeeds, + message(["footer", negated ? "may not" : "must", "have leading blank line"]), + ]; +}; +//# sourceMappingURL=footer-leading-blank.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-leading-blank.js.map b/node_modules/@commitlint/rules/lib/footer-leading-blank.js.map new file mode 100644 index 000000000..48dde1e8a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-leading-blank.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-leading-blank.js","sourceRoot":"","sources":["../src/footer-leading-blank.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,kBAAkB,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IACvE,8BAA8B;IAC9B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;IAEnD,6CAA6C;IAC7C,MAAM,QAAQ,GAAG,OAAO,KAAK,EAAE,CAAC;IAEhC,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;KAC5E,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-length.d.ts b/node_modules/@commitlint/rules/lib/footer-max-length.d.ts new file mode 100644 index 000000000..b5c63dd3c --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const footerMaxLength: SyncRule; +//# sourceMappingURL=footer-max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-length.d.ts.map b/node_modules/@commitlint/rules/lib/footer-max-length.d.ts.map new file mode 100644 index 000000000..1f7d4e0ec --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-max-length.d.ts","sourceRoot":"","sources":["../src/footer-max-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAQ5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-length.js b/node_modules/@commitlint/rules/lib/footer-max-length.js new file mode 100644 index 000000000..d94e165df --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-length.js @@ -0,0 +1,9 @@ +import { maxLength } from "@commitlint/ensure"; +export const footerMaxLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.footer; + if (!input) { + return [true]; + } + return [maxLength(input, value), `footer must not be longer than ${value} characters`]; +}; +//# sourceMappingURL=footer-max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-length.js.map b/node_modules/@commitlint/rules/lib/footer-max-length.js.map new file mode 100644 index 000000000..e7c1f62c9 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-max-length.js","sourceRoot":"","sources":["../src/footer-max-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACzF,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAE5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,kCAAkC,KAAK,aAAa,CAAC,CAAC;AACxF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-line-length.d.ts b/node_modules/@commitlint/rules/lib/footer-max-line-length.d.ts new file mode 100644 index 000000000..4bc38d18a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-line-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const footerMaxLineLength: SyncRule; +//# sourceMappingURL=footer-max-line-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-line-length.d.ts.map b/node_modules/@commitlint/rules/lib/footer-max-line-length.d.ts.map new file mode 100644 index 000000000..801619160 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-line-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-max-line-length.d.ts","sourceRoot":"","sources":["../src/footer-max-line-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAWhD,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-line-length.js b/node_modules/@commitlint/rules/lib/footer-max-line-length.js new file mode 100644 index 000000000..59939bfaa --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-line-length.js @@ -0,0 +1,12 @@ +import { maxLineLength } from "@commitlint/ensure"; +export const footerMaxLineLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.footer; + if (!input) { + return [true]; + } + return [ + maxLineLength(input, value), + `footer's lines must not be longer than ${value} characters`, + ]; +}; +//# sourceMappingURL=footer-max-line-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-max-line-length.js.map b/node_modules/@commitlint/rules/lib/footer-max-line-length.js.map new file mode 100644 index 000000000..77435d279 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-max-line-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-max-line-length.js","sourceRoot":"","sources":["../src/footer-max-line-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,CAAC,MAAM,mBAAmB,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAE5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO;QACN,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;QAC3B,0CAA0C,KAAK,aAAa;KAC5D,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-min-length.d.ts b/node_modules/@commitlint/rules/lib/footer-min-length.d.ts new file mode 100644 index 000000000..92691aeb8 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-min-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const footerMinLength: SyncRule; +//# sourceMappingURL=footer-min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-min-length.d.ts.map b/node_modules/@commitlint/rules/lib/footer-min-length.d.ts.map new file mode 100644 index 000000000..79eef0008 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-min-length.d.ts","sourceRoot":"","sources":["../src/footer-min-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAM5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-min-length.js b/node_modules/@commitlint/rules/lib/footer-min-length.js new file mode 100644 index 000000000..30aa6460c --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-min-length.js @@ -0,0 +1,8 @@ +import { minLength } from "@commitlint/ensure"; +export const footerMinLength = (parsed, _when = undefined, value = 0) => { + if (!parsed.footer) { + return [true]; + } + return [minLength(parsed.footer, value), `footer must not be shorter than ${value} characters`]; +}; +//# sourceMappingURL=footer-min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/footer-min-length.js.map b/node_modules/@commitlint/rules/lib/footer-min-length.js.map new file mode 100644 index 000000000..dc9b0544e --- /dev/null +++ b/node_modules/@commitlint/rules/lib/footer-min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer-min-length.js","sourceRoot":"","sources":["../src/footer-min-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACzF,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,mCAAmC,KAAK,aAAa,CAAC,CAAC;AACjG,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-case.d.ts b/node_modules/@commitlint/rules/lib/header-case.d.ts new file mode 100644 index 000000000..48a53d165 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-case.d.ts @@ -0,0 +1,3 @@ +import { TargetCaseType, SyncRule } from "@commitlint/types"; +export declare const headerCase: SyncRule; +//# sourceMappingURL=header-case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-case.d.ts.map b/node_modules/@commitlint/rules/lib/header-case.d.ts.map new file mode 100644 index 000000000..ce81c9d41 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header-case.d.ts","sourceRoot":"","sources":["../src/header-case.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7D,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,cAAc,GAAG,cAAc,EAAE,CAsClE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-case.js b/node_modules/@commitlint/rules/lib/header-case.js new file mode 100644 index 000000000..eb29375fb --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-case.js @@ -0,0 +1,33 @@ +import { case as ensureCase } from "@commitlint/ensure"; +import message from "@commitlint/message"; +const negated = (when) => when === "never"; +export const headerCase = (parsed, when = "always", value = []) => { + const { header } = parsed; + if (typeof header !== "string" || !header.match(/^[a-z]/i)) { + return [true]; + } + const checks = (Array.isArray(value) ? value : [value]).map((check) => { + if (typeof check === "string") { + return { + when: "always", + case: check, + }; + } + return check; + }); + const matches = checks.filter((check) => { + const r = ensureCase(header, check.case); + return negated(check.when) ? !r : r; + }); + const result = matches.length > 0; + // A `never` rule fails because a case matched, so report the case(s) that + // did. An `always` rule fails because none matched, so it keeps reporting + // every configured case. + const reported = negated(when) && result ? matches : checks; + const list = reported.map((c) => c.case).join(", "); + return [ + negated(when) ? !result : result, + message([`header must`, negated(when) ? `not` : null, `be ${list}`]), + ]; +}; +//# sourceMappingURL=header-case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-case.js.map b/node_modules/@commitlint/rules/lib/header-case.js.map new file mode 100644 index 000000000..27caaa634 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-case.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header-case.js","sourceRoot":"","sources":["../src/header-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,OAAO,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAgD,CACtE,MAAM,EACN,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACT,EAAE;IACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE1B,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACrE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,KAAK;aACX,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QACvC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAElC,0EAA0E;IAC1E,0EAA0E;IAC1E,yBAAyB;IACzB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5D,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEpD,OAAO;QACN,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAChC,OAAO,CAAC,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;KACpE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-full-stop.d.ts b/node_modules/@commitlint/rules/lib/header-full-stop.d.ts new file mode 100644 index 000000000..c84c6770e --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-full-stop.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const headerFullStop: SyncRule; +//# sourceMappingURL=header-full-stop.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-full-stop.d.ts.map b/node_modules/@commitlint/rules/lib/header-full-stop.d.ts.map new file mode 100644 index 000000000..a0427bc9d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-full-stop.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header-full-stop.d.ts","sourceRoot":"","sources":["../src/header-full-stop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAS3C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-full-stop.js b/node_modules/@commitlint/rules/lib/header-full-stop.js new file mode 100644 index 000000000..cb6439b0f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-full-stop.js @@ -0,0 +1,11 @@ +import message from "@commitlint/message"; +export const headerFullStop = (parsed, when = "always", value = ".") => { + const { header } = parsed; + const negated = when === "never"; + const hasStop = header?.[header.length - 1] === value; + return [ + negated ? !hasStop : hasStop, + message(["header", negated ? "may not" : "must", "end with full stop"]), + ]; +}; +//# sourceMappingURL=header-full-stop.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-full-stop.js.map b/node_modules/@commitlint/rules/lib/header-full-stop.js.map new file mode 100644 index 000000000..bb6d41f30 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-full-stop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header-full-stop.js","sourceRoot":"","sources":["../src/header-full-stop.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,cAAc,GAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,GAAG,EAAE,EAAE;IACxF,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC1B,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAEtD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;QAC5B,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KACvE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-max-length.d.ts b/node_modules/@commitlint/rules/lib/header-max-length.d.ts new file mode 100644 index 000000000..fd622c074 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-max-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const headerMaxLength: SyncRule; +//# sourceMappingURL=header-max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-max-length.d.ts.map b/node_modules/@commitlint/rules/lib/header-max-length.d.ts.map new file mode 100644 index 000000000..c49d45fff --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header-max-length.d.ts","sourceRoot":"","sources":["../src/header-max-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAK5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-max-length.js b/node_modules/@commitlint/rules/lib/header-max-length.js new file mode 100644 index 000000000..edd08436d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-max-length.js @@ -0,0 +1,8 @@ +import { maxLength } from "@commitlint/ensure"; +export const headerMaxLength = (parsed, _when = undefined, value = 0) => { + return [ + maxLength(parsed.header, value), + `header must not be longer than ${value} characters, current length is ${parsed.header?.length}`, + ]; +}; +//# sourceMappingURL=header-max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-max-length.js.map b/node_modules/@commitlint/rules/lib/header-max-length.js.map new file mode 100644 index 000000000..0a1355333 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header-max-length.js","sourceRoot":"","sources":["../src/header-max-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACzF,OAAO;QACN,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;QAC/B,kCAAkC,KAAK,kCAAkC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE;KAChG,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-min-length.d.ts b/node_modules/@commitlint/rules/lib/header-min-length.d.ts new file mode 100644 index 000000000..ee591cc9d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-min-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const headerMinLength: SyncRule; +//# sourceMappingURL=header-min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-min-length.d.ts.map b/node_modules/@commitlint/rules/lib/header-min-length.d.ts.map new file mode 100644 index 000000000..fa9610b96 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header-min-length.d.ts","sourceRoot":"","sources":["../src/header-min-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAK5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-min-length.js b/node_modules/@commitlint/rules/lib/header-min-length.js new file mode 100644 index 000000000..6bfb9e617 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-min-length.js @@ -0,0 +1,8 @@ +import { minLength } from "@commitlint/ensure"; +export const headerMinLength = (parsed, _when = undefined, value = 0) => { + return [ + minLength(parsed.header, value), + `header must not be shorter than ${value} characters, current length is ${parsed.header?.length}`, + ]; +}; +//# sourceMappingURL=header-min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-min-length.js.map b/node_modules/@commitlint/rules/lib/header-min-length.js.map new file mode 100644 index 000000000..496525602 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header-min-length.js","sourceRoot":"","sources":["../src/header-min-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACzF,OAAO;QACN,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;QAC/B,mCAAmC,KAAK,kCAAkC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE;KACjG,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-trim.d.ts b/node_modules/@commitlint/rules/lib/header-trim.d.ts new file mode 100644 index 000000000..561878609 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-trim.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const headerTrim: SyncRule; +//# sourceMappingURL=header-trim.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-trim.d.ts.map b/node_modules/@commitlint/rules/lib/header-trim.d.ts.map new file mode 100644 index 000000000..4dcf30108 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-trim.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header-trim.d.ts","sourceRoot":"","sources":["../src/header-trim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,QAgBxB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-trim.js b/node_modules/@commitlint/rules/lib/header-trim.js new file mode 100644 index 000000000..a95af8fdc --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-trim.js @@ -0,0 +1,16 @@ +import message from "@commitlint/message"; +export const headerTrim = (parsed) => { + const { header } = parsed; + if (!header) + return [true]; + const startsWithWhiteSpace = header.length > header.trimStart().length; + const endsWithWhiteSpace = header.length > header.trimEnd().length; + if (startsWithWhiteSpace && endsWithWhiteSpace) + return [false, message(["header", "must not be surrounded by whitespace"])]; + if (startsWithWhiteSpace) + return [false, message(["header", "must not start with whitespace"])]; + if (endsWithWhiteSpace) + return [false, message(["header", "must not end with whitespace"])]; + return [true]; +}; +//# sourceMappingURL=header-trim.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/header-trim.js.map b/node_modules/@commitlint/rules/lib/header-trim.js.map new file mode 100644 index 000000000..8ac5f7732 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/header-trim.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header-trim.js","sourceRoot":"","sources":["../src/header-trim.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,UAAU,GAAa,CAAC,MAAM,EAAE,EAAE;IAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE1B,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC;IACvE,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IAEnE,IAAI,oBAAoB,IAAI,kBAAkB;QAC7C,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,sCAAsC,CAAC,CAAC,CAAC,CAAC;IAE7E,IAAI,oBAAoB;QAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,gCAAgC,CAAC,CAAC,CAAC,CAAC;IAEhG,IAAI,kBAAkB;QAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,8BAA8B,CAAC,CAAC,CAAC,CAAC;IAE5F,OAAO,CAAC,IAAI,CAAC,CAAC;AACf,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/index.d.ts b/node_modules/@commitlint/rules/lib/index.d.ts new file mode 100644 index 000000000..710f39625 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/index.d.ts @@ -0,0 +1,48 @@ +declare const _default: { + "body-case": import("@commitlint/types").SyncRule; + "body-empty": import("@commitlint/types").SyncRule; + "body-full-stop": import("@commitlint/types").SyncRule; + "body-leading-blank": import("@commitlint/types").SyncRule; + "body-max-length": import("@commitlint/types").SyncRule; + "body-max-line-length": import("@commitlint/types").SyncRule; + "body-min-length": import("@commitlint/types").SyncRule; + "breaking-change-exclamation-mark": import("@commitlint/types").SyncRule; + "footer-empty": import("@commitlint/types").SyncRule; + "footer-leading-blank": import("@commitlint/types").SyncRule; + "footer-max-length": import("@commitlint/types").SyncRule; + "footer-max-line-length": import("@commitlint/types").SyncRule; + "footer-min-length": import("@commitlint/types").SyncRule; + "header-case": import("@commitlint/types").SyncRule; + "header-full-stop": import("@commitlint/types").SyncRule; + "header-max-length": import("@commitlint/types").SyncRule; + "header-min-length": import("@commitlint/types").SyncRule; + "header-trim": import("@commitlint/types").SyncRule; + "references-empty": import("@commitlint/types").SyncRule; + "scope-case": import("@commitlint/types").SyncRule; + "scope-delimiter-style": import("@commitlint/types").SyncRule; + "scope-empty": import("@commitlint/types").SyncRule; + "scope-enum": import("@commitlint/types").SyncRule; + "scope-max-length": import("@commitlint/types").SyncRule; + "scope-min-length": import("@commitlint/types").SyncRule; + "signed-off-by": import("@commitlint/types").SyncRule; + "subject-case": import("@commitlint/types").SyncRule; + "subject-empty": import("@commitlint/types").SyncRule; + "subject-exclamation-mark": import("@commitlint/types").SyncRule; + "subject-full-stop": import("@commitlint/types").SyncRule; + "subject-max-length": import("@commitlint/types").SyncRule; + "subject-min-length": import("@commitlint/types").SyncRule; + "trailer-exists": import("@commitlint/types").SyncRule; + "type-case": import("@commitlint/types").SyncRule; + "type-empty": import("@commitlint/types").SyncRule; + "type-enum": import("@commitlint/types").SyncRule; + "type-max-length": import("@commitlint/types").SyncRule; + "type-min-length": import("@commitlint/types").SyncRule; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/index.d.ts.map b/node_modules/@commitlint/rules/lib/index.d.ts.map new file mode 100644 index 000000000..cde1ef500 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";IAwCC,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;IACtB,iBAAiB;IACjB,kCAAkC;IAClC,cAAc;IACd,sBAAsB;IACtB,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,aAAa;IACb,kBAAkB;IAClB,YAAY;;;;IACZ,uBAAuB;IACvB,aAAa;IACb,YAAY;;;;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,0BAA0B;IAC1B,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;IAChB,WAAW;IACX,YAAY;IACZ,WAAW;IACX,iBAAiB;IACjB,iBAAiB"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/index.js b/node_modules/@commitlint/rules/lib/index.js new file mode 100644 index 000000000..3170b711e --- /dev/null +++ b/node_modules/@commitlint/rules/lib/index.js @@ -0,0 +1,79 @@ +import { breakingChangeExclamationMark } from "./breaking-change-exclamation-mark.js"; +import { bodyCase } from "./body-case.js"; +import { bodyEmpty } from "./body-empty.js"; +import { bodyFullStop } from "./body-full-stop.js"; +import { bodyLeadingBlank } from "./body-leading-blank.js"; +import { bodyMaxLength } from "./body-max-length.js"; +import { bodyMaxLineLength } from "./body-max-line-length.js"; +import { bodyMinLength } from "./body-min-length.js"; +import { footerEmpty } from "./footer-empty.js"; +import { footerLeadingBlank } from "./footer-leading-blank.js"; +import { footerMaxLength } from "./footer-max-length.js"; +import { footerMaxLineLength } from "./footer-max-line-length.js"; +import { footerMinLength } from "./footer-min-length.js"; +import { headerCase } from "./header-case.js"; +import { headerFullStop } from "./header-full-stop.js"; +import { headerMaxLength } from "./header-max-length.js"; +import { headerMinLength } from "./header-min-length.js"; +import { headerTrim } from "./header-trim.js"; +import { referencesEmpty } from "./references-empty.js"; +import { scopeCase } from "./scope-case.js"; +import { scopeDelimiterStyle } from "./scope-delimiter-style.js"; +import { scopeEmpty } from "./scope-empty.js"; +import { scopeEnum } from "./scope-enum.js"; +import { scopeMaxLength } from "./scope-max-length.js"; +import { scopeMinLength } from "./scope-min-length.js"; +import { signedOffBy } from "./signed-off-by.js"; +import { subjectCase } from "./subject-case.js"; +import { subjectEmpty } from "./subject-empty.js"; +import { subjectFullStop } from "./subject-full-stop.js"; +import { subjectMaxLength } from "./subject-max-length.js"; +import { subjectMinLength } from "./subject-min-length.js"; +import { subjectExclamationMark } from "./subject-exclamation-mark.js"; +import { trailerExists } from "./trailer-exists.js"; +import { typeCase } from "./type-case.js"; +import { typeEmpty } from "./type-empty.js"; +import { typeEnum } from "./type-enum.js"; +import { typeMaxLength } from "./type-max-length.js"; +import { typeMinLength } from "./type-min-length.js"; +export default { + "body-case": bodyCase, + "body-empty": bodyEmpty, + "body-full-stop": bodyFullStop, + "body-leading-blank": bodyLeadingBlank, + "body-max-length": bodyMaxLength, + "body-max-line-length": bodyMaxLineLength, + "body-min-length": bodyMinLength, + "breaking-change-exclamation-mark": breakingChangeExclamationMark, + "footer-empty": footerEmpty, + "footer-leading-blank": footerLeadingBlank, + "footer-max-length": footerMaxLength, + "footer-max-line-length": footerMaxLineLength, + "footer-min-length": footerMinLength, + "header-case": headerCase, + "header-full-stop": headerFullStop, + "header-max-length": headerMaxLength, + "header-min-length": headerMinLength, + "header-trim": headerTrim, + "references-empty": referencesEmpty, + "scope-case": scopeCase, + "scope-delimiter-style": scopeDelimiterStyle, + "scope-empty": scopeEmpty, + "scope-enum": scopeEnum, + "scope-max-length": scopeMaxLength, + "scope-min-length": scopeMinLength, + "signed-off-by": signedOffBy, + "subject-case": subjectCase, + "subject-empty": subjectEmpty, + "subject-exclamation-mark": subjectExclamationMark, + "subject-full-stop": subjectFullStop, + "subject-max-length": subjectMaxLength, + "subject-min-length": subjectMinLength, + "trailer-exists": trailerExists, + "type-case": typeCase, + "type-empty": typeEmpty, + "type-enum": typeEnum, + "type-max-length": typeMaxLength, + "type-min-length": typeMinLength, +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/index.js.map b/node_modules/@commitlint/rules/lib/index.js.map new file mode 100644 index 000000000..7a40a3147 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,M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EAAE,eAAe;IACpC,oBAAoB,EAAE,gBAAgB;IACtC,oBAAoB,EAAE,gBAAgB;IACtC,gBAAgB,EAAE,aAAa;IAC/B,WAAW,EAAE,QAAQ;IACrB,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,QAAQ;IACrB,iBAAiB,EAAE,aAAa;IAChC,iBAAiB,EAAE,aAAa;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/references-empty.d.ts b/node_modules/@commitlint/rules/lib/references-empty.d.ts new file mode 100644 index 000000000..0f4ebd42f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/references-empty.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const referencesEmpty: SyncRule; +//# sourceMappingURL=references-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/references-empty.d.ts.map b/node_modules/@commitlint/rules/lib/references-empty.d.ts.map new file mode 100644 index 000000000..1e49797d6 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/references-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"references-empty.d.ts","sourceRoot":"","sources":["../src/references-empty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,QAO7B,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/references-empty.js b/node_modules/@commitlint/rules/lib/references-empty.js new file mode 100644 index 000000000..d8ff38fdb --- /dev/null +++ b/node_modules/@commitlint/rules/lib/references-empty.js @@ -0,0 +1,10 @@ +import message from "@commitlint/message"; +export const referencesEmpty = (parsed, when = "never") => { + const negated = when === "always"; + const notEmpty = parsed.references.length > 0; + return [ + negated ? !notEmpty : notEmpty, + message(["references", negated ? "must" : "may not", "be empty"]), + ]; +}; +//# sourceMappingURL=references-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/references-empty.js.map b/node_modules/@commitlint/rules/lib/references-empty.js.map new file mode 100644 index 000000000..77c99da6c --- /dev/null +++ b/node_modules/@commitlint/rules/lib/references-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"references-empty.js","sourceRoot":"","sources":["../src/references-empty.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE,EAAE;IACnE,MAAM,OAAO,GAAG,IAAI,KAAK,QAAQ,CAAC;IAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9C,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KACjE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-case.d.ts b/node_modules/@commitlint/rules/lib/scope-case.d.ts new file mode 100644 index 000000000..c62a2cce3 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-case.d.ts @@ -0,0 +1,6 @@ +import { TargetCaseType, SyncRule } from "@commitlint/types"; +export declare const scopeCase: SyncRule; +//# sourceMappingURL=scope-case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-case.d.ts.map b/node_modules/@commitlint/rules/lib/scope-case.d.ts.map new file mode 100644 index 000000000..7487358a4 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-case.d.ts","sourceRoot":"","sources":["../src/scope-case.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7D,eAAO,MAAM,SAAS,EAAE,QAAQ,CAC7B,cAAc,GACd,cAAc,EAAE,GAChB;IACA,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAiDH,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-case.js b/node_modules/@commitlint/rules/lib/scope-case.js new file mode 100644 index 000000000..12d47e1f4 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-case.js @@ -0,0 +1,40 @@ +import { case as ensureCase } from "@commitlint/ensure"; +import message from "@commitlint/message"; +const negated = (when) => when === "never"; +export const scopeCase = (parsed, when = "always", value = []) => { + const { scope } = parsed; + if (!scope) { + return [true]; + } + const isObjectBasedConfiguration = !Array.isArray(value) && !(typeof value === "string"); + const checks = (isObjectBasedConfiguration ? value.cases : Array.isArray(value) ? value : [value]).map((check) => { + if (typeof check === "string") { + return { + when: "always", + case: check, + }; + } + return check; + }); + const delimiters = isObjectBasedConfiguration && value.delimiters?.length ? value.delimiters : ["/", "\\", ","]; + const delimiterPatterns = delimiters.map((delimiter) => { + return delimiter === "," ? ", ?" : delimiter.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + }); + const delimiterRegex = new RegExp(delimiterPatterns.join("|")); + const scopeSegments = scope.split(delimiterRegex); + const matches = checks.filter((check) => { + const r = scopeSegments.every((segment) => delimiterRegex.test(segment) || ensureCase(segment, check.case)); + return negated(check.when) ? !r : r; + }); + const result = matches.length > 0; + // A `never` rule fails because a case matched, so report the case(s) that + // did. An `always` rule fails because none matched, so it keeps reporting + // every configured case. + const reported = negated(when) && result ? matches : checks; + const list = reported.map((c) => c.case).join(", "); + return [ + negated(when) ? !result : result, + message([`scope must`, negated(when) ? `not` : null, `be ${list}`]), + ]; +}; +//# sourceMappingURL=scope-case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-case.js.map b/node_modules/@commitlint/rules/lib/scope-case.js.map new file mode 100644 index 000000000..c9dd54105 --- /dev/null +++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AAC,CAAC,MAAM;QAChC,OAAO,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;KACnE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-delimiter-style.d.ts b/node_modules/@commitlint/rules/lib/scope-delimiter-style.d.ts new file mode 100644 index 000000000..ad8d54ccc --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-delimiter-style.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const scopeDelimiterStyle: SyncRule; +//# sourceMappingURL=scope-delimiter-style.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-delimiter-style.d.ts.map b/node_modules/@commitlint/rules/lib/scope-delimiter-style.d.ts.map new file mode 100644 index 000000000..3045b7fd4 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-delimiter-style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-delimiter-style.d.ts","sourceRoot":"","sources":["../src/scope-delimiter-style.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAwBlD,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-delimiter-style.js b/node_modules/@commitlint/rules/lib/scope-delimiter-style.js new file mode 100644 index 000000000..0a37dbe74 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-delimiter-style.js @@ -0,0 +1,23 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const scopeDelimiterStyle = ({ scope }, when = "always", value = []) => { + if (!scope) { + return [true]; + } + const delimiters = value.length ? value : ["/", "\\", ","]; + const scopeRawDelimiters = scope.match(/[^A-Za-z0-9-_]+/g) ?? []; + const scopeDelimiters = [ + ...new Set(scopeRawDelimiters.map((delimiter) => { + return delimiter.trim() === "," ? "," : delimiter; + })), + ]; + const isAllDelimitersAllowed = scopeDelimiters.every((delimiter) => { + return ensure.enum(delimiter, delimiters); + }); + const isNever = when === "never"; + return [ + isNever ? !isAllDelimitersAllowed : isAllDelimitersAllowed, + message([`scope delimiters must ${isNever ? "not " : ""}be one of [${delimiters.join(", ")}]`]), + ]; +}; +//# sourceMappingURL=scope-delimiter-style.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-delimiter-style.js.map b/node_modules/@commitlint/rules/lib/scope-delimiter-style.js.map new file mode 100644 index 000000000..9e6f1c7f5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-delimiter-style.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-delimiter-style.js","sourceRoot":"","sources":["../src/scope-delimiter-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,mBAAmB,GAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACjG,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,kBAAkB,GAAG,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACjE,MAAM,eAAe,GAAG;QACvB,GAAG,IAAI,GAAG,CACT,kBAAkB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;YACpC,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QACnD,CAAC,CAAC,CACF;KACD,CAAC;IAEF,MAAM,sBAAsB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE;QAClE,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IAEjC,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB;QAC1D,OAAO,CAAC,CAAC,yBAAyB,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,cAAc,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC/F,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-empty.d.ts b/node_modules/@commitlint/rules/lib/scope-empty.d.ts new file mode 100644 index 000000000..1086c161d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-empty.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const scopeEmpty: SyncRule; +//# sourceMappingURL=scope-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-empty.d.ts.map b/node_modules/@commitlint/rules/lib/scope-empty.d.ts.map new file mode 100644 index 000000000..3d374180e --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-empty.d.ts","sourceRoot":"","sources":["../src/scope-empty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,QAOxB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-empty.js b/node_modules/@commitlint/rules/lib/scope-empty.js new file mode 100644 index 000000000..8fb7c4aaf --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-empty.js @@ -0,0 +1,11 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const scopeEmpty = (parsed, when = "never") => { + const negated = when === "always"; + const notEmpty = ensure.notEmpty(parsed.scope || ""); + return [ + negated ? !notEmpty : notEmpty, + message(["scope", negated ? "must" : "may not", "be empty"]), + ]; +}; +//# sourceMappingURL=scope-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-empty.js.map b/node_modules/@commitlint/rules/lib/scope-empty.js.map new file mode 100644 index 000000000..42c65cfaf --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-empty.js","sourceRoot":"","sources":["../src/scope-empty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,UAAU,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE,EAAE;IAC9D,MAAM,OAAO,GAAG,IAAI,KAAK,QAAQ,CAAC;IAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IACrD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KAC5D,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-enum.d.ts b/node_modules/@commitlint/rules/lib/scope-enum.d.ts new file mode 100644 index 000000000..5638478a2 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-enum.d.ts @@ -0,0 +1,6 @@ +import { SyncRule } from "@commitlint/types"; +export declare const scopeEnum: SyncRule; +//# sourceMappingURL=scope-enum.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-enum.d.ts.map b/node_modules/@commitlint/rules/lib/scope-enum.d.ts.map new file mode 100644 index 000000000..d4b1fcfbd --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-enum.d.ts","sourceRoot":"","sources":["../src/scope-enum.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,QAAQ,CAC7B,MAAM,EAAE,GACR;IACA,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CA0BH,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-enum.js b/node_modules/@commitlint/rules/lib/scope-enum.js new file mode 100644 index 000000000..81974bd1b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-enum.js @@ -0,0 +1,25 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const scopeEnum = ({ scope }, when = "always", value = []) => { + const scopes = Array.isArray(value) ? value : value.scopes; + if (!scope || !scopes.length) { + return [true, ""]; + } + const delimiters = Array.isArray(value) || !value.delimiters?.length ? ["/", "\\", ","] : value.delimiters; + const delimiterPatterns = delimiters.map((delimiter) => { + return delimiter === "," ? ", ?" : delimiter.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + }); + const messageScopes = scope.split(new RegExp(delimiterPatterns.join("|"))); + const errorMessage = ["scope must", `be one of [${scopes.join(", ")}]`]; + const isScopeInEnum = (scope) => ensure.enum(scope, scopes); + let isValid; + if (when === "never") { + isValid = !messageScopes.some(isScopeInEnum) && !isScopeInEnum(scope); + errorMessage.splice(1, 0, "not"); + } + else { + isValid = messageScopes.every(isScopeInEnum) || isScopeInEnum(scope); + } + return [isValid, message(errorMessage)]; +}; +//# sourceMappingURL=scope-enum.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-enum.js.map b/node_modules/@commitlint/rules/lib/scope-enum.js.map new file mode 100644 index 000000000..21224aff1 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-enum.js","sourceRoot":"","sources":["../src/scope-enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,SAAS,GAMlB,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;IAE3D,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACnB,CAAC;IAED,MAAM,UAAU,GACf,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IACzF,MAAM,iBAAiB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QACtD,OAAO,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3E,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,cAAc,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACpE,IAAI,OAAO,CAAC;IAEZ,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACtE,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACP,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AACzC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-max-length.d.ts b/node_modules/@commitlint/rules/lib/scope-max-length.d.ts new file mode 100644 index 000000000..ae8596814 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-max-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const scopeMaxLength: SyncRule; +//# sourceMappingURL=scope-max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-max-length.d.ts.map b/node_modules/@commitlint/rules/lib/scope-max-length.d.ts.map new file mode 100644 index 000000000..d6662ab7b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-max-length.d.ts","sourceRoot":"","sources":["../src/scope-max-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAQ3C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-max-length.js b/node_modules/@commitlint/rules/lib/scope-max-length.js new file mode 100644 index 000000000..e6e19c40b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-max-length.js @@ -0,0 +1,9 @@ +import { maxLength } from "@commitlint/ensure"; +export const scopeMaxLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.scope; + if (!input) { + return [true]; + } + return [maxLength(input, value), `scope must not be longer than ${value} characters`]; +}; +//# sourceMappingURL=scope-max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-max-length.js.map b/node_modules/@commitlint/rules/lib/scope-max-length.js.map new file mode 100644 index 000000000..e113630b6 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-max-length.js","sourceRoot":"","sources":["../src/scope-max-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,cAAc,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACxF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAE3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,iCAAiC,KAAK,aAAa,CAAC,CAAC;AACvF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-min-length.d.ts b/node_modules/@commitlint/rules/lib/scope-min-length.d.ts new file mode 100644 index 000000000..2bbaf438e --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-min-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const scopeMinLength: SyncRule; +//# sourceMappingURL=scope-min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-min-length.d.ts.map b/node_modules/@commitlint/rules/lib/scope-min-length.d.ts.map new file mode 100644 index 000000000..a7c7a8b3b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-min-length.d.ts","sourceRoot":"","sources":["../src/scope-min-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAM3C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-min-length.js b/node_modules/@commitlint/rules/lib/scope-min-length.js new file mode 100644 index 000000000..d4fa18cd4 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-min-length.js @@ -0,0 +1,9 @@ +import { minLength } from "@commitlint/ensure"; +export const scopeMinLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.scope; + if (!input) { + return [true]; + } + return [minLength(input, value), `scope must not be shorter than ${value} characters`]; +}; +//# sourceMappingURL=scope-min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/scope-min-length.js.map b/node_modules/@commitlint/rules/lib/scope-min-length.js.map new file mode 100644 index 000000000..e138475dc --- /dev/null +++ b/node_modules/@commitlint/rules/lib/scope-min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scope-min-length.js","sourceRoot":"","sources":["../src/scope-min-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,cAAc,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACxF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IACD,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,kCAAkC,KAAK,aAAa,CAAC,CAAC;AACxF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/signed-off-by.d.ts b/node_modules/@commitlint/rules/lib/signed-off-by.d.ts new file mode 100644 index 000000000..36cca646a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/signed-off-by.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const signedOffBy: SyncRule; +//# sourceMappingURL=signed-off-by.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/signed-off-by.d.ts.map b/node_modules/@commitlint/rules/lib/signed-off-by.d.ts.map new file mode 100644 index 000000000..0949cae7a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/signed-off-by.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signed-off-by.d.ts","sourceRoot":"","sources":["../src/signed-off-by.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAsBxC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/signed-off-by.js b/node_modules/@commitlint/rules/lib/signed-off-by.js new file mode 100644 index 000000000..ff80cc910 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/signed-off-by.js @@ -0,0 +1,22 @@ +import message from "@commitlint/message"; +import toLines from "@commitlint/to-lines"; +const CHERRY_PICK_REGEX = /^\(cherry picked from commit [0-9a-f]{7,64}\)$/i; +export const signedOffBy = (parsed, when = "always", value = "") => { + const lines = toLines(parsed.raw).filter((ln) => + // skip comments + !ln.startsWith("#") && + // skip cherry pick commits + !CHERRY_PICK_REGEX.test(ln.trim()) && + // ignore empty lines + Boolean(ln)); + const last = lines[lines.length - 1]; + const negated = when === "never"; + const hasSignedOffBy = + // empty commit message + last ? last.startsWith(value) : false; + return [ + negated ? !hasSignedOffBy : hasSignedOffBy, + message(["message", negated ? "must not" : "must", "be signed off"]), + ]; +}; +//# sourceMappingURL=signed-off-by.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/signed-off-by.js.map b/node_modules/@commitlint/rules/lib/signed-off-by.js.map new file mode 100644 index 000000000..0dc5266d6 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/signed-off-by.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signed-off-by.js","sourceRoot":"","sources":["../src/signed-off-by.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAG3C,MAAM,iBAAiB,GAAG,iDAAiD,CAAC;AAE5E,MAAM,CAAC,MAAM,WAAW,GAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACpF,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CACvC,CAAC,EAAE,EAAE,EAAE;IACN,gBAAgB;IAChB,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QACnB,2BAA2B;QAC3B,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QAClC,qBAAqB;QACrB,OAAO,CAAC,EAAE,CAAC,CACZ,CAAC;IAEF,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAErC,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,cAAc;IACnB,uBAAuB;IACvB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEvC,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc;QAC1C,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;KACpE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-case.d.ts b/node_modules/@commitlint/rules/lib/subject-case.d.ts new file mode 100644 index 000000000..a8ce0a313 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-case.d.ts @@ -0,0 +1,3 @@ +import { TargetCaseType, SyncRule } from "@commitlint/types"; +export declare const subjectCase: SyncRule; +//# sourceMappingURL=subject-case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-case.d.ts.map b/node_modules/@commitlint/rules/lib/subject-case.d.ts.map new file mode 100644 index 000000000..daf1e3229 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-case.d.ts","sourceRoot":"","sources":["../src/subject-case.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAqB7D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,cAAc,GAAG,cAAc,EAAE,CAsCnE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-case.js b/node_modules/@commitlint/rules/lib/subject-case.js new file mode 100644 index 000000000..742dd699a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-case.js @@ -0,0 +1,49 @@ +import { case as ensureCase } from "@commitlint/ensure"; +import message from "@commitlint/message"; +/** + * Since the rule requires first symbol of a subject to be a letter, use + * Unicode `Cased_Letter` category now to allow non-Latin alphabets as well. + * + * Do not use `Letter` category directly to avoid capturing `Modifier_Letter` + * (which just modifiers letters, so we probably shouldn't anyway) and + * `Other_Letter` (they actually are case-less, so they can't be validated) + * categories, and to stay close to previous implementation. + * + * Also, typescript does not seem to support almost any longhand category name + * (and even short for `Cased_Letter` too) so list all required letter + * categories manually just to prevent it from complaining about unknown stuff. + * + * @see [Unicode Categories]{@link https://www.regular-expressions.info/unicode.html} + */ +const startsWithLetterRegex = /^[\p{Ll}\p{Lu}\p{Lt}]/iu; +const negated = (when) => when === "never"; +export const subjectCase = (parsed, when = "always", value = []) => { + const { subject } = parsed; + if (typeof subject !== "string" || !subject.match(startsWithLetterRegex)) { + return [true]; + } + const checks = (Array.isArray(value) ? value : [value]).map((check) => { + if (typeof check === "string") { + return { + when: "always", + case: check, + }; + } + return check; + }); + const matches = checks.filter((check) => { + const r = ensureCase(subject, check.case); + return negated(check.when) ? !r : r; + }); + const result = matches.length > 0; + // A `never` rule fails because a case matched, so report the case(s) that + // did. An `always` rule fails because none matched, so it keeps reporting + // every configured case. + const reported = negated(when) && result ? matches : checks; + const list = reported.map((c) => c.case).join(", "); + return [ + negated(when) ? !result : result, + message([`subject must`, negated(when) ? `not` : null, `be ${list}`]), + ]; +}; +//# sourceMappingURL=subject-case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-case.js.map b/node_modules/@commitlint/rules/lib/subject-case.js.map new file mode 100644 index 000000000..4cd3365d9 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-case.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-case.js","sourceRoot":"","sources":["../src/subject-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C;;;;;;;;;;;;;;GAcG;AACH,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAExD,MAAM,OAAO,GAAG,CAA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GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEpD,OAAO;QACN,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAChC,OAAO,CAAC,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;KACrE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-empty.d.ts b/node_modules/@commitlint/rules/lib/subject-empty.d.ts new file mode 100644 index 000000000..9d01e544f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-empty.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const subjectEmpty: SyncRule; +//# sourceMappingURL=subject-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-empty.d.ts.map b/node_modules/@commitlint/rules/lib/subject-empty.d.ts.map new file mode 100644 index 000000000..569c89316 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-empty.d.ts","sourceRoot":"","sources":["../src/subject-empty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,QAQ1B,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-empty.js b/node_modules/@commitlint/rules/lib/subject-empty.js new file mode 100644 index 000000000..17cc00b9d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-empty.js @@ -0,0 +1,11 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const subjectEmpty = (parsed, when = "always") => { + const negated = when === "never"; + const notEmpty = ensure.notEmpty(parsed.subject || ""); + return [ + negated ? notEmpty : !notEmpty, + message(["subject", negated ? "may not" : "must", "be empty"]), + ]; +}; +//# sourceMappingURL=subject-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-empty.js.map b/node_modules/@commitlint/rules/lib/subject-empty.js.map new file mode 100644 index 000000000..84cbaf281 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-empty.js","sourceRoot":"","sources":["../src/subject-empty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,YAAY,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAEvD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAC9D,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-exclamation-mark.d.ts b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.d.ts new file mode 100644 index 000000000..380fe8a6c --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const subjectExclamationMark: SyncRule; +//# sourceMappingURL=subject-exclamation-mark.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-exclamation-mark.d.ts.map b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.d.ts.map new file mode 100644 index 000000000..b269c2539 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-exclamation-mark.d.ts","sourceRoot":"","sources":["../src/subject-exclamation-mark.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,sBAAsB,EAAE,QAiBpC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-exclamation-mark.js b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.js new file mode 100644 index 000000000..58e82543b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.js @@ -0,0 +1,18 @@ +import message from "@commitlint/message"; +export const subjectExclamationMark = (parsed, when = "always") => { + const input = parsed.header; + if (!input) { + return [true, ""]; + } + const negated = when === "never"; + const hasExclamationMark = /^(\w*)(?:\((.*)\))?!: (.*)$/.test(input); + return [ + negated ? !hasExclamationMark : hasExclamationMark, + message([ + "subject", + negated ? "must not" : "must", + "have an exclamation mark in the subject to identify a breaking change", + ]), + ]; +}; +//# sourceMappingURL=subject-exclamation-mark.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-exclamation-mark.js.map b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.js.map new file mode 100644 index 000000000..89640fa67 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-exclamation-mark.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-exclamation-mark.js","sourceRoot":"","sources":["../src/subject-exclamation-mark.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,sBAAsB,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IAC3E,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACnB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,kBAAkB,GAAG,6BAA6B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAErE,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB;QAClD,OAAO,CAAC;YACP,SAAS;YACT,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;YAC7B,uEAAuE;SACvE,CAAC;KACF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-full-stop.d.ts b/node_modules/@commitlint/rules/lib/subject-full-stop.d.ts new file mode 100644 index 000000000..abd1e6b69 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-full-stop.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const subjectFullStop: SyncRule; +//# sourceMappingURL=subject-full-stop.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-full-stop.d.ts.map b/node_modules/@commitlint/rules/lib/subject-full-stop.d.ts.map new file mode 100644 index 000000000..b52e067b9 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-full-stop.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-full-stop.d.ts","sourceRoot":"","sources":["../src/subject-full-stop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAkB5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-full-stop.js b/node_modules/@commitlint/rules/lib/subject-full-stop.js new file mode 100644 index 000000000..f94a91eb7 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-full-stop.js @@ -0,0 +1,18 @@ +import message from "@commitlint/message"; +export const subjectFullStop = (parsed, when = "always", value = ".") => { + const colonIndex = parsed.header?.indexOf(":") || 0; + if (colonIndex > 0 && colonIndex === parsed.header.length - 1) { + return [true]; + } + const input = parsed.header; + const negated = when === "never"; + let hasStop = input?.[input.length - 1] === value; + if (input?.slice(-3) === "...") { + hasStop = false; + } + return [ + negated ? !hasStop : hasStop, + message(["subject", negated ? "may not" : "must", "end with full stop"]), + ]; +}; +//# sourceMappingURL=subject-full-stop.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-full-stop.js.map b/node_modules/@commitlint/rules/lib/subject-full-stop.js.map new file mode 100644 index 000000000..1b81f3ab5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-full-stop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-full-stop.js","sourceRoot":"","sources":["../src/subject-full-stop.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,GAAG,EAAE,EAAE;IACzF,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpD,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,KAAK,MAAM,CAAC,MAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAE5B,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAClD,IAAI,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO,GAAG,KAAK,CAAC;IACjB,CAAC;IAED,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;QAC5B,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KACxE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-max-length.d.ts b/node_modules/@commitlint/rules/lib/subject-max-length.d.ts new file mode 100644 index 000000000..f9269f1b5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-max-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const subjectMaxLength: SyncRule; +//# sourceMappingURL=subject-max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-max-length.d.ts.map b/node_modules/@commitlint/rules/lib/subject-max-length.d.ts.map new file mode 100644 index 000000000..0ac736bc1 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-max-length.d.ts","sourceRoot":"","sources":["../src/subject-max-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAQ7C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-max-length.js b/node_modules/@commitlint/rules/lib/subject-max-length.js new file mode 100644 index 000000000..0b7d90c42 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-max-length.js @@ -0,0 +1,9 @@ +import { maxLength } from "@commitlint/ensure"; +export const subjectMaxLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.subject; + if (!input) { + return [true]; + } + return [maxLength(input, value), `subject must not be longer than ${value} characters`]; +}; +//# sourceMappingURL=subject-max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-max-length.js.map b/node_modules/@commitlint/rules/lib/subject-max-length.js.map new file mode 100644 index 000000000..427d22727 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-max-length.js","sourceRoot":"","sources":["../src/subject-max-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,gBAAgB,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC1F,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;IAE7B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,mCAAmC,KAAK,aAAa,CAAC,CAAC;AACzF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-min-length.d.ts b/node_modules/@commitlint/rules/lib/subject-min-length.d.ts new file mode 100644 index 000000000..0320c81a4 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-min-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const subjectMinLength: SyncRule; +//# sourceMappingURL=subject-min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-min-length.d.ts.map b/node_modules/@commitlint/rules/lib/subject-min-length.d.ts.map new file mode 100644 index 000000000..ad380398d --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-min-length.d.ts","sourceRoot":"","sources":["../src/subject-min-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAM7C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-min-length.js b/node_modules/@commitlint/rules/lib/subject-min-length.js new file mode 100644 index 000000000..d8ae756a5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-min-length.js @@ -0,0 +1,9 @@ +import { minLength } from "@commitlint/ensure"; +export const subjectMinLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.subject; + if (!input) { + return [true]; + } + return [minLength(input, value), `subject must not be shorter than ${value} characters`]; +}; +//# sourceMappingURL=subject-min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/subject-min-length.js.map b/node_modules/@commitlint/rules/lib/subject-min-length.js.map new file mode 100644 index 000000000..68a8f9b0f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/subject-min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subject-min-length.js","sourceRoot":"","sources":["../src/subject-min-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,gBAAgB,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC1F,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;IAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IACD,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,oCAAoC,KAAK,aAAa,CAAC,CAAC;AAC1F,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/trailer-exists.d.ts b/node_modules/@commitlint/rules/lib/trailer-exists.d.ts new file mode 100644 index 000000000..028418890 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/trailer-exists.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const trailerExists: SyncRule; +//# sourceMappingURL=trailer-exists.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/trailer-exists.d.ts.map b/node_modules/@commitlint/rules/lib/trailer-exists.d.ts.map new file mode 100644 index 000000000..7b2d6686b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/trailer-exists.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"trailer-exists.d.ts","sourceRoot":"","sources":["../src/trailer-exists.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAc1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/trailer-exists.js b/node_modules/@commitlint/rules/lib/trailer-exists.js new file mode 100644 index 000000000..10013127f --- /dev/null +++ b/node_modules/@commitlint/rules/lib/trailer-exists.js @@ -0,0 +1,16 @@ +import { spawnSync } from "node:child_process"; +import message from "@commitlint/message"; +import toLines from "@commitlint/to-lines"; +export const trailerExists = (parsed, when = "always", value = "") => { + const trailers = spawnSync("git", ["interpret-trailers", "--parse"], { + input: parsed.raw || "", + }).stdout; + const matches = toLines(trailers.toString()).filter((ln) => ln.startsWith(value)).length; + const negated = when === "never"; + const hasTrailer = matches > 0; + return [ + negated ? !hasTrailer : hasTrailer, + message(["message", negated ? "must not" : "must", "have `" + value + "` trailer"]), + ]; +}; +//# sourceMappingURL=trailer-exists.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/trailer-exists.js.map b/node_modules/@commitlint/rules/lib/trailer-exists.js.map new file mode 100644 index 000000000..efd155ef5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/trailer-exists.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trailer-exists.js","sourceRoot":"","sources":["../src/trailer-exists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAG3C,MAAM,CAAC,MAAM,aAAa,GAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACtF,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAAE;QACpE,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE;KACvB,CAAC,CAAC,MAAM,CAAC;IAEV,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IAEzF,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,CAAC;IAE/B,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;QAClC,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,GAAG,WAAW,CAAC,CAAC;KACnF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-case.d.ts b/node_modules/@commitlint/rules/lib/type-case.d.ts new file mode 100644 index 000000000..8982c1609 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-case.d.ts @@ -0,0 +1,3 @@ +import { TargetCaseType, SyncRule } from "@commitlint/types"; +export declare const typeCase: SyncRule; +//# sourceMappingURL=type-case.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-case.d.ts.map b/node_modules/@commitlint/rules/lib/type-case.d.ts.map new file mode 100644 index 000000000..175ac5273 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-case.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"type-case.d.ts","sourceRoot":"","sources":["../src/type-case.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7D,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,cAAc,GAAG,cAAc,EAAE,CAsChE,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-case.js b/node_modules/@commitlint/rules/lib/type-case.js new file mode 100644 index 000000000..a630259f6 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-case.js @@ -0,0 +1,33 @@ +import { case as ensureCase } from "@commitlint/ensure"; +import message from "@commitlint/message"; +const negated = (when) => when === "never"; +export const typeCase = (parsed, when = "always", value = []) => { + const { type } = parsed; + if (!type) { + return [true]; + } + const checks = (Array.isArray(value) ? value : [value]).map((check) => { + if (typeof check === "string") { + return { + when: "always", + case: check, + }; + } + return check; + }); + const matches = checks.filter((check) => { + const r = ensureCase(type, check.case); + return negated(check.when) ? !r : r; + }); + const result = matches.length > 0; + // A `never` rule fails because a case matched, so report the case(s) that + // did. An `always` rule fails because none matched, so it keeps reporting + // every configured case. + const reported = negated(when) && result ? matches : checks; + const list = reported.map((c) => c.case).join(", "); + return [ + negated(when) ? !result : result, + message([`type must`, negated(when) ? `not` : null, `be ${list}`]), + ]; +}; +//# sourceMappingURL=type-case.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-case.js.map b/node_modules/@commitlint/rules/lib/type-case.js.map new file mode 100644 index 000000000..8d8a4dd09 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-case.js.map @@ -0,0 +1 @@ +{"version":3,"file":"type-case.js","sourceRoot":"","sources":["../src/type-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC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AG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEpD,OAAO;QACN,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAChC,OAAO,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;KAClE,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-empty.d.ts b/node_modules/@commitlint/rules/lib/type-empty.d.ts new file mode 100644 index 000000000..f6c3074fe --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-empty.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const typeEmpty: SyncRule; +//# sourceMappingURL=type-empty.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-empty.d.ts.map b/node_modules/@commitlint/rules/lib/type-empty.d.ts.map new file mode 100644 index 000000000..71a277eb3 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"type-empty.d.ts","sourceRoot":"","sources":["../src/type-empty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,QAOvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-empty.js b/node_modules/@commitlint/rules/lib/type-empty.js new file mode 100644 index 000000000..013a26883 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-empty.js @@ -0,0 +1,11 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const typeEmpty = (parsed, when = "always") => { + const negated = when === "never"; + const notEmpty = ensure.notEmpty(parsed.type || ""); + return [ + negated ? notEmpty : !notEmpty, + message(["type", negated ? "may not" : "must", "be empty"]), + ]; +}; +//# sourceMappingURL=type-empty.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-empty.js.map b/node_modules/@commitlint/rules/lib/type-empty.js.map new file mode 100644 index 000000000..9e988ce34 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"type-empty.js","sourceRoot":"","sources":["../src/type-empty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,SAAS,GAAa,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE;IAC9D,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IACpD,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;QAC9B,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAC3D,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-enum.d.ts b/node_modules/@commitlint/rules/lib/type-enum.d.ts new file mode 100644 index 000000000..b8e8b2f4a --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-enum.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const typeEnum: SyncRule; +//# sourceMappingURL=type-enum.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-enum.d.ts.map b/node_modules/@commitlint/rules/lib/type-enum.d.ts.map new file mode 100644 index 000000000..a3e63771b --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"type-enum.d.ts","sourceRoot":"","sources":["../src/type-enum.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAcvC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-enum.js b/node_modules/@commitlint/rules/lib/type-enum.js new file mode 100644 index 000000000..78d9efca5 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-enum.js @@ -0,0 +1,15 @@ +import * as ensure from "@commitlint/ensure"; +import message from "@commitlint/message"; +export const typeEnum = (parsed, when = "always", value = []) => { + const { type: input } = parsed; + if (!input) { + return [true]; + } + const negated = when === "never"; + const result = ensure.enum(input, value); + return [ + negated ? !result : result, + message([`type must`, negated ? `not` : null, `be one of [${value.join(", ")}]`]), + ]; +}; +//# sourceMappingURL=type-enum.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-enum.js.map b/node_modules/@commitlint/rules/lib/type-enum.js.map new file mode 100644 index 000000000..a3429d803 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"type-enum.js","sourceRoot":"","sources":["../src/type-enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACnF,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAE/B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAEzC,OAAO;QACN,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAC1B,OAAO,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,cAAc,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACjF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-max-length.d.ts b/node_modules/@commitlint/rules/lib/type-max-length.d.ts new file mode 100644 index 000000000..d36b7bf16 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-max-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const typeMaxLength: SyncRule; +//# sourceMappingURL=type-max-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-max-length.d.ts.map b/node_modules/@commitlint/rules/lib/type-max-length.d.ts.map new file mode 100644 index 000000000..75d815af8 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-max-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"type-max-length.d.ts","sourceRoot":"","sources":["../src/type-max-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAQ1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-max-length.js b/node_modules/@commitlint/rules/lib/type-max-length.js new file mode 100644 index 000000000..9d5a64651 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-max-length.js @@ -0,0 +1,9 @@ +import { maxLength } from "@commitlint/ensure"; +export const typeMaxLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.type; + if (!input) { + return [true]; + } + return [maxLength(input, value), `type must not be longer than ${value} characters`]; +}; +//# sourceMappingURL=type-max-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-max-length.js.map b/node_modules/@commitlint/rules/lib/type-max-length.js.map new file mode 100644 index 000000000..9c3dd23b1 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-max-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"type-max-length.js","sourceRoot":"","sources":["../src/type-max-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,aAAa,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACvF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,gCAAgC,KAAK,aAAa,CAAC,CAAC;AACtF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-min-length.d.ts b/node_modules/@commitlint/rules/lib/type-min-length.d.ts new file mode 100644 index 000000000..e1ca31aaf --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-min-length.d.ts @@ -0,0 +1,3 @@ +import { SyncRule } from "@commitlint/types"; +export declare const typeMinLength: SyncRule; +//# sourceMappingURL=type-min-length.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-min-length.d.ts.map b/node_modules/@commitlint/rules/lib/type-min-length.d.ts.map new file mode 100644 index 000000000..02f8f066e --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-min-length.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"type-min-length.d.ts","sourceRoot":"","sources":["../src/type-min-length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAM1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-min-length.js b/node_modules/@commitlint/rules/lib/type-min-length.js new file mode 100644 index 000000000..6563c67e7 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-min-length.js @@ -0,0 +1,9 @@ +import { minLength } from "@commitlint/ensure"; +export const typeMinLength = (parsed, _when = undefined, value = 0) => { + const input = parsed.type; + if (!input) { + return [true]; + } + return [minLength(input, value), `type must not be shorter than ${value} characters`]; +}; +//# sourceMappingURL=type-min-length.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/rules/lib/type-min-length.js.map b/node_modules/@commitlint/rules/lib/type-min-length.js.map new file mode 100644 index 000000000..4fdb96164 --- /dev/null +++ b/node_modules/@commitlint/rules/lib/type-min-length.js.map @@ -0,0 +1 @@ +{"version":3,"file":"type-min-length.js","sourceRoot":"","sources":["../src/type-min-length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,MAAM,aAAa,GAAqB,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACvF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IACD,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,iCAAiC,KAAK,aAAa,CAAC,CAAC;AACvF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/rules/license.md b/node_modules/@commitlint/rules/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/rules/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/rules/package.json b/node_modules/@commitlint/rules/package.json new file mode 100644 index 000000000..41c053af2 --- /dev/null +++ b/node_modules/@commitlint/rules/package.json @@ -0,0 +1,53 @@ +{ + "name": "@commitlint/rules", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/rules" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "@commitlint/ensure": "^21.2.3", + "@commitlint/message": "^21.2.0", + "@commitlint/to-lines": "^21.0.1", + "@commitlint/types": "^21.2.3" + }, + "devDependencies": { + "@commitlint/parse": "^21.2.3", + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0", + "conventional-changelog-angular": "^9.0.0", + "conventional-commits-parser": "^7.0.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/to-lines/lib/index.d.ts b/node_modules/@commitlint/to-lines/lib/index.d.ts new file mode 100644 index 000000000..bd8047b6c --- /dev/null +++ b/node_modules/@commitlint/to-lines/lib/index.d.ts @@ -0,0 +1,2 @@ +export default function toLines(input?: string | null): string[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/to-lines/lib/index.d.ts.map b/node_modules/@commitlint/to-lines/lib/index.d.ts.map new file mode 100644 index 000000000..5320be3c1 --- /dev/null +++ b/node_modules/@commitlint/to-lines/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAM/D"} \ No newline at end of file diff --git a/node_modules/@commitlint/to-lines/lib/index.js b/node_modules/@commitlint/to-lines/lib/index.js new file mode 100644 index 000000000..a3d29abaf --- /dev/null +++ b/node_modules/@commitlint/to-lines/lib/index.js @@ -0,0 +1,7 @@ +export default function toLines(input) { + if (typeof input !== "string") { + return []; + } + return input.split(/(?:\r?\n)/); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/to-lines/lib/index.js.map b/node_modules/@commitlint/to-lines/lib/index.js.map new file mode 100644 index 000000000..0f502467b --- /dev/null +++ b/node_modules/@commitlint/to-lines/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAqB;IACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,OAAO,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/to-lines/license.md b/node_modules/@commitlint/to-lines/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/to-lines/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/to-lines/package.json b/node_modules/@commitlint/to-lines/package.json new file mode 100644 index 000000000..fbc0b070a --- /dev/null +++ b/node_modules/@commitlint/to-lines/package.json @@ -0,0 +1,42 @@ +{ + "name": "@commitlint/to-lines", + "version": "21.0.1", + "gitHead": "db8d7d6461d721fe2561ce4307e4069eaf6dcc8c", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/to-lines" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/top-level/lib/index.d.ts b/node_modules/@commitlint/top-level/lib/index.d.ts new file mode 100644 index 000000000..a5065a9f4 --- /dev/null +++ b/node_modules/@commitlint/top-level/lib/index.d.ts @@ -0,0 +1,6 @@ +export default toplevel; +/** + * Find the next git root + */ +declare function toplevel(cwd?: string): Promise; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/top-level/lib/index.d.ts.map b/node_modules/@commitlint/top-level/lib/index.d.ts.map new file mode 100644 index 000000000..b00483b5b --- /dev/null +++ b/node_modules/@commitlint/top-level/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAe,QAAQ,CAAC;AAExB;;GAEG;AACH,iBAAS,QAAQ,CAAC,GAAG,SAAgB,0BAMpC"} \ No newline at end of file diff --git a/node_modules/@commitlint/top-level/lib/index.js b/node_modules/@commitlint/top-level/lib/index.js new file mode 100644 index 000000000..ade4ce2af --- /dev/null +++ b/node_modules/@commitlint/top-level/lib/index.js @@ -0,0 +1,14 @@ +import process from "node:process"; +import escalade from "escalade"; +export default toplevel; +/** + * Find the next git root + */ +function toplevel(cwd = process.cwd()) { + return escalade(cwd, (directory, files) => { + if (files.includes(".git")) { + return directory; + } + }); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/top-level/lib/index.js.map b/node_modules/@commitlint/top-level/lib/index.js.map new file mode 100644 index 000000000..829850a14 --- /dev/null +++ b/node_modules/@commitlint/top-level/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,eAAe,QAAQ,CAAC;AAExB;;GAEG;AACH,SAAS,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;IACpC,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/top-level/license.md b/node_modules/@commitlint/top-level/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/top-level/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/top-level/package.json b/node_modules/@commitlint/top-level/package.json new file mode 100644 index 000000000..05ecdf367 --- /dev/null +++ b/node_modules/@commitlint/top-level/package.json @@ -0,0 +1,47 @@ +{ + "name": "@commitlint/top-level", + "version": "21.2.0", + "gitHead": "1b4e5bc0e095294ad421b3ac83f6b66665429e60", + "description": "Lint your commit messages", + "keywords": [ + "commitlint", + "conventional-changelog", + "core", + "library" + ], + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/top-level" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "deps": "dep-check", + "pkg": "pkg-check" + }, + "dependencies": { + "escalade": "^3.2.0" + }, + "devDependencies": { + "@commitlint/test": "^21.2.0", + "@commitlint/utils": "^21.0.1", + "@types/node": "^22.0.0" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@commitlint/types/lib/ensure.d.ts b/node_modules/@commitlint/types/lib/ensure.d.ts new file mode 100644 index 000000000..70a110d8d --- /dev/null +++ b/node_modules/@commitlint/types/lib/ensure.d.ts @@ -0,0 +1,2 @@ +export type TargetCaseType = "camel-case" | "kebab-case" | "snake-case" | "pascal-case" | "start-case" | "upper-case" | "uppercase" | "sentence-case" | "sentencecase" | "lower-case" | "lowercase" | "lowerCase"; +//# sourceMappingURL=ensure.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/ensure.d.ts.map b/node_modules/@commitlint/types/lib/ensure.d.ts.map new file mode 100644 index 000000000..9073adf0f --- /dev/null +++ b/node_modules/@commitlint/types/lib/ensure.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ensure.d.ts","sourceRoot":"","sources":["../src/ensure.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACvB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,eAAe,GACf,cAAc,GACd,YAAY,GACZ,WAAW,GACX,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/ensure.js b/node_modules/@commitlint/types/lib/ensure.js new file mode 100644 index 000000000..da8f42457 --- /dev/null +++ b/node_modules/@commitlint/types/lib/ensure.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ensure.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/ensure.js.map b/node_modules/@commitlint/types/lib/ensure.js.map new file mode 100644 index 000000000..46c5409dc --- /dev/null +++ b/node_modules/@commitlint/types/lib/ensure.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ensure.js","sourceRoot":"","sources":["../src/ensure.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/format.d.ts b/node_modules/@commitlint/types/lib/format.d.ts new file mode 100644 index 000000000..6ff92b36a --- /dev/null +++ b/node_modules/@commitlint/types/lib/format.d.ts @@ -0,0 +1,30 @@ +import type pc from "picocolors"; +import { QualifiedRules } from "./load.js"; +import { RuleConfigSeverity } from "./rules.js"; +export type Formatter = (report: FormattableReport, options: FormatOptions) => string; +export interface FormattableProblem { + level: RuleConfigSeverity; + name: keyof QualifiedRules; + message: string; +} +export interface FormattableResult { + errors?: FormattableProblem[]; + warnings?: FormattableProblem[]; +} +export interface WithInput { + input?: string; +} +export interface FormattableReport { + results?: (FormattableResult & WithInput)[]; +} +export type PicocolorsColor = Exclude; +export type ChalkColor = PicocolorsColor; +export interface FormatOptions { + color?: boolean; + signs?: readonly [string, string, string]; + colors?: readonly [PicocolorsColor, PicocolorsColor, PicocolorsColor]; + verbose?: boolean; + helpUrl?: string; + legacyOutput?: boolean; +} +//# sourceMappingURL=format.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/format.d.ts.map b/node_modules/@commitlint/types/lib/format.d.ts.map new file mode 100644 index 000000000..0e530e31e --- /dev/null +++ b/node_modules/@commitlint/types/lib/format.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,aAAa,KAAK,MAAM,CAAC;AAEtF,MAAM,WAAW,kBAAkB;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,MAAM,cAAc,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IACjC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,SAAS;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IACjC,OAAO,CAAC,EAAE,CAAC,iBAAiB,GAAG,SAAS,CAAC,EAAE,CAAC;CAC5C;AAGD,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,OAAO,EAAE,EAAE,kBAAkB,GAAG,cAAc,CAAC,CAAC;AAG5F,MAAM,MAAM,UAAU,GAAG,eAAe,CAAC;AAEzC,MAAM,WAAW,aAAa;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,SAAS,CAAC,eAAe,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/format.js b/node_modules/@commitlint/types/lib/format.js new file mode 100644 index 000000000..6ed01dbf0 --- /dev/null +++ b/node_modules/@commitlint/types/lib/format.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=format.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/format.js.map b/node_modules/@commitlint/types/lib/format.js.map new file mode 100644 index 000000000..bb9c99860 --- /dev/null +++ b/node_modules/@commitlint/types/lib/format.js.map @@ -0,0 +1 @@ +{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/index.d.ts b/node_modules/@commitlint/types/lib/index.d.ts new file mode 100644 index 000000000..4169dd28d --- /dev/null +++ b/node_modules/@commitlint/types/lib/index.d.ts @@ -0,0 +1,9 @@ +export * from "./ensure.js"; +export * from "./format.js"; +export * from "./is-ignored.js"; +export * from "./lint.js"; +export * from "./load.js"; +export * from "./parse.js"; +export * from "./prompt.js"; +export * from "./rules.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/index.d.ts.map b/node_modules/@commitlint/types/lib/index.d.ts.map new file mode 100644 index 000000000..70b3940fd --- /dev/null +++ b/node_modules/@commitlint/types/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/index.js b/node_modules/@commitlint/types/lib/index.js new file mode 100644 index 000000000..e168eb043 --- /dev/null +++ b/node_modules/@commitlint/types/lib/index.js @@ -0,0 +1,9 @@ +export * from "./ensure.js"; +export * from "./format.js"; +export * from "./is-ignored.js"; +export * from "./lint.js"; +export * from "./load.js"; +export * from "./parse.js"; +export * from "./prompt.js"; +export * from "./rules.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/index.js.map b/node_modules/@commitlint/types/lib/index.js.map new file mode 100644 index 000000000..9b67bcaf7 --- /dev/null +++ b/node_modules/@commitlint/types/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/is-ignored.d.ts b/node_modules/@commitlint/types/lib/is-ignored.d.ts new file mode 100644 index 000000000..970c4b09a --- /dev/null +++ b/node_modules/@commitlint/types/lib/is-ignored.d.ts @@ -0,0 +1,6 @@ +export type Matcher = (commit: string) => boolean; +export interface IsIgnoredOptions { + ignores?: Matcher[]; + defaults?: boolean; +} +//# sourceMappingURL=is-ignored.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/is-ignored.d.ts.map b/node_modules/@commitlint/types/lib/is-ignored.d.ts.map new file mode 100644 index 000000000..95be7e564 --- /dev/null +++ b/node_modules/@commitlint/types/lib/is-ignored.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is-ignored.d.ts","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAChC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/is-ignored.js b/node_modules/@commitlint/types/lib/is-ignored.js new file mode 100644 index 000000000..67f19d118 --- /dev/null +++ b/node_modules/@commitlint/types/lib/is-ignored.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=is-ignored.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/is-ignored.js.map b/node_modules/@commitlint/types/lib/is-ignored.js.map new file mode 100644 index 000000000..3b2686283 --- /dev/null +++ b/node_modules/@commitlint/types/lib/is-ignored.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is-ignored.js","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/lint.d.ts b/node_modules/@commitlint/types/lib/lint.d.ts new file mode 100644 index 000000000..d1c4b485d --- /dev/null +++ b/node_modules/@commitlint/types/lib/lint.d.ts @@ -0,0 +1,39 @@ +import type { ParserOptions as Options } from "conventional-commits-parser"; +import { IsIgnoredOptions } from "./is-ignored.js"; +import { PluginRecords } from "./load.js"; +import type { Parser } from "./parse.js"; +import { RuleConfigSeverity, RuleConfigTuple } from "./rules.js"; +export type LintRuleConfig = Record | RuleConfigTuple | RuleConfigTuple>; +export interface LintOptions { + /** If it should ignore the default commit messages (defaults to `true`) */ + defaultIgnores?: IsIgnoredOptions["defaults"]; + /** Additional commits to ignore, defined by ignore matchers */ + ignores?: IsIgnoredOptions["ignores"]; + /** The parser configuration to use when linting the commit */ + parserOpts?: Options; + /** A custom parser function, used instead of the default conventional-commits-parser */ + parser?: Parser; + plugins?: PluginRecords; + helpUrl?: string; +} +export interface LintOutcome { + /** The linted commit, as string */ + input: string; + /** If the linted commit is considered valid */ + valid: boolean; + /** All errors, per rule, for the commit */ + errors: LintRuleOutcome[]; + /** All warnings, per rule, for the commit */ + warnings: LintRuleOutcome[]; +} +export interface LintRuleOutcome { + /** If the commit is considered valid for the rule */ + valid: boolean; + /** The "severity" of the rule (1 = warning, 2 = error) */ + level: RuleConfigSeverity; + /** The name of the rule */ + name: string; + /** The message returned from the rule, if invalid */ + message: string; +} +//# sourceMappingURL=lint.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/lint.d.ts.map b/node_modules/@commitlint/types/lib/lint.d.ts.map new file mode 100644 index 000000000..42fb9402b --- /dev/null +++ b/node_modules/@commitlint/types/lib/lint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG,MAAM,CAClC,MAAM,EACN,QAAQ,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAC1F,CAAC;AAEF,MAAM,WAAW,WAAW;IAC3B,2EAA2E;IAC3E,cAAc,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC9C,gEAAgE;IAChE,OAAO,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACtC,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC3B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,EAAE,OAAO,CAAC;IACf,2CAA2C;IAC3C,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC/B,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,KAAK,EAAE,kBAAkB,CAAC;IAC1B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CAChB"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/lint.js b/node_modules/@commitlint/types/lib/lint.js new file mode 100644 index 000000000..13f1cf3ca --- /dev/null +++ b/node_modules/@commitlint/types/lib/lint.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=lint.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/lint.js.map b/node_modules/@commitlint/types/lib/lint.js.map new file mode 100644 index 000000000..40cc75a6c --- /dev/null +++ b/node_modules/@commitlint/types/lib/lint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lint.js","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/load.d.ts b/node_modules/@commitlint/types/lib/load.d.ts new file mode 100644 index 000000000..66e31c636 --- /dev/null +++ b/node_modules/@commitlint/types/lib/load.d.ts @@ -0,0 +1,44 @@ +import { UserPromptConfig } from "./prompt.js"; +import { AsyncRule, Rule, RuleConfigQuality, RulesConfig, SyncRule } from "./rules.js"; +export type PluginRecords = Record; +export interface Plugin { + rules: { + [ruleName: string]: Rule | AsyncRule | SyncRule; + }; +} +export interface LoadOptions { + cwd?: string; + file?: string; +} +export interface UserConfig { + extends?: string | string[]; + formatter?: string; + rules?: Partial; + parserPreset?: string | ParserPreset | Promise; + ignores?: ((commit: string) => boolean)[]; + defaultIgnores?: boolean; + plugins?: (string | Plugin)[]; + helpUrl?: string; + prompt?: UserPromptConfig; + [key: string]: unknown; +} +export type QualifiedRules = Partial>; +export interface QualifiedConfig { + extends: string[]; + formatter: string; + rules: QualifiedRules; + parserPreset?: ParserPreset; + ignores?: ((commit: string) => boolean)[]; + defaultIgnores?: boolean; + plugins: PluginRecords; + helpUrl: string; + prompt: UserPromptConfig; +} +export interface ParserPreset { + name?: string; + path?: string; + parserOpts?: unknown; + parser?: unknown; + presetConfig?: unknown; +} +//# sourceMappingURL=load.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/load.d.ts.map b/node_modules/@commitlint/types/lib/load.d.ts.map new file mode 100644 index 000000000..aa465edff --- /dev/null +++ b/node_modules/@commitlint/types/lib/load.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE;QACN,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;KAChD,CAAC;CACF;AAED,MAAM,WAAW,WAAW;IAC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OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/load.js b/node_modules/@commitlint/types/lib/load.js new file mode 100644 index 000000000..e2fa8e648 --- /dev/null +++ b/node_modules/@commitlint/types/lib/load.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=load.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/load.js.map b/node_modules/@commitlint/types/lib/load.js.map new file mode 100644 index 000000000..e01026605 --- /dev/null +++ b/node_modules/@commitlint/types/lib/load.js.map @@ -0,0 +1 @@ +{"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/parse.d.ts b/node_modules/@commitlint/types/lib/parse.d.ts new file mode 100644 index 000000000..789313bb3 --- /dev/null +++ b/node_modules/@commitlint/types/lib/parse.d.ts @@ -0,0 +1,3 @@ +import type { Commit, ParserOptions as Options } from "conventional-commits-parser"; +export type Parser = (message: string, options: Options) => Omit; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/parse.d.ts.map b/node_modules/@commitlint/types/lib/parse.d.ts.map new file mode 100644 index 000000000..cab95d67c --- /dev/null +++ b/node_modules/@commitlint/types/lib/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEpF,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/parse.js b/node_modules/@commitlint/types/lib/parse.js new file mode 100644 index 000000000..d88afa6e0 --- /dev/null +++ b/node_modules/@commitlint/types/lib/parse.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/parse.js.map b/node_modules/@commitlint/types/lib/parse.js.map new file mode 100644 index 000000000..20978d772 --- /dev/null +++ b/node_modules/@commitlint/types/lib/parse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/prompt.d.ts b/node_modules/@commitlint/types/lib/prompt.d.ts new file mode 100644 index 000000000..a6bf96ef9 --- /dev/null +++ b/node_modules/@commitlint/types/lib/prompt.d.ts @@ -0,0 +1,41 @@ +export type RuleField = "header" | "type" | "scope" | "subject" | "body" | "footer"; +export type PromptName = RuleField | "isBreaking" | "breakingBody" | "breaking" | "isIssueAffected" | "issuesBody" | "issues"; +export type PromptConfig = { + settings: { + scopeEnumSeparator: string; + enableMultipleScopes: boolean; + useExclamationMark: boolean; + }; + messages: PromptMessages; + questions: Partial>; +}; +export type PromptMessages = { + skip: string; + max: string; + min: string; + emptyWarning: string; + upperLimitWarning: string; + lowerLimitWarning: string; + [_key: string]: string; +}; +export type UserPromptConfig = DeepPartial; +type DeepPartial = { + [P in keyof T]?: { + [K in keyof T[P]]?: T[P][K]; + }; +}; +export {}; +//# sourceMappingURL=prompt.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/prompt.d.ts.map b/node_modules/@commitlint/types/lib/prompt.d.ts.map new file mode 100644 index 000000000..aaf5a7a62 --- /dev/null +++ b/node_modules/@commitlint/types/lib/prompt.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAA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AC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;CACD,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/prompt.js b/node_modules/@commitlint/types/lib/prompt.js new file mode 100644 index 000000000..3459a71f2 --- /dev/null +++ b/node_modules/@commitlint/types/lib/prompt.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=prompt.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/prompt.js.map b/node_modules/@commitlint/types/lib/prompt.js.map new file mode 100644 index 000000000..c457365f5 --- /dev/null +++ b/node_modules/@commitlint/types/lib/prompt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/rules.d.ts b/node_modules/@commitlint/types/lib/rules.d.ts new file mode 100644 index 000000000..636418c73 --- /dev/null +++ b/node_modules/@commitlint/types/lib/rules.d.ts @@ -0,0 +1,97 @@ +import type { Commit } from "conventional-commits-parser"; +import { TargetCaseType } from "./ensure.js"; +/** + * Rules match the input either as successful or failed. + * For example, when `header-full-stop` detects a full stop and is set as "always"; it's true. + * If the `header-full-stop` discovers a full stop but is set to "never"; it's false. + */ +export type RuleOutcome = Readonly<[boolean, string?]>; +/** + * Rules receive a parsed commit, condition, and possible additional settings through value. + * All rules should provide the most sensible rule condition and value. + */ +export type RuleType = "async" | "sync" | "either"; +export type BaseRule = (parsed: Commit, when?: RuleConfigCondition, value?: Value) => Type extends "either" ? RuleOutcome | Promise : Type extends "async" ? Promise : Type extends "sync" ? RuleOutcome : never; +export type Rule = BaseRule; +export type AsyncRule = BaseRule; +export type SyncRule = BaseRule; +/** + * Rules always have a severity. + * Severity indicates what to do if the rule is found to be broken + * 0 - Disable this rule + * 1 - Warn for violations + * 2 - Error for violations + */ +export declare enum RuleConfigSeverity { + Disabled = 0, + Warning = 1, + Error = 2 +} +/** + * Rules always have a condition. + * It can be either "always" (as tested), or "never" (as tested). + * For example, `header-full-stop` can be enforced as "always" or "never". + */ +export type RuleConfigCondition = "always" | "never"; +export type RuleConfigTuple = T extends void ? Readonly<[RuleConfigSeverity.Disabled]> | Readonly<[RuleConfigSeverity, RuleConfigCondition]> : Readonly<[RuleConfigSeverity.Disabled]> | Readonly<[RuleConfigSeverity, RuleConfigCondition, T]>; +export declare enum RuleConfigQuality { + User = 0, + Qualified = 1 +} +export interface RuleConfigContext { + cwd?: string; +} +export type QualifiedRuleConfig = ((ctx?: RuleConfigContext) => RuleConfigTuple) | ((ctx?: RuleConfigContext) => Promise>) | RuleConfigTuple; +export type RuleConfig = V extends RuleConfigQuality.Qualified ? RuleConfigTuple : QualifiedRuleConfig; +export type CaseRuleConfig = RuleConfig; +export type LengthRuleConfig = RuleConfig; +export type EnumRuleConfig = RuleConfig; +export type ObjectRuleConfig> = RuleConfig; +export type RulesConfig = { + "body-case": CaseRuleConfig; + "body-empty": RuleConfig; + "body-full-stop": RuleConfig; + "body-leading-blank": RuleConfig; + "body-max-length": LengthRuleConfig; + "body-max-line-length": LengthRuleConfig; + "body-min-length": LengthRuleConfig; + "breaking-change-exclamation-mark": RuleConfig; + "footer-empty": RuleConfig; + "footer-leading-blank": RuleConfig; + "footer-max-length": LengthRuleConfig; + "footer-max-line-length": LengthRuleConfig; + "footer-min-length": LengthRuleConfig; + "header-case": CaseRuleConfig; + "header-full-stop": RuleConfig; + "header-max-length": LengthRuleConfig; + "header-min-length": LengthRuleConfig; + "header-trim": RuleConfig; + "references-empty": RuleConfig; + "scope-case": CaseRuleConfig | ObjectRuleConfig; + "scope-delimiter-style": EnumRuleConfig; + "scope-empty": RuleConfig; + "scope-enum": EnumRuleConfig | ObjectRuleConfig; + "scope-max-length": LengthRuleConfig; + "scope-min-length": LengthRuleConfig; + "signed-off-by": RuleConfig; + "subject-case": CaseRuleConfig; + "subject-empty": RuleConfig; + "subject-full-stop": RuleConfig; + "subject-max-length": LengthRuleConfig; + "subject-min-length": LengthRuleConfig; + "trailer-exists": RuleConfig; + "type-case": CaseRuleConfig; + "type-empty": RuleConfig; + "type-enum": EnumRuleConfig; + "type-max-length": LengthRuleConfig; + "type-min-length": LengthRuleConfig; + [key: string]: AnyRuleConfig; +}; +export type AnyRuleConfig = RuleConfig | RuleConfig; +//# sourceMappingURL=rules.d.ts.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/rules.d.ts.map b/node_modules/@commitlint/types/lib/rules.d.ts.map new file mode 100644 index 000000000..faeb703eb --- /dev/null +++ b/node_modules/@commitlint/types/lib/rules.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnD,MAAM,MAAM,QAAQ,CAAC,KAAK,GAAG,KAAK,EAAE,IAAI,SAAS,QAAQ,GAAG,QAAQ,IAAI,CACvE,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,mBAAmB,EAC1B,KAAK,CAAC,EAAE,KAAK,KACT,IAAI,SAAS,QAAQ,GACvB,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,GAClC,IAAI,SAAS,OAAO,GACnB,OAAO,CAAC,WAAW,CAAC,GACpB,IAAI,SAAS,MAAM,GAClB,WAAW,GACX,KAAK,CAAC;AAEX,MAAM,MAAM,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC5D,MAAM,M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,CAAC;IAC1C,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC1C,gBAAgB,EAAE,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC/B,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC/B,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACvC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAEvC,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/rules.js b/node_modules/@commitlint/types/lib/rules.js new file mode 100644 index 000000000..c107e42f7 --- /dev/null +++ b/node_modules/@commitlint/types/lib/rules.js @@ -0,0 +1,19 @@ +/** + * Rules always have a severity. + * Severity indicates what to do if the rule is found to be broken + * 0 - Disable this rule + * 1 - Warn for violations + * 2 - Error for violations + */ +export var RuleConfigSeverity; +(function (RuleConfigSeverity) { + RuleConfigSeverity[RuleConfigSeverity["Disabled"] = 0] = "Disabled"; + RuleConfigSeverity[RuleConfigSeverity["Warning"] = 1] = "Warning"; + RuleConfigSeverity[RuleConfigSeverity["Error"] = 2] = "Error"; +})(RuleConfigSeverity || (RuleConfigSeverity = {})); +export var RuleConfigQuality; +(function (RuleConfigQuality) { + RuleConfigQuality[RuleConfigQuality["User"] = 0] = "User"; + RuleConfigQuality[RuleConfigQuality["Qualified"] = 1] = "Qualified"; +})(RuleConfigQuality || (RuleConfigQuality = {})); +//# sourceMappingURL=rules.js.map \ No newline at end of file diff --git a/node_modules/@commitlint/types/lib/rules.js.map b/node_modules/@commitlint/types/lib/rules.js.map new file mode 100644 index 000000000..12f2b3279 --- /dev/null +++ b/node_modules/@commitlint/types/lib/rules.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rules.js","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAiCA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC7B,mEAAY,CAAA;IACZ,iEAAW,CAAA;IACX,6DAAS,CAAA;AACV,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAeD,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,yDAAI,CAAA;IACJ,mEAAS,CAAA;AACV,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"} \ No newline at end of file diff --git a/node_modules/@commitlint/types/license.md b/node_modules/@commitlint/types/license.md new file mode 100644 index 000000000..9f7de6529 --- /dev/null +++ b/node_modules/@commitlint/types/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present Mario Nebl + +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. diff --git a/node_modules/@commitlint/types/package.json b/node_modules/@commitlint/types/package.json new file mode 100644 index 000000000..0f6a698c4 --- /dev/null +++ b/node_modules/@commitlint/types/package.json @@ -0,0 +1,39 @@ +{ + "name": "@commitlint/types", + "version": "21.2.3", + "gitHead": "95d40569d2592bf9719bc27da2d51fc6b801e4ef", + "description": "Shared types for commitlint packages", + "homepage": "https://commitlint.js.org/", + "bugs": { + "url": "https://github.com/conventional-changelog/commitlint/issues" + }, + "license": "MIT", + "author": { + "name": "Mario Nebl", + "email": "hello@herebecode.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/commitlint.git", + "directory": "@commitlint/types" + }, + "files": [ + "lib/" + ], + "type": "module", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "pkg": "pkg-check" + }, + "dependencies": { + "conventional-commits-parser": "^7.0.0", + "picocolors": "^1.1.1" + }, + "devDependencies": { + "@commitlint/utils": "^21.0.1" + }, + "engines": { + "node": ">=22.12.0" + } +} diff --git a/node_modules/@conventional-changelog/git-client/LICENSE.md b/node_modules/@conventional-changelog/git-client/LICENSE.md new file mode 100644 index 000000000..97b4ed538 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/LICENSE.md @@ -0,0 +1,21 @@ +### MIT License + +Copyright © [conventional-changelog team](https://github.com/conventional-changelog) + +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. diff --git a/node_modules/@conventional-changelog/git-client/README.md b/node_modules/@conventional-changelog/git-client/README.md new file mode 100644 index 000000000..ebf102c10 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/README.md @@ -0,0 +1,75 @@ +# @conventional-changelog/git-client + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/@conventional-changelog/git-client.svg +[npm-url]: https://npmjs.com/package/@conventional-changelog/git-client + +[node]: https://img.shields.io/node/v/@conventional-changelog/git-client.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/@conventional-changelog/git-client +[deps-url]: https://libraries.io/npm/@conventional-changelog%2Fgit-client + +[size]: https://packagephobia.com/badge?p=@conventional-changelog/git-client +[size-url]: https://packagephobia.com/result?p=@conventional-changelog/git-client + +[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master +[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions + +[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master + +Simple git client for conventional changelog packages. + +## Install + +```bash +# pnpm +pnpm add @conventional-changelog/git-client conventional-commits-filter conventional-commits-parser +# yarn +yarn add @conventional-changelog/git-client conventional-commits-filter conventional-commits-parser +# npm +npm i @conventional-changelog/git-client conventional-commits-filter conventional-commits-parser +``` + +Note: `conventional-commits-filter` and `conventional-commits-parser` are required only if you need `ConventionalGitClient#getCommits` method. + +## Usage + +```js +import { + GitClient, + ConventionalGitClient +} from '@conventional-changelog/git-client' + +// Basic git client +const client = new GitClient(process.cwd()) + +await client.add('package.json') +await client.commit({ message: 'chore: release v1.0.0' }) +await client.tag({ name: 'v1.0.0' }) +await client.push('master') + +// Conventional git client, which extends basic git client +const conventionalClient = new ConventionalGitClient(process.cwd()) + +console.log(await conventionalClient.getVersionFromTags()) // v1.0.0 +``` + +## Documentation + +For the API reference, visit the [documentation website](https://conventional-changelog.js.org/git-client/). + +## License + +MIT © [Dan Onoshko](https://github.com/dangreen) diff --git a/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.d.ts b/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.d.ts new file mode 100644 index 000000000..93a82af80 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.d.ts @@ -0,0 +1,53 @@ +import type { ParserStreamOptions, Commit } from 'conventional-commits-parser'; +import type { GetCommitsParams, GetSemverTagsParams } from './types.js'; +import { GitClient } from './GitClient.js'; +/** + * Helper to get package tag prefix. + * @param packageName + * @returns Tag prefix. + */ +export declare function packagePrefix(packageName?: string): string | RegExp; +/** + * Wrapper around Git CLI with conventional commits support. + */ +export declare class ConventionalGitClient extends GitClient { + private deps; + private loadDeps; + /** + * Get parsed commits stream. + * @param params + * @param params.path - Read commits from specific path. + * @param params.from - Start commits range. + * @param params.to - End commits range. + * @param params.format - Commits format. + * @param parserOptions - Commit parser options. + * @yields Raw commits data. + */ + getCommits(params?: GetCommitsParams, parserOptions?: ParserStreamOptions): AsyncIterable; + /** + * Get semver tags stream. + * @param params + * @param params.prefix - Get semver tags with specific prefix. + * @param params.skipUnstable - Skip semver tags with unstable versions. + * @param params.clean - Clean version from prefix and trash. + * @param params.path - Read tags from specific path. + * @param params.from - Start tags range. + * @param params.to - End tags range. + * @param params.since - Get tags since specific date. + * @yields Semver tags. + */ + getSemverTags(params?: GetSemverTagsParams): AsyncGenerator; + /** + * Get last semver tag. + * @param params - getSemverTags params. + * @returns Last semver tag, `null` if not found. + */ + getLastSemverTag(params?: GetSemverTagsParams): Promise; + /** + * Get current sematic version from git tags. + * @param params - Additional git params. + * @returns Current sematic version, `null` if not found. + */ + getVersionFromTags(params?: GetSemverTagsParams): Promise; +} +//# sourceMappingURL=ConventionalGitClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.d.ts.map b/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.d.ts.map new file mode 100644 index 000000000..1b9df744b --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ConventionalGitClient.d.ts","sourceRoot":"","sources":["../src/ConventionalGitClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,MAAM,EAEP,MAAM,6BAA6B,CAAA;AAQpC,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,CAAC,EAAE,MAAM,mBAMjD;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,OAAO,CAAC,IAAI,CAA4E;IAExF,OAAO,CAAC,QAAQ;IAehB;;;;;;;;;OASG;IACI,UAAU,CACf,MAAM,GAAE,gBAAqB,EAC7B,aAAa,GAAE,mBAAwB,GACtC,aAAa,CAAC,MAAM,CAAC,CAavB;IAED;;;;;;;;;;;OAWG;IACI,aAAa,CAAC,MAAM,GAAE,mBAAwB,yCAuCpD;IAED;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,GAAE,mBAAwB,0BAEtD;IAED;;;;OAIG;IACG,kBAAkB,CAAC,MAAM,GAAE,mBAAwB,0BAgBxD;CACF"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js b/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js new file mode 100644 index 000000000..6852cf7c0 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js @@ -0,0 +1,125 @@ +import { clean as cleanVersion, compareReversed, isValid } from 'verkit'; +import { firstFromStream } from '@simple-libs/stream-utils'; +import { isPrereleaseVersion } from './utils.js'; +import { GitClient } from './GitClient.js'; +/** + * Helper to get package tag prefix. + * @param packageName + * @returns Tag prefix. + */ +export function packagePrefix(packageName) { + if (!packageName) { + return /^.+@/; + } + return `${packageName}@`; +} +/** + * Wrapper around Git CLI with conventional commits support. + */ +export class ConventionalGitClient extends GitClient { + deps = null; + loadDeps() { + if (this.deps) { + return this.deps; + } + this.deps = Promise.all([ + import('conventional-commits-parser') + .then(({ parseCommits }) => parseCommits), + import('conventional-commits-filter') + .then(({ filterRevertedCommits }) => filterRevertedCommits) + ]); + return this.deps; + } + /** + * Get parsed commits stream. + * @param params + * @param params.path - Read commits from specific path. + * @param params.from - Start commits range. + * @param params.to - End commits range. + * @param params.format - Commits format. + * @param parserOptions - Commit parser options. + * @yields Raw commits data. + */ + async *getCommits(params = {}, parserOptions = {}) { + const { filterReverts, ...gitLogParams } = params; + const [parseCommits, filterRevertedCommits] = await this.loadDeps(); + if (filterReverts) { + yield* filterRevertedCommits(this.getCommits(gitLogParams, parserOptions)); + return; + } + const parse = parseCommits(parserOptions); + const commitsStream = this.getRawCommits(gitLogParams); + yield* parse(commitsStream); + } + /** + * Get semver tags stream. + * @param params + * @param params.prefix - Get semver tags with specific prefix. + * @param params.skipUnstable - Skip semver tags with unstable versions. + * @param params.clean - Clean version from prefix and trash. + * @param params.path - Read tags from specific path. + * @param params.from - Start tags range. + * @param params.to - End tags range. + * @param params.since - Get tags since specific date. + * @yields Semver tags. + */ + async *getSemverTags(params = {}) { + const { prefix, skipUnstable, clean, ...getTagsParams } = params; + const tagsStream = this.getTags(getTagsParams); + const cleanTag = clean + ? (tag, unprefixed) => cleanVersion(unprefixed || tag) + : (tag) => tag; + let unprefixed; + let tag; + for await (tag of tagsStream) { + if (prefix) { + const isPrefixed = typeof prefix === 'string' + ? tag.startsWith(prefix) + : prefix.test(tag); + if (isPrefixed) { + unprefixed = tag.replace(prefix, ''); + if (isValid(unprefixed) && !(skipUnstable && isPrereleaseVersion(unprefixed))) { + tag = cleanTag(tag, unprefixed); + if (tag) { + yield tag; + } + } + } + } + else if (isValid(tag) && !(skipUnstable && isPrereleaseVersion(tag))) { + tag = cleanTag(tag); + if (tag) { + yield tag; + } + } + } + } + /** + * Get last semver tag. + * @param params - getSemverTags params. + * @returns Last semver tag, `null` if not found. + */ + async getLastSemverTag(params = {}) { + return firstFromStream(this.getSemverTags(params)); + } + /** + * Get current sematic version from git tags. + * @param params - Additional git params. + * @returns Current sematic version, `null` if not found. + */ + async getVersionFromTags(params = {}) { + const semverTagsStream = this.getSemverTags({ + clean: true, + ...params + }); + const semverTags = []; + for await (const tag of semverTagsStream) { + semverTags.push(tag); + } + if (!semverTags.length) { + return null; + } + return semverTags.sort(compareReversed)[0] || null; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29udmVudGlvbmFsR2l0Q2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0NvbnZlbnRpb25hbEdpdENsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxPQUFPLEVBQ0wsS0FBSyxJQUFJLFlBQVksRUFDckIsZUFBZSxFQUNmLE9BQU8sRUFDUixNQUFNLFFBQVEsQ0FBQTtBQUNmLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTtBQUszRCxPQUFPLEVBQUUsbUJBQ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tBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLEdBQXdCLEVBQUU7UUFDckQsT0FBTyxlQUFlLENBQUMsSUFBSSxDQUFDLGFBQWEsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFBO0lBQ3BELENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE1BQU0sR0FBd0IsRUFBRTtRQUN2RCxNQUFNLGdCQUFnQixHQUFHLElBQUksQ0FBQyxhQUFhLENBQUM7WUFDMUMsS0FBSyxFQUFFLElBQUk7WUFDWCxHQUFHLE1BQU07U0FDVixDQUFDLENBQUE7UUFDRixNQUFNLFVBQVUsR0FBYSxFQUFFLENBQUE7UUFFL0IsSUFBSSxLQUFLLEVBQUUsTUFBTSxHQUFHLElBQUksZ0JBQWdCLEVBQUUsQ0FBQztZQUN6QyxVQUFVLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFBO1FBQ3RCLENBQUM7UUFFRCxJQUFJLENBQUMsVUFBVSxDQUFDLE1BQU0sRUFBRSxDQUFDO1lBQ3ZCLE9BQU8sSUFBSSxDQUFBO1FBQ2IsQ0FBQztRQUVELE9BQU8sVUFBVSxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUE7SUFDcEQsQ0FBQztDQUNGIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/GitClient.d.ts b/node_modules/@conventional-changelog/git-client/dist/GitClient.d.ts new file mode 100644 index 000000000..d4c22880f --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/GitClient.d.ts @@ -0,0 +1,136 @@ +import type { GitLogParams, GitLogTagsParams, GitCommitParams, GitTagParams, GitPushParams, GitFetchParams, Arg } from './types.js'; +/** + * Wrapper around Git CLI. + */ +export declare class GitClient { + readonly cwd: string; + debug?: ((log: string[]) => void) | undefined; + constructor(cwd: string, debug?: ((log: string[]) => void) | undefined); + private formatArgs; + /** + * Raw exec method to run git commands. + * @param args + * @returns Stdout string output of the command. + */ + exec(...args: Arg[]): Promise; + /** + * Raw exec method to run git commands with stream output. + * @param args + * @returns Stdout stream of the command. + */ + execStream(...args: Arg[]): AsyncGenerator, void, any>; + /** + * Initialize a new git repository. + * @returns Boolean result. + */ + init(): Promise; + /** + * Get raw commits stream. + * @param params + * @param params.path - Read commits from specific path. + * @param params.from - Start commits range. + * @param params.to - End commits range. + * @param params.format - Commits format. + * @yields Raw commits data. + */ + getRawCommits(params?: GitLogParams): AsyncGenerator; + /** + * Get tags stream. + * @param params + * @yields Tags + */ + getTags(params?: GitLogTagsParams): AsyncGenerator; + /** + * Get last tag. + * @param params + * @returns Last tag, `null` if not found. + */ + getLastTag(params?: GitLogTagsParams): Promise; + /** + * Check file is ignored via .gitignore. + * @param file - Path to target file. + * @returns Boolean value. + */ + checkIgnore(file: string): Promise; + /** + * Add files to git index. + * @param files - Files to stage. + */ + add(files: string | string[]): Promise; + /** + * Commit changes. + * @param params + * @param params.verify + * @param params.sign + * @param params.files + * @param params.allowEmpty + * @param params.message + */ + commit(params: GitCommitParams): Promise; + /** + * Create a tag for the current commit. + * @param params + * @param params.sign + * @param params.name + * @param params.message + */ + tag(params: GitTagParams): Promise; + /** + * Get current branch name. + * @returns Current branch name. + */ + getCurrentBranch(): Promise; + /** + * Get default branch name. + * @returns Default branch name. + */ + getDefaultBranch(): Promise; + /** + * Push changes to remote. + * @param branch + * @param params + * @param params.verify + */ + push(branch: string, params?: GitPushParams): Promise; + /** + * Verify rev exists. + * @param rev + * @param safe - If `true`, will not throw error if rev not found. + * @returns Target hash. + */ + verify(rev: string, safe?: boolean): Promise; + /** + * Get config value by key. + * @param key - Config key. + * @returns Config value. + */ + getConfig(key: string): Promise; + /** + * Set config value by key. + * @param key - Config key. + * @param value - Config value. + */ + setConfig(key: string, value: string): Promise; + /** + * Fetch changes from remote. + * @param params + */ + fetch(params?: GitFetchParams): Promise; + /** + * Create a new branch. + * Name is a value of the `-b` option, so it is never parsed as an option itself. + * @param branch - Branch name. + */ + createBranch(branch: string): Promise; + /** + * Delete a branch. + * @param branch - Branch name. + */ + deleteBranch(branch: string): Promise; + /** + * Checkout a branch. + * @param branch - Branch name. + */ + checkout(branch: string): Promise; +} +//# sourceMappingURL=GitClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/GitClient.d.ts.map b/node_modules/@conventional-changelog/git-client/dist/GitClient.d.ts.map new file mode 100644 index 000000000..67d50a458 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/GitClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GitClient.d.ts","sourceRoot":"","sources":["../src/GitClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,cAAc,EACd,GAAG,EACJ,MAAM,YAAY,CAAA;AAWnB;;GAEG;AACH,qBAAa,SAAS;IAElB,QAAQ,CAAC,GAAG,EAAE,MAAM;IACb,KAAK,CAAC,GAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI;IAFxC,YACW,GAAG,EAAE,MAAM,EACb,KAAK,CAAC,GAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,aAAA,EACpC;IAEJ,OAAO,CAAC,UAAU;IAUlB;;;;OAIG;IACG,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,mBAMxB;IAED;;;;OAIG;IACH,UAAU,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,sDAIxB;IAED;;;OAGG;IACG,IAAI,qBAQT;IAED;;;;;;;;OAQG;IACI,aAAa,CAAC,MAAM,GAAE,YAAiB,yCAmC7C;IAED;;;;OAIG;IACI,OAAO,CAAC,MAAM,GAAE,gBAAqB,yCA+B3C;IAED;;;;OAIG;IACG,UAAU,CAAC,MAAM,CAAC,EAAE,gBAAgB,0BAEzC;IAED;;;;OAIG;IACG,WAAW,CAAC,IAAI,EAAE,MAAM,oBAY7B;IAED;;;OAGG;IACG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,iBAMjC;IAED;;;;;;;;OAQG;IACG,MAAM,CAAC,MAAM,EAAE,eAAe,iBAmBnC;IAED;;;;;;OAMG;IACG,GAAG,CAAC,MAAM,EAAE,YAAY,iBAmB7B;IAED;;;OAGG;IACG,gBAAgB,oBAQrB;IAED;;;OAGG;IACG,gBAAgB,oBAUrB;IAED;;;;;OAKG;IACG,IAAI,CACR,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,aAAkB,iBAmB3B;IAED;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,mBAavC;IAED;;;;OAIG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,mBAO1B;IAED;;;;OAIG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iBAOzC;IAED;;;OAGG;IACG,KAAK,CAAC,MAAM,GAAE,cAAmB,iBAwBtC;IAED;;;;OAIG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,iBAMhC;IAED;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,iBAOhC;IAED;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,iBAM5B;CACF"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/GitClient.js b/node_modules/@conventional-changelog/git-client/dist/GitClient.js new file mode 100644 index 000000000..19265f07b --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/GitClient.js @@ -0,0 +1,249 @@ +import { spawn } from 'child_process'; +import { firstFromStream, splitStream } from '@simple-libs/stream-utils'; +import { output, outputStream } from '@simple-libs/child-process-utils'; +import { formatArgs, toArray } from './utils.js'; +const SCISSOR = '------------------------ >8 ------------------------'; +// Marks the end of the options, so a value which starts with a dash +// is never parsed as a git option. Unlike `--` it works for revisions too. +const END_OF_OPTIONS = '--end-of-options'; +/** + * Wrapper around Git CLI. + */ +export class GitClient { + cwd; + debug; + constructor(cwd, debug) { + this.cwd = cwd; + this.debug = debug; + } + formatArgs(...args) { + const finalArgs = formatArgs(...args); + if (this.debug) { + this.debug(finalArgs); + } + return finalArgs; + } + /** + * Raw exec method to run git commands. + * @param args + * @returns Stdout string output of the command. + */ + async exec(...args) { + return (await output(spawn('git', this.formatArgs(...args), { + cwd: this.cwd + }))).toString().trim(); + } + /** + * Raw exec method to run git commands with stream output. + * @param args + * @returns Stdout stream of the command. + */ + execStream(...args) { + return outputStream(spawn('git', this.formatArgs(...args), { + cwd: this.cwd + })); + } + /** + * Initialize a new git repository. + * @returns Boolean result. + */ + async init() { + try { + await this.exec('init'); + return true; + } + catch { + return false; + } + } + /** + * Get raw commits stream. + * @param params + * @param params.path - Read commits from specific path. + * @param params.from - Start commits range. + * @param params.to - End commits range. + * @param params.format - Commits format. + * @yields Raw commits data. + */ + async *getRawCommits(params = {}) { + const { path, from = '', to = 'HEAD', format = '%B', ignore, reverse, merges, since, firstParent } = params; + const shouldNotIgnore = ignore + ? (chunk) => !ignore.test(chunk) + : () => true; + const stdout = this.execStream('log', `--format=${format}%n${SCISSOR}`, since && `--since=${since instanceof Date ? since.toISOString() : since}`, reverse && '--reverse', merges && '--merges', merges === false && '--no-merges', firstParent && '--first-parent', END_OF_OPTIONS, [from, to].filter(Boolean).join('..'), ...path ? ['--', ...toArray(path)] : []); + const commitsStream = splitStream(stdout, `${SCISSOR}\n`); + let chunk; + for await (chunk of commitsStream) { + if (shouldNotIgnore(chunk)) { + yield chunk; + } + } + } + /** + * Get tags stream. + * @param params + * @yields Tags + */ + async *getTags(params = {}) { + const { path, from = '', to = 'HEAD', since, all } = params; + const tagRegex = /tag:\s*(.+?)[,)]/gi; + const stdout = this.execStream('log', '--decorate', '--no-color', '--date-order', all && '--all', since && `--since=${since instanceof Date ? since.toISOString() : since}`, END_OF_OPTIONS, [from, to].filter(Boolean).join('..'), ...path ? ['--', ...toArray(path)] : []); + let chunk; + let matches; + let tag; + for await (chunk of stdout) { + matches = chunk.toString().trim().matchAll(tagRegex); + for ([, tag] of matches) { + yield tag; + } + } + } + /** + * Get last tag. + * @param params + * @returns Last tag, `null` if not found. + */ + async getLastTag(params) { + return firstFromStream(this.getTags(params)); + } + /** + * Check file is ignored via .gitignore. + * @param file - Path to target file. + * @returns Boolean value. + */ + async checkIgnore(file) { + try { + await this.exec('check-ignore', '--', file); + return true; + } + catch { + return false; + } + } + /** + * Add files to git index. + * @param files - Files to stage. + */ + async add(files) { + await this.exec('add', '--', ...toArray(files)); + } + /** + * Commit changes. + * @param params + * @param params.verify + * @param params.sign + * @param params.files + * @param params.allowEmpty + * @param params.message + */ + async commit(params) { + const { verify = true, sign = false, files = [], allowEmpty = false, message } = params; + await this.exec('commit', !verify && '--no-verify', sign && '-S', allowEmpty && '--allow-empty', '-m', message, '--', ...files); + } + /** + * Create a tag for the current commit. + * @param params + * @param params.sign + * @param params.name + * @param params.message + */ + async tag(params) { + let { sign = false, name, message } = params; + if (sign) { + message = ''; + } + await this.exec('tag', sign && '-s', message && '-a', ...message ? ['-m', message] : [], '--', name); + } + /** + * Get current branch name. + * @returns Current branch name. + */ + async getCurrentBranch() { + const branch = await this.exec('rev-parse', '--abbrev-ref', 'HEAD'); + return branch; + } + /** + * Get default branch name. + * @returns Default branch name. + */ + async getDefaultBranch() { + const branch = (await this.exec('rev-parse', '--abbrev-ref', 'origin/HEAD')).replace(/^origin\//, ''); + return branch; + } + /** + * Push changes to remote. + * @param branch + * @param params + * @param params.verify + */ + async push(branch, params = {}) { + const { verify = true, tags = false, followTags = false, force = false } = params; + await this.exec('push', followTags && '--follow-tags', tags && '--tags', !verify && '--no-verify', force && '--force', 'origin', '--', branch); + } + /** + * Verify rev exists. + * @param rev + * @param safe - If `true`, will not throw error if rev not found. + * @returns Target hash. + */ + async verify(rev, safe) { + let git = this.exec('rev-parse', '--verify', END_OF_OPTIONS, rev); + if (safe) { + git = git.catch(() => ''); + } + return await git; + } + /** + * Get config value by key. + * @param key - Config key. + * @returns Config value. + */ + async getConfig(key) { + return await this.exec('config', '--get', '--', key); + } + /** + * Set config value by key. + * @param key - Config key. + * @param value - Config value. + */ + async setConfig(key, value) { + await this.exec('config', '--', key, value); + } + /** + * Fetch changes from remote. + * @param params + */ + async fetch(params = {}) { + const { prune = false, unshallow = false, tags = false, all = false, remote, branch } = params; + await this.exec('fetch', prune && '--prune', unshallow && '--unshallow', tags && '--tags', all && '--all', ...remote && branch + ? [ + '--', + remote, + branch + ] + : []); + } + /** + * Create a new branch. + * Name is a value of the `-b` option, so it is never parsed as an option itself. + * @param branch - Branch name. + */ + async createBranch(branch) { + await this.exec('checkout', '-b', branch); + } + /** + * Delete a branch. + * @param branch - Branch name. + */ + async deleteBranch(branch) { + await this.exec('branch', '-D', '--', branch); + } + /** + * Checkout a branch. + * @param branch - Branch name. + */ + async checkout(branch) { + await this.exec('checkout', END_OF_OPTIONS, branch); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR2l0Q2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0dpdENsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ3JDLE9BQU8sRUFDTCxlQUFlLEVBQ2YsV0FBVyxFQUNaLE1BQU0sMkJBQTJCLENBQUE7QUFDbEMsT0FBTyxFQUNMLE1BQU0sRUFDTixZQUFZLEVBQ2IsTUFBTSxrQ0FBa0MsQ0FBQTtBQVV6QyxPQUFPLEVBQ0wsVUFBVSxFQUNWLE9BQU8sRUFDUixNQUFNLFlBQVksQ0FBQTtBQUVuQixNQUFNLE9BQU8sR0FBRyxzREFBc0QsQ0FBQTtBQUN0RSxvRUFBb0U7QUFDcE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UFBSSxDQUNiLE9BQU8sRUFDUCxLQUFLLElBQUksU0FBUyxFQUNsQixTQUFTLElBQUksYUFBYSxFQUMxQixJQUFJLElBQUksUUFBUSxFQUNoQixHQUFHLElBQUksT0FBTyxFQUNkLEdBQUcsTUFBTSxJQUFJLE1BQU07WUFDakIsQ0FBQyxDQUFDO2dCQUNBLElBQUk7Z0JBQ0osTUFBTTtnQkFDTixNQUFNO2FBQ1A7WUFDRCxDQUFDLENBQUMsRUFBRSxDQUNQLENBQUE7SUFDSCxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNILEtBQUssQ0FBQyxZQUFZLENBQUMsTUFBYztRQUMvQixNQUFNLElBQUksQ0FBQyxJQUFJLENBQ2IsVUFBVSxFQUNWLElBQUksRUFDSixNQUFNLENBQ1AsQ0FBQTtJQUNILENBQUM7SUFFRDs7O09BR0c7SUFDSCxLQUFLLENBQUMsWUFBWSxDQUFDLE1BQWM7UUFDL0IsTUFBTSxJQUFJLENBQUMsSUFBSSxDQUNiLFFBQVEsRUFDUixJQUFJLEVBQ0osSUFBSSxFQUNKLE1BQU0sQ0FDUCxDQUFBO0lBQ0gsQ0FBQztJQUVEOzs7T0FHRztJQUNILEtBQUssQ0FBQyxRQUFRLENBQUMsTUFBYztRQUMzQixNQUFNLElBQUksQ0FBQyxJQUFJLENBQ2IsVUFBVSxFQUNWLGNBQWMsRUFDZCxNQUFNLENBQ1AsQ0FBQTtJQUNILENBQUM7Q0FDRiJ9 \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/index.d.ts b/node_modules/@conventional-changelog/git-client/dist/index.d.ts new file mode 100644 index 000000000..df3e199ba --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/index.d.ts @@ -0,0 +1,5 @@ +export type * from './types.js'; +export * from './utils.js'; +export * from './GitClient.js'; +export * from './ConventionalGitClient.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/index.d.ts.map b/node_modules/@conventional-changelog/git-client/dist/index.d.ts.map new file mode 100644 index 000000000..3f02c687c --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/index.js b/node_modules/@conventional-changelog/git-client/dist/index.js new file mode 100644 index 000000000..5bfbdf470 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/index.js @@ -0,0 +1,4 @@ +export * from './utils.js'; +export * from './GitClient.js'; +export * from './ConventionalGitClient.js'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxnQkFBZ0IsQ0FBQTtBQUM5QixjQUFjLDRCQUE0QixDQUFBIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/types.d.ts b/node_modules/@conventional-changelog/git-client/dist/types.d.ts new file mode 100644 index 000000000..3c33d7a95 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/types.d.ts @@ -0,0 +1,92 @@ +export interface GitLogParams { + /** + * Read commits from specific path. + */ + path?: string | string[]; + /** + * Start commits range. + */ + from?: string; + /** + * End commits range. + */ + to?: string; + /** + * Commits format. + */ + format?: string; + /** + * Pattern to filter commits. + */ + ignore?: RegExp; + /** + * Get commits since specific date. + */ + since?: Date | string; + /** + * Get commits in reverse order. + */ + reverse?: boolean; + /** + * Get merge commits or not. + */ + merges?: boolean; + /** + * Only follow the first parent of merge commits. + */ + firstParent?: boolean; +} +export interface GitLogTagsParams extends Pick { + /** + * Walk all refs (branches and tags) instead of the current branch history. + */ + all?: boolean; +} +export interface GetCommitsParams extends GitLogParams { + /** + * Enable revert commits filter. + */ + filterReverts?: boolean; +} +export interface GitCommitParams { + verify?: boolean; + sign?: boolean; + files?: string[]; + allowEmpty?: boolean; + message: string; +} +export interface GitTagParams { + sign?: boolean; + name: string; + message?: string; +} +export interface GitPushParams { + verify?: boolean; + tags?: boolean; + followTags?: boolean; + force?: boolean; +} +export interface GitFetchParams { + prune?: boolean; + unshallow?: boolean; + tags?: boolean; + all?: boolean; + remote?: string; + branch?: string; +} +export interface GetSemverTagsParams extends GitLogTagsParams { + /** + * Get semver tags with specific prefix. + */ + prefix?: string | RegExp; + /** + * Skip semver tags with unstable versions. + */ + skipUnstable?: boolean; + /** + * Clean version from prefix and trash. + */ + clean?: boolean; +} +export type Arg = string | false | null | undefined; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/types.d.ts.map b/node_modules/@conventional-changelog/git-client/dist/types.d.ts.map new file mode 100644 index 000000000..fe1ef7914 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CA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,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAA"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/types.js b/node_modules/@conventional-changelog/git-client/dist/types.js new file mode 100644 index 000000000..a0dabde2e --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/utils.d.ts b/node_modules/@conventional-changelog/git-client/dist/utils.d.ts new file mode 100644 index 000000000..883a012ec --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/utils.d.ts @@ -0,0 +1,20 @@ +import type { Arg } from './types.js'; +/** + * Format arguments. + * @param args + * @returns Formatted arguments. + */ +export declare function formatArgs(...args: Arg[]): string[]; +/** + * Convert value to array. + * @param value + * @returns Array. + */ +export declare function toArray(value: T | T[]): T[]; +/** + * Check if version is a prerelease, e.g. 1.0.0-alpha.1, 1.0.0-rc.2. + * @param version + * @returns True if version is a prerelease. + */ +export declare function isPrereleaseVersion(version: string): boolean; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/utils.d.ts.map b/node_modules/@conventional-changelog/git-client/dist/utils.d.ts.map new file mode 100644 index 000000000..273ad1970 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAErC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,CAQnD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,OAExC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,WAElD"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/dist/utils.js b/node_modules/@conventional-changelog/git-client/dist/utils.js new file mode 100644 index 000000000..6badd0cf7 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/dist/utils.js @@ -0,0 +1,31 @@ +import { isPrerelease } from 'verkit'; +/** + * Format arguments. + * @param args + * @returns Formatted arguments. + */ +export function formatArgs(...args) { + return args.reduce((finalArgs, arg) => { + if (arg) { + finalArgs.push(String(arg)); + } + return finalArgs; + }, []); +} +/** + * Convert value to array. + * @param value + * @returns Array. + */ +export function toArray(value) { + return Array.isArray(value) ? value : [value]; +} +/** + * Check if version is a prerelease, e.g. 1.0.0-alpha.1, 1.0.0-rc.2. + * @param version + * @returns True if version is a prerelease. + */ +export function isPrereleaseVersion(version) { + return isPrerelease(version) === true; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUdyQzs7OztHQUlHO0FBQ0gsTUFBTSxVQUFVLFVBQVUsQ0FBQyxHQUFHLElBQVc7SUFDdkMsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFXLENBQUMsU0FBUyxFQUFFLEdBQUcsRUFBRSxFQUFFO1FBQzlDLElBQUksR0FBRyxFQUFFLENBQUM7WUFDUixTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFBO1FBQzdCLENBQUM7UUFFRCxPQUFPLFNBQVMsQ0FBQTtJQUNsQixDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUE7QUFDUixDQUFDO0FBRUQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxPQUFPLENBQUksS0FBYztJQUN2QyxPQUFPLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQTtBQUMvQyxDQUFDO0FBRUQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxtQkFBbUIsQ0FBQyxPQUFlO0lBQ2pELE9BQU8sWUFBWSxDQUFDLE9BQU8sQ0FBQyxLQUFLLElBQUksQ0FBQTtBQUN2QyxDQUFDIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/git-client/package.json b/node_modules/@conventional-changelog/git-client/package.json new file mode 100644 index 000000000..3f97f0986 --- /dev/null +++ b/node_modules/@conventional-changelog/git-client/package.json @@ -0,0 +1,54 @@ +{ + "name": "@conventional-changelog/git-client", + "type": "module", + "version": "3.2.0", + "description": "Simple git client for conventional changelog packages.", + "author": { + "name": "Dan Onoshko", + "email": "danon0404@gmail.com", + "url": "https://github.com/dangreen" + }, + "license": "MIT", + "homepage": "https://conventional-changelog.js.org/git-client/", + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/conventional-changelog.git", + "directory": "packages/git-client" + }, + "bugs": { + "url": "https://github.com/conventional-changelog/conventional-changelog/issues" + }, + "keywords": [ + "git", + "client", + "conventional", + "changelog" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "files": [ + "dist" + ], + "peerDependencies": { + "conventional-commits-filter": "^6.0.1", + "conventional-commits-parser": "^7.1.3" + }, + "peerDependenciesMeta": { + "conventional-commits-filter": { + "optional": true + }, + "conventional-commits-parser": { + "optional": true + } + }, + "dependencies": { + "@simple-libs/child-process-utils": "^2.0.0", + "@simple-libs/stream-utils": "^2.0.0", + "verkit": "^0.5.0" + } +} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/LICENSE.md b/node_modules/@conventional-changelog/template/LICENSE.md new file mode 100644 index 000000000..97b4ed538 --- /dev/null +++ b/node_modules/@conventional-changelog/template/LICENSE.md @@ -0,0 +1,21 @@ +### MIT License + +Copyright © [conventional-changelog team](https://github.com/conventional-changelog) + +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. diff --git a/node_modules/@conventional-changelog/template/README.md b/node_modules/@conventional-changelog/template/README.md new file mode 100644 index 000000000..52c87e35e --- /dev/null +++ b/node_modules/@conventional-changelog/template/README.md @@ -0,0 +1,66 @@ +# @conventional-changelog/template + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/@conventional-changelog/template.svg +[npm-url]: https://npmjs.com/package/@conventional-changelog/template + +[node]: https://img.shields.io/node/v/@conventional-changelog/template.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/@conventional-changelog/template +[deps-url]: https://libraries.io/npm/@conventional-changelog%2Ftemplate + +[size]: https://packagephobia.com/badge?p=@conventional-changelog/template +[size-url]: https://packagephobia.com/result?p=@conventional-changelog/template + +[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master +[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions + +[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master + +Template utilities for conventional changelog generation. + +## Install + +```bash +# pnpm +pnpm add @conventional-changelog/template +# yarn +yarn add @conventional-changelog/template +# npm +npm i @conventional-changelog/template +``` + +## Usage + +```js +import { + heading, + link, + list, + url +} from '@conventional-changelog/template' + +console.log(heading(2, 'Features')) // ## Features +console.log(link('commit', url('https://github.com/example/repo', 'commit', 'abc123'))) +console.log(list(['a', 'b'], item => item)) +``` + +## Documentation + +For the API reference, visit the [documentation website](https://conventional-changelog.js.org/template/). + +## License + +MIT © [Dan Onoshko](https://github.com/dangreen) diff --git a/node_modules/@conventional-changelog/template/dist/elements.d.ts b/node_modules/@conventional-changelog/template/dist/elements.d.ts new file mode 100644 index 000000000..3568180c5 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/elements.d.ts @@ -0,0 +1,78 @@ +/** + * Renders an array into newline-separated non-empty strings. + * @param array - Items to render. + * @param callback - Item renderer. + * @param separator - Separator inserted between rendered items. + * @returns Rendered string. + */ +export declare function each(array: T[] | null | undefined | false, callback: (item: T) => string | number | null | undefined | false, separator?: string): string; +/** + * Renders a Markdown heading. + * @param level - Markdown heading level. + * @param text - Heading text. + * @returns Markdown heading. + */ +export declare function heading(level: number, text: string): string; +/** + * Renders a Markdown link. + * @param text - Link text. + * @param url - Link URL. + * @returns Markdown link. + */ +export declare function link(text: string, url: string): string; +/** + * Renders an array into a Markdown unordered list. + * @param array - Items to render. + * @param callback - Item renderer. + * @returns Markdown unordered list. + */ +export declare function list(array: T[] | null | undefined | false, callback: (item: T) => string | null | undefined | false): string; +/** + * Renders bold Markdown text. + * @param text - Text to render. + * @returns Bold Markdown text. + */ +export declare function bold(text: string): string; +/** + * Renders italic Markdown text. + * @param text - Text to render. + * @returns Italic Markdown text. + */ +export declare function italic(text: string): string; +/** + * Renders text inside an HTML small element. + * @param text - Text to render. + * @returns HTML small element. + */ +export declare function small(text: string): string; +/** + * Creates one or more newline characters. + * @param times - Number of newline characters to render. + * @returns Newline characters. + */ +export declare function newline(times?: number): string; +/** + * Renders values without separators. + * @param values - Values to render. + * @returns Concatenated non-empty values. + */ +export declare function strings(...values: (string | number | null | undefined | false)[]): string; +/** + * Renders values as Markdown blocks separated by blank lines. + * @param values - Values to render. + * @returns Rendered non-empty block segments. + */ +export declare function segments(...values: (string | number | null | undefined | false)[]): string; +/** + * Renders values as space-separated words. + * @param values - Values to render. + * @returns Rendered non-empty words. + */ +export declare function words(...values: (string | number | null | undefined | false)[]): string; +/** + * Joins URL path segments and trims extra slashes around each segment. + * @param parts - URL path segments. + * @returns Joined URL. + */ +export declare function url(...parts: (string | number | null | undefined)[]): string; +//# sourceMappingURL=elements.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/elements.d.ts.map b/node_modules/@conventional-changelog/template/dist/elements.d.ts.map new file mode 100644 index 000000000..7b4ef275c --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/elements.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../src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AAM,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,EAAE,UAG1D;AAED;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,UAYnE"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/elements.js b/node_modules/@conventional-changelog/template/dist/elements.js new file mode 100644 index 000000000..1a0ced045 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/elements.js @@ -0,0 +1,132 @@ +/** + * Converts a renderable value to a string. + * @param value - Value to render. + * @returns String value, or an empty string for empty values. + */ +function toString(value) { + return typeof value === 'number' || value ? String(value) : ''; +} +/** + * Renders an array into newline-separated non-empty strings. + * @param array - Items to render. + * @param callback - Item renderer. + * @param separator - Separator inserted between rendered items. + * @returns Rendered string. + */ +export function each(array, callback, separator = newline()) { + return array + ? array.reduce((acc, item) => { + const rendered = toString(callback(item)).trim(); + return `${acc}${acc && rendered ? separator : ''}${rendered}`; + }, '') + : ''; +} +/** + * Renders a Markdown heading. + * @param level - Markdown heading level. + * @param text - Heading text. + * @returns Markdown heading. + */ +export function heading(level, text) { + return `${'#'.repeat(level)} ${text}`; +} +/** + * Renders a Markdown link. + * @param text - Link text. + * @param url - Link URL. + * @returns Markdown link. + */ +export function link(text, url) { + return `[${text}](${url})`; +} +/** + * Renders an array into a Markdown unordered list. + * @param array - Items to render. + * @param callback - Item renderer. + * @returns Markdown unordered list. + */ +export function list(array, callback) { + return each(array, (item) => { + const rendered = toString(callback(item)).trim(); + const itemText = rendered + .split(/\r?\n/) + .map((line, index) => (index > 0 && line + ? ` ${line}` + : line)) + .join('\n'); + return rendered ? `* ${itemText}` : ''; + }); +} +/** + * Renders bold Markdown text. + * @param text - Text to render. + * @returns Bold Markdown text. + */ +export function bold(text) { + return `**${text}**`; +} +/** + * Renders italic Markdown text. + * @param text - Text to render. + * @returns Italic Markdown text. + */ +export function italic(text) { + return `_${text}_`; +} +/** + * Renders text inside an HTML small element. + * @param text - Text to render. + * @returns HTML small element. + */ +export function small(text) { + return `${text}`; +} +/** + * Creates one or more newline characters. + * @param times - Number of newline characters to render. + * @returns Newline characters. + */ +export function newline(times = 1) { + return '\n'.repeat(times); +} +/** + * Renders values without separators. + * @param values - Values to render. + * @returns Concatenated non-empty values. + */ +export function strings(...values) { + return each(values, value => value, ''); +} +/** + * Renders values as Markdown blocks separated by blank lines. + * @param values - Values to render. + * @returns Rendered non-empty block segments. + */ +export function segments(...values) { + return each(values, value => value, newline(2)); +} +/** + * Renders values as space-separated words. + * @param values - Values to render. + * @returns Rendered non-empty words. + */ +export function words(...values) { + return each(values, value => value, ' '); +} +/** + * Joins URL path segments and trims extra slashes around each segment. + * @param parts - URL path segments. + * @returns Joined URL. + */ +export function url(...parts) { + return parts.reduce((acc, part) => { + if (typeof part !== 'number' && !part) { + return acc; + } + const segment = String(part).replace(/^\/+|\/+$/g, ''); + return acc + ? `${acc}/${segment}` + : segment; + }, ''); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZWxlbWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7R0FJRztBQUNILFNBQVMsUUFBUSxDQUFDLEtBQWlEO0lBQ2pFLE9BQU8sT0FBTyxLQUFLLEtBQUssUUFBUSxJQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUE7QUFDaEUsQ0FBQztBQUVEOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxJQUFJLENBQ2xCLEtBQXFDLEVBQ3JDLFFBQWlFLEVBQ2pFLFNBQVMsR0FBRyxPQUFPLEVBQUU7SUFFckI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O0FBQ3pDLENBQUM7QUFFRDs7OztHQUlHO0FBQ0gsTUFBTSxVQUFVLFFBQVEsQ0FDdEIsR0FBRyxNQUFzRDtJQUV6RCxPQUFPLElBQUksQ0FBQyxNQUFNLEVBQUUsS0FBSyxDQUFDLEVBQUUsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDakQsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsS0FBSyxDQUNuQixHQUFHLE1BQXNEO0lBRXpELE9BQU8sSUFBSSxDQUFDLE1BQU0sRUFBRSxLQUFLLENBQUMsRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUMsQ0FBQTtBQUMxQyxDQUFDO0FBRUQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxHQUFHLENBQUMsR0FBRyxLQUE2QztJQUNsRSxPQUFPLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQyxHQUFXLEVBQUUsSUFBSSxFQUFFLEVBQUU7UUFDeEMsSUFBSSxPQUFPLElBQUksS0FBSyxRQUFRLElBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQztZQUN0QyxPQUFPLEdBQUcsQ0FBQTtRQUNaLENBQUM7UUFFRCxNQUFNLE9BQU8sR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsT0FBTyxDQUFDLFlBQVksRUFBRSxFQUFFLENBQUMsQ0FBQTtRQUV0RCxPQUFPLEdBQUc7WUFDUixDQUFDLENBQUMsR0FBRyxHQUFHLElBQUksT0FBTyxFQUFFO1lBQ3JCLENBQUMsQ0FBQyxPQUFPLENBQUE7SUFDYixDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUE7QUFDUixDQUFDIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/index.d.ts b/node_modules/@conventional-changelog/template/dist/index.d.ts new file mode 100644 index 000000000..e396f3e75 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/index.d.ts @@ -0,0 +1,6 @@ +export type * from './types/index.js'; +export * from './elements.js'; +export * from './references.js'; +export * from './templates.js'; +export * from './legacy.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/index.d.ts.map b/node_modules/@conventional-changelog/template/dist/index.d.ts.map new file mode 100644 index 000000000..df025b865 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,kBAAkB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/index.js b/node_modules/@conventional-changelog/template/dist/index.js new file mode 100644 index 000000000..a457d07a3 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/index.js @@ -0,0 +1,5 @@ +export * from './elements.js'; +export * from './references.js'; +export * from './templates.js'; +export * from './legacy.js'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsY0FBYyxlQUFlLENBQUE7QUFDN0IsY0FBYyxpQkFBaUIsQ0FBQTtBQUMvQixjQUFjLGdCQUFnQixDQUFBO0FBQzlCLGNBQWMsYUFBYSxDQUFBIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/legacy.d.ts b/node_modules/@conventional-changelog/template/dist/legacy.d.ts new file mode 100644 index 000000000..3020758c7 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/legacy.d.ts @@ -0,0 +1,20 @@ +/** + * Creates writer options which make legacy handlebars-based writers + * (`conventional-changelog-writer@8` and older) fail loudly instead of + * silently rendering an empty changelog when a mixed-versions install + * resolves a modern preset against them. + * Legacy writers compile the `mainTemplate` option with handlebars, + * where rendering the planted template triggers the `helperMissing` hook, + * which throws an error with the message from the template. + * Modern writers have no `mainTemplate` option and ignore the value, + * and a string survives the option merges of downstream tooling, + * so the guard reaches legacy writers even through cloned options. + * The message must not contain `]` characters to stay a valid + * handlebars segment literal. + * @param preset - Preset package name to mention in the error message. + * @returns Writer options to spread into preset writer options. + */ +export declare function createLegacyWriterGuard(preset: string): { + mainTemplate: string; +}; +//# sourceMappingURL=legacy.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/legacy.d.ts.map b/node_modules/@conventional-changelog/template/dist/legacy.d.ts.map new file mode 100644 index 000000000..09bfcd8c4 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/legacy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../src/legacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM;IAElD,YAAY;EAEf"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/legacy.js b/node_modules/@conventional-changelog/template/dist/legacy.js new file mode 100644 index 000000000..75d5ed6a5 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/legacy.js @@ -0,0 +1,22 @@ +/** + * Creates writer options which make legacy handlebars-based writers + * (`conventional-changelog-writer@8` and older) fail loudly instead of + * silently rendering an empty changelog when a mixed-versions install + * resolves a modern preset against them. + * Legacy writers compile the `mainTemplate` option with handlebars, + * where rendering the planted template triggers the `helperMissing` hook, + * which throws an error with the message from the template. + * Modern writers have no `mainTemplate` option and ignore the value, + * and a string survives the option merges of downstream tooling, + * so the guard reaches legacy writers even through cloned options. + * The message must not contain `]` characters to stay a valid + * handlebars segment literal. + * @param preset - Preset package name to mention in the error message. + * @returns Writer options to spread into preset writer options. + */ +export function createLegacyWriterGuard(preset) { + return { + mainTemplate: `{{[${preset} requires conventional-changelog-writer@9 or newer (conventional-changelog@8 or newer). Your changelog tooling loaded an older writer which cannot render this preset. Update the tooling or use an older major version of the preset.] true}}` + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGVnYWN5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2xlZ2FjeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7O0dBZUc7QUFDSCxNQUFNLFVBQVUsdUJBQXVCLENBQUMsTUFBYztJQUNwRCxPQUFPO1FBQ0wsWUFBWSxFQUFFLE1BQU0sTUFBTSxnUEFBZ1A7S0FDM1EsQ0FBQTtBQUNILENBQUMifQ== \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/references.d.ts b/node_modules/@conventional-changelog/template/dist/references.d.ts new file mode 100644 index 000000000..6ef0c904f --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/references.d.ts @@ -0,0 +1,43 @@ +import type { CommitKnownProps, FinalTemplateContext } from './types/index.js'; +export interface IssueReference { + /** + * Issue prefix. EG: In `gh-123` `gh-` is the prefix. + */ + prefix: string; + /** + * Issue id. EG: In `gh-123` `123` is the id. + */ + issue: string; +} +export interface ReferencesFormatterOptions { + /** + * The prefixes of an issue. EG: In `gh-123` `gh-` is the prefix. + * Prefixes are matched in the given order, so a prefix which starts + * with another one should be placed first. + */ + issuePrefixes?: (string | RegExp)[]; + /** + * Pattern of an issue id. EG: In `gh-123` `123` is the id. + */ + issuePattern?: RegExp; + /** + * Builds an issue URL. Empty result leaves the reference as is. + */ + formatIssueUrl(context: FinalTemplateContext, reference: IssueReference): string; + /** + * Builds a user URL. Empty result leaves the mention as is. + */ + formatUserUrl(context: FinalTemplateContext, user: string): string; +} +export type ReferencesFormatter = (text: string, context: FinalTemplateContext, references?: string[]) => string; +/** + * Creates a text formatter for the given options. + * + * Regexes from the options are inlined into a single multiline regex, + * so their flags are ignored, `^` and `$` match line boundaries, + * and they should not contain capturing groups, backreferences or named groups. + * @param options - Formatter options. + * @returns Formatter which replaces issue and user references in a text with links. + */ +export declare function createReferencesFormatter(options: ReferencesFormatterOptions): ReferencesFormatter; +//# sourceMappingURL=references.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/references.d.ts.map b/node_modules/@conventional-changelog/template/dist/references.d.ts.map new file mode 100644 index 000000000..7a8f9c55d --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/references.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,kBAAkB,CAAA;AAmBzB,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,0BAA0B,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB;IAC5F;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,cAAc,CAAC,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,cAAc,GAAG,MAAM,CAAA;IACxF;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3E;AAED,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,CACpF,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,EACrC,UAAU,CAAC,EAAE,MAAM,EAAE,KAClB,MAAM,CAAA;AAmCX;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAC1F,OAAO,EAAE,0BAA0B,CAAC,MAAM,CAAC,GAC1C,mBAAmB,CAAC,MAAM,CAAC,CA0C7B"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/references.js b/node_modules/@conventional-changelog/template/dist/references.js new file mode 100644 index 000000000..67dd9c060 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/references.js @@ -0,0 +1,82 @@ +import { link } from './elements.js'; +/** + * Markdown segments to keep as is: replacing references inside them + * would break already formatted links, code samples and urls. + */ +const protectedSegments = [ + /\[(?:[^[\]]|\[[^[\]]*])*]\((?:[^()\n]|\([^()\n]*\))*\)/, // [text](url) + /\[[^\]]*]\[[^\]]*]/, // [text][ref] + // the lookahead makes the delimiter length atomic, without it a long run + // of backticks makes the regex engine retry every possible delimiter length + /^[ \t]*(?=(?`{3,}|~{3,}))\k[\s\S]*?^[ \t]*\k[ \t]*\r?$/, // ```code block``` + /(?=(?`+))\k[^\n]*?\k/, // `code span` + /https?:\/\/(?:[^\s()]|\([^\s()]*\))+/ // https://url +]; +const userMention = /\B@(?[a-z0-9](?:-?[a-z0-9/]){0,38})/; +const defaultIssuePattern = /[a-z0-9]+/; +/** + * Escapes a string to use it as a part of a regex. + * @param string + * @returns Escaped string. + */ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} +/** + * Builds a regex which matches issue and user references + * outside of the protected Markdown segments. + * @param issuePrefixes + * @param issuePattern + * @returns Regex with `prefix`, `issue` and `user` groups. + */ +function referencesRegex(issuePrefixes = [], issuePattern = defaultIssuePattern) { + const prefixes = issuePrefixes + .map(prefix => (typeof prefix === 'string' ? escapeRegExp(prefix) : prefix.source)) + .join('|'); + const patterns = [ + ...protectedSegments.map(segment => segment.source), + // without prefixes every word would be matched as an issue reference + prefixes && `(?${prefixes})(?${issuePattern.source})`, + userMention.source + ]; + return new RegExp(patterns.filter(Boolean).join('|'), 'gm'); +} +/** + * Creates a text formatter for the given options. + * + * Regexes from the options are inlined into a single multiline regex, + * so their flags are ignored, `^` and `$` match line boundaries, + * and they should not contain capturing groups, backreferences or named groups. + * @param options - Formatter options. + * @returns Formatter which replaces issue and user references in a text with links. + */ +export function createReferencesFormatter(options) { + const regex = referencesRegex(options.issuePrefixes, options.issuePattern); + return (text, context, references) => text.replace(regex, (match, ...args) => { + const { prefix, issue, user } = args.at(-1); + if (issue) { + const issueUrl = options.formatIssueUrl(context, { + prefix: prefix, + issue + }); + if (!issueUrl) { + return match; + } + references?.push(match); + return link(match, issueUrl); + } + if (user) { + // TODO: investigate why this code exists. + if (user.includes('/')) { + return match; + } + const userUrl = options.formatUserUrl(context, user); + if (!userUrl) { + return match; + } + return link(match, userUrl); + } + return match; + }); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVmZXJlbmNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yZWZlcmVuY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFFcEM7OztHQUdHO0FBQ0gsTUFBTSxpQkFBaUIsR0FBRztJQUN4Qix3REFBd0QsRUFBRSxjQUFjO0lBQ3hFLG9CQUFvQixFQUFFLGNBQWM7SUFDcEMseUVBQXlFO0lBQ3pFLDRFQUE0RTtJQUM1RSw2RUFBNkUsRUFBRSxtQkFBbUI7SUFDbEcsd0NBQXdDLEVBQUUsY0FBYztJQUN4RCxzQ0FBc0MsQ0FBQyxjQUFjO0NBQ3RELENBQUE7QUFDRCxNQUFNLFdBQVcsR0FBRywyQ0FBMkMsQ0FBQTtBQUMvRCxNQUFNLG1CQUFtQixH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DZCxDQUFDO1lBRUQsT0FBTyxJQUFJLENBQUMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxDQUFBO1FBQzdCLENBQUM7UUFFRCxPQUFPLEtBQUssQ0FBQTtJQUNkLENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyJ9 \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/templates.d.ts b/node_modules/@conventional-changelog/template/dist/templates.d.ts new file mode 100644 index 000000000..a6b23d0e3 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/templates.d.ts @@ -0,0 +1,74 @@ +import type { FinalTemplateContext, CommitKnownProps, CommitNote, CommitReference, TransformedCommit } from './types/index.js'; +/** + * Builds a repository URL from template context fields. + * @param context - Template context. + * @returns Repository URL. + */ +export declare function repositoryUrl(context: FinalTemplateContext): string; +/** + * Builds a repository URL for a commit reference. + * @param context - Template context. + * @param reference - Commit reference. + * @returns Reference repository URL. + */ +export declare function referenceRepositoryUrl(context: FinalTemplateContext, reference: CommitReference): string; +/** + * Builds a release comparison URL and encodes tag names as URL path segments. + * @param context - Template context. + * @returns Release comparison URL. + */ +export declare function compareUrl(context: FinalTemplateContext): string; +export declare const BREAKING_CHANGE_KEYWORDS: string[]; +export declare const BREAKING_CHANGES_TITLE = "BREAKING CHANGES"; +/** + * Renders a note group title. + * Breaking change keywords are merged into a single title, + * every other keyword is uppercased to group its spellings together. + * @param title - Note title as it was written in a commit. + * @returns Note group title. + */ +export declare function noteTitle(title: string): string; +/** + * Checks if a note is a breaking change note. + * @param note - Commit note. + * @returns Is it a breaking change note. + */ +export declare function isBreakingNote(note: CommitNote): boolean; +/** + * Renders a commit reference label. + * @param reference - Commit reference. + * @returns Commit reference label. + */ +export declare function reference(reference: CommitReference): string; +/** + * Renders the default changelog header. + * @param context - Template context. + * @returns Changelog header. + */ +export declare function headerPartial({ isPatch, title, version, date }: FinalTemplateContext): string; +/** + * Renders the default changelog preamble. + * @param context - Template context. + * @returns Changelog preamble. + */ +export declare function preamblePartial({ preamble }: FinalTemplateContext): string; +/** + * Renders the default changelog footer. + * @param context - Template context. + * @returns Changelog footer. + */ +export declare function footerPartial({ noteGroups }: FinalTemplateContext): string; +/** + * Renders the default changelog commit line. + * @param context - Template context. + * @param commit - Transformed commit. + * @returns Changelog commit line. + */ +export declare function commitPartial(context: FinalTemplateContext, commit: TransformedCommit): string; +/** + * Renders the default changelog template. + * @param context - Template context. + * @returns Changelog text. + */ +export declare function template(context: FinalTemplateContext): string; +//# sourceMappingURL=templates.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/templates.d.ts.map b/node_modules/@conventional-changelog/template/dist/templates.d.ts.map new file mode 100644 index 000000000..3a6b68489 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/templates.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,kBAAkB,CAAA;AAczB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAC9E,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAOtC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EACvF,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,EACrC,SAAS,EAAE,eAAe,UAW3B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAC3E,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAUtC;AAED,eAAO,MAAM,wBAAwB,UAAyC,CAAA;AAC9E,eAAO,MAAM,sBAAsB,qBAAqB,CAAA;AAExD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,UAMtC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,WAE9C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,eAAe,UAMnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EAChF,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACL,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAQ9B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAChF,EAAE,QAAQ,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAG3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAC9E,EAAE,UAAU,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAa7C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAC9E,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,EACrC,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,UAuClC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EACzE,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAsBtC"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/templates.js b/node_modules/@conventional-changelog/template/dist/templates.js new file mode 100644 index 000000000..dbdbd0dc0 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/templates.js @@ -0,0 +1,125 @@ +import { each, link, list, small, heading, segments, strings, words, newline, url } from './elements.js'; +/** + * Builds a repository URL from template context fields. + * @param context - Template context. + * @returns Repository URL. + */ +export function repositoryUrl(context) { + if (context.repository) { + return url(context.host, context.owner, context.repository); + } + return context.repoUrl || ''; +} +/** + * Builds a repository URL for a commit reference. + * @param context - Template context. + * @param reference - Commit reference. + * @returns Reference repository URL. + */ +export function referenceRepositoryUrl(context, reference) { + if (!context.repository) { + return context.repoUrl || ''; + } + if (reference.repository) { + return url(context.host, reference.owner, reference.repository); + } + return url(context.host, context.owner, context.repository); +} +/** + * Builds a release comparison URL and encodes tag names as URL path segments. + * @param context - Template context. + * @returns Release comparison URL. + */ +export function compareUrl(context) { + const previousTag = encodeURIComponent(context.previousTag || ''); + const currentTag = encodeURIComponent(context.currentTag || ''); + return url(repositoryUrl(context), context.compare || 'compare', `${previousTag}...${currentTag}`); +} +export const BREAKING_CHANGE_KEYWORDS = ['BREAKING CHANGE', 'BREAKING-CHANGE']; +export const BREAKING_CHANGES_TITLE = 'BREAKING CHANGES'; +/** + * Renders a note group title. + * Breaking change keywords are merged into a single title, + * every other keyword is uppercased to group its spellings together. + * @param title - Note title as it was written in a commit. + * @returns Note group title. + */ +export function noteTitle(title) { + const upperCaseTitle = title.toUpperCase(); + return BREAKING_CHANGE_KEYWORDS.includes(upperCaseTitle) + ? BREAKING_CHANGES_TITLE + : upperCaseTitle; +} +/** + * Checks if a note is a breaking change note. + * @param note - Commit note. + * @returns Is it a breaking change note. + */ +export function isBreakingNote(note) { + return noteTitle(note.title) === BREAKING_CHANGES_TITLE; +} +/** + * Renders a commit reference label. + * @param reference - Commit reference. + * @returns Commit reference label. + */ +export function reference(reference) { + return strings(reference.owner && `${reference.owner}/`, reference.repository, reference.issue && `${reference.prefix || '#'}${reference.issue}`); +} +/** + * Renders the default changelog header. + * @param context - Template context. + * @returns Changelog header. + */ +export function headerPartial({ isPatch, title, version, date }) { + const versionText = words(version, title && `"${title}"`, date && `(${date})`); + return heading(2, isPatch ? small(versionText) : versionText); +} +/** + * Renders the default changelog preamble. + * @param context - Template context. + * @returns Changelog preamble. + */ +export function preamblePartial({ preamble }) { + return strings(preamble); +} +/** + * Renders the default changelog footer. + * @param context - Template context. + * @returns Changelog footer. + */ +export function footerPartial({ noteGroups }) { + return each(noteGroups, group => segments(heading(3, group.title), list(group.notes, note => note.text)), newline(2)); +} +/** + * Renders the default changelog commit line. + * @param context - Template context. + * @param commit - Transformed commit. + * @returns Changelog commit line. + */ +export function commitPartial(context, commit) { + const { linkReferences, issue, commit: commitUrlPath } = context; + const { hash, references, header } = commit; + const commitLink = hash + ? linkReferences + ? `(${link(hash, url(repositoryUrl(context), commitUrlPath, hash))})` + : hash + : ''; + const renderedReferences = each(references, (linkReference) => { + if (linkReferences) { + return link(reference(linkReference), url(referenceRepositoryUrl(context, linkReference), issue, linkReference.issue)); + } + return reference(linkReference); + }, ' '); + return strings(words(header, commitLink), renderedReferences && `, closes ${renderedReferences}`); +} +/** + * Renders the default changelog template. + * @param context - Template context. + * @returns Changelog text. + */ +export function template(context) { + const { headerPartial, preamblePartial, commitPartial, footerPartial, commitGroups } = context; + return segments(headerPartial(context), preamblePartial(context), each(commitGroups, group => list(group.commits, commit => commitPartial(context, commit))), footerPartial(context)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3RlbXBsYXRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxPQUFPLEVBQ0wsSUFBSSxFQUNKLElBQUksRUFDSixJQUFJLEVBQ0osS0FBSyxFQUNMLE9BQU8sRUFDUCxRQUFRLEVBQ1IsT0FBTyxFQUNQLEtBQUssRUFDTCxPQUFPLEVBQ1AsR0FBRyxFQUNKLE1BQU0sZUFBZSxDQUFBO0FBRXRCOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsYUFBYSxDQUMzQixPQUFxQztJQUVyQyxJQUFJLE9BQU8sQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUN2QixPQUFPLEdBQUcsQ0FBQyxPQUFPLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxLQUFLLEVBQUUsT0F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BQUksQ0FDRixZQUFZLEVBQ1osS0FBSyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQ1gsS0FBSyxDQUFDLE9BQU8sRUFDYixNQUFNLENBQUMsRUFBRSxDQUFDLGFBQWEsQ0FBQyxPQUFPLEVBQUUsTUFBTSxDQUFDLENBQ3pDLENBQ0YsRUFDRCxhQUFhLENBQUMsT0FBTyxDQUFDLENBQ3ZCLENBQUE7QUFDSCxDQUFDIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/commit.d.ts b/node_modules/@conventional-changelog/template/dist/types/commit.d.ts new file mode 100644 index 000000000..bfb0e7c08 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/commit.d.ts @@ -0,0 +1,37 @@ +import type { AnyObject } from './utils.js'; +export interface CommitReference { + raw: string; + action: string | null; + owner: string | null; + repository: string | null; + issue: string; + prefix: string; +} +export interface CommitNote { + title: string; + text: string; +} +export interface CommitKnownProps { + type?: string | null; + header?: string | null; + version?: string | null; + hash?: string | null; + committerDate?: string | null; + references?: CommitReference[] | null; + notes: CommitNote[]; + revert?: AnyObject | null; + body?: string | null; + footer?: string | null; +} +export type TransformedCommit = Commit & { + raw?: Commit; +}; +export interface CommitGroup { + title: string; + commits: Commit[]; +} +export interface NoteGroup { + title: string; + notes: CommitNote[]; +} +//# sourceMappingURL=commit.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/commit.d.ts.map b/node_modules/@conventional-changelog/template/dist/types/commit.d.ts.map new file mode 100644 index 000000000..6f62887ab --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/commit.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../src/types/commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,CAAC,EAAE,eAAe,EAAE,GAAG,IAAI,CAAA;IACrC,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AAED,MAAM,MAAM,iBAAiB,CAAC,MAAM,IAAI,MAAM,GAAG;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,WAAW,WAAW,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB;IAC7E,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/commit.js b/node_modules/@conventional-changelog/template/dist/types/commit.js new file mode 100644 index 000000000..e65c08098 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/commit.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWl0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL2NvbW1pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0= \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/context.d.ts b/node_modules/@conventional-changelog/template/dist/types/context.d.ts new file mode 100644 index 000000000..fdd92f77f --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/context.d.ts @@ -0,0 +1,113 @@ +import type { CommitKnownProps, CommitGroup, NoteGroup, TransformedCommit } from './commit.js'; +export type HeaderPartialFunction = (context: FinalTemplateContext) => string; +export type PreamblePartialFunction = (context: FinalTemplateContext) => string; +export type CommitPartialFunction = (context: FinalTemplateContext, commit: TransformedCommit) => string; +export type FooterPartialFunction = (context: FinalTemplateContext) => string; +export interface TemplateContext { + /** + * Version number of the upcoming release. + * If `version` is found in the last commit before generating logs, it will be overwritten. + */ + version?: string; + /** + * Is this a patch release? + */ + isPatch?: boolean; + /** + * The title of the release. + */ + title?: string; + /** + * The release date. + */ + date?: string; + /** + * Introductory text rendered after the release header. + */ + preamble?: string; + /** + * Should all references be linked? + */ + linkReferences?: boolean; + /** + * Commit base url path. + */ + commit?: string; + /** + * Issue base url. + */ + issue?: string; + /** + * Release comparison base url path. + */ + compare?: string; + /** + * Repository name. + * Eg: `'conventional-changelog-writer'` + */ + repository?: string; + /** + * Repository host. + * Eg: `'https://github.com'` or `'https://bitbucket.org'` + */ + host?: string; + /** + * Repository owner. + * Eg: `'conventional-changelog'` + */ + owner?: string; + /** + * Full repository url. + * Eg: `'https://github.com/conventional-changelog/conventional-changelog-writer'`. + * Should be used as a fallback when `context.repository` doesn't exist. + */ + repoUrl?: string; + /** + * Commit groups. + */ + commitGroups?: CommitGroup[]; + /** + * Note groups. + */ + noteGroups?: NoteGroup[]; + /** + * Previous release tag. + */ + previousTag?: string | null; + /** + * Current release tag. + */ + currentTag?: string | null; + /** + * Add a link to compare changes. + */ + linkCompare?: boolean; + /** + * Function that renders the release header. + */ + headerPartial?: HeaderPartialFunction; + /** + * Function that renders introductory text after the release header. + */ + preamblePartial?: PreamblePartialFunction; + /** + * Function that renders a single commit entry. + */ + commitPartial?: CommitPartialFunction; + /** + * Function that renders release footer notes. + */ + footerPartial?: FooterPartialFunction; +} +type RequiredTemplateContext = Required>; +export interface FinalTemplateContext extends TemplateContext { + commit: RequiredTemplateContext['commit']; + issue: RequiredTemplateContext['issue']; + date: RequiredTemplateContext['date']; + headerPartial: RequiredTemplateContext['headerPartial']; + preamblePartial: RequiredTemplateContext['preamblePartial']; + commitPartial: RequiredTemplateContext['commitPartial']; + footerPartial: RequiredTemplateContext['footerPartial']; +} +export {}; +//# sourceMappingURL=context.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/context.d.ts.map b/node_modules/@conventional-changelog/template/dist/types/context.d.ts.map new file mode 100644 index 000000000..7bc1b6592 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/context.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,iBAAiB,EAClB,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,qBAAqB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,IAClF,CAAC,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,MAAM,CAAA;AAEnD,MAAM,MAAM,uBAAuB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,IACpF,CAAC,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,MAAM,CAAA;AAEnD,MAAM,MAAM,qBAAqB,CAAC,MAAM,SAAS,g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WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAC7C;;OAEG;IACH,eAAe,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAA;IACjD;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAC7C;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;CAC9C;AAED,KAAK,uBAAuB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;AAEpH,MAAM,WAAW,oBAAoB,CAAC,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,CAAE,SAAQ,eAAe,CAAC,MAAM,CAAC;IACvH,MAAM,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAA;IACjD,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;IAC/C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;IAC7C,aAAa,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAA;IAC/D,eAAe,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAA;IACnE,aAAa,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAA;IAC/D,aAAa,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAA;CAChE"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/context.js b/node_modules/@conventional-changelog/template/dist/types/context.js new file mode 100644 index 000000000..6cbd754b5 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/context.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9jb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/index.d.ts b/node_modules/@conventional-changelog/template/dist/types/index.d.ts new file mode 100644 index 000000000..79aea310d --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/index.d.ts @@ -0,0 +1,4 @@ +export type * from './commit.js'; +export type * from './context.js'; +export type * from './utils.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/index.d.ts.map b/node_modules/@conventional-changelog/template/dist/types/index.d.ts.map new file mode 100644 index 000000000..3c7e461ff --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,aAAa,CAAA;AAChC,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,YAAY,CAAA"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/index.js b/node_modules/@conventional-changelog/template/dist/types/index.js new file mode 100644 index 000000000..fe80a85d0 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/index.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/utils.d.ts b/node_modules/@conventional-changelog/template/dist/types/utils.d.ts new file mode 100644 index 000000000..8ea33265e --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/utils.d.ts @@ -0,0 +1,2 @@ +export type AnyObject = Record; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/utils.d.ts.map b/node_modules/@conventional-changelog/template/dist/types/utils.d.ts.map new file mode 100644 index 000000000..ac4e11192 --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/dist/types/utils.js b/node_modules/@conventional-changelog/template/dist/types/utils.js new file mode 100644 index 000000000..61370211f --- /dev/null +++ b/node_modules/@conventional-changelog/template/dist/types/utils.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 \ No newline at end of file diff --git a/node_modules/@conventional-changelog/template/package.json b/node_modules/@conventional-changelog/template/package.json new file mode 100644 index 000000000..c5965e4d2 --- /dev/null +++ b/node_modules/@conventional-changelog/template/package.json @@ -0,0 +1,38 @@ +{ + "name": "@conventional-changelog/template", + "type": "module", + "version": "1.4.0", + "description": "Template utilities for conventional changelog generation.", + "author": { + "name": "Dan Onoshko", + "email": "danon0404@gmail.com", + "url": "https://github.com/dangreen" + }, + "license": "MIT", + "homepage": "https://conventional-changelog.js.org/template/", + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/conventional-changelog.git", + "directory": "packages/template" + }, + "bugs": { + "url": "https://github.com/conventional-changelog/conventional-changelog/issues" + }, + "keywords": [ + "conventional-changelog", + "changelog", + "template", + "render", + "helpers" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "files": [ + "dist" + ] +} \ No newline at end of file diff --git a/node_modules/@emnapi/wasi-threads/LICENSE b/node_modules/@emnapi/wasi-threads/LICENSE new file mode 100644 index 000000000..05a594416 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021-present Toyobayashi + +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. diff --git a/node_modules/@emnapi/wasi-threads/README.md b/node_modules/@emnapi/wasi-threads/README.md new file mode 100644 index 000000000..d7ab93560 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/README.md @@ -0,0 +1,203 @@ +# @emnapi/wasi-threads + +This package makes [wasi-threads proposal](https://github.com/WebAssembly/wasi-threads) based WASI modules work in Node.js and browser. + +## Quick Start + +`index.html` + +```html + + + +``` + +If your application will block browser main thread (for example `pthread_join`), please run it in worker instead. + +```html + +``` + +`index.js` + +```js +const ENVIRONMENT_IS_NODE = + typeof process === 'object' && process !== null && + typeof process.versions === 'object' && process.versions !== null && + typeof process.versions.node === 'string'; + +(function (main) { + if (ENVIRONMENT_IS_NODE) { + main(require) + } else { + if (typeof importScripts === 'function') { + importScripts('./node_modules/@tybys/wasm-util/dist/wasm-util.js') + importScripts('./node_modules/@emnapi/wasi-threads/dist/wasi-threads.js') + } + const nodeWasi = { WASI: globalThis.wasmUtil.WASI } + const nodeWorkerThreads = { + Worker: globalThis.Worker + } + const _require = function (request) { + if (request === 'node:wasi' || request === 'wasi') return nodeWasi + if (request === 'node:worker_threads' || request === 'worker_threads') return nodeWorkerThreads + if (request === '@emnapi/wasi-threads') return globalThis.wasiThreads + throw new Error('Can not find module: ' + request) + } + main(_require) + } +})(async function (require) { + const { WASI } = require('wasi') + const { Worker } = require('worker_threads') + const { WASIThreads } = require('@emnapi/wasi-threads') + + const wasi = new WASI({ + version: 'preview1' + }) + const wasiThreads = new WASIThreads({ + wasi, + + /** + * avoid Atomics.wait() deadlock during thread creation in browser + * see https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size + */ + reuseWorker: ENVIRONMENT_IS_NODE + ? false + : { + size: 4 /** greater than actual needs (2) */, + strict: true + }, + + /** + * Synchronous thread creation + * pthread_create will not return until thread worker actually starts + */ + waitThreadStart: typeof window === 'undefined' ? 1000 : false, + + onCreateWorker: () => { + return new Worker('./worker.js', { + execArgv: ['--experimental-wasi-unstable-preview1'] + }) + } + }) + const memory = new WebAssembly.Memory({ + initial: 16777216 / 65536, + maximum: 2147483648 / 65536, + shared: true + }) + let input + const file = 'path/to/your/wasi-module.wasm' + try { + input = require('fs').readFileSync(require('path').join(__dirname, file)) + } catch (err) { + const response = await fetch(file) + input = await response.arrayBuffer() + } + let { module, instance } = await WebAssembly.instantiate(input, { + env: { memory }, + wasi_snapshot_preview1: wasi.wasiImport, + ...wasiThreads.getImportObject() + }) + + wasiThreads.setup(instance, module, memory) + await wasiThreads.preloadWorkers() + + if (typeof instance.exports._start === 'function') { + return wasi.start(instance) + } else { + wasi.initialize(instance) + // instance.exports.exported_wasm_function() + } +}) +``` + +`worker.js` + +```js +(function (main) { + const ENVIRONMENT_IS_NODE = + typeof process === 'object' && process !== null && + typeof process.versions === 'object' && process.versions !== null && + typeof process.versions.node === 'string' + + if (ENVIRONMENT_IS_NODE) { + const _require = function (request) { + return require(request) + } + + const _init = function () { + const nodeWorkerThreads = require('worker_threads') + const parentPort = nodeWorkerThreads.parentPort + + parentPort.on('message', (data) => { + globalThis.onmessage({ data }) + }) + + Object.assign(globalThis, { + self: globalThis, + require, + Worker: nodeWorkerThreads.Worker, + importScripts: function (f) { + (0, eval)(require('fs').readFileSync(f, 'utf8') + '//# sourceURL=' + f) + }, + postMessage: function (msg) { + parentPort.postMessage(msg) + } + }) + } + + main(_require, _init) + } else { + importScripts('./node_modules/@tybys/wasm-util/dist/wasm-util.js') + importScripts('./node_modules/@emnapi/wasi-threads/dist/wasi-threads.js') + + const nodeWasi = { WASI: globalThis.wasmUtil.WASI } + const _require = function (request) { + if (request === '@emnapi/wasi-threads') return globalThis.wasiThreads + if (request === 'node:wasi' || request === 'wasi') return nodeWasi + throw new Error('Can not find module: ' + request) + } + const _init = function () {} + main(_require, _init) + } +})(function main (require, init) { + init() + + const { WASI } = require('wasi') + const { ThreadMessageHandler, WASIThreads } = require('@emnapi/wasi-threads') + + const handler = new ThreadMessageHandler({ + async onLoad ({ wasmModule, wasmMemory }) { + const wasi = new WASI({ + version: 'preview1' + }) + + const wasiThreads = new WASIThreads({ + wasi, + childThread: true + }) + + const originalInstance = await WebAssembly.instantiate(wasmModule, { + env: { + memory: wasmMemory, + }, + wasi_snapshot_preview1: wasi.wasiImport, + ...wasiThreads.getImportObject() + }) + + // must call `initialize` instead of `start` in child thread + const instance = wasiThreads.initialize(originalInstance, wasmModule, wasmMemory) + + return { module: wasmModule, instance } + } + }) + + globalThis.onmessage = function (e) { + handler.handle(e) + // handle other messages + } +}) +``` diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js new file mode 100644 index 000000000..96a1d87f7 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js @@ -0,0 +1,885 @@ +const _WebAssembly = typeof WebAssembly !== 'undefined' + ? WebAssembly + : typeof WXWebAssembly !== 'undefined' + ? WXWebAssembly + : undefined; +const ENVIRONMENT_IS_NODE = typeof process === 'object' && process !== null && + typeof process.versions === 'object' && process.versions !== null && + typeof process.versions.node === 'string'; +function getPostMessage(options) { + return typeof (options === null || options === void 0 ? void 0 : options.postMessage) === 'function' + ? options.postMessage + : typeof postMessage === 'function' + ? postMessage + : undefined; +} +function serizeErrorToBuffer(sab, code, error) { + const i32array = new Int32Array(sab); + Atomics.store(i32array, 0, code); + if (code > 1 && error) { + const name = error.name; + const message = error.message; + const stack = error.stack; + const nameBuffer = new TextEncoder().encode(name); + const messageBuffer = new TextEncoder().encode(message); + const stackBuffer = new TextEncoder().encode(stack); + Atomics.store(i32array, 1, nameBuffer.length); + Atomics.store(i32array, 2, messageBuffer.length); + Atomics.store(i32array, 3, stackBuffer.length); + const buffer = new Uint8Array(sab); + buffer.set(nameBuffer, 16); + buffer.set(messageBuffer, 16 + nameBuffer.length); + buffer.set(stackBuffer, 16 + nameBuffer.length + messageBuffer.length); + } +} +function deserizeErrorFromBuffer(sab) { + var _a, _b; + const i32array = new Int32Array(sab); + const status = Atomics.load(i32array, 0); + if (status <= 1) { + return null; + } + const nameLength = Atomics.load(i32array, 1); + const messageLength = Atomics.load(i32array, 2); + const stackLength = Atomics.load(i32array, 3); + const buffer = new Uint8Array(sab); + const nameBuffer = buffer.slice(16, 16 + nameLength); + const messageBuffer = buffer.slice(16 + nameLength, 16 + nameLength + messageLength); + const stackBuffer = buffer.slice(16 + nameLength + messageLength, 16 + nameLength + messageLength + stackLength); + const name = new TextDecoder().decode(nameBuffer); + const message = new TextDecoder().decode(messageBuffer); + const stack = new TextDecoder().decode(stackBuffer); + const ErrorConstructor = (_a = globalThis[name]) !== null && _a !== void 0 ? _a : (name === 'RuntimeError' ? ((_b = _WebAssembly.RuntimeError) !== null && _b !== void 0 ? _b : Error) : Error); + const error = new ErrorConstructor(message); + Object.defineProperty(error, 'stack', { + value: stack, + writable: true, + enumerable: false, + configurable: true + }); + return error; +} +function isSharedArrayBuffer(value) { + return ((typeof SharedArrayBuffer === 'function' && value instanceof SharedArrayBuffer) || + (Object.prototype.toString.call(value) === '[object SharedArrayBuffer]')); +} +function isTrapError(e) { + try { + return e instanceof _WebAssembly.RuntimeError; + } + catch (_) { + return false; + } +} + +function createMessage(type, payload) { + return { + __emnapi__: { + type, + payload + } + }; +} + +const WASI_THREADS_MAX_TID = 0x1FFFFFFF; +function checkSharedWasmMemory(wasmMemory) { + if (wasmMemory) { + if (!isSharedArrayBuffer(wasmMemory.buffer)) { + throw new Error('Multithread features require shared wasm memory. ' + + 'Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, ' + + 'then create WebAssembly.Memory with `shared: true` option'); + } + } + else { + if (typeof SharedArrayBuffer === 'undefined') { + throw new Error('Current environment does not support SharedArrayBuffer, threads are not available!'); + } + } +} +function getReuseWorker(value) { + var _a; + if (typeof value === 'boolean') { + return value ? { size: 0, strict: false } : false; + } + if (typeof value === 'number') { + if (!(value >= 0)) { + throw new RangeError('reuseWorker: size must be a non-negative integer'); + } + return { size: value, strict: false }; + } + if (!value) { + return false; + } + const size = (_a = Number(value.size)) !== null && _a !== void 0 ? _a : 0; + const strict = Boolean(value.strict); + if (!(size > 0) && strict) { + throw new RangeError('reuseWorker: size must be set to positive integer if strict is set to true'); + } + return { size, strict }; +} +let nextWorkerID = 0; +class ThreadManager { + get nextWorkerID() { return nextWorkerID; } + constructor(options) { + var _a; + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.wasmModule = null; + this.wasmMemory = null; + this.messageEvents = new WeakMap(); + if (!options) { + throw new TypeError('ThreadManager(): options is not provided'); + } + if ('childThread' in options) { + this._childThread = Boolean(options.childThread); + } + else { + this._childThread = false; + } + if (this._childThread) { + this._onCreateWorker = undefined; + this._reuseWorker = false; + this._beforeLoad = undefined; + } + else { + this._onCreateWorker = options.onCreateWorker; + this._reuseWorker = getReuseWorker(options.reuseWorker); + this._beforeLoad = options.beforeLoad; + } + this.printErr = (_a = options.printErr) !== null && _a !== void 0 ? _a : console.error.bind(console); + this.threadSpawn = options.threadSpawn; + } + init() { + if (!this._childThread) { + this.initMainThread(); + } + } + initMainThread() { + this.preparePool(); + } + preparePool() { + if (this._reuseWorker) { + if (this._reuseWorker.size) { + let pthreadPoolSize = this._reuseWorker.size; + while (pthreadPoolSize--) { + const worker = this.allocateUnusedWorker(); + if (ENVIRONMENT_IS_NODE) { + worker.once('message', () => { }); + worker.unref(); + } + } + } + } + } + shouldPreloadWorkers() { + return !this._childThread && this._reuseWorker && this._reuseWorker.size > 0; + } + loadWasmModuleToAllWorkers() { + const promises = Array(this.unusedWorkers.length); + for (let i = 0; i < this.unusedWorkers.length; ++i) { + const worker = this.unusedWorkers[i]; + if (ENVIRONMENT_IS_NODE) + worker.ref(); + promises[i] = this.loadWasmModuleToWorker(worker).then((w) => { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + return w; + }, (e) => { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + throw e; + }); + } + return Promise.all(promises).catch((err) => { + this.terminateAllThreads(); + throw err; + }); + } + preloadWorkers() { + if (this.shouldPreloadWorkers()) { + return this.loadWasmModuleToAllWorkers(); + } + return Promise.resolve([]); + } + setup(wasmModule, wasmMemory) { + this.wasmModule = wasmModule; + this.wasmMemory = wasmMemory; + } + markId(worker) { + if (worker.__emnapi_tid) + return worker.__emnapi_tid; + const tid = nextWorkerID + 43; + nextWorkerID = (nextWorkerID + 1) % (WASI_THREADS_MAX_TID - 42); + this.pthreads[tid] = worker; + worker.__emnapi_tid = tid; + return tid; + } + returnWorkerToPool(worker) { + var tid = worker.__emnapi_tid; + if (tid !== undefined) { + delete this.pthreads[tid]; + } + this.unusedWorkers.push(worker); + delete worker.__emnapi_tid; + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + } + loadWasmModuleToWorker(worker, sab) { + if (worker.whenLoaded) + return worker.whenLoaded; + const err = this.printErr; + const beforeLoad = this._beforeLoad; + const _this = this; + worker.whenLoaded = new Promise((resolve, reject) => { + const handleError = function (e) { + let message = 'worker sent an error!'; + if (worker.__emnapi_tid !== undefined) { + message = 'worker (tid = ' + worker.__emnapi_tid + ') sent an error!'; + } + if ('message' in e) { + err(message + ' ' + e.message); + if (e.message.indexOf('RuntimeError') !== -1 || e.message.indexOf('unreachable') !== -1) { + try { + _this.terminateAllThreads(); + } + catch (_) { } + } + } + else { + err(message); + } + reject(e); + throw e; + }; + const handleMessage = (data) => { + if (data.__emnapi__) { + const type = data.__emnapi__.type; + const payload = data.__emnapi__.payload; + if (type === 'loaded') { + worker.loaded = true; + if (ENVIRONMENT_IS_NODE && !worker.__emnapi_tid) { + worker.unref(); + } + resolve(worker); + } + else if (type === 'cleanup-thread') { + if (payload.tid in this.pthreads) { + this.cleanThread(worker, payload.tid); + } + } + else if (type === 'spawn-thread') { + this.threadSpawn(payload.startArg, payload.errorOrTid); + } + else if (type === 'terminate-all-threads') { + this.terminateAllThreads(); + } + } + }; + worker.onmessage = (e) => { + handleMessage(e.data); + this.fireMessageEvent(worker, e); + }; + worker.onerror = handleError; + if (ENVIRONMENT_IS_NODE) { + worker.on('message', function (data) { + var _a, _b; + (_b = (_a = worker).onmessage) === null || _b === void 0 ? void 0 : _b.call(_a, { + data + }); + }); + worker.on('error', function (e) { + var _a, _b; + (_b = (_a = worker).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, e); + }); + worker.on('detachedExit', function () { }); + } + if (typeof beforeLoad === 'function') { + beforeLoad(worker); + } + try { + worker.postMessage(createMessage('load', { + wasmModule: this.wasmModule, + wasmMemory: this.wasmMemory, + sab + })); + } + catch (err) { + checkSharedWasmMemory(this.wasmMemory); + throw err; + } + }); + return worker.whenLoaded; + } + allocateUnusedWorker() { + const _onCreateWorker = this._onCreateWorker; + if (typeof _onCreateWorker !== 'function') { + throw new TypeError('`options.onCreateWorker` is not provided'); + } + const worker = _onCreateWorker({ type: 'thread', name: 'emnapi-pthread' }); + this.unusedWorkers.push(worker); + return worker; + } + getNewWorker(sab) { + if (this._reuseWorker) { + if (this.unusedWorkers.length === 0) { + if (this._reuseWorker.strict) { + if (!ENVIRONMENT_IS_NODE) { + const err = this.printErr; + err('Tried to spawn a new thread, but the thread pool is exhausted.\n' + + 'This might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.'); + return; + } + } + const worker = this.allocateUnusedWorker(); + this.loadWasmModuleToWorker(worker, sab); + } + return this.unusedWorkers.pop(); + } + const worker = this.allocateUnusedWorker(); + this.loadWasmModuleToWorker(worker, sab); + return this.unusedWorkers.pop(); + } + cleanThread(worker, tid, force) { + if (!force && this._reuseWorker) { + this.returnWorkerToPool(worker); + } + else { + delete this.pthreads[tid]; + this.terminateWorker(worker); + delete worker.__emnapi_tid; + } + } + terminateWorker(worker) { + var _a; + const tid = worker.__emnapi_tid; + worker.terminate(); + (_a = this.messageEvents.get(worker)) === null || _a === void 0 ? void 0 : _a.clear(); + this.messageEvents.delete(worker); + worker.onmessage = (e) => { + if (e.data.__emnapi__) { + const err = this.printErr; + err('received "' + e.data.__emnapi__.type + '" command from terminated worker: ' + tid); + } + }; + } + terminateAllThreads() { + const runningWorkers = Object.values(this.pthreads); + for (let i = 0; i < runningWorkers.length; ++i) { + this.terminateWorker(runningWorkers[i]); + } + for (let i = 0; i < this.unusedWorkers.length; ++i) { + this.terminateWorker(this.unusedWorkers[i]); + } + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.preparePool(); + } + addMessageEventListener(worker, onMessage) { + let listeners = this.messageEvents.get(worker); + if (!listeners) { + listeners = new Set(); + this.messageEvents.set(worker, listeners); + } + listeners.add(onMessage); + return () => { + listeners === null || listeners === void 0 ? void 0 : listeners.delete(onMessage); + }; + } + fireMessageEvent(worker, e) { + const listeners = this.messageEvents.get(worker); + if (!listeners) + return; + const err = this.printErr; + listeners.forEach((listener) => { + try { + listener(e); + } + catch (e) { + err(e.stack); + } + }); + } +} + +const kIsProxy = Symbol('kIsProxy'); +function createInstanceProxy(instance, memory) { + if (instance[kIsProxy]) + return instance; + const originalExports = instance.exports; + const createHandler = function (target) { + const handlers = [ + 'apply', + 'construct', + 'defineProperty', + 'deleteProperty', + 'get', + 'getOwnPropertyDescriptor', + 'getPrototypeOf', + 'has', + 'isExtensible', + 'ownKeys', + 'preventExtensions', + 'set', + 'setPrototypeOf' + ]; + const handler = {}; + for (let i = 0; i < handlers.length; i++) { + const name = handlers[i]; + handler[name] = function () { + const args = Array.prototype.slice.call(arguments, 1); + args.unshift(target); + return Reflect[name].apply(Reflect, args); + }; + } + return handler; + }; + const handler = createHandler(originalExports); + const _initialize = () => { }; + const _start = () => 0; + handler.get = function (_target, p, receiver) { + var _a; + if (p === 'memory') { + return (_a = (typeof memory === 'function' ? memory() : memory)) !== null && _a !== void 0 ? _a : Reflect.get(originalExports, p, receiver); + } + if (p === '_initialize') { + return p in originalExports ? _initialize : undefined; + } + if (p === '_start') { + return p in originalExports ? _start : undefined; + } + return Reflect.get(originalExports, p, receiver); + }; + handler.has = function (_target, p) { + if (p === 'memory') + return true; + return Reflect.has(originalExports, p); + }; + const exportsProxy = new Proxy(Object.create(null), handler); + return new Proxy(instance, { + get(target, p, receiver) { + if (p === 'exports') { + return exportsProxy; + } + if (p === kIsProxy) { + return true; + } + return Reflect.get(target, p, receiver); + } + }); +} + +const patchedWasiInstances = new WeakMap(); +class WASIThreads { + constructor(options) { + if (!options) { + throw new TypeError('WASIThreads(): options is not provided'); + } + if (!options.wasi) { + throw new TypeError('WASIThreads(): options.wasi is not provided'); + } + patchedWasiInstances.set(this, new WeakSet()); + const wasi = options.wasi; + patchWasiInstance(this, wasi); + this.wasi = wasi; + if ('childThread' in options) { + this.childThread = Boolean(options.childThread); + } + else { + this.childThread = false; + } + this.PThread = undefined; + if ('threadManager' in options) { + if (typeof options.threadManager === 'function') { + this.PThread = options.threadManager(); + } + else { + this.PThread = options.threadManager; + } + } + else { + if (!this.childThread) { + this.PThread = new ThreadManager(options); + this.PThread.init(); + } + } + let waitThreadStart = false; + if ('waitThreadStart' in options) { + waitThreadStart = typeof options.waitThreadStart === 'number' ? options.waitThreadStart : Boolean(options.waitThreadStart); + } + const postMessage = getPostMessage(options); + if (this.childThread && typeof postMessage !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMessage; + const wasm64 = Boolean(options.wasm64); + const threadSpawn = (startArg, errorOrTid) => { + var _a; + const EAGAIN = 6; + const isNewABI = errorOrTid !== undefined; + try { + checkSharedWasmMemory(this.wasmMemory); + } + catch (err) { + (_a = this.PThread) === null || _a === void 0 ? void 0 : _a.printErr(err.stack); + if (isNewABI) { + const struct = new Int32Array(this.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct, 0, 1); + Atomics.store(struct, 1, EAGAIN); + Atomics.notify(struct, 1); + return 1; + } + else { + return -EAGAIN; + } + } + if (!isNewABI) { + const malloc = this.wasmInstance.exports.malloc; + errorOrTid = wasm64 ? Number(malloc(BigInt(8))) : (malloc(8) >>> 0); + if (!errorOrTid) { + return -48; + } + } + const _free = this.wasmInstance.exports.free; + const free = wasm64 ? (ptr) => { _free(BigInt(ptr)); } : _free; + const struct = new Int32Array(this.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, 0); + if (this.childThread) { + postMessage(createMessage('spawn-thread', { + startArg, + errorOrTid: errorOrTid + })); + Atomics.wait(struct, 1, 0); + const isError = Atomics.load(struct, 0); + const result = Atomics.load(struct, 1); + if (isNewABI) { + return isError; + } + free(errorOrTid); + return isError ? -result : result; + } + const shouldWait = waitThreadStart || (waitThreadStart === 0); + let sab; + if (shouldWait) { + sab = new Int32Array(new SharedArrayBuffer(16 + 8192)); + Atomics.store(sab, 0, 0); + } + let worker; + let tid; + const PThread = this.PThread; + try { + worker = PThread.getNewWorker(sab); + if (!worker) { + throw new Error('failed to get new worker'); + } + tid = PThread.markId(worker); + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + worker.postMessage(createMessage('start', { + tid, + arg: startArg, + sab + })); + if (shouldWait) { + if (typeof waitThreadStart === 'number') { + const waitResult = Atomics.wait(sab, 0, 0, waitThreadStart); + if (waitResult === 'timed-out') { + throw new Error('Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.'); + } + } + else { + Atomics.wait(sab, 0, 0); + } + const r = Atomics.load(sab, 0); + if (r > 1) { + throw deserizeErrorFromBuffer(sab.buffer); + } + } + } + catch (e) { + if (worker !== undefined && tid !== undefined) { + try { + PThread.cleanThread(worker, tid, true); + } + catch (_) { } + } + Atomics.store(struct, 0, 1); + Atomics.store(struct, 1, EAGAIN); + Atomics.notify(struct, 1); + PThread === null || PThread === void 0 ? void 0 : PThread.printErr(e.stack); + if (isNewABI) { + return 1; + } + free(errorOrTid); + return -EAGAIN; + } + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, tid); + Atomics.notify(struct, 1); + if (!shouldWait) { + worker.whenLoaded.catch((err) => { + delete worker.whenLoaded; + PThread.cleanThread(worker, tid, true); + throw err; + }); + } + if (isNewABI) { + return 0; + } + free(errorOrTid); + return tid; + }; + this.threadSpawn = threadSpawn; + if (this.PThread) { + this.PThread.threadSpawn = threadSpawn; + } + } + getImportObject() { + return { + wasi: { + 'thread-spawn': this.threadSpawn + } + }; + } + setup(wasmInstance, wasmModule, wasmMemory) { + wasmMemory !== null && wasmMemory !== void 0 ? wasmMemory : (wasmMemory = wasmInstance.exports.memory); + this.wasmInstance = wasmInstance; + this.wasmMemory = wasmMemory; + if (this.PThread) { + this.PThread.setup(wasmModule, wasmMemory); + } + } + preloadWorkers() { + if (this.PThread) { + return this.PThread.preloadWorkers(); + } + return Promise.resolve([]); + } + initialize(instance, module, memory) { + const exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + const wasi = this.wasi; + if (('_start' in exports) && (typeof exports._start === 'function')) { + if (this.childThread) { + wasi.start(instance); + try { + const kStarted = getWasiSymbol(wasi, 'kStarted'); + wasi[kStarted] = false; + } + catch (_) { } + } + else { + setupInstance(wasi, instance); + } + } + else { + wasi.initialize(instance); + } + return instance; + } + start(instance, module, memory) { + const exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + const exitCode = this.wasi.start(instance); + return { exitCode, instance }; + } + terminateAllThreads() { + var _a; + if (!this.childThread) { + (_a = this.PThread) === null || _a === void 0 ? void 0 : _a.terminateAllThreads(); + } + else { + this.postMessage(createMessage('terminate-all-threads', {})); + } + } +} +function patchWasiInstance(wasiThreads, wasi) { + const patched = patchedWasiInstances.get(wasiThreads); + if (patched.has(wasi)) { + return; + } + const _this = wasiThreads; + const wasiImport = wasi.wasiImport; + if (wasiImport) { + const proc_exit = wasiImport.proc_exit; + wasiImport.proc_exit = function (code) { + _this.terminateAllThreads(); + return proc_exit.call(this, code); + }; + } + if (!_this.childThread) { + const start = wasi.start; + if (typeof start === 'function') { + wasi.start = function (instance) { + try { + return start.call(this, instance); + } + catch (err) { + if (isTrapError(err)) { + _this.terminateAllThreads(); + } + throw err; + } + }; + } + } + patched.add(wasi); +} +function getWasiSymbol(wasi, description) { + const symbols = Object.getOwnPropertySymbols(wasi); + const selectDescription = (description) => (s) => { + if (s.description) { + return s.description === description; + } + return s.toString() === `Symbol(${description})`; + }; + if (Array.isArray(description)) { + return description.map(d => symbols.filter(selectDescription(d))[0]); + } + return symbols.filter(selectDescription(description))[0]; +} +function setupInstance(wasi, instance) { + const [kInstance, kSetMemory] = getWasiSymbol(wasi, ['kInstance', 'kSetMemory']); + wasi[kInstance] = instance; + wasi[kSetMemory](instance.exports.memory); +} + +class ThreadMessageHandler { + constructor(options) { + const postMsg = getPostMessage(options); + if (typeof postMsg !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMsg; + this.onLoad = options === null || options === void 0 ? void 0 : options.onLoad; + this.onError = typeof (options === null || options === void 0 ? void 0 : options.onError) === 'function' ? options.onError : (_type, err) => { throw err; }; + this.instance = undefined; + this.messagesBeforeLoad = []; + } + instantiate(data) { + if (typeof this.onLoad === 'function') { + return this.onLoad(data); + } + throw new Error('ThreadMessageHandler.prototype.instantiate is not implemented'); + } + handle(e) { + var _a; + if ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.__emnapi__) { + const type = e.data.__emnapi__.type; + const payload = e.data.__emnapi__.payload; + try { + if (type === 'load') { + this._load(payload); + } + else if (type === 'start') { + this.handleAfterLoad(e, () => { + this._start(payload); + }); + } + } + catch (err) { + this.onError(err, type); + } + } + } + _load(payload) { + if (this.instance !== undefined) + return; + let source; + try { + source = this.instantiate(payload); + } + catch (err) { + this._loaded(err, null, payload); + return; + } + const then = source && 'then' in source ? source.then : undefined; + if (typeof then === 'function') { + then.call(source, (source) => { this._loaded(null, source, payload); }, (err) => { this._loaded(err, null, payload); }); + } + else { + this._loaded(null, source, payload); + } + } + _start(payload) { + const wasi_thread_start = this.instance.exports.wasi_thread_start; + if (typeof wasi_thread_start !== 'function') { + const err = new TypeError('wasi_thread_start is not exported'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + const postMessage = this.postMessage; + const tid = payload.tid; + const startArg = payload.arg; + notifyPthreadCreateResult(payload.sab, 1); + try { + wasi_thread_start(tid, startArg); + } + catch (err) { + if (err !== 'unwind') { + throw err; + } + else { + return; + } + } + postMessage(createMessage('cleanup-thread', { tid })); + } + _loaded(err, source, payload) { + if (err) { + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + if (source == null) { + const err = new TypeError('onLoad should return an object'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + const instance = source.instance; + if (!instance) { + const err = new TypeError('onLoad should return an object which includes "instance"'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + this.instance = instance; + const postMessage = this.postMessage; + postMessage(createMessage('loaded', {})); + const messages = this.messagesBeforeLoad; + this.messagesBeforeLoad = []; + for (let i = 0; i < messages.length; i++) { + const data = messages[i]; + this.handle({ data }); + } + } + handleAfterLoad(e, f) { + if (this.instance !== undefined) { + f.call(this, e); + } + else { + this.messagesBeforeLoad.push(e.data); + } + } +} +function notifyPthreadCreateResult(sab, result, error) { + if (sab) { + serizeErrorToBuffer(sab.buffer, result, error); + Atomics.notify(sab, 0); + } +} + +exports.ThreadManager = ThreadManager; +exports.ThreadMessageHandler = ThreadMessageHandler; +exports.WASIThreads = WASIThreads; +exports.createInstanceProxy = createInstanceProxy; +exports.isSharedArrayBuffer = isSharedArrayBuffer; +exports.isTrapError = isTrapError; diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts new file mode 100644 index 000000000..1d3951c36 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts @@ -0,0 +1,271 @@ +/// + +import type { Worker as Worker_2 } from 'worker_threads'; + +/** @public */ +export declare interface BaseOptions { + wasi: WASIInstance; + version?: 'preview1'; + wasm64?: boolean; +} + +/** @public */ +export declare interface ChildThreadOptions extends BaseOptions { + childThread: true; + postMessage?: (data: any) => void; +} + +/** @public */ +export declare interface CleanupThreadPayload { + tid: number; +} + +/** @public */ +export declare interface CommandInfo { + type: T; + payload: CommandPayloadMap[T]; +} + +/** @public */ +export declare interface CommandPayloadMap { + load: LoadPayload; + loaded: LoadedPayload; + start: StartPayload; + 'cleanup-thread': CleanupThreadPayload; + 'terminate-all-threads': TerminateAllThreadsPayload; + 'spawn-thread': SpawnThreadPayload; +} + +/** @public */ +export declare type CommandType = keyof CommandPayloadMap; + +/** @public */ +export declare function createInstanceProxy(instance: WebAssembly.Instance, memory?: WebAssembly.Memory | (() => WebAssembly.Memory)): WebAssembly.Instance; + +/** @public */ +export declare function isSharedArrayBuffer(value: any): value is SharedArrayBuffer; + +/** @public */ +export declare function isTrapError(e: Error): e is WebAssembly.RuntimeError; + +/** @public */ +export declare interface LoadedPayload { +} + +/** @public */ +export declare interface LoadPayload { + wasmModule: WebAssembly.Module; + wasmMemory: WebAssembly.Memory; + sab?: Int32Array; +} + +/** @public */ +export declare interface MainThreadBaseOptions extends BaseOptions { + waitThreadStart?: boolean | number; +} + +/** @public */ +export declare type MainThreadOptions = MainThreadOptionsWithThreadManager | MainThreadOptionsCreateThreadManager; + +/** @public */ +export declare interface MainThreadOptionsCreateThreadManager extends MainThreadBaseOptions, ThreadManagerOptionsMain { +} + +/** @public */ +export declare interface MainThreadOptionsWithThreadManager extends MainThreadBaseOptions { + threadManager?: ThreadManager | (() => ThreadManager); +} + +/** @public */ +export declare interface MessageEventData { + __emnapi__: CommandInfo; +} + +/** @public */ +export declare interface ReuseWorkerOptions { + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size | PTHREAD_POOL_SIZE} + */ + size: number; + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size-strict | PTHREAD_POOL_SIZE_STRICT} + */ + strict?: boolean; +} + +/** @public */ +export declare interface SpawnThreadPayload { + startArg: number; + errorOrTid: number; +} + +/** @public */ +export declare interface StartPayload { + tid: number; + arg: number; + sab?: Int32Array; +} + +/** @public */ +export declare interface StartResult { + exitCode: number; + instance: WebAssembly.Instance; +} + +/** @public */ +export declare interface TerminateAllThreadsPayload { +} + +/** @public */ +export declare class ThreadManager { + unusedWorkers: WorkerLike[]; + pthreads: Record; + get nextWorkerID(): number; + wasmModule: WebAssembly.Module | null; + wasmMemory: WebAssembly.Memory | null; + private readonly messageEvents; + private readonly _childThread; + private readonly _onCreateWorker; + private readonly _reuseWorker; + private readonly _beforeLoad?; + /* Excluded from this release type: printErr */ + threadSpawn?: ((startArg: number, errorOrTid?: number) => number); + constructor(options: ThreadManagerOptions); + init(): void; + initMainThread(): void; + private preparePool; + shouldPreloadWorkers(): boolean; + loadWasmModuleToAllWorkers(): Promise; + preloadWorkers(): Promise; + setup(wasmModule: WebAssembly.Module, wasmMemory: WebAssembly.Memory): void; + markId(worker: WorkerLike): number; + returnWorkerToPool(worker: WorkerLike): void; + loadWasmModuleToWorker(worker: WorkerLike, sab?: Int32Array): Promise; + allocateUnusedWorker(): WorkerLike; + getNewWorker(sab?: Int32Array): WorkerLike | undefined; + cleanThread(worker: WorkerLike, tid: number, force?: boolean): void; + terminateWorker(worker: WorkerLike): void; + terminateAllThreads(): void; + addMessageEventListener(worker: WorkerLike, onMessage: (e: WorkerMessageEvent) => void): () => void; + fireMessageEvent(worker: WorkerLike, e: WorkerMessageEvent): void; +} + +/** @public */ +export declare type ThreadManagerOptions = ThreadManagerOptionsMain | ThreadManagerOptionsChild; + +/** @public */ +export declare interface ThreadManagerOptionsBase { + printErr?: (message: string) => void; + threadSpawn?: (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare interface ThreadManagerOptionsChild extends ThreadManagerOptionsBase { + childThread: true; +} + +/** @public */ +export declare interface ThreadManagerOptionsMain extends ThreadManagerOptionsBase { + beforeLoad?: (worker: WorkerLike) => any; + reuseWorker?: boolean | number | ReuseWorkerOptions; + onCreateWorker: WorkerFactory; + childThread?: false; +} + +/** @public */ +export declare class ThreadMessageHandler { + protected instance: WebAssembly.Instance | undefined; + private messagesBeforeLoad; + protected postMessage: (message: any) => void; + protected onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + protected onError: (error: Error, type: WorkerMessageType) => void; + constructor(options?: ThreadMessageHandlerOptions); + /** @virtual */ + instantiate(data: LoadPayload): WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + /** @virtual */ + handle(e: WorkerMessageEvent>): void; + private _load; + private _start; + protected _loaded(err: Error | null, source: WebAssembly.WebAssemblyInstantiatedSource | null, payload: LoadPayload): void; + protected handleAfterLoad(e: E, f: (e: E) => void): void; +} + +/** @public */ +export declare interface ThreadMessageHandlerOptions { + onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + onError?: (error: Error, type: WorkerMessageType) => void; + postMessage?: (message: any) => void; +} + +/** @public */ +export declare interface WASIInstance { + readonly wasiImport?: Record; + initialize(instance: object): void; + start(instance: object): number; + getImportObject?(): any; +} + +/** @public */ +export declare class WASIThreads { + PThread: ThreadManager | undefined; + private wasmMemory; + private wasmInstance; + private readonly threadSpawn; + readonly childThread: boolean; + private readonly postMessage; + readonly wasi: WASIInstance; + constructor(options: WASIThreadsOptions); + getImportObject(): { + wasi: WASIThreadsImports; + }; + setup(wasmInstance: WebAssembly.Instance, wasmModule: WebAssembly.Module, wasmMemory?: WebAssembly.Memory): void; + preloadWorkers(): Promise; + /** + * It's ok to call this method to a WASI command module. + * + * in child thread, must call this method instead of {@link WASIThreads.start} even if it's a WASI command module + * + * @returns A proxied WebAssembly instance if in child thread, other wise the original instance + */ + initialize(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): WebAssembly.Instance; + /** + * Equivalent to calling {@link WASIThreads.initialize} and then calling {@link WASIInstance.start} + * ```js + * this.initialize(instance, module, memory) + * this.wasi.start(instance) + * ``` + */ + start(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): StartResult; + terminateAllThreads(): void; +} + +/** @public */ +export declare interface WASIThreadsImports { + 'thread-spawn': (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare type WASIThreadsOptions = MainThreadOptions | ChildThreadOptions; + +/** @public */ +export declare type WorkerFactory = (ctx: { + type: string; + name: string; +}) => WorkerLike; + +/** @public */ +export declare type WorkerLike = (Worker | Worker_2) & { + whenLoaded?: Promise; + loaded?: boolean; + __emnapi_tid?: number; +}; + +/** @public */ +export declare interface WorkerMessageEvent { + data: T; +} + +/** @public */ +export declare type WorkerMessageType = 'load' | 'start'; + +export { } diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js new file mode 100644 index 000000000..e7a7901d0 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js @@ -0,0 +1 @@ +const e="undefined"!=typeof WebAssembly?WebAssembly:"undefined"!=typeof WXWebAssembly?WXWebAssembly:void 0,t="object"==typeof process&&null!==process&&"object"==typeof process.versions&&null!==process.versions&&"string"==typeof process.versions.node;function r(e){return"function"==typeof(null==e?void 0:e.postMessage)?e.postMessage:"function"==typeof postMessage?postMessage:void 0}function s(e){return"function"==typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"[object SharedArrayBuffer]"===Object.prototype.toString.call(e)}function o(t){try{return t instanceof e.RuntimeError}catch(e){return!1}}function n(e,t){return{__emnapi__:{type:e,payload:t}}}function i(e){if(e){if(!s(e.buffer))throw new Error("Multithread features require shared wasm memory. Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, then create WebAssembly.Memory with `shared: true` option")}else if("undefined"==typeof SharedArrayBuffer)throw new Error("Current environment does not support SharedArrayBuffer, threads are not available!")}let a=0;class d{get nextWorkerID(){return a}constructor(e){var t;if(this.unusedWorkers=[],this.pthreads=Object.create(null),this.wasmModule=null,this.wasmMemory=null,this.messageEvents=new WeakMap,!e)throw new TypeError("ThreadManager(): options is not provided");this._childThread="childThread"in e&&Boolean(e.childThread),this._childThread?(this._onCreateWorker=void 0,this._reuseWorker=!1,this._beforeLoad=void 0):(this._onCreateWorker=e.onCreateWorker,this._reuseWorker=function(e){var t;if("boolean"==typeof e)return!!e&&{size:0,strict:!1};if("number"==typeof e){if(!(e>=0))throw new RangeError("reuseWorker: size must be a non-negative integer");return{size:e,strict:!1}}if(!e)return!1;const r=null!==(t=Number(e.size))&&void 0!==t?t:0,s=Boolean(e.strict);if(!(r>0)&&s)throw new RangeError("reuseWorker: size must be set to positive integer if strict is set to true");return{size:r,strict:s}}(e.reuseWorker),this._beforeLoad=e.beforeLoad),this.printErr=null!==(t=e.printErr)&&void 0!==t?t:console.error.bind(console),this.threadSpawn=e.threadSpawn}init(){this._childThread||this.initMainThread()}initMainThread(){this.preparePool()}preparePool(){if(this._reuseWorker&&this._reuseWorker.size){let e=this._reuseWorker.size;for(;e--;){const e=this.allocateUnusedWorker();t&&(e.once("message",()=>{}),e.unref())}}}shouldPreloadWorkers(){return!this._childThread&&this._reuseWorker&&this._reuseWorker.size>0}loadWasmModuleToAllWorkers(){const e=Array(this.unusedWorkers.length);for(let r=0;r(t&&s.unref(),e),e=>{throw t&&s.unref(),e})}return Promise.all(e).catch(e=>{throw this.terminateAllThreads(),e})}preloadWorkers(){return this.shouldPreloadWorkers()?this.loadWasmModuleToAllWorkers():Promise.resolve([])}setup(e,t){this.wasmModule=e,this.wasmMemory=t}markId(e){if(e.__emnapi_tid)return e.__emnapi_tid;const t=a+43;return a=(a+1)%536870869,this.pthreads[t]=e,e.__emnapi_tid=t,t}returnWorkerToPool(e){var r=e.__emnapi_tid;void 0!==r&&delete this.pthreads[r],this.unusedWorkers.push(e),delete e.__emnapi_tid,t&&e.unref()}loadWasmModuleToWorker(e,r){if(e.whenLoaded)return e.whenLoaded;const s=this.printErr,o=this._beforeLoad,a=this;return e.whenLoaded=new Promise((d,h)=>{const l=r=>{if(r.__emnapi__){const s=r.__emnapi__.type,o=r.__emnapi__.payload;"loaded"===s?(e.loaded=!0,t&&!e.__emnapi_tid&&e.unref(),d(e)):"cleanup-thread"===s?o.tid in this.pthreads&&this.cleanThread(e,o.tid):"spawn-thread"===s?this.threadSpawn(o.startArg,o.errorOrTid):"terminate-all-threads"===s&&this.terminateAllThreads()}};e.onmessage=t=>{l(t.data),this.fireMessageEvent(e,t)},e.onerror=function(t){let r="worker sent an error!";if(void 0!==e.__emnapi_tid&&(r="worker (tid = "+e.__emnapi_tid+") sent an error!"),"message"in t){if(s(r+" "+t.message),-1!==t.message.indexOf("RuntimeError")||-1!==t.message.indexOf("unreachable"))try{a.terminateAllThreads()}catch(e){}}else s(r);throw h(t),t},t&&(e.on("message",function(t){var r,s;null===(s=(r=e).onmessage)||void 0===s||s.call(r,{data:t})}),e.on("error",function(t){var r,s;null===(s=(r=e).onerror)||void 0===s||s.call(r,t)}),e.on("detachedExit",function(){})),"function"==typeof o&&o(e);try{e.postMessage(n("load",{wasmModule:this.wasmModule,wasmMemory:this.wasmMemory,sab:r}))}catch(e){throw i(this.wasmMemory),e}}),e.whenLoaded}allocateUnusedWorker(){const e=this._onCreateWorker;if("function"!=typeof e)throw new TypeError("`options.onCreateWorker` is not provided");const t=e({type:"thread",name:"emnapi-pthread"});return this.unusedWorkers.push(t),t}getNewWorker(e){if(this._reuseWorker){if(0===this.unusedWorkers.length){if(this._reuseWorker.strict&&!t){return void(0,this.printErr)("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.")}const r=this.allocateUnusedWorker();this.loadWasmModuleToWorker(r,e)}return this.unusedWorkers.pop()}const r=this.allocateUnusedWorker();return this.loadWasmModuleToWorker(r,e),this.unusedWorkers.pop()}cleanThread(e,t,r){!r&&this._reuseWorker?this.returnWorkerToPool(e):(delete this.pthreads[t],this.terminateWorker(e),delete e.__emnapi_tid)}terminateWorker(e){var t;const r=e.__emnapi_tid;e.terminate(),null===(t=this.messageEvents.get(e))||void 0===t||t.clear(),this.messageEvents.delete(e),e.onmessage=e=>{if(e.data.__emnapi__){(0,this.printErr)('received "'+e.data.__emnapi__.type+'" command from terminated worker: '+r)}}}terminateAllThreads(){const e=Object.values(this.pthreads);for(let t=0;t{null==r||r.delete(t)}}fireMessageEvent(e,t){const r=this.messageEvents.get(e);if(!r)return;const s=this.printErr;r.forEach(e=>{try{e(t)}catch(e){s(e.stack)}})}}const h=Symbol("kIsProxy");function l(e,t){if(e[h])return e;const r=e.exports,s=function(e){const t=["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"],r={};for(let s=0;s{},n=()=>0;s.get=function(e,s,i){var a;return"memory"===s?null!==(a="function"==typeof t?t():t)&&void 0!==a?a:Reflect.get(r,s,i):"_initialize"===s?s in r?o:void 0:"_start"===s?s in r?n:void 0:Reflect.get(r,s,i)},s.has=function(e,t){return"memory"===t||Reflect.has(r,t)};const i=new Proxy(Object.create(null),s);return new Proxy(e,{get:(e,t,r)=>"exports"===t?i:t===h||Reflect.get(e,t,r)})}const c=new WeakMap;function u(e,t){const r=Object.getOwnPropertySymbols(e),s=e=>t=>t.description?t.description===e:t.toString()===`Symbol(${e})`;return Array.isArray(t)?t.map(e=>r.filter(s(e))[0]):r.filter(s(t))[0]}function f(e,t,r){e&&(!function(e,t,r){const s=new Int32Array(e);if(Atomics.store(s,0,t),t>1&&r){const t=r.name,o=r.message,n=r.stack,i=(new TextEncoder).encode(t),a=(new TextEncoder).encode(o),d=(new TextEncoder).encode(n);Atomics.store(s,1,i.length),Atomics.store(s,2,a.length),Atomics.store(s,3,d.length);const h=new Uint8Array(e);h.set(i,16),h.set(a,16+i.length),h.set(d,16+i.length+a.length)}}(e.buffer,t,r),Atomics.notify(e,0))}exports.ThreadManager=d,exports.ThreadMessageHandler=class{constructor(e){const t=r(e);if("function"!=typeof t)throw new TypeError("options.postMessage is not a function");this.postMessage=t,this.onLoad=null==e?void 0:e.onLoad,this.onError="function"==typeof(null==e?void 0:e.onError)?e.onError:(e,t)=>{throw t},this.instance=void 0,this.messagesBeforeLoad=[]}instantiate(e){if("function"==typeof this.onLoad)return this.onLoad(e);throw new Error("ThreadMessageHandler.prototype.instantiate is not implemented")}handle(e){var t;if(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.__emnapi__){const t=e.data.__emnapi__.type,r=e.data.__emnapi__.payload;try{"load"===t?this._load(r):"start"===t&&this.handleAfterLoad(e,()=>{this._start(r)})}catch(e){this.onError(e,t)}}}_load(e){if(void 0!==this.instance)return;let t;try{t=this.instantiate(e)}catch(t){return void this._loaded(t,null,e)}const r=t&&"then"in t?t.then:void 0;"function"==typeof r?r.call(t,t=>{this._loaded(null,t,e)},t=>{this._loaded(t,null,e)}):this._loaded(null,t,e)}_start(e){const t=this.instance.exports.wasi_thread_start;if("function"!=typeof t){const t=new TypeError("wasi_thread_start is not exported");throw f(e.sab,2,t),t}const r=this.postMessage,s=e.tid,o=e.arg;f(e.sab,1);try{t(s,o)}catch(e){if("unwind"!==e)throw e;return}r(n("cleanup-thread",{tid:s}))}_loaded(e,t,r){if(e)throw f(r.sab,2,e),e;if(null==t){const e=new TypeError("onLoad should return an object");throw f(r.sab,2,e),e}const s=t.instance;if(!s){const e=new TypeError('onLoad should return an object which includes "instance"');throw f(r.sab,2,e),e}this.instance=s;(0,this.postMessage)(n("loaded",{}));const o=this.messagesBeforeLoad;this.messagesBeforeLoad=[];for(let e=0;e{var o;const a=void 0!==s;try{i(this.wasmMemory)}catch(e){if(null===(o=this.PThread)||void 0===o||o.printErr(e.stack),a){const e=new Int32Array(this.wasmMemory.buffer,s,2);return Atomics.store(e,0,1),Atomics.store(e,1,6),Atomics.notify(e,1),1}return-6}if(!a){const e=this.wasmInstance.exports.malloc;if(!(s=u?Number(e(BigInt(8))):e(8)>>>0))return-48}const d=this.wasmInstance.exports.free,c=u?e=>{d(BigInt(e))}:d,f=new Int32Array(this.wasmMemory.buffer,s,2);if(Atomics.store(f,0,0),Atomics.store(f,1,0),this.childThread){l(n("spawn-thread",{startArg:r,errorOrTid:s})),Atomics.wait(f,1,0);const e=Atomics.load(f,0),t=Atomics.load(f,1);return a?e:(c(s),e?-t:t)}const p=h||0===h;let m,w,y;p&&(m=new Int32Array(new SharedArrayBuffer(8208)),Atomics.store(m,0,0));const _=this.PThread;try{if(w=_.getNewWorker(m),!w)throw new Error("failed to get new worker");if(y=_.markId(w),t&&w.unref(),w.postMessage(n("start",{tid:y,arg:r,sab:m})),p){if("number"==typeof h){if("timed-out"===Atomics.wait(m,0,0,h))throw new Error("Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.")}else Atomics.wait(m,0,0);if(Atomics.load(m,0)>1)throw function(t){var r,s;const o=new Int32Array(t);if(Atomics.load(o,0)<=1)return null;const n=Atomics.load(o,1),i=Atomics.load(o,2),a=Atomics.load(o,3),d=new Uint8Array(t),h=d.slice(16,16+n),l=d.slice(16+n,16+n+i),c=d.slice(16+n+i,16+n+i+a),u=(new TextDecoder).decode(h),f=(new TextDecoder).decode(l),p=(new TextDecoder).decode(c),m=new(null!==(r=globalThis[u])&&void 0!==r?r:"RuntimeError"===u&&null!==(s=e.RuntimeError)&&void 0!==s?s:Error)(f);return Object.defineProperty(m,"stack",{value:p,writable:!0,enumerable:!1,configurable:!0}),m}(m.buffer)}}catch(e){if(void 0!==w&&void 0!==y)try{_.cleanThread(w,y,!0)}catch(e){}return Atomics.store(f,0,1),Atomics.store(f,1,6),Atomics.notify(f,1),null==_||_.printErr(e.stack),a?1:(c(s),-6)}return Atomics.store(f,0,0),Atomics.store(f,1,y),Atomics.notify(f,1),p||w.whenLoaded.catch(e=>{throw delete w.whenLoaded,_.cleanThread(w,y,!0),e}),a?0:(c(s),y)};this.threadSpawn=f,this.PThread&&(this.PThread.threadSpawn=f)}getImportObject(){return{wasi:{"thread-spawn":this.threadSpawn}}}setup(e,t,r){null!=r||(r=e.exports.memory),this.wasmInstance=e,this.wasmMemory=r,this.PThread&&this.PThread.setup(t,r)}preloadWorkers(){return this.PThread?this.PThread.preloadWorkers():Promise.resolve([])}initialize(e,t,r){const s=e.exports;null!=r||(r=s.memory),this.childThread&&(e=l(e,r)),this.setup(e,t,r);const o=this.wasi;if("_start"in s&&"function"==typeof s._start)if(this.childThread){o.start(e);try{o[u(o,"kStarted")]=!1}catch(e){}}else!function(e,t){const[r,s]=u(e,["kInstance","kSetMemory"]);e[r]=t,e[s](t.exports.memory)}(o,e);else o.initialize(e);return e}start(e,t,r){const s=e.exports;null!=r||(r=s.memory),this.childThread&&(e=l(e,r)),this.setup(e,t,r);return{exitCode:this.wasi.start(e),instance:e}}terminateAllThreads(){var e;this.childThread?this.postMessage(n("terminate-all-threads",{})):null===(e=this.PThread)||void 0===e||e.terminateAllThreads()}},exports.createInstanceProxy=l,exports.isSharedArrayBuffer=s,exports.isTrapError=o; diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts new file mode 100644 index 000000000..1d3951c36 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts @@ -0,0 +1,271 @@ +/// + +import type { Worker as Worker_2 } from 'worker_threads'; + +/** @public */ +export declare interface BaseOptions { + wasi: WASIInstance; + version?: 'preview1'; + wasm64?: boolean; +} + +/** @public */ +export declare interface ChildThreadOptions extends BaseOptions { + childThread: true; + postMessage?: (data: any) => void; +} + +/** @public */ +export declare interface CleanupThreadPayload { + tid: number; +} + +/** @public */ +export declare interface CommandInfo { + type: T; + payload: CommandPayloadMap[T]; +} + +/** @public */ +export declare interface CommandPayloadMap { + load: LoadPayload; + loaded: LoadedPayload; + start: StartPayload; + 'cleanup-thread': CleanupThreadPayload; + 'terminate-all-threads': TerminateAllThreadsPayload; + 'spawn-thread': SpawnThreadPayload; +} + +/** @public */ +export declare type CommandType = keyof CommandPayloadMap; + +/** @public */ +export declare function createInstanceProxy(instance: WebAssembly.Instance, memory?: WebAssembly.Memory | (() => WebAssembly.Memory)): WebAssembly.Instance; + +/** @public */ +export declare function isSharedArrayBuffer(value: any): value is SharedArrayBuffer; + +/** @public */ +export declare function isTrapError(e: Error): e is WebAssembly.RuntimeError; + +/** @public */ +export declare interface LoadedPayload { +} + +/** @public */ +export declare interface LoadPayload { + wasmModule: WebAssembly.Module; + wasmMemory: WebAssembly.Memory; + sab?: Int32Array; +} + +/** @public */ +export declare interface MainThreadBaseOptions extends BaseOptions { + waitThreadStart?: boolean | number; +} + +/** @public */ +export declare type MainThreadOptions = MainThreadOptionsWithThreadManager | MainThreadOptionsCreateThreadManager; + +/** @public */ +export declare interface MainThreadOptionsCreateThreadManager extends MainThreadBaseOptions, ThreadManagerOptionsMain { +} + +/** @public */ +export declare interface MainThreadOptionsWithThreadManager extends MainThreadBaseOptions { + threadManager?: ThreadManager | (() => ThreadManager); +} + +/** @public */ +export declare interface MessageEventData { + __emnapi__: CommandInfo; +} + +/** @public */ +export declare interface ReuseWorkerOptions { + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size | PTHREAD_POOL_SIZE} + */ + size: number; + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size-strict | PTHREAD_POOL_SIZE_STRICT} + */ + strict?: boolean; +} + +/** @public */ +export declare interface SpawnThreadPayload { + startArg: number; + errorOrTid: number; +} + +/** @public */ +export declare interface StartPayload { + tid: number; + arg: number; + sab?: Int32Array; +} + +/** @public */ +export declare interface StartResult { + exitCode: number; + instance: WebAssembly.Instance; +} + +/** @public */ +export declare interface TerminateAllThreadsPayload { +} + +/** @public */ +export declare class ThreadManager { + unusedWorkers: WorkerLike[]; + pthreads: Record; + get nextWorkerID(): number; + wasmModule: WebAssembly.Module | null; + wasmMemory: WebAssembly.Memory | null; + private readonly messageEvents; + private readonly _childThread; + private readonly _onCreateWorker; + private readonly _reuseWorker; + private readonly _beforeLoad?; + /* Excluded from this release type: printErr */ + threadSpawn?: ((startArg: number, errorOrTid?: number) => number); + constructor(options: ThreadManagerOptions); + init(): void; + initMainThread(): void; + private preparePool; + shouldPreloadWorkers(): boolean; + loadWasmModuleToAllWorkers(): Promise; + preloadWorkers(): Promise; + setup(wasmModule: WebAssembly.Module, wasmMemory: WebAssembly.Memory): void; + markId(worker: WorkerLike): number; + returnWorkerToPool(worker: WorkerLike): void; + loadWasmModuleToWorker(worker: WorkerLike, sab?: Int32Array): Promise; + allocateUnusedWorker(): WorkerLike; + getNewWorker(sab?: Int32Array): WorkerLike | undefined; + cleanThread(worker: WorkerLike, tid: number, force?: boolean): void; + terminateWorker(worker: WorkerLike): void; + terminateAllThreads(): void; + addMessageEventListener(worker: WorkerLike, onMessage: (e: WorkerMessageEvent) => void): () => void; + fireMessageEvent(worker: WorkerLike, e: WorkerMessageEvent): void; +} + +/** @public */ +export declare type ThreadManagerOptions = ThreadManagerOptionsMain | ThreadManagerOptionsChild; + +/** @public */ +export declare interface ThreadManagerOptionsBase { + printErr?: (message: string) => void; + threadSpawn?: (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare interface ThreadManagerOptionsChild extends ThreadManagerOptionsBase { + childThread: true; +} + +/** @public */ +export declare interface ThreadManagerOptionsMain extends ThreadManagerOptionsBase { + beforeLoad?: (worker: WorkerLike) => any; + reuseWorker?: boolean | number | ReuseWorkerOptions; + onCreateWorker: WorkerFactory; + childThread?: false; +} + +/** @public */ +export declare class ThreadMessageHandler { + protected instance: WebAssembly.Instance | undefined; + private messagesBeforeLoad; + protected postMessage: (message: any) => void; + protected onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + protected onError: (error: Error, type: WorkerMessageType) => void; + constructor(options?: ThreadMessageHandlerOptions); + /** @virtual */ + instantiate(data: LoadPayload): WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + /** @virtual */ + handle(e: WorkerMessageEvent>): void; + private _load; + private _start; + protected _loaded(err: Error | null, source: WebAssembly.WebAssemblyInstantiatedSource | null, payload: LoadPayload): void; + protected handleAfterLoad(e: E, f: (e: E) => void): void; +} + +/** @public */ +export declare interface ThreadMessageHandlerOptions { + onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + onError?: (error: Error, type: WorkerMessageType) => void; + postMessage?: (message: any) => void; +} + +/** @public */ +export declare interface WASIInstance { + readonly wasiImport?: Record; + initialize(instance: object): void; + start(instance: object): number; + getImportObject?(): any; +} + +/** @public */ +export declare class WASIThreads { + PThread: ThreadManager | undefined; + private wasmMemory; + private wasmInstance; + private readonly threadSpawn; + readonly childThread: boolean; + private readonly postMessage; + readonly wasi: WASIInstance; + constructor(options: WASIThreadsOptions); + getImportObject(): { + wasi: WASIThreadsImports; + }; + setup(wasmInstance: WebAssembly.Instance, wasmModule: WebAssembly.Module, wasmMemory?: WebAssembly.Memory): void; + preloadWorkers(): Promise; + /** + * It's ok to call this method to a WASI command module. + * + * in child thread, must call this method instead of {@link WASIThreads.start} even if it's a WASI command module + * + * @returns A proxied WebAssembly instance if in child thread, other wise the original instance + */ + initialize(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): WebAssembly.Instance; + /** + * Equivalent to calling {@link WASIThreads.initialize} and then calling {@link WASIInstance.start} + * ```js + * this.initialize(instance, module, memory) + * this.wasi.start(instance) + * ``` + */ + start(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): StartResult; + terminateAllThreads(): void; +} + +/** @public */ +export declare interface WASIThreadsImports { + 'thread-spawn': (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare type WASIThreadsOptions = MainThreadOptions | ChildThreadOptions; + +/** @public */ +export declare type WorkerFactory = (ctx: { + type: string; + name: string; +}) => WorkerLike; + +/** @public */ +export declare type WorkerLike = (Worker | Worker_2) & { + whenLoaded?: Promise; + loaded?: boolean; + __emnapi_tid?: number; +}; + +/** @public */ +export declare interface WorkerMessageEvent { + data: T; +} + +/** @public */ +export declare type WorkerMessageType = 'load' | 'start'; + +export { } diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts new file mode 100644 index 000000000..23b1fe32d --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts @@ -0,0 +1,273 @@ +/// + +import type { Worker as Worker_2 } from 'worker_threads'; + +/** @public */ +export declare interface BaseOptions { + wasi: WASIInstance; + version?: 'preview1'; + wasm64?: boolean; +} + +/** @public */ +export declare interface ChildThreadOptions extends BaseOptions { + childThread: true; + postMessage?: (data: any) => void; +} + +/** @public */ +export declare interface CleanupThreadPayload { + tid: number; +} + +/** @public */ +export declare interface CommandInfo { + type: T; + payload: CommandPayloadMap[T]; +} + +/** @public */ +export declare interface CommandPayloadMap { + load: LoadPayload; + loaded: LoadedPayload; + start: StartPayload; + 'cleanup-thread': CleanupThreadPayload; + 'terminate-all-threads': TerminateAllThreadsPayload; + 'spawn-thread': SpawnThreadPayload; +} + +/** @public */ +export declare type CommandType = keyof CommandPayloadMap; + +/** @public */ +export declare function createInstanceProxy(instance: WebAssembly.Instance, memory?: WebAssembly.Memory | (() => WebAssembly.Memory)): WebAssembly.Instance; + +/** @public */ +export declare function isSharedArrayBuffer(value: any): value is SharedArrayBuffer; + +/** @public */ +export declare function isTrapError(e: Error): e is WebAssembly.RuntimeError; + +/** @public */ +export declare interface LoadedPayload { +} + +/** @public */ +export declare interface LoadPayload { + wasmModule: WebAssembly.Module; + wasmMemory: WebAssembly.Memory; + sab?: Int32Array; +} + +/** @public */ +export declare interface MainThreadBaseOptions extends BaseOptions { + waitThreadStart?: boolean | number; +} + +/** @public */ +export declare type MainThreadOptions = MainThreadOptionsWithThreadManager | MainThreadOptionsCreateThreadManager; + +/** @public */ +export declare interface MainThreadOptionsCreateThreadManager extends MainThreadBaseOptions, ThreadManagerOptionsMain { +} + +/** @public */ +export declare interface MainThreadOptionsWithThreadManager extends MainThreadBaseOptions { + threadManager?: ThreadManager | (() => ThreadManager); +} + +/** @public */ +export declare interface MessageEventData { + __emnapi__: CommandInfo; +} + +/** @public */ +export declare interface ReuseWorkerOptions { + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size | PTHREAD_POOL_SIZE} + */ + size: number; + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size-strict | PTHREAD_POOL_SIZE_STRICT} + */ + strict?: boolean; +} + +/** @public */ +export declare interface SpawnThreadPayload { + startArg: number; + errorOrTid: number; +} + +/** @public */ +export declare interface StartPayload { + tid: number; + arg: number; + sab?: Int32Array; +} + +/** @public */ +export declare interface StartResult { + exitCode: number; + instance: WebAssembly.Instance; +} + +/** @public */ +export declare interface TerminateAllThreadsPayload { +} + +/** @public */ +export declare class ThreadManager { + unusedWorkers: WorkerLike[]; + pthreads: Record; + get nextWorkerID(): number; + wasmModule: WebAssembly.Module | null; + wasmMemory: WebAssembly.Memory | null; + private readonly messageEvents; + private readonly _childThread; + private readonly _onCreateWorker; + private readonly _reuseWorker; + private readonly _beforeLoad?; + /* Excluded from this release type: printErr */ + threadSpawn?: ((startArg: number, errorOrTid?: number) => number); + constructor(options: ThreadManagerOptions); + init(): void; + initMainThread(): void; + private preparePool; + shouldPreloadWorkers(): boolean; + loadWasmModuleToAllWorkers(): Promise; + preloadWorkers(): Promise; + setup(wasmModule: WebAssembly.Module, wasmMemory: WebAssembly.Memory): void; + markId(worker: WorkerLike): number; + returnWorkerToPool(worker: WorkerLike): void; + loadWasmModuleToWorker(worker: WorkerLike, sab?: Int32Array): Promise; + allocateUnusedWorker(): WorkerLike; + getNewWorker(sab?: Int32Array): WorkerLike | undefined; + cleanThread(worker: WorkerLike, tid: number, force?: boolean): void; + terminateWorker(worker: WorkerLike): void; + terminateAllThreads(): void; + addMessageEventListener(worker: WorkerLike, onMessage: (e: WorkerMessageEvent) => void): () => void; + fireMessageEvent(worker: WorkerLike, e: WorkerMessageEvent): void; +} + +/** @public */ +export declare type ThreadManagerOptions = ThreadManagerOptionsMain | ThreadManagerOptionsChild; + +/** @public */ +export declare interface ThreadManagerOptionsBase { + printErr?: (message: string) => void; + threadSpawn?: (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare interface ThreadManagerOptionsChild extends ThreadManagerOptionsBase { + childThread: true; +} + +/** @public */ +export declare interface ThreadManagerOptionsMain extends ThreadManagerOptionsBase { + beforeLoad?: (worker: WorkerLike) => any; + reuseWorker?: boolean | number | ReuseWorkerOptions; + onCreateWorker: WorkerFactory; + childThread?: false; +} + +/** @public */ +export declare class ThreadMessageHandler { + protected instance: WebAssembly.Instance | undefined; + private messagesBeforeLoad; + protected postMessage: (message: any) => void; + protected onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + protected onError: (error: Error, type: WorkerMessageType) => void; + constructor(options?: ThreadMessageHandlerOptions); + /** @virtual */ + instantiate(data: LoadPayload): WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + /** @virtual */ + handle(e: WorkerMessageEvent>): void; + private _load; + private _start; + protected _loaded(err: Error | null, source: WebAssembly.WebAssemblyInstantiatedSource | null, payload: LoadPayload): void; + protected handleAfterLoad(e: E, f: (e: E) => void): void; +} + +/** @public */ +export declare interface ThreadMessageHandlerOptions { + onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + onError?: (error: Error, type: WorkerMessageType) => void; + postMessage?: (message: any) => void; +} + +/** @public */ +export declare interface WASIInstance { + readonly wasiImport?: Record; + initialize(instance: object): void; + start(instance: object): number; + getImportObject?(): any; +} + +/** @public */ +export declare class WASIThreads { + PThread: ThreadManager | undefined; + private wasmMemory; + private wasmInstance; + private readonly threadSpawn; + readonly childThread: boolean; + private readonly postMessage; + readonly wasi: WASIInstance; + constructor(options: WASIThreadsOptions); + getImportObject(): { + wasi: WASIThreadsImports; + }; + setup(wasmInstance: WebAssembly.Instance, wasmModule: WebAssembly.Module, wasmMemory?: WebAssembly.Memory): void; + preloadWorkers(): Promise; + /** + * It's ok to call this method to a WASI command module. + * + * in child thread, must call this method instead of {@link WASIThreads.start} even if it's a WASI command module + * + * @returns A proxied WebAssembly instance if in child thread, other wise the original instance + */ + initialize(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): WebAssembly.Instance; + /** + * Equivalent to calling {@link WASIThreads.initialize} and then calling {@link WASIInstance.start} + * ```js + * this.initialize(instance, module, memory) + * this.wasi.start(instance) + * ``` + */ + start(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): StartResult; + terminateAllThreads(): void; +} + +/** @public */ +export declare interface WASIThreadsImports { + 'thread-spawn': (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare type WASIThreadsOptions = MainThreadOptions | ChildThreadOptions; + +/** @public */ +export declare type WorkerFactory = (ctx: { + type: string; + name: string; +}) => WorkerLike; + +/** @public */ +export declare type WorkerLike = (Worker | Worker_2) & { + whenLoaded?: Promise; + loaded?: boolean; + __emnapi_tid?: number; +}; + +/** @public */ +export declare interface WorkerMessageEvent { + data: T; +} + +/** @public */ +export declare type WorkerMessageType = 'load' | 'start'; + +export { } + +export as namespace wasiThreads; diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js new file mode 100644 index 000000000..f2bc4d05a --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js @@ -0,0 +1,933 @@ +var _WebAssembly = typeof WebAssembly !== 'undefined' + ? WebAssembly + : typeof WXWebAssembly !== 'undefined' + ? WXWebAssembly + : undefined; +var ENVIRONMENT_IS_NODE = typeof process === 'object' && process !== null && + typeof process.versions === 'object' && process.versions !== null && + typeof process.versions.node === 'string'; +function getPostMessage(options) { + return typeof (options === null || options === void 0 ? void 0 : options.postMessage) === 'function' + ? options.postMessage + : typeof postMessage === 'function' + ? postMessage + : undefined; +} +function serizeErrorToBuffer(sab, code, error) { + var i32array = new Int32Array(sab); + Atomics.store(i32array, 0, code); + if (code > 1 && error) { + var name_1 = error.name; + var message = error.message; + var stack = error.stack; + var nameBuffer = new TextEncoder().encode(name_1); + var messageBuffer = new TextEncoder().encode(message); + var stackBuffer = new TextEncoder().encode(stack); + Atomics.store(i32array, 1, nameBuffer.length); + Atomics.store(i32array, 2, messageBuffer.length); + Atomics.store(i32array, 3, stackBuffer.length); + var buffer = new Uint8Array(sab); + buffer.set(nameBuffer, 16); + buffer.set(messageBuffer, 16 + nameBuffer.length); + buffer.set(stackBuffer, 16 + nameBuffer.length + messageBuffer.length); + } +} +function deserizeErrorFromBuffer(sab) { + var _a, _b; + var i32array = new Int32Array(sab); + var status = Atomics.load(i32array, 0); + if (status <= 1) { + return null; + } + var nameLength = Atomics.load(i32array, 1); + var messageLength = Atomics.load(i32array, 2); + var stackLength = Atomics.load(i32array, 3); + var buffer = new Uint8Array(sab); + var nameBuffer = buffer.slice(16, 16 + nameLength); + var messageBuffer = buffer.slice(16 + nameLength, 16 + nameLength + messageLength); + var stackBuffer = buffer.slice(16 + nameLength + messageLength, 16 + nameLength + messageLength + stackLength); + var name = new TextDecoder().decode(nameBuffer); + var message = new TextDecoder().decode(messageBuffer); + var stack = new TextDecoder().decode(stackBuffer); + var ErrorConstructor = (_a = globalThis[name]) !== null && _a !== void 0 ? _a : (name === 'RuntimeError' ? ((_b = _WebAssembly.RuntimeError) !== null && _b !== void 0 ? _b : Error) : Error); + var error = new ErrorConstructor(message); + Object.defineProperty(error, 'stack', { + value: stack, + writable: true, + enumerable: false, + configurable: true + }); + return error; +} +/** @public */ +function isSharedArrayBuffer(value) { + return ((typeof SharedArrayBuffer === 'function' && value instanceof SharedArrayBuffer) || + (Object.prototype.toString.call(value) === '[object SharedArrayBuffer]')); +} +/** @public */ +function isTrapError(e) { + try { + return e instanceof _WebAssembly.RuntimeError; + } + catch (_) { + return false; + } +} + +function createMessage(type, payload) { + return { + __emnapi__: { + type: type, + payload: payload + } + }; +} + +var WASI_THREADS_MAX_TID = 0x1FFFFFFF; +function checkSharedWasmMemory(wasmMemory) { + if (wasmMemory) { + if (!isSharedArrayBuffer(wasmMemory.buffer)) { + throw new Error('Multithread features require shared wasm memory. ' + + 'Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, ' + + 'then create WebAssembly.Memory with `shared: true` option'); + } + } + else { + if (typeof SharedArrayBuffer === 'undefined') { + throw new Error('Current environment does not support SharedArrayBuffer, threads are not available!'); + } + } +} +function getReuseWorker(value) { + var _a; + if (typeof value === 'boolean') { + return value ? { size: 0, strict: false } : false; + } + if (typeof value === 'number') { + if (!(value >= 0)) { + throw new RangeError('reuseWorker: size must be a non-negative integer'); + } + return { size: value, strict: false }; + } + if (!value) { + return false; + } + var size = (_a = Number(value.size)) !== null && _a !== void 0 ? _a : 0; + var strict = Boolean(value.strict); + if (!(size > 0) && strict) { + throw new RangeError('reuseWorker: size must be set to positive integer if strict is set to true'); + } + return { size: size, strict: strict }; +} +var nextWorkerID = 0; +/** @public */ +var ThreadManager = /*#__PURE__*/ (function () { + function ThreadManager(options) { + var _a; + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.wasmModule = null; + this.wasmMemory = null; + this.messageEvents = new WeakMap(); + if (!options) { + throw new TypeError('ThreadManager(): options is not provided'); + } + if ('childThread' in options) { + this._childThread = Boolean(options.childThread); + } + else { + this._childThread = false; + } + if (this._childThread) { + this._onCreateWorker = undefined; + this._reuseWorker = false; + this._beforeLoad = undefined; + } + else { + this._onCreateWorker = options.onCreateWorker; + this._reuseWorker = getReuseWorker(options.reuseWorker); + this._beforeLoad = options.beforeLoad; + } + this.printErr = (_a = options.printErr) !== null && _a !== void 0 ? _a : console.error.bind(console); + this.threadSpawn = options.threadSpawn; + } + Object.defineProperty(ThreadManager.prototype, "nextWorkerID", { + get: function () { return nextWorkerID; }, + enumerable: false, + configurable: true + }); + ThreadManager.prototype.init = function () { + if (!this._childThread) { + this.initMainThread(); + } + }; + ThreadManager.prototype.initMainThread = function () { + this.preparePool(); + }; + ThreadManager.prototype.preparePool = function () { + if (this._reuseWorker) { + if (this._reuseWorker.size) { + var pthreadPoolSize = this._reuseWorker.size; + while (pthreadPoolSize--) { + var worker = this.allocateUnusedWorker(); + if (ENVIRONMENT_IS_NODE) { + // https://github.com/nodejs/node/issues/53036 + worker.once('message', function () { }); + worker.unref(); + } + } + } + } + }; + ThreadManager.prototype.shouldPreloadWorkers = function () { + return !this._childThread && this._reuseWorker && this._reuseWorker.size > 0; + }; + ThreadManager.prototype.loadWasmModuleToAllWorkers = function () { + var _this_1 = this; + var promises = Array(this.unusedWorkers.length); + var _loop_1 = function (i) { + var worker = this_1.unusedWorkers[i]; + if (ENVIRONMENT_IS_NODE) + worker.ref(); + promises[i] = this_1.loadWasmModuleToWorker(worker).then(function (w) { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + return w; + }, function (e) { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + throw e; + }); + }; + var this_1 = this; + for (var i = 0; i < this.unusedWorkers.length; ++i) { + _loop_1(i); + } + return Promise.all(promises).catch(function (err) { + _this_1.terminateAllThreads(); + throw err; + }); + }; + ThreadManager.prototype.preloadWorkers = function () { + if (this.shouldPreloadWorkers()) { + return this.loadWasmModuleToAllWorkers(); + } + return Promise.resolve([]); + }; + ThreadManager.prototype.setup = function (wasmModule, wasmMemory) { + this.wasmModule = wasmModule; + this.wasmMemory = wasmMemory; + }; + ThreadManager.prototype.markId = function (worker) { + if (worker.__emnapi_tid) + return worker.__emnapi_tid; + var tid = nextWorkerID + 43; + nextWorkerID = (nextWorkerID + 1) % (WASI_THREADS_MAX_TID - 42); + this.pthreads[tid] = worker; + worker.__emnapi_tid = tid; + return tid; + }; + ThreadManager.prototype.returnWorkerToPool = function (worker) { + var tid = worker.__emnapi_tid; + if (tid !== undefined) { + delete this.pthreads[tid]; + } + this.unusedWorkers.push(worker); + delete worker.__emnapi_tid; + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + }; + ThreadManager.prototype.loadWasmModuleToWorker = function (worker, sab) { + var _this_1 = this; + if (worker.whenLoaded) + return worker.whenLoaded; + var err = this.printErr; + var beforeLoad = this._beforeLoad; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var _this = this; + worker.whenLoaded = new Promise(function (resolve, reject) { + var handleError = function (e) { + var message = 'worker sent an error!'; + if (worker.__emnapi_tid !== undefined) { + message = 'worker (tid = ' + worker.__emnapi_tid + ') sent an error!'; + } + if ('message' in e) { + err(message + ' ' + e.message); + if (e.message.indexOf('RuntimeError') !== -1 || e.message.indexOf('unreachable') !== -1) { + try { + _this.terminateAllThreads(); + } + catch (_) { } + } + } + else { + err(message); + } + reject(e); + throw e; + }; + var handleMessage = function (data) { + if (data.__emnapi__) { + var type = data.__emnapi__.type; + var payload = data.__emnapi__.payload; + if (type === 'loaded') { + worker.loaded = true; + if (ENVIRONMENT_IS_NODE && !worker.__emnapi_tid) { + worker.unref(); + } + resolve(worker); + // if (payload.err) { + // err('failed to load in child thread: ' + (payload.err.message || payload.err)) + // } + } + else if (type === 'cleanup-thread') { + if (payload.tid in _this_1.pthreads) { + _this_1.cleanThread(worker, payload.tid); + } + } + else if (type === 'spawn-thread') { + _this_1.threadSpawn(payload.startArg, payload.errorOrTid); + } + else if (type === 'terminate-all-threads') { + _this_1.terminateAllThreads(); + } + } + }; + worker.onmessage = function (e) { + handleMessage(e.data); + _this_1.fireMessageEvent(worker, e); + }; + worker.onerror = handleError; + if (ENVIRONMENT_IS_NODE) { + worker.on('message', function (data) { + var _a, _b; + (_b = (_a = worker).onmessage) === null || _b === void 0 ? void 0 : _b.call(_a, { + data: data + }); + }); + worker.on('error', function (e) { + var _a, _b; + (_b = (_a = worker).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, e); + }); + worker.on('detachedExit', function () { }); + } + if (typeof beforeLoad === 'function') { + beforeLoad(worker); + } + try { + worker.postMessage(createMessage('load', { + wasmModule: _this_1.wasmModule, + wasmMemory: _this_1.wasmMemory, + sab: sab + })); + } + catch (err) { + checkSharedWasmMemory(_this_1.wasmMemory); + throw err; + } + }); + return worker.whenLoaded; + }; + ThreadManager.prototype.allocateUnusedWorker = function () { + var _onCreateWorker = this._onCreateWorker; + if (typeof _onCreateWorker !== 'function') { + throw new TypeError('`options.onCreateWorker` is not provided'); + } + var worker = _onCreateWorker({ type: 'thread', name: 'emnapi-pthread' }); + this.unusedWorkers.push(worker); + return worker; + }; + ThreadManager.prototype.getNewWorker = function (sab) { + if (this._reuseWorker) { + if (this.unusedWorkers.length === 0) { + if (this._reuseWorker.strict) { + if (!ENVIRONMENT_IS_NODE) { + var err = this.printErr; + err('Tried to spawn a new thread, but the thread pool is exhausted.\n' + + 'This might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.'); + return; + } + } + var worker_1 = this.allocateUnusedWorker(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + this.loadWasmModuleToWorker(worker_1, sab); + } + return this.unusedWorkers.pop(); + } + var worker = this.allocateUnusedWorker(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + this.loadWasmModuleToWorker(worker, sab); + return this.unusedWorkers.pop(); + }; + ThreadManager.prototype.cleanThread = function (worker, tid, force) { + if (!force && this._reuseWorker) { + this.returnWorkerToPool(worker); + } + else { + delete this.pthreads[tid]; + this.terminateWorker(worker); + delete worker.__emnapi_tid; + } + }; + ThreadManager.prototype.terminateWorker = function (worker) { + var _this_1 = this; + var _a; + var tid = worker.__emnapi_tid; + // eslint-disable-next-line @typescript-eslint/no-floating-promises + worker.terminate(); + (_a = this.messageEvents.get(worker)) === null || _a === void 0 ? void 0 : _a.clear(); + this.messageEvents.delete(worker); + worker.onmessage = function (e) { + if (e.data.__emnapi__) { + var err = _this_1.printErr; + err('received "' + e.data.__emnapi__.type + '" command from terminated worker: ' + tid); + } + }; + }; + ThreadManager.prototype.terminateAllThreads = function () { + var runningWorkers = Object.values(this.pthreads); + for (var i = 0; i < runningWorkers.length; ++i) { + this.terminateWorker(runningWorkers[i]); + } + for (var i = 0; i < this.unusedWorkers.length; ++i) { + this.terminateWorker(this.unusedWorkers[i]); + } + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.preparePool(); + }; + ThreadManager.prototype.addMessageEventListener = function (worker, onMessage) { + var listeners = this.messageEvents.get(worker); + if (!listeners) { + listeners = new Set(); + this.messageEvents.set(worker, listeners); + } + listeners.add(onMessage); + return function () { + listeners === null || listeners === void 0 ? void 0 : listeners.delete(onMessage); + }; + }; + ThreadManager.prototype.fireMessageEvent = function (worker, e) { + var listeners = this.messageEvents.get(worker); + if (!listeners) + return; + var err = this.printErr; + listeners.forEach(function (listener) { + try { + listener(e); + } + catch (e) { + err(e.stack); + } + }); + }; + return ThreadManager; +}()); + +var kIsProxy = Symbol('kIsProxy'); +/** @public */ +function createInstanceProxy(instance, memory) { + if (instance[kIsProxy]) + return instance; + // https://github.com/nodejs/help/issues/4102 + var originalExports = instance.exports; + var createHandler = function (target) { + var handlers = [ + 'apply', + 'construct', + 'defineProperty', + 'deleteProperty', + 'get', + 'getOwnPropertyDescriptor', + 'getPrototypeOf', + 'has', + 'isExtensible', + 'ownKeys', + 'preventExtensions', + 'set', + 'setPrototypeOf' + ]; + var handler = {}; + var _loop_1 = function (i) { + var name_1 = handlers[i]; + handler[name_1] = function () { + var args = Array.prototype.slice.call(arguments, 1); + args.unshift(target); + return Reflect[name_1].apply(Reflect, args); + }; + }; + for (var i = 0; i < handlers.length; i++) { + _loop_1(i); + } + return handler; + }; + var handler = createHandler(originalExports); + var _initialize = function () { }; + var _start = function () { return 0; }; + handler.get = function (_target, p, receiver) { + var _a; + if (p === 'memory') { + return (_a = (typeof memory === 'function' ? memory() : memory)) !== null && _a !== void 0 ? _a : Reflect.get(originalExports, p, receiver); + } + if (p === '_initialize') { + return p in originalExports ? _initialize : undefined; + } + if (p === '_start') { + return p in originalExports ? _start : undefined; + } + return Reflect.get(originalExports, p, receiver); + }; + handler.has = function (_target, p) { + if (p === 'memory') + return true; + return Reflect.has(originalExports, p); + }; + var exportsProxy = new Proxy(Object.create(null), handler); + return new Proxy(instance, { + get: function (target, p, receiver) { + if (p === 'exports') { + return exportsProxy; + } + if (p === kIsProxy) { + return true; + } + return Reflect.get(target, p, receiver); + } + }); +} + +var patchedWasiInstances = new WeakMap(); +/** @public */ +var WASIThreads = /*#__PURE__*/ (function () { + function WASIThreads(options) { + var _this_1 = this; + if (!options) { + throw new TypeError('WASIThreads(): options is not provided'); + } + if (!options.wasi) { + throw new TypeError('WASIThreads(): options.wasi is not provided'); + } + patchedWasiInstances.set(this, new WeakSet()); + var wasi = options.wasi; + patchWasiInstance(this, wasi); + this.wasi = wasi; + if ('childThread' in options) { + this.childThread = Boolean(options.childThread); + } + else { + this.childThread = false; + } + this.PThread = undefined; + if ('threadManager' in options) { + if (typeof options.threadManager === 'function') { + this.PThread = options.threadManager(); + } + else { + this.PThread = options.threadManager; + } + } + else { + if (!this.childThread) { + this.PThread = new ThreadManager(options); + this.PThread.init(); + } + } + var waitThreadStart = false; + if ('waitThreadStart' in options) { + waitThreadStart = typeof options.waitThreadStart === 'number' ? options.waitThreadStart : Boolean(options.waitThreadStart); + } + var postMessage = getPostMessage(options); + if (this.childThread && typeof postMessage !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMessage; + var wasm64 = Boolean(options.wasm64); + var threadSpawn = function (startArg, errorOrTid) { + var _a; + var EAGAIN = 6; + var isNewABI = errorOrTid !== undefined; + try { + checkSharedWasmMemory(_this_1.wasmMemory); + } + catch (err) { + (_a = _this_1.PThread) === null || _a === void 0 ? void 0 : _a.printErr(err.stack); + if (isNewABI) { + var struct_1 = new Int32Array(_this_1.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct_1, 0, 1); + Atomics.store(struct_1, 1, EAGAIN); + Atomics.notify(struct_1, 1); + return 1; + } + else { + return -EAGAIN; + } + } + if (!isNewABI) { + var malloc = _this_1.wasmInstance.exports.malloc; + errorOrTid = wasm64 ? Number(malloc(BigInt(8))) : (malloc(8) >>> 0); + if (!errorOrTid) { + return -48; /* ENOMEM */ + } + } + var _free = _this_1.wasmInstance.exports.free; + var free = wasm64 ? function (ptr) { _free(BigInt(ptr)); } : _free; + var struct = new Int32Array(_this_1.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, 0); + if (_this_1.childThread) { + postMessage(createMessage('spawn-thread', { + startArg: startArg, + errorOrTid: errorOrTid + })); + Atomics.wait(struct, 1, 0); + var isError = Atomics.load(struct, 0); + var result = Atomics.load(struct, 1); + if (isNewABI) { + return isError; + } + free(errorOrTid); + return isError ? -result : result; + } + var shouldWait = waitThreadStart || (waitThreadStart === 0); + var sab; + if (shouldWait) { + sab = new Int32Array(new SharedArrayBuffer(16 + 8192)); + Atomics.store(sab, 0, 0); + } + var worker; + var tid; + var PThread = _this_1.PThread; + try { + worker = PThread.getNewWorker(sab); + if (!worker) { + throw new Error('failed to get new worker'); + } + tid = PThread.markId(worker); + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + worker.postMessage(createMessage('start', { + tid: tid, + arg: startArg, + sab: sab + })); + if (shouldWait) { + if (typeof waitThreadStart === 'number') { + var waitResult = Atomics.wait(sab, 0, 0, waitThreadStart); + if (waitResult === 'timed-out') { + throw new Error('Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.'); + } + } + else { + Atomics.wait(sab, 0, 0); + } + var r = Atomics.load(sab, 0); + if (r > 1) { + throw deserizeErrorFromBuffer(sab.buffer); + } + } + } + catch (e) { + if (worker !== undefined && tid !== undefined) { + try { + PThread.cleanThread(worker, tid, true); + } + catch (_) { } + } + Atomics.store(struct, 0, 1); + Atomics.store(struct, 1, EAGAIN); + Atomics.notify(struct, 1); + PThread === null || PThread === void 0 ? void 0 : PThread.printErr(e.stack); + if (isNewABI) { + return 1; + } + free(errorOrTid); + return -EAGAIN; + } + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, tid); + Atomics.notify(struct, 1); + if (!shouldWait) { + worker.whenLoaded.catch(function (err) { + delete worker.whenLoaded; + PThread.cleanThread(worker, tid, true); + throw err; + }); + } + if (isNewABI) { + return 0; + } + free(errorOrTid); + return tid; + }; + this.threadSpawn = threadSpawn; + if (this.PThread) { + this.PThread.threadSpawn = threadSpawn; + } + } + WASIThreads.prototype.getImportObject = function () { + return { + wasi: { + 'thread-spawn': this.threadSpawn + } + }; + }; + WASIThreads.prototype.setup = function (wasmInstance, wasmModule, wasmMemory) { + wasmMemory !== null && wasmMemory !== void 0 ? wasmMemory : (wasmMemory = wasmInstance.exports.memory); + this.wasmInstance = wasmInstance; + this.wasmMemory = wasmMemory; + if (this.PThread) { + this.PThread.setup(wasmModule, wasmMemory); + } + }; + WASIThreads.prototype.preloadWorkers = function () { + if (this.PThread) { + return this.PThread.preloadWorkers(); + } + return Promise.resolve([]); + }; + /** + * It's ok to call this method to a WASI command module. + * + * in child thread, must call this method instead of {@link WASIThreads.start} even if it's a WASI command module + * + * @returns A proxied WebAssembly instance if in child thread, other wise the original instance + */ + WASIThreads.prototype.initialize = function (instance, module, memory) { + var exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + var wasi = this.wasi; + if (('_start' in exports) && (typeof exports._start === 'function')) { + if (this.childThread) { + wasi.start(instance); + try { + var kStarted = getWasiSymbol(wasi, 'kStarted'); + wasi[kStarted] = false; + } + catch (_) { } + } + else { + setupInstance(wasi, instance); + } + } + else { + wasi.initialize(instance); + } + return instance; + }; + /** + * Equivalent to calling {@link WASIThreads.initialize} and then calling {@link WASIInstance.start} + * ```js + * this.initialize(instance, module, memory) + * this.wasi.start(instance) + * ``` + */ + WASIThreads.prototype.start = function (instance, module, memory) { + var exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + var exitCode = this.wasi.start(instance); + return { exitCode: exitCode, instance: instance }; + }; + WASIThreads.prototype.terminateAllThreads = function () { + var _a; + if (!this.childThread) { + (_a = this.PThread) === null || _a === void 0 ? void 0 : _a.terminateAllThreads(); + } + else { + this.postMessage(createMessage('terminate-all-threads', {})); + } + }; + return WASIThreads; +}()); +function patchWasiInstance(wasiThreads, wasi) { + var patched = patchedWasiInstances.get(wasiThreads); + if (patched.has(wasi)) { + return; + } + var _this = wasiThreads; + var wasiImport = wasi.wasiImport; + if (wasiImport) { + var proc_exit_1 = wasiImport.proc_exit; + wasiImport.proc_exit = function (code) { + _this.terminateAllThreads(); + return proc_exit_1.call(this, code); + }; + } + if (!_this.childThread) { + var start_1 = wasi.start; + if (typeof start_1 === 'function') { + wasi.start = function (instance) { + try { + return start_1.call(this, instance); + } + catch (err) { + if (isTrapError(err)) { + _this.terminateAllThreads(); + } + throw err; + } + }; + } + } + patched.add(wasi); +} +function getWasiSymbol(wasi, description) { + var symbols = Object.getOwnPropertySymbols(wasi); + var selectDescription = function (description) { return function (s) { + if (s.description) { + return s.description === description; + } + return s.toString() === "Symbol(".concat(description, ")"); + }; }; + if (Array.isArray(description)) { + return description.map(function (d) { return symbols.filter(selectDescription(d))[0]; }); + } + return symbols.filter(selectDescription(description))[0]; +} +function setupInstance(wasi, instance) { + var _a = getWasiSymbol(wasi, ['kInstance', 'kSetMemory']), kInstance = _a[0], kSetMemory = _a[1]; + wasi[kInstance] = instance; + wasi[kSetMemory](instance.exports.memory); +} + +/** @public */ +var ThreadMessageHandler = /*#__PURE__*/ (function () { + function ThreadMessageHandler(options) { + var postMsg = getPostMessage(options); + if (typeof postMsg !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMsg; + this.onLoad = options === null || options === void 0 ? void 0 : options.onLoad; + this.onError = typeof (options === null || options === void 0 ? void 0 : options.onError) === 'function' ? options.onError : function (_type, err) { throw err; }; + this.instance = undefined; + // this.module = undefined + this.messagesBeforeLoad = []; + } + /** @virtual */ + ThreadMessageHandler.prototype.instantiate = function (data) { + if (typeof this.onLoad === 'function') { + return this.onLoad(data); + } + throw new Error('ThreadMessageHandler.prototype.instantiate is not implemented'); + }; + /** @virtual */ + ThreadMessageHandler.prototype.handle = function (e) { + var _this = this; + var _a; + if ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.__emnapi__) { + var type = e.data.__emnapi__.type; + var payload_1 = e.data.__emnapi__.payload; + try { + if (type === 'load') { + this._load(payload_1); + } + else if (type === 'start') { + this.handleAfterLoad(e, function () { + _this._start(payload_1); + }); + } + } + catch (err) { + this.onError(err, type); + } + } + }; + ThreadMessageHandler.prototype._load = function (payload) { + var _this = this; + if (this.instance !== undefined) + return; + var source; + try { + source = this.instantiate(payload); + } + catch (err) { + this._loaded(err, null, payload); + return; + } + var then = source && 'then' in source ? source.then : undefined; + if (typeof then === 'function') { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + then.call(source, function (source) { _this._loaded(null, source, payload); }, function (err) { _this._loaded(err, null, payload); }); + } + else { + this._loaded(null, source, payload); + } + }; + ThreadMessageHandler.prototype._start = function (payload) { + var wasi_thread_start = this.instance.exports.wasi_thread_start; + if (typeof wasi_thread_start !== 'function') { + var err = new TypeError('wasi_thread_start is not exported'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + var postMessage = this.postMessage; + var tid = payload.tid; + var startArg = payload.arg; + notifyPthreadCreateResult(payload.sab, 1); + try { + wasi_thread_start(tid, startArg); + } + catch (err) { + if (err !== 'unwind') { + throw err; + } + else { + return; + } + } + postMessage(createMessage('cleanup-thread', { tid: tid })); + }; + ThreadMessageHandler.prototype._loaded = function (err, source, payload) { + if (err) { + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + if (source == null) { + var err_1 = new TypeError('onLoad should return an object'); + notifyPthreadCreateResult(payload.sab, 2, err_1); + throw err_1; + } + var instance = source.instance; + if (!instance) { + var err_2 = new TypeError('onLoad should return an object which includes "instance"'); + notifyPthreadCreateResult(payload.sab, 2, err_2); + throw err_2; + } + this.instance = instance; + var postMessage = this.postMessage; + postMessage(createMessage('loaded', {})); + var messages = this.messagesBeforeLoad; + this.messagesBeforeLoad = []; + for (var i = 0; i < messages.length; i++) { + var data = messages[i]; + this.handle({ data: data }); + } + }; + ThreadMessageHandler.prototype.handleAfterLoad = function (e, f) { + if (this.instance !== undefined) { + f.call(this, e); + } + else { + this.messagesBeforeLoad.push(e.data); + } + }; + return ThreadMessageHandler; +}()); +function notifyPthreadCreateResult(sab, result, error) { + if (sab) { + serizeErrorToBuffer(sab.buffer, result, error); + Atomics.notify(sab, 0); + } +} + +export { ThreadManager, ThreadMessageHandler, WASIThreads, createInstanceProxy, isSharedArrayBuffer, isTrapError }; diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js new file mode 100644 index 000000000..312cb1855 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js @@ -0,0 +1,945 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.wasiThreads = {})); +})(this, (function (exports) { + var _WebAssembly = typeof WebAssembly !== 'undefined' + ? WebAssembly + : typeof WXWebAssembly !== 'undefined' + ? WXWebAssembly + : undefined; + var ENVIRONMENT_IS_NODE = typeof process === 'object' && process !== null && + typeof process.versions === 'object' && process.versions !== null && + typeof process.versions.node === 'string'; + function getPostMessage(options) { + return typeof (options === null || options === void 0 ? void 0 : options.postMessage) === 'function' + ? options.postMessage + : typeof postMessage === 'function' + ? postMessage + : undefined; + } + function serizeErrorToBuffer(sab, code, error) { + var i32array = new Int32Array(sab); + Atomics.store(i32array, 0, code); + if (code > 1 && error) { + var name_1 = error.name; + var message = error.message; + var stack = error.stack; + var nameBuffer = new TextEncoder().encode(name_1); + var messageBuffer = new TextEncoder().encode(message); + var stackBuffer = new TextEncoder().encode(stack); + Atomics.store(i32array, 1, nameBuffer.length); + Atomics.store(i32array, 2, messageBuffer.length); + Atomics.store(i32array, 3, stackBuffer.length); + var buffer = new Uint8Array(sab); + buffer.set(nameBuffer, 16); + buffer.set(messageBuffer, 16 + nameBuffer.length); + buffer.set(stackBuffer, 16 + nameBuffer.length + messageBuffer.length); + } + } + function deserizeErrorFromBuffer(sab) { + var _a, _b; + var i32array = new Int32Array(sab); + var status = Atomics.load(i32array, 0); + if (status <= 1) { + return null; + } + var nameLength = Atomics.load(i32array, 1); + var messageLength = Atomics.load(i32array, 2); + var stackLength = Atomics.load(i32array, 3); + var buffer = new Uint8Array(sab); + var nameBuffer = buffer.slice(16, 16 + nameLength); + var messageBuffer = buffer.slice(16 + nameLength, 16 + nameLength + messageLength); + var stackBuffer = buffer.slice(16 + nameLength + messageLength, 16 + nameLength + messageLength + stackLength); + var name = new TextDecoder().decode(nameBuffer); + var message = new TextDecoder().decode(messageBuffer); + var stack = new TextDecoder().decode(stackBuffer); + var ErrorConstructor = (_a = globalThis[name]) !== null && _a !== void 0 ? _a : (name === 'RuntimeError' ? ((_b = _WebAssembly.RuntimeError) !== null && _b !== void 0 ? _b : Error) : Error); + var error = new ErrorConstructor(message); + Object.defineProperty(error, 'stack', { + value: stack, + writable: true, + enumerable: false, + configurable: true + }); + return error; + } + /** @public */ + function isSharedArrayBuffer(value) { + return ((typeof SharedArrayBuffer === 'function' && value instanceof SharedArrayBuffer) || + (Object.prototype.toString.call(value) === '[object SharedArrayBuffer]')); + } + /** @public */ + function isTrapError(e) { + try { + return e instanceof _WebAssembly.RuntimeError; + } + catch (_) { + return false; + } + } + + function createMessage(type, payload) { + return { + __emnapi__: { + type: type, + payload: payload + } + }; + } + + var WASI_THREADS_MAX_TID = 0x1FFFFFFF; + function checkSharedWasmMemory(wasmMemory) { + if (wasmMemory) { + if (!isSharedArrayBuffer(wasmMemory.buffer)) { + throw new Error('Multithread features require shared wasm memory. ' + + 'Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, ' + + 'then create WebAssembly.Memory with `shared: true` option'); + } + } + else { + if (typeof SharedArrayBuffer === 'undefined') { + throw new Error('Current environment does not support SharedArrayBuffer, threads are not available!'); + } + } + } + function getReuseWorker(value) { + var _a; + if (typeof value === 'boolean') { + return value ? { size: 0, strict: false } : false; + } + if (typeof value === 'number') { + if (!(value >= 0)) { + throw new RangeError('reuseWorker: size must be a non-negative integer'); + } + return { size: value, strict: false }; + } + if (!value) { + return false; + } + var size = (_a = Number(value.size)) !== null && _a !== void 0 ? _a : 0; + var strict = Boolean(value.strict); + if (!(size > 0) && strict) { + throw new RangeError('reuseWorker: size must be set to positive integer if strict is set to true'); + } + return { size: size, strict: strict }; + } + var nextWorkerID = 0; + /** @public */ + var ThreadManager = /*#__PURE__*/ (function () { + function ThreadManager(options) { + var _a; + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.wasmModule = null; + this.wasmMemory = null; + this.messageEvents = new WeakMap(); + if (!options) { + throw new TypeError('ThreadManager(): options is not provided'); + } + if ('childThread' in options) { + this._childThread = Boolean(options.childThread); + } + else { + this._childThread = false; + } + if (this._childThread) { + this._onCreateWorker = undefined; + this._reuseWorker = false; + this._beforeLoad = undefined; + } + else { + this._onCreateWorker = options.onCreateWorker; + this._reuseWorker = getReuseWorker(options.reuseWorker); + this._beforeLoad = options.beforeLoad; + } + this.printErr = (_a = options.printErr) !== null && _a !== void 0 ? _a : console.error.bind(console); + this.threadSpawn = options.threadSpawn; + } + Object.defineProperty(ThreadManager.prototype, "nextWorkerID", { + get: function () { return nextWorkerID; }, + enumerable: false, + configurable: true + }); + ThreadManager.prototype.init = function () { + if (!this._childThread) { + this.initMainThread(); + } + }; + ThreadManager.prototype.initMainThread = function () { + this.preparePool(); + }; + ThreadManager.prototype.preparePool = function () { + if (this._reuseWorker) { + if (this._reuseWorker.size) { + var pthreadPoolSize = this._reuseWorker.size; + while (pthreadPoolSize--) { + var worker = this.allocateUnusedWorker(); + if (ENVIRONMENT_IS_NODE) { + // https://github.com/nodejs/node/issues/53036 + worker.once('message', function () { }); + worker.unref(); + } + } + } + } + }; + ThreadManager.prototype.shouldPreloadWorkers = function () { + return !this._childThread && this._reuseWorker && this._reuseWorker.size > 0; + }; + ThreadManager.prototype.loadWasmModuleToAllWorkers = function () { + var _this_1 = this; + var promises = Array(this.unusedWorkers.length); + var _loop_1 = function (i) { + var worker = this_1.unusedWorkers[i]; + if (ENVIRONMENT_IS_NODE) + worker.ref(); + promises[i] = this_1.loadWasmModuleToWorker(worker).then(function (w) { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + return w; + }, function (e) { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + throw e; + }); + }; + var this_1 = this; + for (var i = 0; i < this.unusedWorkers.length; ++i) { + _loop_1(i); + } + return Promise.all(promises).catch(function (err) { + _this_1.terminateAllThreads(); + throw err; + }); + }; + ThreadManager.prototype.preloadWorkers = function () { + if (this.shouldPreloadWorkers()) { + return this.loadWasmModuleToAllWorkers(); + } + return Promise.resolve([]); + }; + ThreadManager.prototype.setup = function (wasmModule, wasmMemory) { + this.wasmModule = wasmModule; + this.wasmMemory = wasmMemory; + }; + ThreadManager.prototype.markId = function (worker) { + if (worker.__emnapi_tid) + return worker.__emnapi_tid; + var tid = nextWorkerID + 43; + nextWorkerID = (nextWorkerID + 1) % (WASI_THREADS_MAX_TID - 42); + this.pthreads[tid] = worker; + worker.__emnapi_tid = tid; + return tid; + }; + ThreadManager.prototype.returnWorkerToPool = function (worker) { + var tid = worker.__emnapi_tid; + if (tid !== undefined) { + delete this.pthreads[tid]; + } + this.unusedWorkers.push(worker); + delete worker.__emnapi_tid; + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + }; + ThreadManager.prototype.loadWasmModuleToWorker = function (worker, sab) { + var _this_1 = this; + if (worker.whenLoaded) + return worker.whenLoaded; + var err = this.printErr; + var beforeLoad = this._beforeLoad; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var _this = this; + worker.whenLoaded = new Promise(function (resolve, reject) { + var handleError = function (e) { + var message = 'worker sent an error!'; + if (worker.__emnapi_tid !== undefined) { + message = 'worker (tid = ' + worker.__emnapi_tid + ') sent an error!'; + } + if ('message' in e) { + err(message + ' ' + e.message); + if (e.message.indexOf('RuntimeError') !== -1 || e.message.indexOf('unreachable') !== -1) { + try { + _this.terminateAllThreads(); + } + catch (_) { } + } + } + else { + err(message); + } + reject(e); + throw e; + }; + var handleMessage = function (data) { + if (data.__emnapi__) { + var type = data.__emnapi__.type; + var payload = data.__emnapi__.payload; + if (type === 'loaded') { + worker.loaded = true; + if (ENVIRONMENT_IS_NODE && !worker.__emnapi_tid) { + worker.unref(); + } + resolve(worker); + // if (payload.err) { + // err('failed to load in child thread: ' + (payload.err.message || payload.err)) + // } + } + else if (type === 'cleanup-thread') { + if (payload.tid in _this_1.pthreads) { + _this_1.cleanThread(worker, payload.tid); + } + } + else if (type === 'spawn-thread') { + _this_1.threadSpawn(payload.startArg, payload.errorOrTid); + } + else if (type === 'terminate-all-threads') { + _this_1.terminateAllThreads(); + } + } + }; + worker.onmessage = function (e) { + handleMessage(e.data); + _this_1.fireMessageEvent(worker, e); + }; + worker.onerror = handleError; + if (ENVIRONMENT_IS_NODE) { + worker.on('message', function (data) { + var _a, _b; + (_b = (_a = worker).onmessage) === null || _b === void 0 ? void 0 : _b.call(_a, { + data: data + }); + }); + worker.on('error', function (e) { + var _a, _b; + (_b = (_a = worker).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, e); + }); + worker.on('detachedExit', function () { }); + } + if (typeof beforeLoad === 'function') { + beforeLoad(worker); + } + try { + worker.postMessage(createMessage('load', { + wasmModule: _this_1.wasmModule, + wasmMemory: _this_1.wasmMemory, + sab: sab + })); + } + catch (err) { + checkSharedWasmMemory(_this_1.wasmMemory); + throw err; + } + }); + return worker.whenLoaded; + }; + ThreadManager.prototype.allocateUnusedWorker = function () { + var _onCreateWorker = this._onCreateWorker; + if (typeof _onCreateWorker !== 'function') { + throw new TypeError('`options.onCreateWorker` is not provided'); + } + var worker = _onCreateWorker({ type: 'thread', name: 'emnapi-pthread' }); + this.unusedWorkers.push(worker); + return worker; + }; + ThreadManager.prototype.getNewWorker = function (sab) { + if (this._reuseWorker) { + if (this.unusedWorkers.length === 0) { + if (this._reuseWorker.strict) { + if (!ENVIRONMENT_IS_NODE) { + var err = this.printErr; + err('Tried to spawn a new thread, but the thread pool is exhausted.\n' + + 'This might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.'); + return; + } + } + var worker_1 = this.allocateUnusedWorker(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + this.loadWasmModuleToWorker(worker_1, sab); + } + return this.unusedWorkers.pop(); + } + var worker = this.allocateUnusedWorker(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + this.loadWasmModuleToWorker(worker, sab); + return this.unusedWorkers.pop(); + }; + ThreadManager.prototype.cleanThread = function (worker, tid, force) { + if (!force && this._reuseWorker) { + this.returnWorkerToPool(worker); + } + else { + delete this.pthreads[tid]; + this.terminateWorker(worker); + delete worker.__emnapi_tid; + } + }; + ThreadManager.prototype.terminateWorker = function (worker) { + var _this_1 = this; + var _a; + var tid = worker.__emnapi_tid; + // eslint-disable-next-line @typescript-eslint/no-floating-promises + worker.terminate(); + (_a = this.messageEvents.get(worker)) === null || _a === void 0 ? void 0 : _a.clear(); + this.messageEvents.delete(worker); + worker.onmessage = function (e) { + if (e.data.__emnapi__) { + var err = _this_1.printErr; + err('received "' + e.data.__emnapi__.type + '" command from terminated worker: ' + tid); + } + }; + }; + ThreadManager.prototype.terminateAllThreads = function () { + var runningWorkers = Object.values(this.pthreads); + for (var i = 0; i < runningWorkers.length; ++i) { + this.terminateWorker(runningWorkers[i]); + } + for (var i = 0; i < this.unusedWorkers.length; ++i) { + this.terminateWorker(this.unusedWorkers[i]); + } + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.preparePool(); + }; + ThreadManager.prototype.addMessageEventListener = function (worker, onMessage) { + var listeners = this.messageEvents.get(worker); + if (!listeners) { + listeners = new Set(); + this.messageEvents.set(worker, listeners); + } + listeners.add(onMessage); + return function () { + listeners === null || listeners === void 0 ? void 0 : listeners.delete(onMessage); + }; + }; + ThreadManager.prototype.fireMessageEvent = function (worker, e) { + var listeners = this.messageEvents.get(worker); + if (!listeners) + return; + var err = this.printErr; + listeners.forEach(function (listener) { + try { + listener(e); + } + catch (e) { + err(e.stack); + } + }); + }; + return ThreadManager; + }()); + + var kIsProxy = Symbol('kIsProxy'); + /** @public */ + function createInstanceProxy(instance, memory) { + if (instance[kIsProxy]) + return instance; + // https://github.com/nodejs/help/issues/4102 + var originalExports = instance.exports; + var createHandler = function (target) { + var handlers = [ + 'apply', + 'construct', + 'defineProperty', + 'deleteProperty', + 'get', + 'getOwnPropertyDescriptor', + 'getPrototypeOf', + 'has', + 'isExtensible', + 'ownKeys', + 'preventExtensions', + 'set', + 'setPrototypeOf' + ]; + var handler = {}; + var _loop_1 = function (i) { + var name_1 = handlers[i]; + handler[name_1] = function () { + var args = Array.prototype.slice.call(arguments, 1); + args.unshift(target); + return Reflect[name_1].apply(Reflect, args); + }; + }; + for (var i = 0; i < handlers.length; i++) { + _loop_1(i); + } + return handler; + }; + var handler = createHandler(originalExports); + var _initialize = function () { }; + var _start = function () { return 0; }; + handler.get = function (_target, p, receiver) { + var _a; + if (p === 'memory') { + return (_a = (typeof memory === 'function' ? memory() : memory)) !== null && _a !== void 0 ? _a : Reflect.get(originalExports, p, receiver); + } + if (p === '_initialize') { + return p in originalExports ? _initialize : undefined; + } + if (p === '_start') { + return p in originalExports ? _start : undefined; + } + return Reflect.get(originalExports, p, receiver); + }; + handler.has = function (_target, p) { + if (p === 'memory') + return true; + return Reflect.has(originalExports, p); + }; + var exportsProxy = new Proxy(Object.create(null), handler); + return new Proxy(instance, { + get: function (target, p, receiver) { + if (p === 'exports') { + return exportsProxy; + } + if (p === kIsProxy) { + return true; + } + return Reflect.get(target, p, receiver); + } + }); + } + + var patchedWasiInstances = new WeakMap(); + /** @public */ + var WASIThreads = /*#__PURE__*/ (function () { + function WASIThreads(options) { + var _this_1 = this; + if (!options) { + throw new TypeError('WASIThreads(): options is not provided'); + } + if (!options.wasi) { + throw new TypeError('WASIThreads(): options.wasi is not provided'); + } + patchedWasiInstances.set(this, new WeakSet()); + var wasi = options.wasi; + patchWasiInstance(this, wasi); + this.wasi = wasi; + if ('childThread' in options) { + this.childThread = Boolean(options.childThread); + } + else { + this.childThread = false; + } + this.PThread = undefined; + if ('threadManager' in options) { + if (typeof options.threadManager === 'function') { + this.PThread = options.threadManager(); + } + else { + this.PThread = options.threadManager; + } + } + else { + if (!this.childThread) { + this.PThread = new ThreadManager(options); + this.PThread.init(); + } + } + var waitThreadStart = false; + if ('waitThreadStart' in options) { + waitThreadStart = typeof options.waitThreadStart === 'number' ? options.waitThreadStart : Boolean(options.waitThreadStart); + } + var postMessage = getPostMessage(options); + if (this.childThread && typeof postMessage !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMessage; + var wasm64 = Boolean(options.wasm64); + var threadSpawn = function (startArg, errorOrTid) { + var _a; + var EAGAIN = 6; + var isNewABI = errorOrTid !== undefined; + try { + checkSharedWasmMemory(_this_1.wasmMemory); + } + catch (err) { + (_a = _this_1.PThread) === null || _a === void 0 ? void 0 : _a.printErr(err.stack); + if (isNewABI) { + var struct_1 = new Int32Array(_this_1.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct_1, 0, 1); + Atomics.store(struct_1, 1, EAGAIN); + Atomics.notify(struct_1, 1); + return 1; + } + else { + return -EAGAIN; + } + } + if (!isNewABI) { + var malloc = _this_1.wasmInstance.exports.malloc; + errorOrTid = wasm64 ? Number(malloc(BigInt(8))) : (malloc(8) >>> 0); + if (!errorOrTid) { + return -48; /* ENOMEM */ + } + } + var _free = _this_1.wasmInstance.exports.free; + var free = wasm64 ? function (ptr) { _free(BigInt(ptr)); } : _free; + var struct = new Int32Array(_this_1.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, 0); + if (_this_1.childThread) { + postMessage(createMessage('spawn-thread', { + startArg: startArg, + errorOrTid: errorOrTid + })); + Atomics.wait(struct, 1, 0); + var isError = Atomics.load(struct, 0); + var result = Atomics.load(struct, 1); + if (isNewABI) { + return isError; + } + free(errorOrTid); + return isError ? -result : result; + } + var shouldWait = waitThreadStart || (waitThreadStart === 0); + var sab; + if (shouldWait) { + sab = new Int32Array(new SharedArrayBuffer(16 + 8192)); + Atomics.store(sab, 0, 0); + } + var worker; + var tid; + var PThread = _this_1.PThread; + try { + worker = PThread.getNewWorker(sab); + if (!worker) { + throw new Error('failed to get new worker'); + } + tid = PThread.markId(worker); + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + worker.postMessage(createMessage('start', { + tid: tid, + arg: startArg, + sab: sab + })); + if (shouldWait) { + if (typeof waitThreadStart === 'number') { + var waitResult = Atomics.wait(sab, 0, 0, waitThreadStart); + if (waitResult === 'timed-out') { + throw new Error('Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.'); + } + } + else { + Atomics.wait(sab, 0, 0); + } + var r = Atomics.load(sab, 0); + if (r > 1) { + throw deserizeErrorFromBuffer(sab.buffer); + } + } + } + catch (e) { + if (worker !== undefined && tid !== undefined) { + try { + PThread.cleanThread(worker, tid, true); + } + catch (_) { } + } + Atomics.store(struct, 0, 1); + Atomics.store(struct, 1, EAGAIN); + Atomics.notify(struct, 1); + PThread === null || PThread === void 0 ? void 0 : PThread.printErr(e.stack); + if (isNewABI) { + return 1; + } + free(errorOrTid); + return -EAGAIN; + } + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, tid); + Atomics.notify(struct, 1); + if (!shouldWait) { + worker.whenLoaded.catch(function (err) { + delete worker.whenLoaded; + PThread.cleanThread(worker, tid, true); + throw err; + }); + } + if (isNewABI) { + return 0; + } + free(errorOrTid); + return tid; + }; + this.threadSpawn = threadSpawn; + if (this.PThread) { + this.PThread.threadSpawn = threadSpawn; + } + } + WASIThreads.prototype.getImportObject = function () { + return { + wasi: { + 'thread-spawn': this.threadSpawn + } + }; + }; + WASIThreads.prototype.setup = function (wasmInstance, wasmModule, wasmMemory) { + wasmMemory !== null && wasmMemory !== void 0 ? wasmMemory : (wasmMemory = wasmInstance.exports.memory); + this.wasmInstance = wasmInstance; + this.wasmMemory = wasmMemory; + if (this.PThread) { + this.PThread.setup(wasmModule, wasmMemory); + } + }; + WASIThreads.prototype.preloadWorkers = function () { + if (this.PThread) { + return this.PThread.preloadWorkers(); + } + return Promise.resolve([]); + }; + /** + * It's ok to call this method to a WASI command module. + * + * in child thread, must call this method instead of {@link WASIThreads.start} even if it's a WASI command module + * + * @returns A proxied WebAssembly instance if in child thread, other wise the original instance + */ + WASIThreads.prototype.initialize = function (instance, module, memory) { + var exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + var wasi = this.wasi; + if (('_start' in exports) && (typeof exports._start === 'function')) { + if (this.childThread) { + wasi.start(instance); + try { + var kStarted = getWasiSymbol(wasi, 'kStarted'); + wasi[kStarted] = false; + } + catch (_) { } + } + else { + setupInstance(wasi, instance); + } + } + else { + wasi.initialize(instance); + } + return instance; + }; + /** + * Equivalent to calling {@link WASIThreads.initialize} and then calling {@link WASIInstance.start} + * ```js + * this.initialize(instance, module, memory) + * this.wasi.start(instance) + * ``` + */ + WASIThreads.prototype.start = function (instance, module, memory) { + var exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + var exitCode = this.wasi.start(instance); + return { exitCode: exitCode, instance: instance }; + }; + WASIThreads.prototype.terminateAllThreads = function () { + var _a; + if (!this.childThread) { + (_a = this.PThread) === null || _a === void 0 ? void 0 : _a.terminateAllThreads(); + } + else { + this.postMessage(createMessage('terminate-all-threads', {})); + } + }; + return WASIThreads; + }()); + function patchWasiInstance(wasiThreads, wasi) { + var patched = patchedWasiInstances.get(wasiThreads); + if (patched.has(wasi)) { + return; + } + var _this = wasiThreads; + var wasiImport = wasi.wasiImport; + if (wasiImport) { + var proc_exit_1 = wasiImport.proc_exit; + wasiImport.proc_exit = function (code) { + _this.terminateAllThreads(); + return proc_exit_1.call(this, code); + }; + } + if (!_this.childThread) { + var start_1 = wasi.start; + if (typeof start_1 === 'function') { + wasi.start = function (instance) { + try { + return start_1.call(this, instance); + } + catch (err) { + if (isTrapError(err)) { + _this.terminateAllThreads(); + } + throw err; + } + }; + } + } + patched.add(wasi); + } + function getWasiSymbol(wasi, description) { + var symbols = Object.getOwnPropertySymbols(wasi); + var selectDescription = function (description) { return function (s) { + if (s.description) { + return s.description === description; + } + return s.toString() === "Symbol(".concat(description, ")"); + }; }; + if (Array.isArray(description)) { + return description.map(function (d) { return symbols.filter(selectDescription(d))[0]; }); + } + return symbols.filter(selectDescription(description))[0]; + } + function setupInstance(wasi, instance) { + var _a = getWasiSymbol(wasi, ['kInstance', 'kSetMemory']), kInstance = _a[0], kSetMemory = _a[1]; + wasi[kInstance] = instance; + wasi[kSetMemory](instance.exports.memory); + } + + /** @public */ + var ThreadMessageHandler = /*#__PURE__*/ (function () { + function ThreadMessageHandler(options) { + var postMsg = getPostMessage(options); + if (typeof postMsg !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMsg; + this.onLoad = options === null || options === void 0 ? void 0 : options.onLoad; + this.onError = typeof (options === null || options === void 0 ? void 0 : options.onError) === 'function' ? options.onError : function (_type, err) { throw err; }; + this.instance = undefined; + // this.module = undefined + this.messagesBeforeLoad = []; + } + /** @virtual */ + ThreadMessageHandler.prototype.instantiate = function (data) { + if (typeof this.onLoad === 'function') { + return this.onLoad(data); + } + throw new Error('ThreadMessageHandler.prototype.instantiate is not implemented'); + }; + /** @virtual */ + ThreadMessageHandler.prototype.handle = function (e) { + var _this = this; + var _a; + if ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.__emnapi__) { + var type = e.data.__emnapi__.type; + var payload_1 = e.data.__emnapi__.payload; + try { + if (type === 'load') { + this._load(payload_1); + } + else if (type === 'start') { + this.handleAfterLoad(e, function () { + _this._start(payload_1); + }); + } + } + catch (err) { + this.onError(err, type); + } + } + }; + ThreadMessageHandler.prototype._load = function (payload) { + var _this = this; + if (this.instance !== undefined) + return; + var source; + try { + source = this.instantiate(payload); + } + catch (err) { + this._loaded(err, null, payload); + return; + } + var then = source && 'then' in source ? source.then : undefined; + if (typeof then === 'function') { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + then.call(source, function (source) { _this._loaded(null, source, payload); }, function (err) { _this._loaded(err, null, payload); }); + } + else { + this._loaded(null, source, payload); + } + }; + ThreadMessageHandler.prototype._start = function (payload) { + var wasi_thread_start = this.instance.exports.wasi_thread_start; + if (typeof wasi_thread_start !== 'function') { + var err = new TypeError('wasi_thread_start is not exported'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + var postMessage = this.postMessage; + var tid = payload.tid; + var startArg = payload.arg; + notifyPthreadCreateResult(payload.sab, 1); + try { + wasi_thread_start(tid, startArg); + } + catch (err) { + if (err !== 'unwind') { + throw err; + } + else { + return; + } + } + postMessage(createMessage('cleanup-thread', { tid: tid })); + }; + ThreadMessageHandler.prototype._loaded = function (err, source, payload) { + if (err) { + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + if (source == null) { + var err_1 = new TypeError('onLoad should return an object'); + notifyPthreadCreateResult(payload.sab, 2, err_1); + throw err_1; + } + var instance = source.instance; + if (!instance) { + var err_2 = new TypeError('onLoad should return an object which includes "instance"'); + notifyPthreadCreateResult(payload.sab, 2, err_2); + throw err_2; + } + this.instance = instance; + var postMessage = this.postMessage; + postMessage(createMessage('loaded', {})); + var messages = this.messagesBeforeLoad; + this.messagesBeforeLoad = []; + for (var i = 0; i < messages.length; i++) { + var data = messages[i]; + this.handle({ data: data }); + } + }; + ThreadMessageHandler.prototype.handleAfterLoad = function (e, f) { + if (this.instance !== undefined) { + f.call(this, e); + } + else { + this.messagesBeforeLoad.push(e.data); + } + }; + return ThreadMessageHandler; + }()); + function notifyPthreadCreateResult(sab, result, error) { + if (sab) { + serizeErrorToBuffer(sab.buffer, result, error); + Atomics.notify(sab, 0); + } + } + + exports.ThreadManager = ThreadManager; + exports.ThreadMessageHandler = ThreadMessageHandler; + exports.WASIThreads = WASIThreads; + exports.createInstanceProxy = createInstanceProxy; + exports.isSharedArrayBuffer = isSharedArrayBuffer; + exports.isTrapError = isTrapError; + +})); diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts new file mode 100644 index 000000000..1d3951c36 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts @@ -0,0 +1,271 @@ +/// + +import type { Worker as Worker_2 } from 'worker_threads'; + +/** @public */ +export declare interface BaseOptions { + wasi: WASIInstance; + version?: 'preview1'; + wasm64?: boolean; +} + +/** @public */ +export declare interface ChildThreadOptions extends BaseOptions { + childThread: true; + postMessage?: (data: any) => void; +} + +/** @public */ +export declare interface CleanupThreadPayload { + tid: number; +} + +/** @public */ +export declare interface CommandInfo { + type: T; + payload: CommandPayloadMap[T]; +} + +/** @public */ +export declare interface CommandPayloadMap { + load: LoadPayload; + loaded: LoadedPayload; + start: StartPayload; + 'cleanup-thread': CleanupThreadPayload; + 'terminate-all-threads': TerminateAllThreadsPayload; + 'spawn-thread': SpawnThreadPayload; +} + +/** @public */ +export declare type CommandType = keyof CommandPayloadMap; + +/** @public */ +export declare function createInstanceProxy(instance: WebAssembly.Instance, memory?: WebAssembly.Memory | (() => WebAssembly.Memory)): WebAssembly.Instance; + +/** @public */ +export declare function isSharedArrayBuffer(value: any): value is SharedArrayBuffer; + +/** @public */ +export declare function isTrapError(e: Error): e is WebAssembly.RuntimeError; + +/** @public */ +export declare interface LoadedPayload { +} + +/** @public */ +export declare interface LoadPayload { + wasmModule: WebAssembly.Module; + wasmMemory: WebAssembly.Memory; + sab?: Int32Array; +} + +/** @public */ +export declare interface MainThreadBaseOptions extends BaseOptions { + waitThreadStart?: boolean | number; +} + +/** @public */ +export declare type MainThreadOptions = MainThreadOptionsWithThreadManager | MainThreadOptionsCreateThreadManager; + +/** @public */ +export declare interface MainThreadOptionsCreateThreadManager extends MainThreadBaseOptions, ThreadManagerOptionsMain { +} + +/** @public */ +export declare interface MainThreadOptionsWithThreadManager extends MainThreadBaseOptions { + threadManager?: ThreadManager | (() => ThreadManager); +} + +/** @public */ +export declare interface MessageEventData { + __emnapi__: CommandInfo; +} + +/** @public */ +export declare interface ReuseWorkerOptions { + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size | PTHREAD_POOL_SIZE} + */ + size: number; + /** + * @see {@link https://emscripten.org/docs/tools_reference/settings_reference.html#pthread-pool-size-strict | PTHREAD_POOL_SIZE_STRICT} + */ + strict?: boolean; +} + +/** @public */ +export declare interface SpawnThreadPayload { + startArg: number; + errorOrTid: number; +} + +/** @public */ +export declare interface StartPayload { + tid: number; + arg: number; + sab?: Int32Array; +} + +/** @public */ +export declare interface StartResult { + exitCode: number; + instance: WebAssembly.Instance; +} + +/** @public */ +export declare interface TerminateAllThreadsPayload { +} + +/** @public */ +export declare class ThreadManager { + unusedWorkers: WorkerLike[]; + pthreads: Record; + get nextWorkerID(): number; + wasmModule: WebAssembly.Module | null; + wasmMemory: WebAssembly.Memory | null; + private readonly messageEvents; + private readonly _childThread; + private readonly _onCreateWorker; + private readonly _reuseWorker; + private readonly _beforeLoad?; + /* Excluded from this release type: printErr */ + threadSpawn?: ((startArg: number, errorOrTid?: number) => number); + constructor(options: ThreadManagerOptions); + init(): void; + initMainThread(): void; + private preparePool; + shouldPreloadWorkers(): boolean; + loadWasmModuleToAllWorkers(): Promise; + preloadWorkers(): Promise; + setup(wasmModule: WebAssembly.Module, wasmMemory: WebAssembly.Memory): void; + markId(worker: WorkerLike): number; + returnWorkerToPool(worker: WorkerLike): void; + loadWasmModuleToWorker(worker: WorkerLike, sab?: Int32Array): Promise; + allocateUnusedWorker(): WorkerLike; + getNewWorker(sab?: Int32Array): WorkerLike | undefined; + cleanThread(worker: WorkerLike, tid: number, force?: boolean): void; + terminateWorker(worker: WorkerLike): void; + terminateAllThreads(): void; + addMessageEventListener(worker: WorkerLike, onMessage: (e: WorkerMessageEvent) => void): () => void; + fireMessageEvent(worker: WorkerLike, e: WorkerMessageEvent): void; +} + +/** @public */ +export declare type ThreadManagerOptions = ThreadManagerOptionsMain | ThreadManagerOptionsChild; + +/** @public */ +export declare interface ThreadManagerOptionsBase { + printErr?: (message: string) => void; + threadSpawn?: (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare interface ThreadManagerOptionsChild extends ThreadManagerOptionsBase { + childThread: true; +} + +/** @public */ +export declare interface ThreadManagerOptionsMain extends ThreadManagerOptionsBase { + beforeLoad?: (worker: WorkerLike) => any; + reuseWorker?: boolean | number | ReuseWorkerOptions; + onCreateWorker: WorkerFactory; + childThread?: false; +} + +/** @public */ +export declare class ThreadMessageHandler { + protected instance: WebAssembly.Instance | undefined; + private messagesBeforeLoad; + protected postMessage: (message: any) => void; + protected onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + protected onError: (error: Error, type: WorkerMessageType) => void; + constructor(options?: ThreadMessageHandlerOptions); + /** @virtual */ + instantiate(data: LoadPayload): WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + /** @virtual */ + handle(e: WorkerMessageEvent>): void; + private _load; + private _start; + protected _loaded(err: Error | null, source: WebAssembly.WebAssemblyInstantiatedSource | null, payload: LoadPayload): void; + protected handleAfterLoad(e: E, f: (e: E) => void): void; +} + +/** @public */ +export declare interface ThreadMessageHandlerOptions { + onLoad?: (data: LoadPayload) => WebAssembly.WebAssemblyInstantiatedSource | PromiseLike; + onError?: (error: Error, type: WorkerMessageType) => void; + postMessage?: (message: any) => void; +} + +/** @public */ +export declare interface WASIInstance { + readonly wasiImport?: Record; + initialize(instance: object): void; + start(instance: object): number; + getImportObject?(): any; +} + +/** @public */ +export declare class WASIThreads { + PThread: ThreadManager | undefined; + private wasmMemory; + private wasmInstance; + private readonly threadSpawn; + readonly childThread: boolean; + private readonly postMessage; + readonly wasi: WASIInstance; + constructor(options: WASIThreadsOptions); + getImportObject(): { + wasi: WASIThreadsImports; + }; + setup(wasmInstance: WebAssembly.Instance, wasmModule: WebAssembly.Module, wasmMemory?: WebAssembly.Memory): void; + preloadWorkers(): Promise; + /** + * It's ok to call this method to a WASI command module. + * + * in child thread, must call this method instead of {@link WASIThreads.start} even if it's a WASI command module + * + * @returns A proxied WebAssembly instance if in child thread, other wise the original instance + */ + initialize(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): WebAssembly.Instance; + /** + * Equivalent to calling {@link WASIThreads.initialize} and then calling {@link WASIInstance.start} + * ```js + * this.initialize(instance, module, memory) + * this.wasi.start(instance) + * ``` + */ + start(instance: WebAssembly.Instance, module: WebAssembly.Module, memory?: WebAssembly.Memory): StartResult; + terminateAllThreads(): void; +} + +/** @public */ +export declare interface WASIThreadsImports { + 'thread-spawn': (startArg: number, errorOrTid?: number) => number; +} + +/** @public */ +export declare type WASIThreadsOptions = MainThreadOptions | ChildThreadOptions; + +/** @public */ +export declare type WorkerFactory = (ctx: { + type: string; + name: string; +}) => WorkerLike; + +/** @public */ +export declare type WorkerLike = (Worker | Worker_2) & { + whenLoaded?: Promise; + loaded?: boolean; + __emnapi_tid?: number; +}; + +/** @public */ +export declare interface WorkerMessageEvent { + data: T; +} + +/** @public */ +export declare type WorkerMessageType = 'load' | 'start'; + +export { } diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js new file mode 100644 index 000000000..8de84f3cf --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wasiThreads={})}(this,function(e){var t="undefined"!=typeof WebAssembly?WebAssembly:"undefined"!=typeof WXWebAssembly?WXWebAssembly:void 0,r="object"==typeof process&&null!==process&&"object"==typeof process.versions&&null!==process.versions&&"string"==typeof process.versions.node;function o(e){return"function"==typeof(null==e?void 0:e.postMessage)?e.postMessage:"function"==typeof postMessage?postMessage:void 0}function n(e){return"function"==typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"[object SharedArrayBuffer]"===Object.prototype.toString.call(e)}function i(e){try{return e instanceof t.RuntimeError}catch(e){return!1}}function a(e,t){return{__emnapi__:{type:e,payload:t}}}function s(e){if(e){if(!n(e.buffer))throw new Error("Multithread features require shared wasm memory. Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, then create WebAssembly.Memory with `shared: true` option")}else if("undefined"==typeof SharedArrayBuffer)throw new Error("Current environment does not support SharedArrayBuffer, threads are not available!")}var d=0,h=function(){function e(e){var t;if(this.unusedWorkers=[],this.pthreads=Object.create(null),this.wasmModule=null,this.wasmMemory=null,this.messageEvents=new WeakMap,!e)throw new TypeError("ThreadManager(): options is not provided");this._childThread="childThread"in e&&Boolean(e.childThread),this._childThread?(this._onCreateWorker=void 0,this._reuseWorker=!1,this._beforeLoad=void 0):(this._onCreateWorker=e.onCreateWorker,this._reuseWorker=function(e){var t;if("boolean"==typeof e)return!!e&&{size:0,strict:!1};if("number"==typeof e){if(!(e>=0))throw new RangeError("reuseWorker: size must be a non-negative integer");return{size:e,strict:!1}}if(!e)return!1;var r=null!==(t=Number(e.size))&&void 0!==t?t:0,o=Boolean(e.strict);if(!(r>0)&&o)throw new RangeError("reuseWorker: size must be set to positive integer if strict is set to true");return{size:r,strict:o}}(e.reuseWorker),this._beforeLoad=e.beforeLoad),this.printErr=null!==(t=e.printErr)&&void 0!==t?t:console.error.bind(console),this.threadSpawn=e.threadSpawn}return Object.defineProperty(e.prototype,"nextWorkerID",{get:function(){return d},enumerable:!1,configurable:!0}),e.prototype.init=function(){this._childThread||this.initMainThread()},e.prototype.initMainThread=function(){this.preparePool()},e.prototype.preparePool=function(){if(this._reuseWorker&&this._reuseWorker.size)for(var e=this._reuseWorker.size;e--;){var t=this.allocateUnusedWorker();r&&(t.once("message",function(){}),t.unref())}},e.prototype.shouldPreloadWorkers=function(){return!this._childThread&&this._reuseWorker&&this._reuseWorker.size>0},e.prototype.loadWasmModuleToAllWorkers=function(){for(var e=this,t=Array(this.unusedWorkers.length),o=function(e){var o=n.unusedWorkers[e];r&&o.ref(),t[e]=n.loadWasmModuleToWorker(o).then(function(e){return r&&o.unref(),e},function(e){throw r&&o.unref(),e})},n=this,i=0;i>>0))return-48}var p=n.wasmInstance.exports.free,m=f?function(e){p(BigInt(e))}:p,y=new Int32Array(n.wasmMemory.buffer,o,2);if(Atomics.store(y,0,0),Atomics.store(y,1,0),n.childThread){l(a("spawn-thread",{startArg:e,errorOrTid:o})),Atomics.wait(y,1,0);var v=Atomics.load(y,0),w=Atomics.load(y,1);return d?v:(m(o),v?-w:w)}var _,g,T,k=u||0===u;k&&(_=new Int32Array(new SharedArrayBuffer(8208)),Atomics.store(_,0,0));var W=n.PThread;try{if(!(g=W.getNewWorker(_)))throw new Error("failed to get new worker");if(T=W.markId(g),r&&g.unref(),g.postMessage(a("start",{tid:T,arg:e,sab:_})),k){if("number"==typeof u){if("timed-out"===Atomics.wait(_,0,0,u))throw new Error("Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.")}else Atomics.wait(_,0,0);if(Atomics.load(_,0)>1)throw function(e){var r,o,n=new Int32Array(e);if(Atomics.load(n,0)<=1)return null;var i=Atomics.load(n,1),a=Atomics.load(n,2),s=Atomics.load(n,3),d=new Uint8Array(e),h=d.slice(16,16+i),u=d.slice(16+i,16+i+a),l=d.slice(16+i+a,16+i+a+s),c=(new TextDecoder).decode(h),f=(new TextDecoder).decode(u),p=(new TextDecoder).decode(l),m=new(null!==(r=globalThis[c])&&void 0!==r?r:"RuntimeError"===c&&null!==(o=t.RuntimeError)&&void 0!==o?o:Error)(f);return Object.defineProperty(m,"stack",{value:p,writable:!0,enumerable:!1,configurable:!0}),m}(_.buffer)}}catch(e){if(void 0!==g&&void 0!==T)try{W.cleanThread(g,T,!0)}catch(e){}return Atomics.store(y,0,1),Atomics.store(y,1,6),Atomics.notify(y,1),null==W||W.printErr(e.stack),d?1:(m(o),-6)}return Atomics.store(y,0,0),Atomics.store(y,1,T),Atomics.notify(y,1),k||g.whenLoaded.catch(function(e){throw delete g.whenLoaded,W.cleanThread(g,T,!0),e}),d?0:(m(o),T)};this.threadSpawn=p,this.PThread&&(this.PThread.threadSpawn=p)}return e.prototype.getImportObject=function(){return{wasi:{"thread-spawn":this.threadSpawn}}},e.prototype.setup=function(e,t,r){null!=r||(r=e.exports.memory),this.wasmInstance=e,this.wasmMemory=r,this.PThread&&this.PThread.setup(t,r)},e.prototype.preloadWorkers=function(){return this.PThread?this.PThread.preloadWorkers():Promise.resolve([])},e.prototype.initialize=function(e,t,r){var o=e.exports;null!=r||(r=o.memory),this.childThread&&(e=l(e,r)),this.setup(e,t,r);var n=this.wasi;if("_start"in o&&"function"==typeof o._start)if(this.childThread){n.start(e);try{n[p(n,"kStarted")]=!1}catch(e){}}else!function(e,t){var r=p(e,["kInstance","kSetMemory"]),o=r[0],n=r[1];e[o]=t,e[n](t.exports.memory)}(n,e);else n.initialize(e);return e},e.prototype.start=function(e,t,r){var o=e.exports;return null!=r||(r=o.memory),this.childThread&&(e=l(e,r)),this.setup(e,t,r),{exitCode:this.wasi.start(e),instance:e}},e.prototype.terminateAllThreads=function(){var e;this.childThread?this.postMessage(a("terminate-all-threads",{})):null===(e=this.PThread)||void 0===e||e.terminateAllThreads()},e}();function p(e,t){var r=Object.getOwnPropertySymbols(e),o=function(e){return function(t){return t.description?t.description===e:t.toString()==="Symbol(".concat(e,")")}};return Array.isArray(t)?t.map(function(e){return r.filter(o(e))[0]}):r.filter(o(t))[0]}var m=function(){function e(e){var t=o(e);if("function"!=typeof t)throw new TypeError("options.postMessage is not a function");this.postMessage=t,this.onLoad=null==e?void 0:e.onLoad,this.onError="function"==typeof(null==e?void 0:e.onError)?e.onError:function(e,t){throw t},this.instance=void 0,this.messagesBeforeLoad=[]}return e.prototype.instantiate=function(e){if("function"==typeof this.onLoad)return this.onLoad(e);throw new Error("ThreadMessageHandler.prototype.instantiate is not implemented")},e.prototype.handle=function(e){var t,r=this;if(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.__emnapi__){var o=e.data.__emnapi__.type,n=e.data.__emnapi__.payload;try{"load"===o?this._load(n):"start"===o&&this.handleAfterLoad(e,function(){r._start(n)})}catch(e){this.onError(e,o)}}},e.prototype._load=function(e){var t=this;if(void 0===this.instance){var r;try{r=this.instantiate(e)}catch(t){return void this._loaded(t,null,e)}var o=r&&"then"in r?r.then:void 0;"function"==typeof o?o.call(r,function(r){t._loaded(null,r,e)},function(r){t._loaded(r,null,e)}):this._loaded(null,r,e)}},e.prototype._start=function(e){var t=this.instance.exports.wasi_thread_start;if("function"!=typeof t){var r=new TypeError("wasi_thread_start is not exported");throw y(e.sab,2,r),r}var o=this.postMessage,n=e.tid,i=e.arg;y(e.sab,1);try{t(n,i)}catch(r){if("unwind"!==r)throw r;return}o(a("cleanup-thread",{tid:n}))},e.prototype._loaded=function(e,t,r){if(e)throw y(r.sab,2,e),e;if(null==t){var o=new TypeError("onLoad should return an object");throw y(r.sab,2,o),o}var n=t.instance;if(!n){var i=new TypeError('onLoad should return an object which includes "instance"');throw y(r.sab,2,i),i}this.instance=n,(0,this.postMessage)(a("loaded",{}));var s=this.messagesBeforeLoad;this.messagesBeforeLoad=[];for(var d=0;d1&&r){var n=r.name,i=r.message,a=r.stack,s=(new TextEncoder).encode(n),d=(new TextEncoder).encode(i),h=(new TextEncoder).encode(a);Atomics.store(o,1,s.length),Atomics.store(o,2,d.length),Atomics.store(o,3,h.length);var u=new Uint8Array(e);u.set(s,16),u.set(d,16+s.length),u.set(h,16+s.length+d.length)}}(e.buffer,t,r),Atomics.notify(e,0))}e.ThreadManager=h,e.ThreadMessageHandler=m,e.WASIThreads=f,e.createInstanceProxy=l,e.isSharedArrayBuffer=n,e.isTrapError=i}); diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs new file mode 100644 index 000000000..ed9dd0026 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs @@ -0,0 +1 @@ +const e="undefined"!=typeof WebAssembly?WebAssembly:"undefined"!=typeof WXWebAssembly?WXWebAssembly:void 0,t="object"==typeof process&&null!==process&&"object"==typeof process.versions&&null!==process.versions&&"string"==typeof process.versions.node;function r(e){return"function"==typeof(null==e?void 0:e.postMessage)?e.postMessage:"function"==typeof postMessage?postMessage:void 0}function s(e){return"function"==typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"[object SharedArrayBuffer]"===Object.prototype.toString.call(e)}function o(t){try{return t instanceof e.RuntimeError}catch(e){return!1}}function n(e,t){return{__emnapi__:{type:e,payload:t}}}function i(e){if(e){if(!s(e.buffer))throw new Error("Multithread features require shared wasm memory. Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, then create WebAssembly.Memory with `shared: true` option")}else if("undefined"==typeof SharedArrayBuffer)throw new Error("Current environment does not support SharedArrayBuffer, threads are not available!")}let a=0;class h{get nextWorkerID(){return a}constructor(e){var t;if(this.unusedWorkers=[],this.pthreads=Object.create(null),this.wasmModule=null,this.wasmMemory=null,this.messageEvents=new WeakMap,!e)throw new TypeError("ThreadManager(): options is not provided");this._childThread="childThread"in e&&Boolean(e.childThread),this._childThread?(this._onCreateWorker=void 0,this._reuseWorker=!1,this._beforeLoad=void 0):(this._onCreateWorker=e.onCreateWorker,this._reuseWorker=function(e){var t;if("boolean"==typeof e)return!!e&&{size:0,strict:!1};if("number"==typeof e){if(!(e>=0))throw new RangeError("reuseWorker: size must be a non-negative integer");return{size:e,strict:!1}}if(!e)return!1;const r=null!==(t=Number(e.size))&&void 0!==t?t:0,s=Boolean(e.strict);if(!(r>0)&&s)throw new RangeError("reuseWorker: size must be set to positive integer if strict is set to true");return{size:r,strict:s}}(e.reuseWorker),this._beforeLoad=e.beforeLoad),this.printErr=null!==(t=e.printErr)&&void 0!==t?t:console.error.bind(console),this.threadSpawn=e.threadSpawn}init(){this._childThread||this.initMainThread()}initMainThread(){this.preparePool()}preparePool(){if(this._reuseWorker&&this._reuseWorker.size){let e=this._reuseWorker.size;for(;e--;){const e=this.allocateUnusedWorker();t&&(e.once("message",()=>{}),e.unref())}}}shouldPreloadWorkers(){return!this._childThread&&this._reuseWorker&&this._reuseWorker.size>0}loadWasmModuleToAllWorkers(){const e=Array(this.unusedWorkers.length);for(let r=0;r(t&&s.unref(),e),e=>{throw t&&s.unref(),e})}return Promise.all(e).catch(e=>{throw this.terminateAllThreads(),e})}preloadWorkers(){return this.shouldPreloadWorkers()?this.loadWasmModuleToAllWorkers():Promise.resolve([])}setup(e,t){this.wasmModule=e,this.wasmMemory=t}markId(e){if(e.__emnapi_tid)return e.__emnapi_tid;const t=a+43;return a=(a+1)%536870869,this.pthreads[t]=e,e.__emnapi_tid=t,t}returnWorkerToPool(e){var r=e.__emnapi_tid;void 0!==r&&delete this.pthreads[r],this.unusedWorkers.push(e),delete e.__emnapi_tid,t&&e.unref()}loadWasmModuleToWorker(e,r){if(e.whenLoaded)return e.whenLoaded;const s=this.printErr,o=this._beforeLoad,a=this;return e.whenLoaded=new Promise((h,d)=>{const l=r=>{if(r.__emnapi__){const s=r.__emnapi__.type,o=r.__emnapi__.payload;"loaded"===s?(e.loaded=!0,t&&!e.__emnapi_tid&&e.unref(),h(e)):"cleanup-thread"===s?o.tid in this.pthreads&&this.cleanThread(e,o.tid):"spawn-thread"===s?this.threadSpawn(o.startArg,o.errorOrTid):"terminate-all-threads"===s&&this.terminateAllThreads()}};e.onmessage=t=>{l(t.data),this.fireMessageEvent(e,t)},e.onerror=function(t){let r="worker sent an error!";if(void 0!==e.__emnapi_tid&&(r="worker (tid = "+e.__emnapi_tid+") sent an error!"),"message"in t){if(s(r+" "+t.message),-1!==t.message.indexOf("RuntimeError")||-1!==t.message.indexOf("unreachable"))try{a.terminateAllThreads()}catch(e){}}else s(r);throw d(t),t},t&&(e.on("message",function(t){var r,s;null===(s=(r=e).onmessage)||void 0===s||s.call(r,{data:t})}),e.on("error",function(t){var r,s;null===(s=(r=e).onerror)||void 0===s||s.call(r,t)}),e.on("detachedExit",function(){})),"function"==typeof o&&o(e);try{e.postMessage(n("load",{wasmModule:this.wasmModule,wasmMemory:this.wasmMemory,sab:r}))}catch(e){throw i(this.wasmMemory),e}}),e.whenLoaded}allocateUnusedWorker(){const e=this._onCreateWorker;if("function"!=typeof e)throw new TypeError("`options.onCreateWorker` is not provided");const t=e({type:"thread",name:"emnapi-pthread"});return this.unusedWorkers.push(t),t}getNewWorker(e){if(this._reuseWorker){if(0===this.unusedWorkers.length){if(this._reuseWorker.strict&&!t){return void(0,this.printErr)("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.")}const r=this.allocateUnusedWorker();this.loadWasmModuleToWorker(r,e)}return this.unusedWorkers.pop()}const r=this.allocateUnusedWorker();return this.loadWasmModuleToWorker(r,e),this.unusedWorkers.pop()}cleanThread(e,t,r){!r&&this._reuseWorker?this.returnWorkerToPool(e):(delete this.pthreads[t],this.terminateWorker(e),delete e.__emnapi_tid)}terminateWorker(e){var t;const r=e.__emnapi_tid;e.terminate(),null===(t=this.messageEvents.get(e))||void 0===t||t.clear(),this.messageEvents.delete(e),e.onmessage=e=>{if(e.data.__emnapi__){(0,this.printErr)('received "'+e.data.__emnapi__.type+'" command from terminated worker: '+r)}}}terminateAllThreads(){const e=Object.values(this.pthreads);for(let t=0;t{null==r||r.delete(t)}}fireMessageEvent(e,t){const r=this.messageEvents.get(e);if(!r)return;const s=this.printErr;r.forEach(e=>{try{e(t)}catch(e){s(e.stack)}})}}const d=Symbol("kIsProxy");function l(e,t){if(e[d])return e;const r=e.exports,s=function(e){const t=["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"],r={};for(let s=0;s{},n=()=>0;s.get=function(e,s,i){var a;return"memory"===s?null!==(a="function"==typeof t?t():t)&&void 0!==a?a:Reflect.get(r,s,i):"_initialize"===s?s in r?o:void 0:"_start"===s?s in r?n:void 0:Reflect.get(r,s,i)},s.has=function(e,t){return"memory"===t||Reflect.has(r,t)};const i=new Proxy(Object.create(null),s);return new Proxy(e,{get:(e,t,r)=>"exports"===t?i:t===d||Reflect.get(e,t,r)})}const c=new WeakMap;class u{constructor(s){if(!s)throw new TypeError("WASIThreads(): options is not provided");if(!s.wasi)throw new TypeError("WASIThreads(): options.wasi is not provided");c.set(this,new WeakSet);const a=s.wasi;!function(e,t){const r=c.get(e);if(r.has(t))return;const s=e,n=t.wasiImport;if(n){const e=n.proc_exit;n.proc_exit=function(t){return s.terminateAllThreads(),e.call(this,t)}}if(!s.childThread){const e=t.start;"function"==typeof e&&(t.start=function(t){try{return e.call(this,t)}catch(e){throw o(e)&&s.terminateAllThreads(),e}})}r.add(t)}(this,a),this.wasi=a,this.childThread="childThread"in s&&Boolean(s.childThread),this.PThread=void 0,"threadManager"in s?"function"==typeof s.threadManager?this.PThread=s.threadManager():this.PThread=s.threadManager:this.childThread||(this.PThread=new h(s),this.PThread.init());let d=!1;"waitThreadStart"in s&&(d="number"==typeof s.waitThreadStart?s.waitThreadStart:Boolean(s.waitThreadStart));const l=r(s);if(this.childThread&&"function"!=typeof l)throw new TypeError("options.postMessage is not a function");this.postMessage=l;const u=Boolean(s.wasm64),f=(r,s)=>{var o;const a=void 0!==s;try{i(this.wasmMemory)}catch(e){if(null===(o=this.PThread)||void 0===o||o.printErr(e.stack),a){const e=new Int32Array(this.wasmMemory.buffer,s,2);return Atomics.store(e,0,1),Atomics.store(e,1,6),Atomics.notify(e,1),1}return-6}if(!a){const e=this.wasmInstance.exports.malloc;if(!(s=u?Number(e(BigInt(8))):e(8)>>>0))return-48}const h=this.wasmInstance.exports.free,c=u?e=>{h(BigInt(e))}:h,f=new Int32Array(this.wasmMemory.buffer,s,2);if(Atomics.store(f,0,0),Atomics.store(f,1,0),this.childThread){l(n("spawn-thread",{startArg:r,errorOrTid:s})),Atomics.wait(f,1,0);const e=Atomics.load(f,0),t=Atomics.load(f,1);return a?e:(c(s),e?-t:t)}const p=d||0===d;let m,w,y;p&&(m=new Int32Array(new SharedArrayBuffer(8208)),Atomics.store(m,0,0));const _=this.PThread;try{if(w=_.getNewWorker(m),!w)throw new Error("failed to get new worker");if(y=_.markId(w),t&&w.unref(),w.postMessage(n("start",{tid:y,arg:r,sab:m})),p){if("number"==typeof d){if("timed-out"===Atomics.wait(m,0,0,d))throw new Error("Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.")}else Atomics.wait(m,0,0);if(Atomics.load(m,0)>1)throw function(t){var r,s;const o=new Int32Array(t);if(Atomics.load(o,0)<=1)return null;const n=Atomics.load(o,1),i=Atomics.load(o,2),a=Atomics.load(o,3),h=new Uint8Array(t),d=h.slice(16,16+n),l=h.slice(16+n,16+n+i),c=h.slice(16+n+i,16+n+i+a),u=(new TextDecoder).decode(d),f=(new TextDecoder).decode(l),p=(new TextDecoder).decode(c),m=new(null!==(r=globalThis[u])&&void 0!==r?r:"RuntimeError"===u&&null!==(s=e.RuntimeError)&&void 0!==s?s:Error)(f);return Object.defineProperty(m,"stack",{value:p,writable:!0,enumerable:!1,configurable:!0}),m}(m.buffer)}}catch(e){if(void 0!==w&&void 0!==y)try{_.cleanThread(w,y,!0)}catch(e){}return Atomics.store(f,0,1),Atomics.store(f,1,6),Atomics.notify(f,1),null==_||_.printErr(e.stack),a?1:(c(s),-6)}return Atomics.store(f,0,0),Atomics.store(f,1,y),Atomics.notify(f,1),p||w.whenLoaded.catch(e=>{throw delete w.whenLoaded,_.cleanThread(w,y,!0),e}),a?0:(c(s),y)};this.threadSpawn=f,this.PThread&&(this.PThread.threadSpawn=f)}getImportObject(){return{wasi:{"thread-spawn":this.threadSpawn}}}setup(e,t,r){null!=r||(r=e.exports.memory),this.wasmInstance=e,this.wasmMemory=r,this.PThread&&this.PThread.setup(t,r)}preloadWorkers(){return this.PThread?this.PThread.preloadWorkers():Promise.resolve([])}initialize(e,t,r){const s=e.exports;null!=r||(r=s.memory),this.childThread&&(e=l(e,r)),this.setup(e,t,r);const o=this.wasi;if("_start"in s&&"function"==typeof s._start)if(this.childThread){o.start(e);try{o[f(o,"kStarted")]=!1}catch(e){}}else!function(e,t){const[r,s]=f(e,["kInstance","kSetMemory"]);e[r]=t,e[s](t.exports.memory)}(o,e);else o.initialize(e);return e}start(e,t,r){const s=e.exports;null!=r||(r=s.memory),this.childThread&&(e=l(e,r)),this.setup(e,t,r);return{exitCode:this.wasi.start(e),instance:e}}terminateAllThreads(){var e;this.childThread?this.postMessage(n("terminate-all-threads",{})):null===(e=this.PThread)||void 0===e||e.terminateAllThreads()}}function f(e,t){const r=Object.getOwnPropertySymbols(e),s=e=>t=>t.description?t.description===e:t.toString()===`Symbol(${e})`;return Array.isArray(t)?t.map(e=>r.filter(s(e))[0]):r.filter(s(t))[0]}class p{constructor(e){const t=r(e);if("function"!=typeof t)throw new TypeError("options.postMessage is not a function");this.postMessage=t,this.onLoad=null==e?void 0:e.onLoad,this.onError="function"==typeof(null==e?void 0:e.onError)?e.onError:(e,t)=>{throw t},this.instance=void 0,this.messagesBeforeLoad=[]}instantiate(e){if("function"==typeof this.onLoad)return this.onLoad(e);throw new Error("ThreadMessageHandler.prototype.instantiate is not implemented")}handle(e){var t;if(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.__emnapi__){const t=e.data.__emnapi__.type,r=e.data.__emnapi__.payload;try{"load"===t?this._load(r):"start"===t&&this.handleAfterLoad(e,()=>{this._start(r)})}catch(e){this.onError(e,t)}}}_load(e){if(void 0!==this.instance)return;let t;try{t=this.instantiate(e)}catch(t){return void this._loaded(t,null,e)}const r=t&&"then"in t?t.then:void 0;"function"==typeof r?r.call(t,t=>{this._loaded(null,t,e)},t=>{this._loaded(t,null,e)}):this._loaded(null,t,e)}_start(e){const t=this.instance.exports.wasi_thread_start;if("function"!=typeof t){const t=new TypeError("wasi_thread_start is not exported");throw m(e.sab,2,t),t}const r=this.postMessage,s=e.tid,o=e.arg;m(e.sab,1);try{t(s,o)}catch(e){if("unwind"!==e)throw e;return}r(n("cleanup-thread",{tid:s}))}_loaded(e,t,r){if(e)throw m(r.sab,2,e),e;if(null==t){const e=new TypeError("onLoad should return an object");throw m(r.sab,2,e),e}const s=t.instance;if(!s){const e=new TypeError('onLoad should return an object which includes "instance"');throw m(r.sab,2,e),e}this.instance=s;(0,this.postMessage)(n("loaded",{}));const o=this.messagesBeforeLoad;this.messagesBeforeLoad=[];for(let e=0;e1&&r){const t=r.name,o=r.message,n=r.stack,i=(new TextEncoder).encode(t),a=(new TextEncoder).encode(o),h=(new TextEncoder).encode(n);Atomics.store(s,1,i.length),Atomics.store(s,2,a.length),Atomics.store(s,3,h.length);const d=new Uint8Array(e);d.set(i,16),d.set(a,16+i.length),d.set(h,16+i.length+a.length)}}(e.buffer,t,r),Atomics.notify(e,0))}export{h as ThreadManager,p as ThreadMessageHandler,u as WASIThreads,l as createInstanceProxy,s as isSharedArrayBuffer,o as isTrapError}; diff --git a/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs new file mode 100644 index 000000000..dd8c52915 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs @@ -0,0 +1,880 @@ +const _WebAssembly = typeof WebAssembly !== 'undefined' + ? WebAssembly + : typeof WXWebAssembly !== 'undefined' + ? WXWebAssembly + : undefined; +const ENVIRONMENT_IS_NODE = typeof process === 'object' && process !== null && + typeof process.versions === 'object' && process.versions !== null && + typeof process.versions.node === 'string'; +function getPostMessage(options) { + return typeof (options === null || options === void 0 ? void 0 : options.postMessage) === 'function' + ? options.postMessage + : typeof postMessage === 'function' + ? postMessage + : undefined; +} +function serizeErrorToBuffer(sab, code, error) { + const i32array = new Int32Array(sab); + Atomics.store(i32array, 0, code); + if (code > 1 && error) { + const name = error.name; + const message = error.message; + const stack = error.stack; + const nameBuffer = new TextEncoder().encode(name); + const messageBuffer = new TextEncoder().encode(message); + const stackBuffer = new TextEncoder().encode(stack); + Atomics.store(i32array, 1, nameBuffer.length); + Atomics.store(i32array, 2, messageBuffer.length); + Atomics.store(i32array, 3, stackBuffer.length); + const buffer = new Uint8Array(sab); + buffer.set(nameBuffer, 16); + buffer.set(messageBuffer, 16 + nameBuffer.length); + buffer.set(stackBuffer, 16 + nameBuffer.length + messageBuffer.length); + } +} +function deserizeErrorFromBuffer(sab) { + var _a, _b; + const i32array = new Int32Array(sab); + const status = Atomics.load(i32array, 0); + if (status <= 1) { + return null; + } + const nameLength = Atomics.load(i32array, 1); + const messageLength = Atomics.load(i32array, 2); + const stackLength = Atomics.load(i32array, 3); + const buffer = new Uint8Array(sab); + const nameBuffer = buffer.slice(16, 16 + nameLength); + const messageBuffer = buffer.slice(16 + nameLength, 16 + nameLength + messageLength); + const stackBuffer = buffer.slice(16 + nameLength + messageLength, 16 + nameLength + messageLength + stackLength); + const name = new TextDecoder().decode(nameBuffer); + const message = new TextDecoder().decode(messageBuffer); + const stack = new TextDecoder().decode(stackBuffer); + const ErrorConstructor = (_a = globalThis[name]) !== null && _a !== void 0 ? _a : (name === 'RuntimeError' ? ((_b = _WebAssembly.RuntimeError) !== null && _b !== void 0 ? _b : Error) : Error); + const error = new ErrorConstructor(message); + Object.defineProperty(error, 'stack', { + value: stack, + writable: true, + enumerable: false, + configurable: true + }); + return error; +} +function isSharedArrayBuffer(value) { + return ((typeof SharedArrayBuffer === 'function' && value instanceof SharedArrayBuffer) || + (Object.prototype.toString.call(value) === '[object SharedArrayBuffer]')); +} +function isTrapError(e) { + try { + return e instanceof _WebAssembly.RuntimeError; + } + catch (_) { + return false; + } +} + +function createMessage(type, payload) { + return { + __emnapi__: { + type, + payload + } + }; +} + +const WASI_THREADS_MAX_TID = 0x1FFFFFFF; +function checkSharedWasmMemory(wasmMemory) { + if (wasmMemory) { + if (!isSharedArrayBuffer(wasmMemory.buffer)) { + throw new Error('Multithread features require shared wasm memory. ' + + 'Try to compile with `-matomics -mbulk-memory` and use `--import-memory --shared-memory` during linking, ' + + 'then create WebAssembly.Memory with `shared: true` option'); + } + } + else { + if (typeof SharedArrayBuffer === 'undefined') { + throw new Error('Current environment does not support SharedArrayBuffer, threads are not available!'); + } + } +} +function getReuseWorker(value) { + var _a; + if (typeof value === 'boolean') { + return value ? { size: 0, strict: false } : false; + } + if (typeof value === 'number') { + if (!(value >= 0)) { + throw new RangeError('reuseWorker: size must be a non-negative integer'); + } + return { size: value, strict: false }; + } + if (!value) { + return false; + } + const size = (_a = Number(value.size)) !== null && _a !== void 0 ? _a : 0; + const strict = Boolean(value.strict); + if (!(size > 0) && strict) { + throw new RangeError('reuseWorker: size must be set to positive integer if strict is set to true'); + } + return { size, strict }; +} +let nextWorkerID = 0; +class ThreadManager { + get nextWorkerID() { return nextWorkerID; } + constructor(options) { + var _a; + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.wasmModule = null; + this.wasmMemory = null; + this.messageEvents = new WeakMap(); + if (!options) { + throw new TypeError('ThreadManager(): options is not provided'); + } + if ('childThread' in options) { + this._childThread = Boolean(options.childThread); + } + else { + this._childThread = false; + } + if (this._childThread) { + this._onCreateWorker = undefined; + this._reuseWorker = false; + this._beforeLoad = undefined; + } + else { + this._onCreateWorker = options.onCreateWorker; + this._reuseWorker = getReuseWorker(options.reuseWorker); + this._beforeLoad = options.beforeLoad; + } + this.printErr = (_a = options.printErr) !== null && _a !== void 0 ? _a : console.error.bind(console); + this.threadSpawn = options.threadSpawn; + } + init() { + if (!this._childThread) { + this.initMainThread(); + } + } + initMainThread() { + this.preparePool(); + } + preparePool() { + if (this._reuseWorker) { + if (this._reuseWorker.size) { + let pthreadPoolSize = this._reuseWorker.size; + while (pthreadPoolSize--) { + const worker = this.allocateUnusedWorker(); + if (ENVIRONMENT_IS_NODE) { + worker.once('message', () => { }); + worker.unref(); + } + } + } + } + } + shouldPreloadWorkers() { + return !this._childThread && this._reuseWorker && this._reuseWorker.size > 0; + } + loadWasmModuleToAllWorkers() { + const promises = Array(this.unusedWorkers.length); + for (let i = 0; i < this.unusedWorkers.length; ++i) { + const worker = this.unusedWorkers[i]; + if (ENVIRONMENT_IS_NODE) + worker.ref(); + promises[i] = this.loadWasmModuleToWorker(worker).then((w) => { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + return w; + }, (e) => { + if (ENVIRONMENT_IS_NODE) + worker.unref(); + throw e; + }); + } + return Promise.all(promises).catch((err) => { + this.terminateAllThreads(); + throw err; + }); + } + preloadWorkers() { + if (this.shouldPreloadWorkers()) { + return this.loadWasmModuleToAllWorkers(); + } + return Promise.resolve([]); + } + setup(wasmModule, wasmMemory) { + this.wasmModule = wasmModule; + this.wasmMemory = wasmMemory; + } + markId(worker) { + if (worker.__emnapi_tid) + return worker.__emnapi_tid; + const tid = nextWorkerID + 43; + nextWorkerID = (nextWorkerID + 1) % (WASI_THREADS_MAX_TID - 42); + this.pthreads[tid] = worker; + worker.__emnapi_tid = tid; + return tid; + } + returnWorkerToPool(worker) { + var tid = worker.__emnapi_tid; + if (tid !== undefined) { + delete this.pthreads[tid]; + } + this.unusedWorkers.push(worker); + delete worker.__emnapi_tid; + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + } + loadWasmModuleToWorker(worker, sab) { + if (worker.whenLoaded) + return worker.whenLoaded; + const err = this.printErr; + const beforeLoad = this._beforeLoad; + const _this = this; + worker.whenLoaded = new Promise((resolve, reject) => { + const handleError = function (e) { + let message = 'worker sent an error!'; + if (worker.__emnapi_tid !== undefined) { + message = 'worker (tid = ' + worker.__emnapi_tid + ') sent an error!'; + } + if ('message' in e) { + err(message + ' ' + e.message); + if (e.message.indexOf('RuntimeError') !== -1 || e.message.indexOf('unreachable') !== -1) { + try { + _this.terminateAllThreads(); + } + catch (_) { } + } + } + else { + err(message); + } + reject(e); + throw e; + }; + const handleMessage = (data) => { + if (data.__emnapi__) { + const type = data.__emnapi__.type; + const payload = data.__emnapi__.payload; + if (type === 'loaded') { + worker.loaded = true; + if (ENVIRONMENT_IS_NODE && !worker.__emnapi_tid) { + worker.unref(); + } + resolve(worker); + } + else if (type === 'cleanup-thread') { + if (payload.tid in this.pthreads) { + this.cleanThread(worker, payload.tid); + } + } + else if (type === 'spawn-thread') { + this.threadSpawn(payload.startArg, payload.errorOrTid); + } + else if (type === 'terminate-all-threads') { + this.terminateAllThreads(); + } + } + }; + worker.onmessage = (e) => { + handleMessage(e.data); + this.fireMessageEvent(worker, e); + }; + worker.onerror = handleError; + if (ENVIRONMENT_IS_NODE) { + worker.on('message', function (data) { + var _a, _b; + (_b = (_a = worker).onmessage) === null || _b === void 0 ? void 0 : _b.call(_a, { + data + }); + }); + worker.on('error', function (e) { + var _a, _b; + (_b = (_a = worker).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, e); + }); + worker.on('detachedExit', function () { }); + } + if (typeof beforeLoad === 'function') { + beforeLoad(worker); + } + try { + worker.postMessage(createMessage('load', { + wasmModule: this.wasmModule, + wasmMemory: this.wasmMemory, + sab + })); + } + catch (err) { + checkSharedWasmMemory(this.wasmMemory); + throw err; + } + }); + return worker.whenLoaded; + } + allocateUnusedWorker() { + const _onCreateWorker = this._onCreateWorker; + if (typeof _onCreateWorker !== 'function') { + throw new TypeError('`options.onCreateWorker` is not provided'); + } + const worker = _onCreateWorker({ type: 'thread', name: 'emnapi-pthread' }); + this.unusedWorkers.push(worker); + return worker; + } + getNewWorker(sab) { + if (this._reuseWorker) { + if (this.unusedWorkers.length === 0) { + if (this._reuseWorker.strict) { + if (!ENVIRONMENT_IS_NODE) { + const err = this.printErr; + err('Tried to spawn a new thread, but the thread pool is exhausted.\n' + + 'This might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.'); + return; + } + } + const worker = this.allocateUnusedWorker(); + this.loadWasmModuleToWorker(worker, sab); + } + return this.unusedWorkers.pop(); + } + const worker = this.allocateUnusedWorker(); + this.loadWasmModuleToWorker(worker, sab); + return this.unusedWorkers.pop(); + } + cleanThread(worker, tid, force) { + if (!force && this._reuseWorker) { + this.returnWorkerToPool(worker); + } + else { + delete this.pthreads[tid]; + this.terminateWorker(worker); + delete worker.__emnapi_tid; + } + } + terminateWorker(worker) { + var _a; + const tid = worker.__emnapi_tid; + worker.terminate(); + (_a = this.messageEvents.get(worker)) === null || _a === void 0 ? void 0 : _a.clear(); + this.messageEvents.delete(worker); + worker.onmessage = (e) => { + if (e.data.__emnapi__) { + const err = this.printErr; + err('received "' + e.data.__emnapi__.type + '" command from terminated worker: ' + tid); + } + }; + } + terminateAllThreads() { + const runningWorkers = Object.values(this.pthreads); + for (let i = 0; i < runningWorkers.length; ++i) { + this.terminateWorker(runningWorkers[i]); + } + for (let i = 0; i < this.unusedWorkers.length; ++i) { + this.terminateWorker(this.unusedWorkers[i]); + } + this.unusedWorkers = []; + this.pthreads = Object.create(null); + this.preparePool(); + } + addMessageEventListener(worker, onMessage) { + let listeners = this.messageEvents.get(worker); + if (!listeners) { + listeners = new Set(); + this.messageEvents.set(worker, listeners); + } + listeners.add(onMessage); + return () => { + listeners === null || listeners === void 0 ? void 0 : listeners.delete(onMessage); + }; + } + fireMessageEvent(worker, e) { + const listeners = this.messageEvents.get(worker); + if (!listeners) + return; + const err = this.printErr; + listeners.forEach((listener) => { + try { + listener(e); + } + catch (e) { + err(e.stack); + } + }); + } +} + +const kIsProxy = Symbol('kIsProxy'); +function createInstanceProxy(instance, memory) { + if (instance[kIsProxy]) + return instance; + const originalExports = instance.exports; + const createHandler = function (target) { + const handlers = [ + 'apply', + 'construct', + 'defineProperty', + 'deleteProperty', + 'get', + 'getOwnPropertyDescriptor', + 'getPrototypeOf', + 'has', + 'isExtensible', + 'ownKeys', + 'preventExtensions', + 'set', + 'setPrototypeOf' + ]; + const handler = {}; + for (let i = 0; i < handlers.length; i++) { + const name = handlers[i]; + handler[name] = function () { + const args = Array.prototype.slice.call(arguments, 1); + args.unshift(target); + return Reflect[name].apply(Reflect, args); + }; + } + return handler; + }; + const handler = createHandler(originalExports); + const _initialize = () => { }; + const _start = () => 0; + handler.get = function (_target, p, receiver) { + var _a; + if (p === 'memory') { + return (_a = (typeof memory === 'function' ? memory() : memory)) !== null && _a !== void 0 ? _a : Reflect.get(originalExports, p, receiver); + } + if (p === '_initialize') { + return p in originalExports ? _initialize : undefined; + } + if (p === '_start') { + return p in originalExports ? _start : undefined; + } + return Reflect.get(originalExports, p, receiver); + }; + handler.has = function (_target, p) { + if (p === 'memory') + return true; + return Reflect.has(originalExports, p); + }; + const exportsProxy = new Proxy(Object.create(null), handler); + return new Proxy(instance, { + get(target, p, receiver) { + if (p === 'exports') { + return exportsProxy; + } + if (p === kIsProxy) { + return true; + } + return Reflect.get(target, p, receiver); + } + }); +} + +const patchedWasiInstances = new WeakMap(); +class WASIThreads { + constructor(options) { + if (!options) { + throw new TypeError('WASIThreads(): options is not provided'); + } + if (!options.wasi) { + throw new TypeError('WASIThreads(): options.wasi is not provided'); + } + patchedWasiInstances.set(this, new WeakSet()); + const wasi = options.wasi; + patchWasiInstance(this, wasi); + this.wasi = wasi; + if ('childThread' in options) { + this.childThread = Boolean(options.childThread); + } + else { + this.childThread = false; + } + this.PThread = undefined; + if ('threadManager' in options) { + if (typeof options.threadManager === 'function') { + this.PThread = options.threadManager(); + } + else { + this.PThread = options.threadManager; + } + } + else { + if (!this.childThread) { + this.PThread = new ThreadManager(options); + this.PThread.init(); + } + } + let waitThreadStart = false; + if ('waitThreadStart' in options) { + waitThreadStart = typeof options.waitThreadStart === 'number' ? options.waitThreadStart : Boolean(options.waitThreadStart); + } + const postMessage = getPostMessage(options); + if (this.childThread && typeof postMessage !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMessage; + const wasm64 = Boolean(options.wasm64); + const threadSpawn = (startArg, errorOrTid) => { + var _a; + const EAGAIN = 6; + const isNewABI = errorOrTid !== undefined; + try { + checkSharedWasmMemory(this.wasmMemory); + } + catch (err) { + (_a = this.PThread) === null || _a === void 0 ? void 0 : _a.printErr(err.stack); + if (isNewABI) { + const struct = new Int32Array(this.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct, 0, 1); + Atomics.store(struct, 1, EAGAIN); + Atomics.notify(struct, 1); + return 1; + } + else { + return -EAGAIN; + } + } + if (!isNewABI) { + const malloc = this.wasmInstance.exports.malloc; + errorOrTid = wasm64 ? Number(malloc(BigInt(8))) : (malloc(8) >>> 0); + if (!errorOrTid) { + return -48; + } + } + const _free = this.wasmInstance.exports.free; + const free = wasm64 ? (ptr) => { _free(BigInt(ptr)); } : _free; + const struct = new Int32Array(this.wasmMemory.buffer, errorOrTid, 2); + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, 0); + if (this.childThread) { + postMessage(createMessage('spawn-thread', { + startArg, + errorOrTid: errorOrTid + })); + Atomics.wait(struct, 1, 0); + const isError = Atomics.load(struct, 0); + const result = Atomics.load(struct, 1); + if (isNewABI) { + return isError; + } + free(errorOrTid); + return isError ? -result : result; + } + const shouldWait = waitThreadStart || (waitThreadStart === 0); + let sab; + if (shouldWait) { + sab = new Int32Array(new SharedArrayBuffer(16 + 8192)); + Atomics.store(sab, 0, 0); + } + let worker; + let tid; + const PThread = this.PThread; + try { + worker = PThread.getNewWorker(sab); + if (!worker) { + throw new Error('failed to get new worker'); + } + tid = PThread.markId(worker); + if (ENVIRONMENT_IS_NODE) { + worker.unref(); + } + worker.postMessage(createMessage('start', { + tid, + arg: startArg, + sab + })); + if (shouldWait) { + if (typeof waitThreadStart === 'number') { + const waitResult = Atomics.wait(sab, 0, 0, waitThreadStart); + if (waitResult === 'timed-out') { + throw new Error('Spawning thread timed out. Please check if the worker is created successfully and if message is handled properly in the worker.'); + } + } + else { + Atomics.wait(sab, 0, 0); + } + const r = Atomics.load(sab, 0); + if (r > 1) { + throw deserizeErrorFromBuffer(sab.buffer); + } + } + } + catch (e) { + if (worker !== undefined && tid !== undefined) { + try { + PThread.cleanThread(worker, tid, true); + } + catch (_) { } + } + Atomics.store(struct, 0, 1); + Atomics.store(struct, 1, EAGAIN); + Atomics.notify(struct, 1); + PThread === null || PThread === void 0 ? void 0 : PThread.printErr(e.stack); + if (isNewABI) { + return 1; + } + free(errorOrTid); + return -EAGAIN; + } + Atomics.store(struct, 0, 0); + Atomics.store(struct, 1, tid); + Atomics.notify(struct, 1); + if (!shouldWait) { + worker.whenLoaded.catch((err) => { + delete worker.whenLoaded; + PThread.cleanThread(worker, tid, true); + throw err; + }); + } + if (isNewABI) { + return 0; + } + free(errorOrTid); + return tid; + }; + this.threadSpawn = threadSpawn; + if (this.PThread) { + this.PThread.threadSpawn = threadSpawn; + } + } + getImportObject() { + return { + wasi: { + 'thread-spawn': this.threadSpawn + } + }; + } + setup(wasmInstance, wasmModule, wasmMemory) { + wasmMemory !== null && wasmMemory !== void 0 ? wasmMemory : (wasmMemory = wasmInstance.exports.memory); + this.wasmInstance = wasmInstance; + this.wasmMemory = wasmMemory; + if (this.PThread) { + this.PThread.setup(wasmModule, wasmMemory); + } + } + preloadWorkers() { + if (this.PThread) { + return this.PThread.preloadWorkers(); + } + return Promise.resolve([]); + } + initialize(instance, module, memory) { + const exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + const wasi = this.wasi; + if (('_start' in exports) && (typeof exports._start === 'function')) { + if (this.childThread) { + wasi.start(instance); + try { + const kStarted = getWasiSymbol(wasi, 'kStarted'); + wasi[kStarted] = false; + } + catch (_) { } + } + else { + setupInstance(wasi, instance); + } + } + else { + wasi.initialize(instance); + } + return instance; + } + start(instance, module, memory) { + const exports = instance.exports; + memory !== null && memory !== void 0 ? memory : (memory = exports.memory); + if (this.childThread) { + instance = createInstanceProxy(instance, memory); + } + this.setup(instance, module, memory); + const exitCode = this.wasi.start(instance); + return { exitCode, instance }; + } + terminateAllThreads() { + var _a; + if (!this.childThread) { + (_a = this.PThread) === null || _a === void 0 ? void 0 : _a.terminateAllThreads(); + } + else { + this.postMessage(createMessage('terminate-all-threads', {})); + } + } +} +function patchWasiInstance(wasiThreads, wasi) { + const patched = patchedWasiInstances.get(wasiThreads); + if (patched.has(wasi)) { + return; + } + const _this = wasiThreads; + const wasiImport = wasi.wasiImport; + if (wasiImport) { + const proc_exit = wasiImport.proc_exit; + wasiImport.proc_exit = function (code) { + _this.terminateAllThreads(); + return proc_exit.call(this, code); + }; + } + if (!_this.childThread) { + const start = wasi.start; + if (typeof start === 'function') { + wasi.start = function (instance) { + try { + return start.call(this, instance); + } + catch (err) { + if (isTrapError(err)) { + _this.terminateAllThreads(); + } + throw err; + } + }; + } + } + patched.add(wasi); +} +function getWasiSymbol(wasi, description) { + const symbols = Object.getOwnPropertySymbols(wasi); + const selectDescription = (description) => (s) => { + if (s.description) { + return s.description === description; + } + return s.toString() === `Symbol(${description})`; + }; + if (Array.isArray(description)) { + return description.map(d => symbols.filter(selectDescription(d))[0]); + } + return symbols.filter(selectDescription(description))[0]; +} +function setupInstance(wasi, instance) { + const [kInstance, kSetMemory] = getWasiSymbol(wasi, ['kInstance', 'kSetMemory']); + wasi[kInstance] = instance; + wasi[kSetMemory](instance.exports.memory); +} + +class ThreadMessageHandler { + constructor(options) { + const postMsg = getPostMessage(options); + if (typeof postMsg !== 'function') { + throw new TypeError('options.postMessage is not a function'); + } + this.postMessage = postMsg; + this.onLoad = options === null || options === void 0 ? void 0 : options.onLoad; + this.onError = typeof (options === null || options === void 0 ? void 0 : options.onError) === 'function' ? options.onError : (_type, err) => { throw err; }; + this.instance = undefined; + this.messagesBeforeLoad = []; + } + instantiate(data) { + if (typeof this.onLoad === 'function') { + return this.onLoad(data); + } + throw new Error('ThreadMessageHandler.prototype.instantiate is not implemented'); + } + handle(e) { + var _a; + if ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.__emnapi__) { + const type = e.data.__emnapi__.type; + const payload = e.data.__emnapi__.payload; + try { + if (type === 'load') { + this._load(payload); + } + else if (type === 'start') { + this.handleAfterLoad(e, () => { + this._start(payload); + }); + } + } + catch (err) { + this.onError(err, type); + } + } + } + _load(payload) { + if (this.instance !== undefined) + return; + let source; + try { + source = this.instantiate(payload); + } + catch (err) { + this._loaded(err, null, payload); + return; + } + const then = source && 'then' in source ? source.then : undefined; + if (typeof then === 'function') { + then.call(source, (source) => { this._loaded(null, source, payload); }, (err) => { this._loaded(err, null, payload); }); + } + else { + this._loaded(null, source, payload); + } + } + _start(payload) { + const wasi_thread_start = this.instance.exports.wasi_thread_start; + if (typeof wasi_thread_start !== 'function') { + const err = new TypeError('wasi_thread_start is not exported'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + const postMessage = this.postMessage; + const tid = payload.tid; + const startArg = payload.arg; + notifyPthreadCreateResult(payload.sab, 1); + try { + wasi_thread_start(tid, startArg); + } + catch (err) { + if (err !== 'unwind') { + throw err; + } + else { + return; + } + } + postMessage(createMessage('cleanup-thread', { tid })); + } + _loaded(err, source, payload) { + if (err) { + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + if (source == null) { + const err = new TypeError('onLoad should return an object'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + const instance = source.instance; + if (!instance) { + const err = new TypeError('onLoad should return an object which includes "instance"'); + notifyPthreadCreateResult(payload.sab, 2, err); + throw err; + } + this.instance = instance; + const postMessage = this.postMessage; + postMessage(createMessage('loaded', {})); + const messages = this.messagesBeforeLoad; + this.messagesBeforeLoad = []; + for (let i = 0; i < messages.length; i++) { + const data = messages[i]; + this.handle({ data }); + } + } + handleAfterLoad(e, f) { + if (this.instance !== undefined) { + f.call(this, e); + } + else { + this.messagesBeforeLoad.push(e.data); + } + } +} +function notifyPthreadCreateResult(sab, result, error) { + if (sab) { + serizeErrorToBuffer(sab.buffer, result, error); + Atomics.notify(sab, 0); + } +} + +export { ThreadManager, ThreadMessageHandler, WASIThreads, createInstanceProxy, isSharedArrayBuffer, isTrapError }; diff --git a/node_modules/@emnapi/wasi-threads/index.js b/node_modules/@emnapi/wasi-threads/index.js new file mode 100644 index 000000000..7e6eabd6a --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/index.js @@ -0,0 +1,5 @@ +if (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') { + module.exports = require('./dist/wasi-threads.cjs.min.js') +} else { + module.exports = require('./dist/wasi-threads.cjs.js') +} diff --git a/node_modules/@emnapi/wasi-threads/package.json b/node_modules/@emnapi/wasi-threads/package.json new file mode 100644 index 000000000..71731b599 --- /dev/null +++ b/node_modules/@emnapi/wasi-threads/package.json @@ -0,0 +1,50 @@ +{ + "name": "@emnapi/wasi-threads", + "version": "1.2.2", + "description": "WASI threads proposal implementation in JavaScript", + "main": "index.js", + "module": "./dist/wasi-threads.esm-bundler.js", + "types": "./dist/wasi-threads.d.ts", + "sideEffects": false, + "exports": { + ".": { + "types": { + "module": "./dist/wasi-threads.d.ts", + "import": "./dist/wasi-threads.d.mts", + "default": "./dist/wasi-threads.d.ts" + }, + "module": "./dist/wasi-threads.esm-bundler.js", + "import": "./dist/wasi-threads.mjs", + "default": "./index.js" + }, + "./dist/wasi-threads.cjs.min": { + "types": "./dist/wasi-threads.d.ts", + "default": "./dist/wasi-threads.cjs.min.js" + }, + "./dist/wasi-threads.min.mjs": { + "types": "./dist/wasi-threads.d.mts", + "default": "./dist/wasi-threads.min.mjs" + } + }, + "dependencies": { + "tslib": "^2.4.0" + }, + "scripts": { + "build": "node ./script/build.js", + "build:test": "node ./test/build.js", + "test": "node ./test/index.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/toyobayashi/emnapi.git" + }, + "author": "toyobayashi", + "license": "MIT", + "bugs": { + "url": "https://github.com/toyobayashi/emnapi/issues" + }, + "homepage": "https://github.com/toyobayashi/emnapi#readme", + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@esbuild/win32-x64/README.md b/node_modules/@esbuild/win32-x64/README.md deleted file mode 100644 index a99ee7cf8..000000000 --- a/node_modules/@esbuild/win32-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# esbuild - -This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/node_modules/@esbuild/win32-x64/esbuild.exe b/node_modules/@esbuild/win32-x64/esbuild.exe deleted file mode 100644 index 5af34ef67..000000000 Binary files a/node_modules/@esbuild/win32-x64/esbuild.exe and /dev/null differ diff --git a/node_modules/@esbuild/win32-x64/package.json b/node_modules/@esbuild/win32-x64/package.json deleted file mode 100644 index ef65a96e2..000000000 --- a/node_modules/@esbuild/win32-x64/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@esbuild/win32-x64", - "version": "0.28.1", - "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/esbuild.git" - }, - "license": "MIT", - "preferUnplugged": true, - "engines": { - "node": ">=18" - }, - "os": [ - "win32" - ], - "cpu": [ - "x64" - ] -} diff --git a/node_modules/@rolldown/binding-linux-x64-musl/README.md b/node_modules/@rolldown/binding-linux-x64-musl/README.md deleted file mode 100644 index bd8447710..000000000 --- a/node_modules/@rolldown/binding-linux-x64-musl/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@rolldown/binding-linux-x64-musl` - -This is the **x86_64-unknown-linux-musl** binary for `@rolldown/binding` diff --git a/node_modules/@rolldown/binding-linux-x64-musl/package.json b/node_modules/@rolldown/binding-linux-x64-musl/package.json deleted file mode 100644 index d01287a22..000000000 --- a/node_modules/@rolldown/binding-linux-x64-musl/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@rolldown/binding-linux-x64-musl", - "version": "1.1.3", - "cpu": [ - "x64" - ], - "main": "rolldown-binding.linux-x64-musl.node", - "files": [ - "rolldown-binding.linux-x64-musl.node" - ], - "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", - "keywords": [ - "bundler", - "esbuild", - "parcel", - "rolldown", - "rollup", - "webpack" - ], - "homepage": "https://rolldown.rs/", - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/rolldown/rolldown.git", - "directory": "packages/rolldown" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "os": [ - "linux" - ], - "libc": [ - "musl" - ] -} \ No newline at end of file diff --git a/node_modules/@rolldown/binding-linux-x64-musl/rolldown-binding.linux-x64-musl.node b/node_modules/@rolldown/binding-linux-x64-musl/rolldown-binding.linux-x64-musl.node deleted file mode 100644 index fa969ffb6..000000000 Binary files a/node_modules/@rolldown/binding-linux-x64-musl/rolldown-binding.linux-x64-musl.node and /dev/null differ diff --git a/node_modules/@rolldown/binding-win32-x64-msvc/README.md b/node_modules/@rolldown/binding-win32-x64-msvc/README.md deleted file mode 100644 index ce38f8ea0..000000000 --- a/node_modules/@rolldown/binding-win32-x64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@rolldown/binding-win32-x64-msvc` - -This is the **x86_64-pc-windows-msvc** binary for `@rolldown/binding` diff --git a/node_modules/@rolldown/binding-win32-x64-msvc/package.json b/node_modules/@rolldown/binding-win32-x64-msvc/package.json deleted file mode 100644 index 67358da07..000000000 --- a/node_modules/@rolldown/binding-win32-x64-msvc/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@rolldown/binding-win32-x64-msvc", - "version": "1.1.3", - "cpu": [ - "x64" - ], - "main": "rolldown-binding.win32-x64-msvc.node", - "files": [ - "rolldown-binding.win32-x64-msvc.node" - ], - "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", - "keywords": [ - "bundler", - "esbuild", - "parcel", - "rolldown", - "rollup", - "webpack" - ], - "homepage": "https://rolldown.rs/", - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/rolldown/rolldown.git", - "directory": "packages/rolldown" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "os": [ - "win32" - ] -} \ No newline at end of file diff --git a/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node b/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node deleted file mode 100644 index b48e00069..000000000 Binary files a/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node and /dev/null differ diff --git a/node_modules/@simple-libs/child-process-utils/LICENSE b/node_modules/@simple-libs/child-process-utils/LICENSE new file mode 100644 index 000000000..9ecd6d6a6 --- /dev/null +++ b/node_modules/@simple-libs/child-process-utils/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present, TrigenSoftware + +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. diff --git a/node_modules/@simple-libs/child-process-utils/README.md b/node_modules/@simple-libs/child-process-utils/README.md new file mode 100644 index 000000000..c291a4b13 --- /dev/null +++ b/node_modules/@simple-libs/child-process-utils/README.md @@ -0,0 +1,77 @@ +# @simple-libs/child-process-utils + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/@simple-libs/child-process-utils.svg +[npm-url]: https://www.npmjs.com/package/@simple-libs/child-process-utils + +[node]: https://img.shields.io/node/v/@simple-libs/child-process-utils.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/@simple-libs/child-process-utils +[deps-url]: https://libraries.io/npm/@simple-libs%2Fchild-process-utils + +[size]: https://packagephobia.com/badge?p=@simple-libs/child-process-utils +[size-url]: https://packagephobia.com/result?p=@simple-libs/child-process-utils + +[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-libs/tests.yml?branch=main +[build-url]: https://github.com/TrigenSoftware/simple-libs/actions + +[coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-libs/badge.svg?branch=main +[coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-libs?branch=main + +A small set of utilities for child process. + +## Install + +```bash +# pnpm +pnpm add @simple-libs/child-process-utils +# yarn +yarn add @simple-libs/child-process-utils +# npm +npm i @simple-libs/child-process-utils +``` + +## Usage + +```ts +import { + exitCode, + catchProcessError, + throwProcessError, + outputStream, + output +} from '@simple-libs/child-process-utils' + +// Wait for a child process to exit and return its exit code +await exitCode(spawn()) +// Returns 0 if the process exited successfully, or the exit code if it failed + +// Catch error from a child process +await catchProcessError(spawn()) +// Returns the error if the process failed, or null if it succeeded + +// Throws an error if the child process exits with a non-zero code. +await throwProcessError(spawn()) + +// Yields the stdout of a child process. +// It will throw an error if the process exits with a non-zero code. +for await (chunk of outputStream(spawn())) { + console.log(chunk.toString()) +} + +// Collects the stdout of a child process into a single Buffer. +// It will throw an error if the process exits with a non-zero code. +await output(spawn()) +// Returns a Buffer with the stdout of the process +``` diff --git a/node_modules/@simple-libs/child-process-utils/dist/index.d.ts b/node_modules/@simple-libs/child-process-utils/dist/index.d.ts new file mode 100644 index 000000000..d72ad75ae --- /dev/null +++ b/node_modules/@simple-libs/child-process-utils/dist/index.d.ts @@ -0,0 +1,34 @@ +import type { ChildProcess } from 'child_process'; +/** + * Wait for a child process to exit and return its exit code. + * @param process + * @returns A promise that resolves to the exit code of the process. + */ +export declare function exitCode(process: ChildProcess): Promise; +/** + * Catch error from a child process. + * Also captures stderr output. + * @param process + * @returns A promise that resolves to an Error if the process exited with a non-zero code, or null if it exited successfully. + */ +export declare function catchProcessError(process: ChildProcess): Promise; +/** + * Throws an error if the child process exits with a non-zero code. + * @param process + */ +export declare function throwProcessError(process: ChildProcess): Promise; +/** + * Yields the stdout of a child process. + * It will throw an error if the process exits with a non-zero code. + * @param process + * @yields The stdout of the process. + */ +export declare function outputStream(process: ChildProcess): AsyncGenerator, void, any>; +/** + * Collects the stdout of a child process into a single Buffer. + * It will throw an error if the process exits with a non-zero code. + * @param process + * @returns A promise that resolves to a Buffer containing the stdout of the process. + */ +export declare function output(process: ChildProcess): Promise>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@simple-libs/child-process-utils/dist/index.d.ts.map b/node_modules/@simple-libs/child-process-utils/dist/index.d.ts.map new file mode 100644 index 000000000..eff91a4fd --- /dev/null +++ b/node_modules/@simple-libs/child-process-utils/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,YAAY,mBAMnD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,YAAY,yBAuB5D;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,YAAY,iBAM5D;AAED;;;;;GAKG;AACH,wBAAuB,YAAY,CAAC,OAAO,EAAE,YAAY,sDAsBxD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,YAAY,gCAE3C"} \ No newline at end of file diff --git a/node_modules/@simple-libs/child-process-utils/dist/index.js b/node_modules/@simple-libs/child-process-utils/dist/index.js new file mode 100644 index 000000000..d3addbbdc --- /dev/null +++ b/node_modules/@simple-libs/child-process-utils/dist/index.js @@ -0,0 +1,80 @@ +import { concatBufferStream } from '@simple-libs/stream-utils'; +/** + * Wait for a child process to exit and return its exit code. + * @param process + * @returns A promise that resolves to the exit code of the process. + */ +export async function exitCode(process) { + if (process.exitCode !== null) { + return process.exitCode; + } + return new Promise(resolve => process.once('close', resolve)); +} +/** + * Catch error from a child process. + * Also captures stderr output. + * @param process + * @returns A promise that resolves to an Error if the process exited with a non-zero code, or null if it exited successfully. + */ +export async function catchProcessError(process) { + let error = new Error('Process exited with non-zero code'); + let stderr = ''; + process.on('error', (err) => { + error = err; + }); + if (process.stderr) { + let chunk; + for await (chunk of process.stderr) { + stderr += chunk.toString(); + } + } + const code = await exitCode(process); + if (stderr) { + error = new Error(stderr); + } + return code ? error : null; +} +/** + * Throws an error if the child process exits with a non-zero code. + * @param process + */ +export async function throwProcessError(process) { + const error = await catchProcessError(process); + if (error) { + throw error; + } +} +/** + * Yields the stdout of a child process. + * It will throw an error if the process exits with a non-zero code. + * @param process + * @yields The stdout of the process. + */ +export async function* outputStream(process) { + const { stdout } = process; + const errorPromise = catchProcessError(process); + if (stdout) { + stdout.on('error', (err) => { + // Iteration was interrupted, e.g. by `break` or `return` in a for-await loop. + if (err.name === 'AbortError' && process.exitCode === null) { + process.kill('SIGKILL'); + } + }); + yield* stdout; + } + // Handle error only if iteration was not interrupted. + const error = await errorPromise; + if (error) { + throw error; + } +} +/** + * Collects the stdout of a child process into a single Buffer. + * It will throw an error if the process exits with a non-zero code. + * @param process + * @returns A promise that resolves to a Buffer containing the stdout of the process. + */ +export function output(process) { + return concatBufferStream(outputStream(process)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMkJBQTJCLENBQUE7QUFFOUQ7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsUUFBUSxDQUFDLE9BQXFCO0lBQ2xELElBQUksT0FBTyxDQUFDLFFBQVEsS0FBSyxJQUFJLEVBQUUsQ0FBQztRQUM5QixPQUFPLE9BQU8sQ0FBQyxRQUFRLENBQUE7SUFDekIsQ0FBQztJQUVELE9BQU8sSUFBSSxPQUFPLENBQVMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBO0FBQ3ZFLENBQUM7QUFFRDs7Ozs7R0FLRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsaUJBQWlCLENBQUMsT0FBcUI7SUFDM0QsSUFBSSxLQUFLLEdBQUcsSUFBSSxLQUFLLENBQUMsbUNBQW1DLENBQUMsQ0FBQTtJQUMxRCxJQUFJLE1BQU0sR0FBRyxFQUFFLENBQUE7SUFFZixPQUFPLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDLEdBQVUsRUFBRSxFQUFFO1FBQ2pDLEtBQUssR0FBR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FBQyxPQUFPLEVBQUUsQ0FBQyxHQUFHLEVBQUUsRUFBRTtZQUN6Qiw4RUFBOEU7WUFDOUUsSUFBSSxHQUFHLENBQUMsSUFBSSxLQUFLLFlBQVksSUFBSSxPQUFPLENBQUMsUUFBUSxLQUFLLElBQUksRUFBRSxDQUFDO2dCQUMzRCxPQUFPLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFBO1lBQ3pCLENBQUM7UUFDSCxDQUFDLENBQUMsQ0FBQTtRQUVGLEtBQUssQ0FBQyxDQUFDLE1BQStCLENBQUE7SUFDeEMsQ0FBQztJQUVELHNEQUFzRDtJQUV0RCxNQUFNLEtBQUssR0FBRyxNQUFNLFlBQVksQ0FBQTtJQUVoQyxJQUFJLEtBQUssRUFBRSxDQUFDO1FBQ1YsTUFBTSxLQUFLLENBQUE7SUFDYixDQUFDO0FBQ0gsQ0FBQztBQUVEOzs7OztHQUtHO0FBQ0gsTUFBTSxVQUFVLE1BQU0sQ0FBQyxPQUFxQjtJQUMxQyxPQUFPLGtCQUFrQixDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFBO0FBQ2xELENBQUMifQ== \ No newline at end of file diff --git a/node_modules/@simple-libs/child-process-utils/package.json b/node_modules/@simple-libs/child-process-utils/package.json new file mode 100644 index 000000000..95a653dcf --- /dev/null +++ b/node_modules/@simple-libs/child-process-utils/package.json @@ -0,0 +1,42 @@ +{ + "name": "@simple-libs/child-process-utils", + "type": "module", + "version": "2.0.0", + "description": "A small set of utilities for child process.", + "author": { + "name": "Dan Onoshko", + "email": "danon0404@gmail.com", + "url": "https://github.com/dangreen" + }, + "license": "MIT", + "homepage": "https://github.com/TrigenSoftware/simple-libs/tree/main/packages/child-process-utils#readme", + "funding": "https://ko-fi.com/dangreen", + "repository": { + "type": "git", + "url": "https://github.com/TrigenSoftware/simple-libs.git", + "directory": "packages/child-process-utils" + }, + "bugs": { + "url": "https://github.com/TrigenSoftware/simple-libs/issues" + }, + "keywords": [ + "child_process", + "child", + "process", + "utilities", + "utils" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "files": [ + "dist" + ], + "dependencies": { + "@simple-libs/stream-utils": "^2.0.0" + } +} \ No newline at end of file diff --git a/node_modules/@simple-libs/stream-utils/LICENSE b/node_modules/@simple-libs/stream-utils/LICENSE new file mode 100644 index 000000000..9ecd6d6a6 --- /dev/null +++ b/node_modules/@simple-libs/stream-utils/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 - present, TrigenSoftware + +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. diff --git a/node_modules/@simple-libs/stream-utils/README.md b/node_modules/@simple-libs/stream-utils/README.md new file mode 100644 index 000000000..6524798d8 --- /dev/null +++ b/node_modules/@simple-libs/stream-utils/README.md @@ -0,0 +1,79 @@ +# @simple-libs/stream-utils + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/@simple-libs/stream-utils.svg +[npm-url]: https://www.npmjs.com/package/@simple-libs/stream-utils + +[node]: https://img.shields.io/node/v/@simple-libs/stream-utils.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/@simple-libs/stream-utils +[deps-url]: https://libraries.io/npm/@simple-libs%2Fstream-utils + +[size]: https://packagephobia.com/badge?p=@simple-libs/stream-utils +[size-url]: https://packagephobia.com/result?p=@simple-libs/stream-utils + +[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-libs/tests.yml?branch=main +[build-url]: https://github.com/TrigenSoftware/simple-libs/actions + +[coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-libs/badge.svg?branch=main +[coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-libs?branch=main + +A small set of utilities for streams. + +## Install + +```bash +# pnpm +pnpm add @simple-libs/stream-utils +# yarn +yarn add @simple-libs/stream-utils +# npm +npm i @simple-libs/stream-utils +``` + +## Usage + +```ts +import { + toArray, + concatBufferStream, + concatStringStream, + firstFromStream, + mergeReadables +} from '@simple-libs/stream-utils' + +// Convert a readable stream to an array +await toArray(Readable.from(['foo', 'bar', 'baz'])) +// Returns ['foo', 'bar', 'baz'] + +// Concatenate a stream of buffers into a single buffer +await concatBufferStream(Readable.from([Buffer.from('foo'), Buffer.from('bar')])) +// Returns + +// Concatenate a stream of strings into a single string +await concatStringStream(Readable.from(['foo', 'bar'])) +// Returns 'foobar' + +// Get the first value from a stream +await firstFromStream(Readable.from(['foo', 'bar'])) +// Returns 'foo' + +// Merges multiple Readable streams into a single Readable stream. +// Each chunk will be an object containing the source stream name and the chunk data. +await mergeReadables({ + foo: Readable.from(['foo1', 'foo2']), + bar: Readable.from(['bar1', 'bar2']) +}) +// Returns [{ source: 'foo', chunk: 'foo1' }, { source: 'foo', chunk: 'foo2' }, { source: 'bar', chunk: 'bar1' }, { source: 'bar', chunk: 'bar2' }] +``` diff --git a/node_modules/@simple-libs/stream-utils/dist/index.d.ts b/node_modules/@simple-libs/stream-utils/dist/index.d.ts new file mode 100644 index 000000000..8b41d1958 --- /dev/null +++ b/node_modules/@simple-libs/stream-utils/dist/index.d.ts @@ -0,0 +1,51 @@ +import { Readable } from 'stream'; +/** + * Get all items from an async iterable and return them as an array. + * @param iterable + * @returns A promise that resolves to an array of items. + */ +export declare function toArray(iterable: AsyncIterable): Promise; +/** + * Concatenate all buffers from an async iterable into a single Buffer. + * @param iterable + * @returns A promise that resolves to a single Buffer containing all concatenated buffers. + */ +export declare function concatBufferStream(iterable: AsyncIterable): Promise>; +/** + * Concatenate all strings from an async iterable into a single string. + * @param iterable + * @returns A promise that resolves to a single string containing all concatenated strings. + */ +export declare function concatStringStream(iterable: AsyncIterable): Promise; +/** + * Get the first item from an async iterable. + * @param stream + * @returns A promise that resolves to the first item, or null if the iterable is empty. + */ +export declare function firstFromStream(stream: AsyncIterable): Promise; +export interface MergedReadableChunk { + source: K; + chunk: T; +} +/** + * Merges multiple Readable streams into a single Readable stream. + * Each chunk will be an object containing the source stream name and the chunk data. + * @param streams - An object where keys are stream names and values are Readable streams. + * @returns A merged Readable stream. + */ +export declare function mergeReadables(streams: Record): Readable & AsyncIterable>; +/** + * Split stream by separator. + * @param stream + * @param separator + * @yields String chunks. + */ +export declare function splitStream(stream: AsyncIterable, separator: string): AsyncGenerator; +/** + * Parse JSON objects from a stream, separated by a delimiter (default is newline). + * @param stream + * @param delimiter + * @yields Parsed JSON objects of type T. + */ +export declare function parseJsonStream(stream: AsyncIterable, delimiter?: RegExp): AsyncGenerator, void, unknown>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@simple-libs/stream-utils/dist/index.d.ts.map b/node_modules/@simple-libs/stream-utils/dist/index.d.ts.map new file mode 100644 index 000000000..cdb39a3e2 --- /dev/null +++ b/node_modules/@simple-libs/stream-utils/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAQzE;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,gCAEvE;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,mBAEvE;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,qBAMhE;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,MAAM;IAC/D,MAAM,EAAE,CAAC,CAAA;IACT,KAAK,EAAE,CAAC,CAAA;CACT;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,CAAC,SAAS,MAAM,EAChB,CAAC,GAAG,MAAM,EAEV,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,GAC3B,QAAQ,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAwBrD;AAED;;;;;GAKG;AACH,wBAAuB,WAAW,CAChC,MAAM,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,EACtC,SAAS,EAAE,MAAM,yCAoBlB;AAED;;;;;GAKG;AACH,wBAAuB,eAAe,CAAC,CAAC,EACtC,MAAM,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,EACtC,SAAS,SAAU,6CAuBpB"} \ No newline at end of file diff --git a/node_modules/@simple-libs/stream-utils/dist/index.js b/node_modules/@simple-libs/stream-utils/dist/index.js new file mode 100644 index 000000000..b3a49bb55 --- /dev/null +++ b/node_modules/@simple-libs/stream-utils/dist/index.js @@ -0,0 +1,116 @@ +import { Readable } from 'stream'; +/** + * Get all items from an async iterable and return them as an array. + * @param iterable + * @returns A promise that resolves to an array of items. + */ +export async function toArray(iterable) { + const result = []; + for await (const item of iterable) { + result.push(item); + } + return result; +} +/** + * Concatenate all buffers from an async iterable into a single Buffer. + * @param iterable + * @returns A promise that resolves to a single Buffer containing all concatenated buffers. + */ +export async function concatBufferStream(iterable) { + return Buffer.concat(await toArray(iterable)); +} +/** + * Concatenate all strings from an async iterable into a single string. + * @param iterable + * @returns A promise that resolves to a single string containing all concatenated strings. + */ +export async function concatStringStream(iterable) { + return (await toArray(iterable)).join(''); +} +/** + * Get the first item from an async iterable. + * @param stream + * @returns A promise that resolves to the first item, or null if the iterable is empty. + */ +export async function firstFromStream(stream) { + for await (const tag of stream) { + return tag; + } + return null; +} +/** + * Merges multiple Readable streams into a single Readable stream. + * Each chunk will be an object containing the source stream name and the chunk data. + * @param streams - An object where keys are stream names and values are Readable streams. + * @returns A merged Readable stream. + */ +export function mergeReadables(streams) { + const mergedStream = new Readable({ + objectMode: true, + read() { } + }); + let ended = 0; + Object.entries(streams).forEach(([name, stream], _i, entries) => { + stream + .on('data', (chunk) => mergedStream.push({ + source: name, + chunk + })) + .on('end', () => { + ended += 1; + if (ended === entries.length) { + mergedStream.push(null); + } + }) + .on('error', err => mergedStream.destroy(err)); + }); + return mergedStream; +} +/** + * Split stream by separator. + * @param stream + * @param separator + * @yields String chunks. + */ +export async function* splitStream(stream, separator) { + let chunk; + let payload; + let buffer = ''; + for await (chunk of stream) { + buffer += chunk.toString(); + if (buffer.includes(separator)) { + payload = buffer.split(separator); + buffer = payload.pop() || ''; + yield* payload; + } + } + if (buffer) { + yield buffer; + } +} +/** + * Parse JSON objects from a stream, separated by a delimiter (default is newline). + * @param stream + * @param delimiter + * @yields Parsed JSON objects of type T. + */ +export async function* parseJsonStream(stream, delimiter = /\r?\n/) { + let chunk; + let payload; + let buffer = ''; + let json; + for await (chunk of stream) { + buffer += chunk.toString(); + if (delimiter.test(buffer)) { + payload = buffer.split(delimiter); + buffer = payload.pop() || ''; + for (json of payload) { + yield JSON.parse(json); + } + } + } + if (buffer) { + yield JSON.parse(buffer); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUVqQzs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSxPQUFPLENBQUksUUFBMEI7SUFDekQsTUFBTSxNQUFNLEdBQVEsRUFBRSxDQUFBO0lBRXRCLElBQUksS0FBSyxFQUFFLE1BQU0sSUFBSSxJQUFJLFFBQVEsRUFBRSxDQUFDO1FBQ2xDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDbkIsQ0FBQztJQUVELE9BQU8sTUFBTSxDQUFBO0FBQ2YsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxNQUFNLENBQUMsS0FBSyxVQUFVLGtCQUFrQixDQUFDLFFBQStCO0lBQ3RFLE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQyxNQUFNLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFBO0FBQy9DLENBQUM7QUFFRDs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxRQUErQjtJQUN0RSxPQUFPLENBQUMsTUFBTSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLEN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BQ2YsSUFBSSxJQUFZLENBQUE7SUFFaEIsSUFBSSxLQUFLLEVBQUUsS0FBSyxJQUFJLE1BQU0sRUFBRSxDQUFDO1FBQzNCLE1BQU0sSUFBSSxLQUFLLENBQUMsUUFBUSxFQUFFLENBQUE7UUFFMUIsSUFBSSxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7WUFDM0IsT0FBTyxHQUFHLE1BQU0sQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUE7WUFDakMsTUFBTSxHQUFHLE9BQU8sQ0FBQyxHQUFHLEVBQUUsSUFBSSxFQUFFLENBQUE7WUFFNUIsS0FBSyxJQUFJLElBQUksT0FBTyxFQUFFLENBQUM7Z0JBQ3JCLE1BQU0sSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQU0sQ0FBQTtZQUM3QixDQUFDO1FBQ0gsQ0FBQztJQUNILENBQUM7SUFFRCxJQUFJLE1BQU0sRUFBRSxDQUFDO1FBQ1gsTUFBTSxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBTSxDQUFBO0lBQy9CLENBQUM7QUFDSCxDQUFDIn0= \ No newline at end of file diff --git a/node_modules/@simple-libs/stream-utils/package.json b/node_modules/@simple-libs/stream-utils/package.json new file mode 100644 index 000000000..8a142617c --- /dev/null +++ b/node_modules/@simple-libs/stream-utils/package.json @@ -0,0 +1,38 @@ +{ + "name": "@simple-libs/stream-utils", + "type": "module", + "version": "2.0.0", + "description": "A small set of utilities for streams.", + "author": { + "name": "Dan Onoshko", + "email": "danon0404@gmail.com", + "url": "https://github.com/dangreen" + }, + "license": "MIT", + "homepage": "https://github.com/TrigenSoftware/simple-libs/tree/main/packages/stream-utils#readme", + "funding": "https://ko-fi.com/dangreen", + "repository": { + "type": "git", + "url": "https://github.com/TrigenSoftware/simple-libs.git", + "directory": "packages/stream-utils" + }, + "bugs": { + "url": "https://github.com/TrigenSoftware/simple-libs/issues" + }, + "keywords": [ + "stream", + "streams", + "utilities", + "utils" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "files": [ + "dist" + ] +} \ No newline at end of file diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 000000000..9e841e7a2 --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + 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 diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 000000000..638f6b899 --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for node (https://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Fri, 09 Oct 2026 18:42:20 GMT + * Dependencies: [undici-types](https://npmjs.com/package/undici-types) + +# Credits +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 000000000..72cc91de9 --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,1077 @@ +declare module "node:assert" { + import strict = require("node:assert/strict"); + /** + * An alias of {@link assert.ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert( + value: unknown, + message?: Error | assert.AssertMessageFunction, + ): asserts value; + function assert( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + const kOptions: unique symbol; + namespace assert { + type AssertMethodNames = + | "deepEqual" + | "deepStrictEqual" + | "doesNotMatch" + | "doesNotReject" + | "doesNotThrow" + | "equal" + | "fail" + | "ifError" + | "match" + | "notDeepEqual" + | "notDeepStrictEqual" + | "notEqual" + | "notStrictEqual" + | "ok" + | "partialDeepStrictEqual" + | "rejects" + | "strictEqual" + | "throws"; + interface AssertOptions { + /** + * If set to `'full'`, shows the full diff in assertion errors. + * @default 'simple' + */ + diff?: "simple" | "full" | undefined; + /** + * If set to `true`, non-strict methods behave like their + * corresponding strict methods. + * @default true + */ + strict?: boolean | undefined; + /** + * If set to `true`, skips prototype and constructor + * comparison in deep equality checks. + * @since v24.9.0 + * @default false + */ + skipPrototype?: boolean | undefined; + } + interface Assert extends Pick { + readonly [kOptions]: AssertOptions & { strict: false }; + } + interface AssertStrict extends Pick { + readonly [kOptions]: AssertOptions & { strict: true }; + } + /** + * The `Assert` class allows creating independent assertion instances with custom options. + * @since v24.6.0 + */ + var Assert: { + /** + * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages. + * + * ```js + * const { Assert } = require('node:assert'); + * const assertInstance = new Assert({ diff: 'full' }); + * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 }); + * // Shows a full diff in the error message. + * ``` + * + * **Important**: When destructuring assertion methods from an `Assert` instance, + * the methods lose their connection to the instance's configuration options (such + * as `diff`, `strict`, and `skipPrototype` settings). + * The destructured methods will fall back to default behavior instead. + * + * ```js + * const myAssert = new Assert({ diff: 'full' }); + * + * // This works as expected - uses 'full' diff + * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } }); + * + * // This loses the 'full' diff setting - falls back to default 'simple' diff + * const { strictEqual } = myAssert; + * strictEqual({ a: 1 }, { b: { c: 1 } }); + * ``` + * + * The `skipPrototype` option affects all deep equality methods: + * + * ```js + * class Foo { + * constructor(a) { + * this.a = a; + * } + * } + * + * class Bar { + * constructor(a) { + * this.a = a; + * } + * } + * + * const foo = new Foo(1); + * const bar = new Bar(1); + * + * // Default behavior - fails due to different constructors + * const assert1 = new Assert(); + * assert1.deepStrictEqual(foo, bar); // AssertionError + * + * // Skip prototype comparison - passes if properties are equal + * const assert2 = new Assert({ skipPrototype: true }); + * assert2.deepStrictEqual(foo, bar); // OK + * ``` + * + * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior + * (diff: 'simple', non-strict mode). + * To maintain custom options when using destructured methods, avoid + * destructuring and call methods directly on the instance. + * @since v24.6.0 + */ + new( + options?: AssertOptions & { strict?: true | undefined }, + ): AssertStrict; + new( + options: AssertOptions, + ): Assert; + }; + interface AssertionErrorOptions { + /** + * If provided, the error message is set to this value. + */ + message?: string | undefined; + /** + * The `actual` property on the error instance. + */ + actual?: unknown; + /** + * The `expected` property on the error instance. + */ + expected?: unknown; + /** + * The `operator` property on the error instance. + */ + operator?: string | undefined; + /** + * If provided, the generated stack trace omits frames before this function. + */ + stackStartFn?: Function | undefined; + /** + * If set to `'full'`, shows the full diff in assertion errors. + * @default 'simple' + */ + diff?: "simple" | "full" | undefined; + } + /** + * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. + */ + class AssertionError extends Error { + constructor(options: AssertionErrorOptions); + /** + * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. + */ + actual: unknown; + /** + * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. + */ + expected: unknown; + /** + * Indicates if the message was auto-generated (`true`) or not. + */ + generatedMessage: boolean; + /** + * Value is always `ERR_ASSERTION` to show that the error is an assertion error. + */ + code: "ERR_ASSERTION"; + /** + * Set to the passed in operator value. + */ + operator: string; + } + type AssertMessageFunction = (actual: unknown, expected: unknown) => string; + type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * @since v0.1.21 + * @param [message='Failed'] + */ + function fail(message?: string | Error): never; + /** + * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * // Using `assert()` works the same: + * assert(2 + 2 > 5);; + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(2 + 2 > 5) + * ``` + * @since v0.1.21 + */ + function ok( + value: unknown, + message?: Error | AssertMessageFunction, + ): asserts value; + function ok( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled + * and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function equal( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function equal( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is + * specially handled and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error + * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function notEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function deepEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'node:assert'; + * + * const obj1 = { + * a: { + * b: 1, + * }, + * }; + * const obj2 = { + * a: { + * b: 2, + * }, + * }; + * const obj3 = { + * a: { + * b: 1, + * }, + * }; + * const obj4 = { __proto__: obj1 }; + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notDeepEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual( + actual: unknown, + expected: T, + message?: Error | AssertMessageFunction, + ): asserts actual is T; + function strictEqual( + actual: unknown, + expected: T, + message: string, + ...args: unknown[] + ): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual( + actual: unknown, + expected: T, + message?: Error | AssertMessageFunction, + ): asserts actual is T; + function deepStrictEqual( + actual: unknown, + expected: T, + message: string, + ...args: unknown[] + ): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notDeepStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'node:assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text', + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text', + * }, + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * }, + * ); + * + * // Using regular expressions to validate error properties: + * assert.throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text', + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i, + * }, + * ); + * + * // Fails due to the different `message` and `name` properties: + * assert.throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err, + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error, + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/, + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error', + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'node:assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. + * + * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError, + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops', + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v26.x/api/errors.html#err_invalid_return_value) + * error. In both cases the error handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and `name` properties. + * + * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error, + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to + * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v26.x/api/errors.html#err_invalid_return_value) error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject( + block: (() => Promise) | Promise, + message?: string | Error, + ): Promise; + function doesNotReject( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function match( + value: string, + regExp: RegExp, + message?: Error | AssertMessageFunction, + ): void; + function match( + value: string, + regExp: RegExp, + message: string, + ...args: unknown[] + ): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function doesNotMatch( + value: string, + regExp: RegExp, + message?: Error | AssertMessageFunction, + ): void; + function doesNotMatch( + value: string, + regExp: RegExp, + message: string, + ...args: unknown[] + ): void; + /** + * Tests for partial deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. "Partial" equality means + * that only properties that exist on the `expected` parameter are going to be + * compared. + * + * This method always passes the same test cases as `assert.deepStrictEqual()`, + * behaving as a super set of it. + * @since v22.13.0 + */ + function partialDeepStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function partialDeepStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + } + namespace assert { + export { strict }; + } + export = assert; +} +declare module "assert" { + import assert = require("node:assert"); + export = assert; +} diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts new file mode 100644 index 000000000..d4ea39083 --- /dev/null +++ b/node_modules/@types/node/assert/strict.d.ts @@ -0,0 +1,68 @@ +declare module "node:assert/strict" { + import { + Assert, + AssertionError, + AssertionErrorOptions, + AssertMessageFunction, + AssertOptions, + AssertPredicate, + AssertStrict, + deepStrictEqual, + doesNotMatch, + doesNotReject, + doesNotThrow, + fail, + ifError, + match, + notDeepStrictEqual, + notStrictEqual, + ok, + partialDeepStrictEqual, + rejects, + strictEqual, + throws, + } from "node:assert"; + function strict( + value: unknown, + message?: Error | AssertMessageFunction, + ): asserts value; + function strict( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + namespace strict { + export { + Assert, + AssertionError, + AssertionErrorOptions, + AssertOptions, + AssertPredicate, + AssertStrict, + deepStrictEqual, + deepStrictEqual as deepEqual, + doesNotMatch, + doesNotReject, + doesNotThrow, + fail, + ifError, + match, + notDeepStrictEqual, + notDeepStrictEqual as notDeepEqual, + notStrictEqual, + notStrictEqual as notEqual, + ok, + partialDeepStrictEqual, + rejects, + strict, + strictEqual, + strictEqual as equal, + throws, + }; + } + export = strict; +} +declare module "assert/strict" { + import strict = require("node:assert/strict"); + export = strict; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 000000000..d38fcf096 --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,711 @@ +declare module "node:async_hooks" { + /** + * ```js + * import { executionAsyncId } from 'node:async_hooks'; + * import fs from 'node:fs'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * const path = '.'; + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promise-execution-tracking). + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. + */ + function executionAsyncId(): number; + /** + * Resource objects returned by `executionAsyncResource()` are most often internal + * Node.js handle objects with undocumented APIs. Using any functions or properties + * on the object is likely to crash your application and should be avoided. + * + * Using `executionAsyncResource()` in the top-level execution context will + * return an empty object as there is no handle or request object to use, + * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'node:fs'; + * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'node:http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook, + * } from 'node:async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * }, + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. + */ + function executionAsyncResource(): object; + /** + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on [promise execution tracking](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promise-execution-tracking). + * @return The ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + interface HookCallbacks { + /** + * The [`init` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource). + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; + /** + * The [`before` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#beforeasyncid). + */ + before?(asyncId: number): void; + /** + * The [`after` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#afterasyncid). + */ + after?(asyncId: number): void; + /** + * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promiseresolveasyncid). + */ + promiseResolve?(asyncId: number): void; + /** + * The [`destroy` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#destroyasyncid). + */ + destroy?(asyncId: number): void; + /** + * Whether the hook should track `Promise`s. Cannot be `false` if + * `promiseResolve` is set. + * @default true + */ + trackPromises?: boolean | undefined; + } + 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. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the + * [Hook Callbacks](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#hook-callbacks) section. + * + * ```js + * import { createHook } from 'node:async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { }, + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and + * `destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#hook-callbacks) to register + * @returns 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 | undefined; + /** + * 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 | undefined; + } + /** + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` + */ + 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 v9.3.0) + */ + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); + /** + * Binds the given function to the current execution context. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current execution context. + * @param type An optional name to associate with the underlying `AsyncResource`. + */ + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg, + ): Func; + /** + * Binds the given function to execute to this `AsyncResource`'s scope. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current `AsyncResource`. + */ + bind any>(fn: Func): Func; + /** + * 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. + * @since v9.6.0 + * @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( + fn: (this: This, ...args: any[]) => Result, + thisArg?: This, + ...args: any[] + ): Result; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. + */ + emitDestroy(): this; + /** + * @return The unique `asyncId` assigned to the resource. + */ + asyncId(): number; + /** + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. + */ + triggerAsyncId(): number; + } + interface AsyncLocalStorageOptions { + /** + * The default value to be used when no store is provided. + */ + defaultValue?: any; + /** + * A name for the `AsyncLocalStorage` value. + */ + name?: string | undefined; + } + /** + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory + * safe implementation that involves significant optimizations that are non-obvious + * to implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'node:http'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 0: finish + * // 1: start + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other's data. + * @since v13.10.0, v12.17.0 + */ + class AsyncLocalStorage { + /** + * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a + * `run()` call or after an `enterWith()` call. + */ + constructor(options?: AsyncLocalStorageOptions); + /** + * Binds the given function to the current execution context. + * @since v19.8.0 + * @param fn The function to bind to the current execution context. + * @return A new function that calls `fn` within the captured execution context. + */ + static bind any>(fn: Func): Func; + /** + * Captures the current execution context and returns a function that accepts a + * function as an argument. Whenever the returned function is called, it + * calls the function passed to it within the captured context. + * + * ```js + * const asyncLocalStorage = new AsyncLocalStorage(); + * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); + * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); + * console.log(result); // returns 123 + * ``` + * + * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple + * async context tracking purposes, for example: + * + * ```js + * class Foo { + * #runInAsyncScope = AsyncLocalStorage.snapshot(); + * + * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } + * } + * + * const foo = asyncLocalStorage.run(123, () => new Foo()); + * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 + * ``` + * @since v19.8.0 + * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. + */ + static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; + /** + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. + * + * When calling `asyncLocalStorage.disable()`, all current contexts linked to the + * instance will be exited. + * + * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores + * provided by the `asyncLocalStorage`, as those objects are garbage collected + * along with the corresponding async resources. + * + * Use this method when the `asyncLocalStorage` is not in use anymore + * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental + */ + disable(): void; + /** + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 + */ + getStore(): T | undefined; + /** + * The name of the `AsyncLocalStorage` instance if provided. + * @since v24.0.0 + */ + readonly name: string; + /** + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. + * + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + */ + run(store: T, callback: () => R): R; + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. + * + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental + */ + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Creates a disposable scope that enters the given store and automatically + * restores the previous store value when the scope is disposed. This method is + * designed to work with JavaScript's explicit resource management (`using` syntax). + * + * Example: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * ``` + * + * The `withScope()` method is particularly useful for managing context in + * synchronous code where you want to ensure the previous store value is restored + * when exiting a block, even if an error is thrown. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * try { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * throw new Error('test'); + * } catch (e) { + * // Store is automatically restored even after error + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * } + * ``` + * + * **Important:** When using `withScope()` in async functions before the first + * `await`, be aware that the scope change will affect the caller's context. The + * synchronous portion of an async function (before the first `await`) runs + * immediately when called, and when it reaches the first `await`, it returns the + * promise to the caller. At that point, the scope change becomes visible in the + * caller's context and will persist in subsequent synchronous code until something + * else changes the scope value. For async operations, prefer using `run()` which + * properly isolates context across async boundaries. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * async function example() { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * await someAsyncOperation(); // Function pauses here and returns promise + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * // Calling without await + * example(); // Synchronous portion runs, then pauses at first await + * // After the promise is returned, the scope 'my-store' is now active in caller! + * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!) + * ``` + * @since v25.9.0 + * @experimental + */ + withScope(store: T): RunScope; + /** + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental + */ + enterWith(store: T): void; + } + /** + * A disposable scope returned by `asyncLocalStorage.withScope()` that + * automatically restores the previous store value when disposed. This class + * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work + * with JavaScript's `using` syntax. + * + * The scope automatically restores the previous store value when the `using` block + * exits, whether through normal completion or by throwing an error. + * @since v25.9.0 + * @experimental + */ + interface RunScope extends Disposable { + /** + * Explicitly ends the scope and restores the previous store value. This method + * is idempotent: calling it multiple times has the same effect as calling it once. + * + * The `[Symbol.dispose]()` method defers to `dispose()`. + * + * If `withScope()` is called without the `using` keyword, `dispose()` must be + * called manually to restore the previous store value. Forgetting to call + * `dispose()` will cause the store value to persist for the remainder of the + * current execution context: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const storage = new AsyncLocalStorage(); + * + * // Without using, the scope must be disposed manually + * const scope = storage.withScope('my-store'); + * // storage.getStore() === 'my-store' here + * + * scope.dispose(); // Restore previous value + * // storage.getStore() === undefined here + * ``` + * @since v25.9.0 + */ + dispose(): void; + } + /** + * @since v17.2.0, v16.14.0 + * @return A map of provider types to the corresponding numeric id. + * This map contains all the event types that might be emitted by the `async_hooks.init()` event. + */ + namespace asyncWrapProviders { + const NONE: number; + const DIRHANDLE: number; + const DNSCHANNEL: number; + const ELDHISTOGRAM: number; + const FILEHANDLE: number; + const FILEHANDLECLOSEREQ: number; + const FIXEDSIZEBLOBCOPY: number; + const FSEVENTWRAP: number; + const FSREQCALLBACK: number; + const FSREQPROMISE: number; + const GETADDRINFOREQWRAP: number; + const GETNAMEINFOREQWRAP: number; + const HEAPSNAPSHOT: number; + const HTTP2SESSION: number; + const HTTP2STREAM: number; + const HTTP2PING: number; + const HTTP2SETTINGS: number; + const HTTPINCOMINGMESSAGE: number; + const HTTPCLIENTREQUEST: number; + const JSSTREAM: number; + const JSUDPWRAP: number; + const MESSAGEPORT: number; + const PIPECONNECTWRAP: number; + const PIPESERVERWRAP: number; + const PIPEWRAP: number; + const PROCESSWRAP: number; + const PROMISE: number; + const QUERYWRAP: number; + const SHUTDOWNWRAP: number; + const SIGNALWRAP: number; + const STATWATCHER: number; + const STREAMPIPE: number; + const TCPCONNECTWRAP: number; + const TCPSERVERWRAP: number; + const TCPWRAP: number; + const TTYWRAP: number; + const UDPSENDWRAP: number; + const UDPWRAP: number; + const SIGINTWATCHDOG: number; + const WORKER: number; + const WORKERHEAPSNAPSHOT: number; + const WRITEWRAP: number; + const ZLIB: number; + const CHECKPRIMEREQUEST: number; + const PBKDF2REQUEST: number; + const KEYPAIRGENREQUEST: number; + const KEYGENREQUEST: number; + const KEYEXPORTREQUEST: number; + const CIPHERREQUEST: number; + const DERIVEBITSREQUEST: number; + const HASHREQUEST: number; + const RANDOMBYTESREQUEST: number; + const RANDOMPRIMEREQUEST: number; + const SCRYPTREQUEST: number; + const SIGNREQUEST: number; + const TLSWRAP: number; + const VERIFYREQUEST: number; + } +} +declare module "async_hooks" { + export * from "node:async_hooks"; +} diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts new file mode 100644 index 000000000..47f1fac97 --- /dev/null +++ b/node_modules/@types/node/buffer.buffer.d.ts @@ -0,0 +1,471 @@ +declare module "node:buffer" { + type ImplicitArrayBuffer> = T extends + { valueOf(): infer V extends ArrayBufferLike } ? V : T; + global { + interface BufferConstructor { + // see buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: ArrayLike): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: TArrayBuffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an + * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use + * `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal + * `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(array: WithImplicitCoercion>): Buffer; + /** + * This creates a view of the `ArrayBuffer` without copying the underlying + * memory. For example, when passed a reference to the `.buffer` property of a + * `TypedArray` instance, the newly created `Buffer` will share the same + * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arr = new Uint16Array(2); + * + * arr[0] = 5000; + * arr[1] = 4000; + * + * // Shares memory with `arr`. + * const buf = Buffer.from(arr.buffer); + * + * console.log(buf); + * // Prints: + * + * // Changing the original Uint16Array changes the Buffer also. + * arr[1] = 6000; + * + * console.log(buf); + * // Prints: + * ``` + * + * The optional `byteOffset` and `length` arguments specify a memory range within + * the `arrayBuffer` that will be shared by the `Buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const ab = new ArrayBuffer(10); + * const buf = Buffer.from(ab, 0, 2); + * + * console.log(buf.length); + * // Prints: 2 + * ``` + * + * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a + * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` + * variants. + * + * It is important to remember that a backing `ArrayBuffer` can cover a range + * of memory that extends beyond the bounds of a `TypedArray` view. A new + * `Buffer` created using the `buffer` property of a `TypedArray` may extend + * beyond the range of the `TypedArray`: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements + * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements + * console.log(arrA.buffer === arrB.buffer); // true + * + * const buf = Buffer.from(arrB.buffer); + * console.log(buf); + * // Prints: + * ``` + * @since v5.10.0 + * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the + * `.buffer` property of a `TypedArray`. + * @param byteOffset Index of first byte to expose. **Default:** `0`. + * @param length Number of bytes to expose. **Default:** + * `arrayBuffer.byteLength - byteOffset`. + */ + from>( + arrayBuffer: TArrayBuffer, + byteOffset?: number, + length?: number, + ): Buffer>; + /** + * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies + * the character encoding to be used when converting `string` into bytes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('this is a tést'); + * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); + * + * console.log(buf1.toString()); + * // Prints: this is a tést + * console.log(buf2.toString()); + * // Prints: this is a tést + * console.log(buf1.toString('latin1')); + * // Prints: this is a tést + * ``` + * + * A `TypeError` will be thrown if `string` is not a string or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(string)` may also use the internal `Buffer` pool like + * `Buffer.allocUnsafe()` does. + * @since v5.10.0 + * @param string A string to encode. + * @param encoding The encoding of `string`. **Default:** `'utf8'`. + */ + from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; + from(arrayOrString: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it must be an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is + * less than `totalLength`, the remaining space is filled with zeros. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations less than `Buffer.poolSize >>> 1` (32KiB when default poolSize is used) are sliced + * from a single pre-allocated `Buffer`. This allows applications to avoid the + * garbage collection overhead of creating many individually allocated `Buffer` + * instances. This approach improves both performance and memory usage by + * eliminating the need to track and clean up as many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + } + interface Buffer extends Uint8Array { + // see buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + } + // TODO: remove globals in future version + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBuffer = Buffer; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type AllowSharedBuffer = Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type BufferView = T extends NodeJS.ArrayBufferView ? Buffer : never; +} diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 000000000..59f8a4532 --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,1800 @@ +declare module "node:buffer" { + import { ReadableStream } from "node:stream/web"; + /** + * This function returns `true` if `input` contains only valid UTF-8-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.4.0, v18.14.0 + * @param input The input to validate. + */ + export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean; + /** + * This function returns `true` if `input` contains only valid ASCII-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.6.0, v18.15.0 + * @param input The input to validate. + */ + export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean; + export let INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + export type TranscodeEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "latin1" + | "binary"; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'node:buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ + export function transcode( + source: Uint8Array, + fromEnc: TranscodeEncoding, + toEnc: TranscodeEncoding, + ): NonSharedBuffer; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { type AllowSharedBuffer, Buffer, type NonSharedBuffer }; + export type WithImplicitCoercion = + | T + | { valueOf(): T } + | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never); + global { + namespace NodeJS { + export { BufferEncoding }; + } + // Buffer class + type BufferEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later + // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier + + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength( + string: string | NodeJS.ArrayBufferView | ArrayBufferLike, + encoding?: BufferEncoding, + ): number; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer { + // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later + // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier + + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: "Buffer"; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare( + target: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number, + ): -1 | 0 | 1; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntLE + * @since v14.9.0, v12.19.0 + */ + writeUintLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntBE + * @since v14.9.0, v12.19.0 + */ + writeUintBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + readBigUint64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + readBigUint64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntLE + * @since v14.9.0, v12.19.0 + */ + readUintLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntBE + * @since v14.9.0, v12.19.0 + */ + readUintBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * @alias Buffer.readUInt8 + * @since v14.9.0, v12.19.0 + */ + readUint8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * @alias Buffer.readUInt16LE + * @since v14.9.0, v12.19.0 + */ + readUint16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * @alias Buffer.readUInt16BE + * @since v14.9.0, v12.19.0 + */ + readUint16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * @alias Buffer.readUInt32LE + * @since v14.9.0, v12.19.0 + */ + readUint32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * @alias Buffer.readUInt32BE + * @since v14.9.0, v12.19.0 + */ + readUint32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): this; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): this; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): this; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt8 + * @since v14.9.0, v12.19.0 + */ + writeUint8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16LE + * @since v14.9.0, v12.19.0 + */ + writeUint16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16BE + * @since v14.9.0, v12.19.0 + */ + writeUint16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32LE + * @since v14.9.0, v12.19.0 + */ + writeUint32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32BE + * @since v14.9.0, v12.19.0 + */ + writeUint32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * + * // Fill a buffer with empty string + * const c = Buffer.allocUnsafe(5).fill(''); + * + * console.log(c.fill('')); + * // Prints: + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this; + fill(value: string | Uint8Array | number, encoding: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in + * `encoding`. + * * a `Buffer` or `Uint8Array`, `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.subarray`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a + * `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches `String.prototype.indexOf()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and + * `byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** `0`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is the encoding used to + * determine the binary representation of the string that will be searched for in + * `buf`. **Default:** `'utf8'`. + * @returns The index of the first occurrence of `value` in `buf`, or + * `-1` if `buf` does not contain `value`. + */ + indexOf( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): number; + indexOf(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): number; + indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a + * `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches `String.prototype.lastIndexOf()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** + * `buf.length - 1`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is the encoding used to + * determine the binary representation of the string that will be searched for in + * `buf`. **Default:** `'utf8'`. + * @returns The index of the last occurrence of `value` in `buf`, or + * `-1` if `buf` does not contain `value`. + */ + lastIndexOf( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): number; + lastIndexOf(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): number; + lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** `0`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is its encoding. + * **Default:** `'utf8'`. + * @returns `true` if `value` was found in `buf`, `false` otherwise. + */ + includes( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): boolean; + includes(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): boolean; + includes(value: string | number | Uint8Array, encoding: BufferEncoding): boolean; + } + var Buffer: BufferConstructor; + } + // #region web types + export type BlobPart = NodeJS.BufferSource | Blob | string; + export interface BlobPropertyBag { + endings?: "native" | "transparent"; + type?: string; + } + export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; + } + export interface Blob { + readonly size: number; + readonly type: string; + arrayBuffer(): Promise; + bytes(): Promise; + slice(start?: number, end?: number, contentType?: string): Blob; + stream(): ReadableStream; + text(): Promise; + textStream(): ReadableStream; + } + export var Blob: { + prototype: Blob; + new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + }; + export interface File extends Blob { + readonly lastModified: number; + readonly name: string; + readonly webkitRelativePath: string; + } + export var File: { + prototype: File; + new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + }; + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + // #endregion +} +declare module "buffer" { + export * from "node:buffer"; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 000000000..f89e41524 --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,1361 @@ +declare module "node:child_process" { + import { NonSharedBuffer } from "node:buffer"; + import * as dgram from "node:dgram"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import * as net from "node:net"; + import { Readable, Stream, Writable } from "node:stream"; + import { URL } from "node:url"; + type Serializable = string | object | number | boolean | bigint; + type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; + interface ChildProcessEventMap { + "close": [code: number | null, signal: NodeJS.Signals | null]; + "disconnect": []; + "error": [err: Error]; + "exit": [code: number | null, signal: NodeJS.Signals | null]; + "message": [message: Serializable, sendHandle: SendHandle]; + "spawn": []; + } + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess implements EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stderr: Readable | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Control | null; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * import assert from 'node:assert'; + * import fs from 'node:fs'; + * import child_process from 'node:child_process'; + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ], + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ + readonly stdio: [ + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra + Readable | Writable | null | undefined, // extra + ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ + readonly killed: boolean; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * import { spawn } from 'node:child_process'; + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ + readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + * + * When the child process is terminated by a signal, `subprocess.exitCode` will be + * `null` and `subprocess.signalCode` will be set. To get the corresponding + * POSIX exit code, use + * `util.convertProcessSignalToExitCode(subprocess.signalCode)`. + */ + readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ + readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ + readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ + readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * import { spawn } from 'node:child_process'; + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'], + * }, + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ + kill(signal?: NodeJS.Signals | number): boolean; + /** + * Calls {@link ChildProcess.kill} with `'SIGTERM'`. + * @since v20.5.0 + */ + [Symbol.dispose](): void; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * import cp from 'node:child_process'; + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received and buffered in + * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * import { createServer } from 'node:net'; + * import { fork } from 'node:child_process'; + * const subprocess = fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of + * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only + * supported on Unix platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * import { createServer } from 'node:net'; + * import { fork } from 'node:child_process'; + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v26.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v26.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v26.x/api/dgram.html#class-dgramsocket) object. + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: Serializable, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; + send( + message: Serializable, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ + disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ + unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ + ref(): void; + } + interface ChildProcess extends InternalEventEmitter {} + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, + Readable, + 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 + 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 Control extends EventEmitter { + ref(): void; + unref(): void; + } + interface MessageOptions { + keepOpen?: boolean | undefined; + } + type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; + type StdioOptions = IOType | Array; + type SerializationType = "json" | "advanced"; + interface MessagingOptions extends Abortable { + /** + * Specify the kind of serialization used for sending messages between processes. + * @default 'json' + */ + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; + } + interface ProcessEnvOptions { + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; + } + interface CommonOptions extends ProcessEnvOptions { + /** + * @default false + */ + windowsHide?: boolean | undefined; + /** + * @default 0 + */ + timeout?: number | undefined; + } + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + interface SpawnOptions extends CommonSpawnOptions { + detached?: boolean | undefined; + } + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: StdioPipeNamed | StdioPipe[] | undefined; + } + type StdioNull = "inherit" | "ignore" | Stream; + type StdioPipeNamed = "pipe" | "overlapped"; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple< + Stdin extends StdioNull | StdioPipe, + Stdout extends StdioNull | StdioPipe, + Stderr extends StdioNull | StdioPipe, + > extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + /** + * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env, + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * import { spawn } from 'node:child_process'; + * import { once } from 'node:events'; + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * const [code] = await once(ls, 'close'); + * console.log(`child process exited with code ${code}`); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * import { spawn } from 'node:child_process'; + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * import { spawn } from 'node:child_process'; + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve + * it with the `process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { spawn } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptions): ChildProcess; + // overloads of spawn with 'args' + function spawn( + command: string, + args?: readonly string[], + options?: SpawnOptionsWithoutStdio, + ): ChildProcessWithoutNullStreams; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; + interface ExecOptions extends CommonOptions { + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + encoding?: string | null | undefined; + } + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding?: BufferEncoding | undefined; + } + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: "buffer" | null; + } + interface ExecException extends Omit { + cmd: string; + code?: number | string; + killed?: boolean; + signal?: NodeJS.Signals; + stdout?: string | NonSharedBuffer; + stderr?: string | NonSharedBuffer; + } + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * import { exec } from 'node:child_process'; + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * import { exec } from 'node:child_process'; + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * If `timeout` is greater than `0`, the parent will send the signal + * identified by the `killSignal` property (the default is `'SIGTERM'`) if the + * child runs longer than `timeout` milliseconds. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * import util from 'node:util'; + * import child_process from 'node:child_process'; + * const exec = util.promisify(child_process.exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { exec } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ + 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: ExecOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: ExecOptionsWithStringEncoding, + 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: ExecOptions | undefined | null, + callback?: ( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void, + ): ChildProcess; + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + command: string, + options: ExecOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; + encoding?: string | null | undefined; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding?: BufferEncoding | undefined; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: "buffer" | null; + } + /** @deprecated Use `ExecFileOptions` instead. */ + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {} + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * import { execFile } from 'node:child_process'; + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * import util from 'node:util'; + * import child_process from 'node:child_process'; + * const execFile = util.promisify(child_process.execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { execFile } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ + // no `options` definitely means stdout/stderr are `string`. + function execFile( + file: string, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + callback?: (error: ExecException | 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: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. + function execFile( + file: string, + options: ExecFileOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: ExecFileOptions | undefined | null, + callback: + | (( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void) + | undefined + | null, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions | undefined | null, + callback: + | (( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void) + | undefined + | null, + ): ChildProcess; + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + } + interface ForkOptions extends CommonOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * import { fork } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ + function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; + function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; + interface SpawnSyncOptions extends CommonSpawnOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding?: "buffer" | null | undefined; + } + interface SpawnSyncReturns { + pid: number; + output: Array; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error; + } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithStringEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithBufferEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args?: readonly string[], + options?: SpawnSyncOptions, + ): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + /** + * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding?: "buffer" | null | undefined; + } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ + function execSync(command: string): NonSharedBuffer; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer; + function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding?: "buffer" | null | undefined; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): NonSharedBuffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer; + function execFileSync(file: string, args: readonly string[]): NonSharedBuffer; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithStringEncoding, + ): string; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithBufferEncoding, + ): NonSharedBuffer; + function execFileSync( + file: string, + args?: readonly string[], + options?: ExecFileSyncOptions, + ): string | NonSharedBuffer; + /** @deprecated This deprecated alias will be removed in a future version. Use `ExecException` instead. */ + interface ExecFileException extends ExecException {} +} +declare module "child_process" { + export * from "node:child_process"; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 000000000..b9dbc8c11 --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,432 @@ +declare module "node:cluster" { + import * as child_process from "node:child_process"; + import { EventEmitter, InternalEventEmitter } from "node:events"; + class Worker implements EventEmitter { + constructor(options?: cluster.WorkerOptions); + /** + * Each new worker is given its own unique id, this id is stored in the `id`. + * + * While a worker is alive, this is the key that indexes it in `cluster.workers`. + * @since v0.8.0 + */ + id: number; + /** + * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object + * from this function is stored as `.process`. In a worker, the global `process` is stored. + * + * See: [Child Process module](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options). + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ + process: child_process.ChildProcess; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). + * + * In a worker, this sends a message to the primary. It is identical to `process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. + */ + send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean; + send( + message: child_process.Serializable, + sendHandle: child_process.SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send( + message: child_process.Serializable, + sendHandle: child_process.SendHandle, + options?: child_process.MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * This function will kill the worker. In the primary worker, it does this by + * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. + * + * The `kill()` function kills the worker process without waiting for a graceful + * disconnect, it has the same behavior as `worker.process.kill()`. + * + * This method is aliased as `worker.destroy()` for backwards compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is [`kill()`](https://nodejs.org/docs/latest-v26.x/api/process.html#processkillpid-signal). + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ + kill(signal?: string): void; + destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * import net from 'node:net'; + * + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ + disconnect(): this; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ + isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'node:cluster'; + * import http from 'node:http'; + * import { availableParallelism } from 'node:os'; + * import process from 'node:process'; + * + * const numCPUs = availableParallelism(); + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ + isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.disconnect()`. + * If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ + exitedAfterDisconnect: boolean; + } + interface Worker extends InternalEventEmitter {} + type _Worker = Worker; + namespace cluster { + interface Worker extends _Worker {} + interface WorkerOptions { + id?: number | undefined; + process?: child_process.ChildProcess | undefined; + state?: string | undefined; + } + interface WorkerEventMap { + "disconnect": []; + "error": [error: Error]; + "exit": [code: number, signal: string]; + "listening": [address: Address]; + "message": [message: any, handle: child_process.SendHandle]; + "online": []; + } + interface ClusterSettings { + /** + * List of string arguments passed to the Node.js executable. + * @default process.execArgv + */ + execArgv?: string[] | undefined; + /** + * File path to worker file. + * @default process.argv[1] + */ + exec?: string | undefined; + /** + * String arguments passed to worker. + * @default process.argv.slice(2) + */ + args?: readonly string[] | undefined; + /** + * Whether or not to send output to parent's stdio. + * @default false + */ + silent?: boolean | undefined; + /** + * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must + * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processspawncommand-args-options)'s + * [`stdio`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#optionsstdio). + */ + stdio?: any[] | undefined; + /** + * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) + */ + uid?: number | undefined; + /** + * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) + */ + gid?: number | undefined; + /** + * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. + * By default each worker gets its own port, incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + /** + * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. + * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#advanced-serialization) for more details. + * @default false + */ + serialization?: "json" | "advanced" | undefined; + /** + * Current working directory of the worker process. + * @default undefined (inherits from parent process) + */ + cwd?: string | undefined; + /** + * Hide the forked processes console window that would normally be created on Windows systems. + * @default false + */ + windowsHide?: boolean | undefined; + } + interface Address { + address: string; + port: number; + /** + * The `addressType` is one of: + * + * * `4` (TCPv4) + * * `6` (TCPv6) + * * `-1` (Unix domain socket) + * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) + */ + addressType: 4 | 6 | -1 | "udp4" | "udp6"; + } + interface ClusterEventMap { + "disconnect": [worker: Worker]; + "exit": [worker: Worker, code: number, signal: string]; + "fork": [worker: Worker]; + "listening": [worker: Worker, address: Address]; + "message": [worker: Worker, message: any, handle: child_process.SendHandle]; + "online": [worker: Worker]; + "setup": [settings: ClusterSettings]; + } + interface Cluster extends InternalEventEmitter { + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + Worker: typeof Worker; + disconnect(callback?: () => void): void; + /** + * Spawn a new worker process. + * + * This can only be called from the primary process. + * @param env Key/value pairs to add to worker process environment. + * @since v0.6.0 + */ + fork(env?: any): Worker; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + /** + * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` + * is undefined, then `isPrimary` is `true`. + * @since v16.0.0 + */ + readonly isPrimary: boolean; + /** + * True if the process is not a primary (it is the negation of `cluster.isPrimary`). + * @since v0.6.0 + */ + readonly isWorker: boolean; + /** + * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a + * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) + * is called, whichever comes first. + * + * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute + * IOCP handles without incurring a large performance hit. + * + * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. + * @since v0.11.2 + */ + schedulingPolicy: number; + /** + * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) + * (or [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv)) this settings object will contain + * the settings, including the default values. + * + * This object is not intended to be changed or set manually. + * @since v0.7.1 + */ + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) instead. */ + setupMaster(settings?: ClusterSettings): void; + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. + * + * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv) + * and have no effect on workers that are already running. + * + * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to + * [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv). + * + * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of + * `cluster.setupPrimary()` is called. + * + * ```js + * import cluster from 'node:cluster'; + * + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'https'], + * silent: true, + * }); + * cluster.fork(); // https worker + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'http'], + * }); + * cluster.fork(); // http worker + * ``` + * + * This can only be called from the primary process. + * @since v16.0.0 + */ + setupPrimary(settings?: ClusterSettings): void; + /** + * A reference to the current worker object. Not available in the primary process. + * + * ```js + * import cluster from 'node:cluster'; + * + * if (cluster.isPrimary) { + * console.log('I am primary'); + * cluster.fork(); + * cluster.fork(); + * } else if (cluster.isWorker) { + * console.log(`I am worker #${cluster.worker.id}`); + * } + * ``` + * @since v0.7.0 + */ + readonly worker?: Worker; + /** + * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. + * + * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it + * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. + * + * ```js + * import cluster from 'node:cluster'; + * + * for (const worker of Object.values(cluster.workers)) { + * worker.send('big announcement to all workers'); + * } + * ``` + * @since v0.7.0 + */ + readonly workers?: NodeJS.Dict; + readonly SCHED_NONE: number; + readonly SCHED_RR: number; + } + } + var cluster: cluster.Cluster; + export = cluster; +} +declare module "cluster" { + import cluster = require("node:cluster"); + export = cluster; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 000000000..5ba70b3f4 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,93 @@ +declare module "node:console" { + import { InspectOptions } from "node:util"; + namespace console { + interface ConsoleOptions { + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + /** + * Ignore errors when writing to the underlying streams. + * @default true + */ + ignoreErrors?: boolean | undefined; + /** + * Set color support for this `Console` instance. Setting to true enables coloring while inspecting + * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color + * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the + * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. + * @default 'auto' + */ + colorMode?: boolean | "auto" | undefined; + /** + * Specifies options that are passed along to + * [`util.inspect()`](https://nodejs.org/docs/latest-v26.x/api/util.html#utilinspectobject-options). + */ + inspectOptions?: InspectOptions | ReadonlyMap | undefined; + /** + * Set group indentation. + * @default 2 + */ + groupIndentation?: number | undefined; + } + interface Console { + readonly Console: { + prototype: Console; + new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleOptions): Console; + }; + assert(condition?: unknown, ...data: any[]): void; + clear(): void; + count(label?: string): void; + countReset(label?: string): void; + debug(...data: any[]): void; + dir(item?: any, options?: InspectOptions): void; + dirxml(...data: any[]): void; + error(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(): void; + info(...data: any[]): void; + log(...data: any[]): void; + table(tabularData?: any, properties?: string[]): void; + time(label?: string): void; + timeEnd(label?: string): void; + timeLog(label?: string, ...data: any[]): void; + trace(...data: any[]): void; + warn(...data: any[]): void; + /** + * This method does not display anything unless used in the inspector. The `console.profile()` + * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} + * is called. The profile is then added to the Profile panel of the inspector. + * + * ```js + * console.profile('MyLabel'); + * // Some code + * console.profileEnd('MyLabel'); + * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. + * ``` + * @since v8.0.0 + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. Stops the current + * JavaScript CPU profiling session if one has been started and prints the report to the + * Profiles panel of the inspector. See {@link profile} for an example. + * + * If this method is called without a label, the most recently started profile is stopped. + * @since v8.0.0 + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. The `console.timeStamp()` + * method adds an event with the label `'label'` to the Timeline panel of the inspector. + * @since v8.0.0 + */ + timeStamp(label?: string): void; + } + } + var console: console.Console; + export = console; +} +declare module "console" { + import console = require("node:console"); + export = console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 000000000..a271f9aaa --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,14 @@ +declare module "node:constants" { + const constants: + & typeof import("node:os").constants.dlopen + & typeof import("node:os").constants.errno + & typeof import("node:os").constants.priority + & typeof import("node:os").constants.signals + & typeof import("node:fs").constants + & typeof import("node:crypto").constants; + export = constants; +} +declare module "constants" { + import constants = require("node:constants"); + export = constants; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 000000000..c628382fb --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,3964 @@ +declare module "node:crypto" { + import { NonSharedBuffer } from "node:buffer"; + import { Transform, TransformOptions, Writable, WritableOptions } from "node:stream"; + import { PeerCertificate } from "node:tls"; + /** + * SPKAC is a Certificate Signing Request mechanism originally implemented by + * Netscape and was specified formally as part of HTML5's `keygen` element. + * + * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects + * should not use this element anymore. + * + * The `node:crypto` module provides the `Certificate` class for working with SPKAC + * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC + * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. + * @since v0.11.8 + */ + class Certificate { + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const challenge = Certificate.exportChallenge(spkac); + * console.log(challenge.toString('utf8')); + * // Prints: the challenge as a UTF8 string + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const publicKey = Certificate.exportPublicKey(spkac); + * console.log(publicKey); + * // Prints: the public key as + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * ```js + * import { Buffer } from 'node:buffer'; + * const { Certificate } = await import('node:crypto'); + * + * const spkac = getSpkacSomehow(); + * console.log(Certificate.verifySpkac(Buffer.from(spkac))); + * // Prints: true or false + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return `true` if the given `spkac` data structure is valid, `false` otherwise. + */ + static verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean; + /** + * @deprecated + * @param encoding The `encoding` of the `spkac` string. + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * @deprecated + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * @deprecated + * @param encoding The `encoding` of the `spkac` string. + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean; + } + /** @deprecated This property is deprecated. Please use `crypto.setFips()` and `crypto.getFips()` instead. */ + var fips: boolean; + interface HashOptions extends TransformOptions { + outputLength?: number | undefined; + } + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * When the data is small (< 5MB) and readily available, `crypto.hash()` is usually faster. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHash, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ + function createHash(algorithm: string, options?: HashOptions): Hash; + interface HmacOptions extends TransformOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was + * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not + * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createHmac(algorithm: string, key: KeyLike, options?: HmacOptions): Hmac; + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { createHash } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ + class Hash extends Transform { + private constructor(); + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: HashOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ + digest(): NonSharedBuffer; + digest(encoding: BufferEncoding): string; + } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ + class Hmac extends Transform { + private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ + digest(): NonSharedBuffer; + digest(encoding: BufferEncoding): string; + } + type KeyFormat = "pem" | "der" | "jwk" | "raw-public" | "raw-private" | "raw-seed"; + type KeyObjectType = "secret" | "public" | "private"; + type PublicKeyExportType = "pkcs1" | "spki"; + type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1"; + type KeyExportOptions = + | SymmetricKeyExportOptions + | PublicKeyExportOptions + | PrivateKeyExportOptions + | JwkKeyExportOptions + | RawPublicKeyExportOptions + | RawPrivateKeyExportOptions; + interface SymmetricKeyExportOptions { + format?: "buffer" | undefined; + } + interface PublicKeyExportOptions { + type: T; + format: "pem" | "der"; + } + interface PrivateKeyExportOptions { + type: T; + format: "pem" | "der"; + cipher?: string | undefined; + passphrase?: BinaryLike | undefined; + } + interface JwkKeyExportOptions { + format: "jwk"; + } + interface RawPublicKeyExportOptions { + format: "raw-public"; + } + interface RawPrivateKeyExportOptions { + format: "raw-private" | "raw-seed"; + } + interface KeyPairExportOptions< + TPublic extends PublicKeyExportType = PublicKeyExportType, + TPrivate extends PrivateKeyExportType = PrivateKeyExportType, + > { + publicKeyEncoding?: + | PublicKeyExportOptions + | RawPublicKeyExportOptions + | JwkKeyExportOptions + | undefined; + privateKeyEncoding?: + | PrivateKeyExportOptions + | RawPrivateKeyExportOptions + | JwkKeyExportOptions + | undefined; + } + type KeyExportResult = T extends { format: infer F extends KeyFormat } ? { + "der": NonSharedBuffer; + "jwk": webcrypto.JsonWebKey; + "pem": string; + "raw-public": NonSharedBuffer; + "raw-private": NonSharedBuffer; + "raw-seed": NonSharedBuffer; + }[F] + : Default; + interface KeyPairExportResult { + publicKey: KeyExportResult; + privateKey: KeyExportResult; + } + type KeyPairExportCallback = ( + err: Error | null, + publicKey: KeyExportResult, + privateKey: KeyExportResult, + ) => void; + type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`; + type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`; + type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`; + type AsymmetricKeyType = + | "dh" + | "dsa" + | "ec" + | "ed25519" + | "ed448" + | MLDSAKeyType + | MLKEMKeyType + | "rsa-pss" + | "rsa" + | SLHDSAKeyType + | "x25519" + | "x448"; + interface AsymmetricKeyDetails { + modulusLength?: number; + publicExponent?: bigint; + hashAlgorithm?: string; + mgf1HashAlgorithm?: string; + saltLength?: number; + divisorLength?: number; + namedCurve?: string; + } + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ + class KeyObject { + private constructor(); + /** + * Returns the underlying `KeyObject` of a `CryptoKey`. The returned `KeyObject` + * does not retain any of the restrictions imposed by the Web Crypto API on the + * original `CryptoKey`, such as the allowed key usages, the algorithm or hash + * algorithm bindings, and the extractability flag. In particular, the underlying + * key material of the returned `KeyObject` can always be exported. + * + * ```js + * const { KeyObject } = await import('node:crypto'); + * const { subtle } = globalThis.crypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256, + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: AsymmetricKeyType; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails; + /** + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. Raw formats return a + * `Buffer` containing the raw key material. + * + * Private keys can be encrypted by specifying a `cipher` and `passphrase`. + * The PKCS#8 `type` supports encryption with both PEM and DER `format` for any + * key algorithm. PKCS#1 and SEC1 can only be encrypted when the PEM `format` is + * used. For maximum compatibility, use PKCS#8 for encrypted private keys. Since + * PKCS#8 defines its own encryption mechanism, PEM-level encryption is not + * supported when encrypting a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption + * and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ + export(options?: T): KeyExportResult; + /** + * Returns `true` or `false` depending on whether the keys have exactly the same + * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). + * @since v17.7.0, v16.15.0 + * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. + */ + equals(otherKeyObject: KeyObject): boolean; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number; + /** + * Converts a `KeyObject` instance to a `CryptoKey`. + * @since 22.10.0 + */ + toCryptoKey( + algorithm: + | webcrypto.AlgorithmIdentifier + | webcrypto.RsaHashedImportParams + | webcrypto.EcKeyImportParams + | webcrypto.HmacImportParams, + extractable: boolean, + keyUsages: readonly webcrypto.KeyUsage[], + ): webcrypto.CryptoKey; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ + 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 CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; + type CipherChaCha20Poly1305Types = "chacha20-poly1305"; + type BinaryLike = string | ArrayBufferLike | NodeJS.ArrayBufferView; + type KeyLike = BinaryLike | KeyObject; + interface CipherCCMOptions extends TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends TransformOptions { + authTagLength?: number | undefined; + } + interface CipherOCBOptions extends TransformOptions { + authTagLength: number; + } + interface CipherChaCha20Poly1305Options extends TransformOptions { + authTagLength?: number | undefined; + } + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv( + algorithm: CipherCCMTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherCCMOptions, + ): CipherCCM; + function createCipheriv( + algorithm: CipherOCBTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherOCBOptions, + ): CipherOCB; + function createCipheriv( + algorithm: CipherGCMTypes, + key: KeyLike, + iv: BinaryLike, + options?: CipherGCMOptions, + ): CipherGCM; + function createCipheriv( + algorithm: CipherChaCha20Poly1305Types, + key: KeyLike, + iv: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): CipherChaCha20Poly1305; + function createCipheriv( + algorithm: string, + key: KeyLike, + iv: BinaryLike | null, + options?: TransformOptions, + ): Cipheriv; + /** + * Instances of the `Cipheriv` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipheriv} method is + * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipheriv` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipheriv` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * + * import { + * pipeline, + * } from 'node:stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ + class Cipheriv extends Transform { + private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer; + update( + data: string | NodeJS.ArrayBufferView, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Once the `cipher.final()` method has been called, the `Cipheriv` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): NonSharedBuffer; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipheriv` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; + } + interface CipherAEADMethods { + getAuthTag(): NonSharedBuffer; + setAAD(buffer: BinaryLike, options?: { + plaintextLength?: number | undefined; + encoding?: BufferEncoding | undefined; + }): this; + } + interface CipherCCM extends Cipheriv, CipherAEADMethods { + setAAD(buffer: BinaryLike, options: { + plaintextLength: number; + encoding?: BufferEncoding | undefined; + }): this; + } + interface CipherGCM extends Cipheriv, CipherAEADMethods {} + interface CipherOCB extends Cipheriv, CipherAEADMethods {} + interface CipherChaCha20Poly1305 extends Cipheriv, CipherAEADMethods {} + /** + * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the + * `authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see [CCM mode](https://nodejs.org/docs/latest-v26.x/api/crypto.html#ccm-mode). + * For AES-GCM and `chacha20-poly1305`, the `authTagLength` option defaults to 16 + * bytes and must be set to a different value if a different length is used. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv( + algorithm: CipherCCMTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherOCBTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherOCBOptions, + ): DecipherOCB; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: KeyLike, + iv: BinaryLike, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv( + algorithm: CipherChaCha20Poly1305Types, + key: KeyLike, + iv: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): DecipherChaCha20Poly1305; + function createDecipheriv( + algorithm: string, + key: KeyLike, + iv: BinaryLike | null, + options?: TransformOptions, + ): Decipheriv; + /** + * Instances of the `Decipheriv` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipheriv} method is + * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipheriv` objects as streams: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * let chunk; + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipheriv` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ + class Decipheriv extends Transform { + private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer; + update( + data: string | NodeJS.ArrayBufferView, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Once the `decipher.final()` method has been called, the `Decipheriv` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): NonSharedBuffer; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(auto_padding?: boolean): this; + } + interface DecipherAEADMethods { + setAAD( + buffer: BinaryLike, + options?: { + plaintextLength?: number | undefined; + encoding?: BufferEncoding | undefined; + }, + ): this; + setAuthTag(buffer: BinaryLike, encoding?: BufferEncoding): this; + } + interface DecipherCCM extends Decipheriv, DecipherAEADMethods { + setAAD( + buffer: BinaryLike, + options: { + plaintextLength: number; + encoding?: BufferEncoding | undefined; + }, + ): this; + } + interface DecipherGCM extends Decipheriv, DecipherAEADMethods {} + interface DecipherOCB extends Decipheriv, DecipherAEADMethods {} + interface DecipherChaCha20Poly1305 extends Decipheriv, DecipherAEADMethods {} + interface PrivateKeyInput { + key: BinaryLike; + format?: "pem" | "der" | undefined; + type?: PrivateKeyExportType | undefined; + passphrase?: BinaryLike | undefined; + encoding?: BufferEncoding | undefined; + } + interface PublicKeyInput { + key: BinaryLike; + format?: "pem" | "der" | undefined; + type?: PublicKeyExportType | undefined; + encoding?: BufferEncoding | undefined; + } + interface RawPrivateKeyInput { + key: ArrayBufferLike | NodeJS.ArrayBufferView; + format: "raw-private" | "raw-seed"; + asymmetricKeyType: AsymmetricKeyType; + namedCurve?: string | undefined; + } + interface RawPublicKeyInput { + key: ArrayBufferLike | NodeJS.ArrayBufferView; + format: "raw-public"; + asymmetricKeyType: AsymmetricKeyType; + namedCurve?: string | undefined; + } + interface JsonWebKeyInput { + key: webcrypto.JsonWebKey; + format: "jwk"; + } + interface SecretKeyOptions { + length: number; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey, + * } = await import('node:crypto'); + * + * generateKey('hmac', { length: 512 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: "hmac" | "aes", + options: SecretKeyOptions, + callback: (err: Error | null, key: KeyObject) => void, + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync, + * } = await import('node:crypto'); + * + * const key = generateKeySync('hmac', { length: 512 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync(type: "hmac" | "aes", options: SecretKeyOptions): KeyObject; + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput | BinaryLike): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | KeyLike): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ + function createSecretKey(key: BinaryLike, encoding?: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: WritableOptions): Sign; + type DSAEncoding = "der" | "ieee-p1363"; + interface SigningOptions { + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; + context?: NodeJS.ArrayBufferView | undefined; + } + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} + interface SignRawPrivateKeyInput extends RawPrivateKeyInput, SigningOptions {} + interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + interface SignKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} + interface VerifyRawPublicKeyInput extends RawPublicKeyInput, SigningOptions {} + interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + interface VerifyKeyObjectInput extends SigningOptions { + key: KeyObject; + } + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1', + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends Writable { + private constructor(); + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if + * `privateKey` had been passed to `crypto.createPrivateKey()`. When + * `privateKey` is a string, `ArrayBuffer`, `Buffer`, `TypedArray`, or + * `DataView`, it must contain PEM-encoded key material. If it is an object, the + * following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign( + privateKey: + | KeyLike + | SignKeyObjectInput + | SignPrivateKeyInput + | SignRawPrivateKeyInput + | SignJsonWebKeyInput, + ): NonSharedBuffer; + sign( + privateKey: + | KeyLike + | SignKeyObjectInput + | SignPrivateKeyInput + | SignRawPrivateKeyInput + | SignJsonWebKeyInput, + outputFormat: BufferEncoding, + ): string; + } + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createVerify(algorithm: string, options?: WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ + class Verify extends Writable { + private constructor(); + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Verify; + /** + * Verifies the provided data using the given `key` and `signature`. + * + * If `key` is not a `KeyObject`, this function behaves as if + * `key` had been passed to `crypto.createPublicKey()`. When `key` is a string, + * `ArrayBuffer`, `Buffer`, `TypedArray`, or `DataView`, it must contain + * PEM-encoded key material. If it is an object, the following additional + * properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify( + key: + | KeyLike + | VerifyKeyObjectInput + | VerifyPublicKeyInput + | VerifyRawPublicKeyInput + | VerifyJsonWebKeyInput, + signature: BinaryLike, + signatureEncoding?: BufferEncoding, + ): boolean; + } + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; + function createDiffieHellman( + prime: BinaryLike, + primeEncoding?: BufferEncoding, + generator?: number | BinaryLike, + generatorEncoding?: BufferEncoding, + ): DiffieHellman; + function createDiffieHellman( + prime: BinaryLike, + generator: number | BinaryLike, + generatorEncoding?: BufferEncoding, + ): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createDiffieHellman, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values unless they have been + * generated or computed already, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, + * once a private key has been generated or set, calling this function only + * recomputes the public key from the existing private key. Since the public key is + * determined by the private key, the result will be the same unless the private key + * has been changed via `diffieHellman.setPrivateKey()`. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + generateKeys(): NonSharedBuffer; + generateKeys(encoding: BufferEncoding): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding?: BufferEncoding, + ): NonSharedBuffer; + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrime(): NonSharedBuffer; + getPrime(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getGenerator(): NonSharedBuffer; + getGenerator(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPublicKey(): NonSharedBuffer; + getPublicKey(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrivateKey(): NonSharedBuffer; + getPrivateKey(encoding: BufferEncoding): string; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: BinaryLike, encoding?: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * + * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be + * used to manually provide the public key or to automatically derive it. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `node:constants` module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ + verifyError: number; + } + /** + * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. + * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. + * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. + * + * ```js + * const { createDiffieHellmanGroup } = await import('node:crypto'); + * const dh = createDiffieHellmanGroup('modp1'); + * ``` + * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): + * ```bash + * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h + * modp1 # 768 bits + * modp2 # 1024 bits + * modp5 # 1536 bits + * modp14 # 2048 bits + * modp15 # etc. + * modp16 + * modp17 + * modp18 + * ``` + * @since v0.7.5 + */ + class DiffieHellmanGroup { + private constructor(); + } + interface DiffieHellmanGroup extends Omit {} + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are listed in the documentation for `DiffieHellmanGroup`. + * + * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman, + * } = await import('node:crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellmanGroup; + /** + * An alias for {@link getDiffieHellman} + * @since v0.9.3 + */ + function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2, + * } = await import('node:crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync, + * } = await import('node:crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + ): NonSharedBuffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ + function randomBytes(size: number): NonSharedBuffer; + function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; + function pseudoRandomBytes(size: number): NonSharedBuffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 2**48. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param min Start of random range (inclusive). + * @param max End of random range (exclusive). + */ + function randomInt(max: number): number; + function randomInt(min: number, max: number): number; + function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; + function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ + function randomFillSync( + buffer: T, + offset?: number, + size?: number, + ): T; + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill( + buffer: T, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + size: number, + callback: (err: Error | null, buf: T) => void, + ): void; + interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; + } + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt, + * } = await import('node:crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync, + * } = await import('node:crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ + function scryptSync( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options?: ScryptOptions, + ): NonSharedBuffer; + interface PublicDecryptOptions { + padding?: number | undefined; + encoding?: BufferEncoding | undefined; + } + interface PublicDecryptPrivateKeyInput extends PrivateKeyInput, PublicDecryptOptions {} + interface PublicDecryptPublicKeyInput extends PublicKeyInput, PublicDecryptOptions {} + interface PublicDecryptJsonWebKeyInput extends JsonWebKeyInput, PublicDecryptOptions {} + interface PublicDecryptKeyObjectInput extends PublicDecryptOptions { + key: KeyObject; + } + interface PublicEncryptOptions extends PublicDecryptOptions { + oaepHash?: string | undefined; + oaepLabel?: BinaryLike | undefined; + } + interface PublicEncryptPrivateKeyInput extends PrivateKeyInput, PublicEncryptOptions {} + interface PublicEncryptPublicKeyInput extends PublicKeyInput, PublicEncryptOptions {} + interface PublicEncryptJsonWebKeyInput extends JsonWebKeyInput, PublicEncryptOptions {} + interface PublicEncryptKeyObjectInput extends PublicEncryptOptions { + key: KeyObject; + } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ + function publicEncrypt( + key: + | KeyLike + | PublicEncryptKeyObjectInput + | PublicEncryptPrivateKeyInput + | PublicEncryptPublicKeyInput + | PublicEncryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ + function publicDecrypt( + key: + | KeyLike + | PublicDecryptKeyObjectInput + | PublicDecryptPrivateKeyInput + | PublicDecryptPublicKeyInput + | PublicDecryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt( + privateKey: + | KeyLike + | PublicEncryptKeyObjectInput + | PublicEncryptPrivateKeyInput + | PublicEncryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt( + privateKey: + | KeyLike + | PublicDecryptKeyObjectInput + | PublicDecryptPrivateKeyInput + | PublicDecryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * ```js + * const { + * getCiphers, + * } = await import('node:crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ + function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves, + * } = await import('node:crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ + function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ + function getFips(): 1 | 0; + /** + * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. + * Throws an error if FIPS mode is not available. + * @since v10.0.0 + * @param bool `true` to enable FIPS mode. + */ + function setFips(bool: boolean): void; + /** + * ```js + * const { + * getHashes, + * } = await import('node:crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ + function getHashes(): string[]; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createECDH, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ + class ECDH { + private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'` format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH, + * } = await import('node:crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + */ + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: BufferEncoding, + outputEncoding?: null, + format?: "uncompressed" | "compressed" | "hybrid", + ): NonSharedBuffer; + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + format?: "uncompressed" | "compressed" | "hybrid", + ): string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + generateKeys(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; + generateKeys(encoding: BufferEncoding, format?: ECDHKeyFormat): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: BinaryLike, inputEncoding?: BufferEncoding): NonSharedBuffer; + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ + getPrivateKey(): NonSharedBuffer; + getPrivateKey(encoding: BufferEncoding): string; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; + getPublicKey(encoding: BufferEncoding, format?: ECDHKeyFormat): string; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void; + } + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time + * algorithm. + * + * This function does not leak timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. An error is thrown if `a` and `b` have + * different byte lengths. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** + * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** + * **numbers `x` and `y` are equal.** + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ + function timingSafeEqual( + a: ArrayBufferLike | NodeJS.ArrayBufferView, + b: ArrayBufferLike | NodeJS.ArrayBufferView, + ): boolean; + interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + prime?: NodeJS.ArrayBufferView | undefined; + primeLength?: number | undefined; + generator?: number | undefined; + groupName?: string | undefined; + } + interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + modulusLength: number; + divisorLength?: number | undefined; + } + interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> { + namedCurve: string; + paramEncoding?: "explicit" | "named" | undefined; + } + interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + modulusLength: number; + publicExponent?: number | undefined; + hashAlgorithm?: string | undefined; + mgf1HashAlgorithm?: string | undefined; + saltLength?: string | undefined; + } + interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> { + modulusLength: number; + publicExponent?: number | undefined; + } + interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + /** + * Generates a new asymmetric key pair of the given `type`. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync, + * } = await import('node:crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type The asymmetric key type to generate. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + */ + function generateKeyPairSync( + type: "dh", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "dsa", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ec", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ed25519", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ed448", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: MLDSAKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: MLKEMKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "rsa-pss", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "rsa", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: SLHDSAKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "x25519", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "x448", + options?: T, + ): KeyPairExportResult; + /** + * Generates a new asymmetric key pair of the given `type`. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair, + * } = await import('node:crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type The asymmetric key type to generate. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + */ + function generateKeyPair( + type: "dh", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "dsa", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ec", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed25519", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed25519", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed448", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed448", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLDSAKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLDSAKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLKEMKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLKEMKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "rsa", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: SLHDSAKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: SLHDSAKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x25519", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x25519", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x448", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x448", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + namespace generateKeyPair { + function __promisify__( + type: "dh", + options: T, + ): Promise>; + function __promisify__( + type: "dsa", + options: T, + ): Promise>; + function __promisify__( + type: "ec", + options: T, + ): Promise>; + function __promisify__( + type: "ed25519", + options?: T, + ): Promise>; + function __promisify__( + type: "ed448", + options?: T, + ): Promise>; + function __promisify__( + type: MLDSAKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: MLKEMKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: "rsa-pss", + options: T, + ): Promise>; + function __promisify__( + type: "rsa", + options: T, + ): Promise>; + function __promisify__( + type: SLHDSAKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: "x25519", + options?: T, + ): Promise>; + function __promisify__( + type: "x448", + options?: T, + ): Promise>; + } + /** + * 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. + * + * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and + * ML-DSA. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to `crypto.createPrivateKey()`. When `key` is a string, `ArrayBuffer`, + * `Buffer`, `TypedArray`, or `DataView`, it must contain PEM-encoded key + * material. If it is an object, the following additional properties can be + * passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function sign( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, + ): NonSharedBuffer; + function sign( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, + callback: (error: Error | null, data: NonSharedBuffer) => void, + ): void; + /** + * Verifies the given signature for `data` using the given key and algorithm. If + * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type. + * + * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and + * ML-DSA. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to `crypto.createPublicKey()`. When `key` is a string, `ArrayBuffer`, + * `Buffer`, `TypedArray`, or `DataView`, it must contain PEM-encoded key + * material. If it is an object, the following additional properties can be + * passed: + * + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function verify( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: BinaryLike, + ): boolean; + function verify( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: BinaryLike, + callback: (error: Error | null, result: boolean) => void, + ): void; + /** + * Key decapsulation using a KEM algorithm with a private key. + * + * Supported key types and their KEM algorithms are: + * + * * `'rsa'` RSA Secret Value Encapsulation + * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) + * * `'x25519'` DHKEM(X25519, HKDF-SHA256) + * * `'x448'` DHKEM(X448, HKDF-SHA512) + * * `'ml-kem-512'` ML-KEM + * * `'ml-kem-768'` ML-KEM + * * `'ml-kem-1024'` ML-KEM + * + * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been + * passed to `crypto.createPrivateKey()`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v24.7.0 + */ + function decapsulate( + key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput, + ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView, + ): NonSharedBuffer; + function decapsulate( + key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput, + ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView, + callback: (err: Error, sharedKey: NonSharedBuffer) => void, + ): void; + interface DiffieHellmanOptions { + privateKey: KeyLike | PrivateKeyInput; + publicKey: KeyLike | PublicKeyInput; + } + /** + * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType` and must support either the DH or + * ECDH operation. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v13.9.0, v12.17.0 + */ + function diffieHellman(options: DiffieHellmanOptions): NonSharedBuffer; + function diffieHellman( + options: DiffieHellmanOptions, + callback: (err: Error | null, secret: NonSharedBuffer) => void, + ): void; + /** + * Key encapsulation using a KEM algorithm with a public key. + * + * Supported key types and their KEM algorithms are: + * + * * `'rsa'` RSA Secret Value Encapsulation + * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) + * * `'x25519'` DHKEM(X25519, HKDF-SHA256) + * * `'x448'` DHKEM(X448, HKDF-SHA512) + * * `'ml-kem-512'` ML-KEM + * * `'ml-kem-768'` ML-KEM + * * `'ml-kem-1024'` ML-KEM + * + * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been + * passed to `crypto.createPublicKey()`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v24.7.0 + */ + function encapsulate( + key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput, + ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }; + function encapsulate( + key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput, + callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void, + ): void; + interface OneShotDigestOptions { + /** + * Encoding used to encode the returned digest. + * @default 'hex' + */ + outputEncoding?: BufferEncoding | "buffer" | undefined; + /** + * For XOF hash functions such as 'shake256', the outputLength option + * can be used to specify the desired output length in bytes. + */ + outputLength?: number | undefined; + } + interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions { + outputEncoding?: BufferEncoding | undefined; + } + interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions { + outputEncoding: "buffer"; + } + /** + * A utility for creating one-shot hash digests of data. It can be faster than + * the object-based `crypto.createHash()` when hashing a smaller amount of data + * (<= 5MB) that's readily available. If the data can be big or if it is streamed, + * it's still recommended to use `crypto.createHash()` instead. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * If `options` is a string, then it specifies the `outputEncoding`. + * + * Example: + * + * ```js + * import crypto from 'node:crypto'; + * import { Buffer } from 'node:buffer'; + * + * // Hashing a string and return the result as a hex-encoded string. + * const string = 'Node.js'; + * // 10b3493287f831e81a438811a1ffba01f8cec4b7 + * console.log(crypto.hash('sha1', string)); + * + * // Encode a base64-encoded string into a Buffer, hash it and return + * // the result as a buffer. + * const base64 = 'Tm9kZS5qcw=='; + * // + * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); + * ``` + * @since v21.7.0, v20.12.0 + * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different + * input encoding is desired for a string input, user could encode the string + * into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing + * the encoded `TypedArray` into this API instead. + */ + function hash( + algorithm: string, + data: BinaryLike, + options?: OneShotDigestOptionsWithStringEncoding | BufferEncoding, + ): string; + function hash( + algorithm: string, + data: BinaryLike, + options: OneShotDigestOptionsWithBufferEncoding | "buffer", + ): NonSharedBuffer; + function hash( + algorithm: string, + data: BinaryLike, + options: OneShotDigestOptions | BufferEncoding | "buffer", + ): string | NonSharedBuffer; + type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + name: string; + nid: number; + blockSize?: number; + ivLength?: number; + keyLength: number; + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdf, + * } = await import('node:crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf( + digest: string, + ikm: KeyLike, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: ArrayBuffer) => void, + ): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdfSync, + * } = await import('node:crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync( + digest: string, + ikm: KeyLike, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + ): ArrayBuffer; + interface SecureHeapUsage { + total: number; + min: number; + used: number; + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + interface RandomUUIDV7Options extends RandomUUIDOptions {} + type UUID = `${string}-${string}-${string}-${string}-${string}`; + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0, v14.17.0 + */ + function randomUUID(options?: RandomUUIDOptions): UUID; + /** + * Generates a random [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.txt) version 7 UUID. The UUID contains a millisecond + * precision Unix timestamp in the most significant 48 bits, followed by + * cryptographically secure random bits for the remaining fields, making it + * suitable for use as a database key with time-based sorting. The embedded + * timestamp relies on a non-monotonic clock and is not guaranteed to be strictly + * increasing. + * @since v26.1.0 + */ + function randomUUIDv7(options?: RandomUUIDV7Options): UUID; + interface X509CheckOptions { + subject?: "always" | "default" | "never" | undefined; + wildcards?: boolean | undefined; + partialWildcards?: boolean | undefined; + multiLabelWildcards?: boolean | undefined; + singleLabelSubdomains?: boolean | undefined; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('node:crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (CA) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * + * Because SHA-1 is cryptographically broken and because the security of SHA-1 is + * significantly worse than that of algorithms that are commonly used to sign + * certificates, consider using `x509.fingerprint256` instead. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The SHA-512 fingerprint of this certificate. + * + * Because computing the SHA-256 fingerprint is usually faster and because it is + * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be + * a better choice. While SHA-512 presumably provides a higher level of security in + * general, the security of SHA-256 matches that of most algorithms that are + * commonly used to sign certificates. + * @since v17.2.0, v16.14.0 + */ + readonly fingerprint512: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate. + * + * This is a comma-separated list of subject alternative names. Each entry begins + * with a string identifying the kind of the subject alternative name followed by + * a colon and the value associated with the entry. + * + * Earlier versions of Node.js incorrectly assumed that it is safe to split this + * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, + * both malicious and legitimate certificates can contain subject alternative names + * that include this sequence when represented as a string. + * + * After the prefix denoting the type of the entry, the remainder of each entry + * might be enclosed in quotes to indicate that the value is a JSON string literal. + * For backward compatibility, Node.js only uses JSON string literals within this + * property when necessary to avoid ambiguity. Third-party code should be prepared + * to handle both possible entry formats. + * @since v15.6.0 + */ + readonly subjectAltName: string | undefined; + /** + * A textual representation of the certificate's authority information access + * extension. + * + * This is a line feed separated list of access descriptions. Each line begins with + * the access method and the kind of the access location, followed by a colon and + * the value associated with the access location. + * + * After the prefix denoting the access method and the kind of the access location, + * the remainder of each line might be enclosed in quotes to indicate that the + * value is a JSON string literal. For backward compatibility, Node.js only uses + * JSON string literals within this property when necessary to avoid ambiguity. + * Third-party code should be prepared to handle both possible entry formats. + * @since v15.6.0 + */ + readonly infoAccess: string | undefined; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: NonSharedBuffer; + /** + * The serial number of this certificate. + * + * Serial numbers are assigned by certificate authorities and do not uniquely + * identify certificates. Consider using `x509.fingerprint256` as a unique + * identifier instead. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL. + * @since v24.9.0 + */ + readonly signatureAlgorithm: string | undefined; + /** + * The OID of the algorithm used to sign the certificate. + * @since v24.9.0 + */ + readonly signatureAlgorithmOid: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time from which this certificate is valid, encapsulated in a `Date` object. + * @since v22.10.0 + */ + readonly validFromDate: Date; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + /** + * The date/time until which this certificate is valid, encapsulated in a `Date` object. + * @since v22.10.0 + */ + readonly validToDate: Date; + constructor(buffer: string | NodeJS.ArrayBufferView); + /** + * Checks whether the certificate matches the given email address. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any email addresses. + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching email + * address, the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: Pick): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * + * If the certificate matches the given host name, the matching subject name is + * returned. The returned name might be an exact match (e.g., `foo.example.com`) + * or it might contain wildcards (e.g., `*.example.com`). Because host name + * comparisons are case-insensitive, the returned subject name might also differ + * from the given `name` in capitalization. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching DNS name, + * the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * + * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they + * must match the given `ip` address exactly. Other subject alternative names as + * well as the subject field of the certificate are ignored. + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string): string | undefined; + /** + * Checks whether this certificate was potentially issued by the given `otherCert` + * by comparing the certificate metadata. + * + * This is useful for pruning a list of possible issuer certificates which have been + * selected using a more rudimentary filtering routine, i.e. just based on subject + * and issuer names. + * + * Finally, to verify that this certificate's signature was produced by a private key + * corresponding to `otherCert`'s public key use `x509.verify(publicKey)` + * with `otherCert`'s public key represented as a `KeyObject` + * like so + * + * ```js + * if (!x509.verify(otherCert.publicKey)) { + * throw new Error('otherCert did not issue x509'); + * } + * ``` + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = ArrayBufferLike | NodeJS.ArrayBufferView | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsArrayBuffer, + callback: (err: Error | null, prime: ArrayBuffer) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsBigInt, + callback: (err: Error | null, prime: bigint) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptions, + callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, + ): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime( + value: LargeNumberLike, + options: CheckPrimeOptions, + callback: (err: Error | null, result: boolean) => void, + ): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + /** + * Load and set the `engine` for some or all OpenSSL functions (selected by flags). + * + * `engine` could be either an id or a path to the engine's shared library. + * + * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): + * + * * `crypto.constants.ENGINE_METHOD_RSA` + * * `crypto.constants.ENGINE_METHOD_DSA` + * * `crypto.constants.ENGINE_METHOD_DH` + * * `crypto.constants.ENGINE_METHOD_RAND` + * * `crypto.constants.ENGINE_METHOD_EC` + * * `crypto.constants.ENGINE_METHOD_CIPHERS` + * * `crypto.constants.ENGINE_METHOD_DIGESTS` + * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` + * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` + * * `crypto.constants.ENGINE_METHOD_ALL` + * * `crypto.constants.ENGINE_METHOD_NONE` + * @since v0.11.11 + * @param flags + */ + function setEngine(engine: string, flags?: number): void; + /** + * A convenient alias for {@link webcrypto.getRandomValues}. This + * implementation is not compliant with the Web Crypto spec, to write + * web-compatible code use {@link webcrypto.getRandomValues} instead. + * @since v17.4.0 + * @return Returns `typedArray`. + */ + function getRandomValues< + T extends Exclude< + NodeJS.NonSharedTypedArray, + NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array + >, + >(typedArray: T): T; + type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id"; + interface Argon2Parameters { + message: BinaryLike; + nonce: BinaryLike; + parallelism: number; + tagLength: number; + memory: number; + passes: number; + secret?: BinaryLike | undefined; + associatedData?: BinaryLike | undefined; + } + /** + * Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `nonce` should be as unique as possible. It is recommended that a nonce is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please + * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). + * + * The `callback` function is called with two arguments: `err` and `derivedKey`. + * `err` is an exception object when key derivation fails, otherwise `err` is + * `null`. `derivedKey` is passed to the callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { argon2, randomBytes } = await import('node:crypto'); + * + * const parameters = { + * message: 'password', + * nonce: randomBytes(16), + * parallelism: 4, + * tagLength: 64, + * memory: 65536, + * passes: 3, + * }; + * + * argon2('argon2id', parameters, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' + * }); + * ``` + * @since v24.7.0 + * @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`. + */ + function argon2( + algorithm: Argon2Algorithm, + parameters: Argon2Parameters, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `nonce` should be as unique as possible. It is recommended that a nonce is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please + * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { argon2Sync, randomBytes } = await import('node:crypto'); + * + * const parameters = { + * message: 'password', + * nonce: randomBytes(16), + * parallelism: 4, + * tagLength: 64, + * memory: 65536, + * passes: 3, + * }; + * + * const derivedKey = argon2Sync('argon2id', parameters); + * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' + * ``` + * @since v24.7.0 + */ + function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer; + /** + * A convenient alias for `crypto.webcrypto.subtle`. + * @since v17.4.0 + */ + const subtle: webcrypto.SubtleCrypto; + /** + * An implementation of the Web Crypto API standard. + * + * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. + * @since v15.0.0 + */ + const webcrypto: webcrypto.Crypto; + namespace webcrypto { + type AlgorithmIdentifier = Algorithm | string; + type BigInteger = NodeJS.NonSharedUint8Array; + type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki"; + type KeyType = "private" | "public" | "secret"; + type KeyUsage = + | "decapsulateBits" + | "decapsulateKey" + | "decrypt" + | "deriveBits" + | "deriveKey" + | "encapsulateBits" + | "encapsulateKey" + | "encrypt" + | "sign" + | "unwrapKey" + | "verify" + | "wrapKey"; + type HashAlgorithmIdentifier = AlgorithmIdentifier; + type NamedCurve = string; + interface AeadParams extends Algorithm { + additionalData?: NodeJS.BufferSource; + iv: NodeJS.BufferSource; + tagLength: number; + } + interface AesCbcParams extends Algorithm { + iv: NodeJS.BufferSource; + } + interface AesCtrParams extends Algorithm { + counter: NodeJS.BufferSource; + length: number; + } + interface AesDerivedKeyParams extends Algorithm { + length: number; + } + interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface AesKeyGenParams extends Algorithm { + length: number; + } + interface Algorithm { + name: string; + } + interface Argon2Params extends Algorithm { + associatedData?: NodeJS.BufferSource; + memory: number; + nonce: NodeJS.BufferSource; + parallelism: number; + passes: number; + secretValue?: NodeJS.BufferSource; + version?: number; + } + interface CShakeParams extends Algorithm { + customization?: NodeJS.BufferSource; + functionName?: NodeJS.BufferSource; + outputLength: number; + } + interface ContextParams extends Algorithm { + context?: NodeJS.BufferSource; + } + interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; + } + interface EcKeyGenParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcKeyImportParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcdhKeyDeriveParams extends Algorithm { + public: CryptoKey; + } + interface EcdsaParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: NodeJS.BufferSource; + salt: NodeJS.BufferSource; + } + interface HmacImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; + } + interface HmacKeyGenParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface KangarooTwelveParams extends Algorithm { + customization?: NodeJS.BufferSource; + outputLength: number; + } + interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; + } + interface KeyAlgorithm { + name: string; + } + interface KmacImportParams extends Algorithm { + length?: number; + } + interface KmacKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface KmacKeyGenParams extends Algorithm { + length?: number; + } + interface KmacParams extends Algorithm { + customization?: NodeJS.BufferSource; + outputLength: number; + } + interface Pbkdf2Params extends Algorithm { + hash: HashAlgorithmIdentifier; + iterations: number; + salt: NodeJS.BufferSource; + } + interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; + } + interface RsaHashedKeyGenParams extends RsaKeyGenParams { + hash: HashAlgorithmIdentifier; + } + interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaKeyGenParams extends Algorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaOaepParams extends Algorithm { + label?: NodeJS.BufferSource; + } + interface RsaOtherPrimesInfo { + d?: string; + r?: string; + t?: string; + } + interface RsaPssParams extends Algorithm { + saltLength: number; + } + interface TurboShakeParams extends Algorithm { + domainSeparation?: number; + outputLength: number; + } + interface Crypto { + readonly subtle: SubtleCrypto; + getRandomValues< + T extends Exclude< + NodeJS.NonSharedTypedArray, + NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array + >, + >( + typedArray: T, + ): T; + randomUUID(): UUID; + } + interface CryptoKey { + readonly algorithm: KeyAlgorithm; + readonly extractable: boolean; + readonly type: KeyType; + readonly usages: KeyUsage[]; + } + interface CryptoKeyPair { + privateKey: CryptoKey; + publicKey: CryptoKey; + } + interface EncapsulatedBits { + sharedKey: ArrayBuffer; + ciphertext: ArrayBuffer; + } + interface EncapsulatedKey { + sharedKey: CryptoKey; + ciphertext: ArrayBuffer; + } + interface SubtleCrypto { + decapsulateBits( + decapsulationAlgorithm: AlgorithmIdentifier, + decapsulationKey: CryptoKey, + ciphertext: NodeJS.BufferSource, + ): Promise; + decapsulateKey( + decapsulationAlgorithm: AlgorithmIdentifier, + decapsulationKey: CryptoKey, + ciphertext: NodeJS.BufferSource, + sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + decrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + deriveBits( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, + baseKey: CryptoKey, + length?: number | null, + ): Promise; + deriveKey( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, + baseKey: CryptoKey, + derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + digest( + algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams, + data: NodeJS.BufferSource, + ): Promise; + encapsulateBits( + encapsulationAlgorithm: AlgorithmIdentifier, + encapsulationKey: CryptoKey, + ): Promise; + encapsulateKey( + encapsulationAlgorithm: AlgorithmIdentifier, + encapsulationKey: CryptoKey, + sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + encrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + exportKey(format: "jwk", key: CryptoKey): Promise; + exportKey(format: Exclude, key: CryptoKey): Promise; + exportKey(format: KeyFormat, key: CryptoKey): Promise; + generateKey( + algorithm: RsaHashedKeyGenParams | EcKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + generateKey( + algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + generateKey( + algorithm: AlgorithmIdentifier, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise; + importKey( + format: "jwk", + keyData: JsonWebKey, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + importKey( + format: Exclude, + keyData: NodeJS.BufferSource, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + sign( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + unwrapKey( + format: KeyFormat, + wrappedKey: NodeJS.BufferSource, + unwrappingKey: CryptoKey, + unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + unwrappedKeyAlgorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + verify( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, + key: CryptoKey, + signature: NodeJS.BufferSource, + data: NodeJS.BufferSource, + ): Promise; + wrapKey( + format: KeyFormat, + key: CryptoKey, + wrappingKey: CryptoKey, + wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + ): Promise; + } + } + /** + * An object containing commonly used constants for crypto and security related + * operations. The specific constants currently defined are described in + * [Crypto constants](https://nodejs.org/docs/latest-v26.x/api/crypto.html#crypto-constants). + * @since v6.3.0 + */ + namespace constants { + const OPENSSL_VERSION_NUMBER: number; + const SSL_OP_ALL: number; + const SSL_OP_ALLOW_NO_DHE_KEX: 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_LEGACY_SERVER_CONNECT: number; + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_ENCRYPT_THEN_MAC: number; + const SSL_OP_NO_QUERY_MTU: number; + const SSL_OP_NO_RENEGOTIATION: 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_NO_TLSv1_3: number; + const SSL_OP_PRIORITIZE_CHACHA: number; + 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 RSA_PKCS1_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 RSA_PSS_SALTLEN_DIGEST: number; + const RSA_PSS_SALTLEN_MAX_SIGN: number; + const RSA_PSS_SALTLEN_AUTO: number; + const TLS1_VERSION: number; + const TLS1_1_VERSION: number; + const TLS1_2_VERSION: number; + const TLS1_3_VERSION: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + const defaultCipherList: string; + const defaultCoreCipherList: string; + } + // TODO: remove in future major version + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type Encoding = BufferEncoding; + /** @deprecated This type will be removed in a future version. Use `KeyLike` instead. */ + type CipherKey = KeyLike; + /** @deprecated This type will be removed in a future version. */ + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string | undefined; + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; + } + /** @deprecated This type will be removed in a future version. */ + interface RsaPublicKey { + key: KeyLike; + padding?: number | undefined; + } +} +declare module "crypto" { + export * from "node:crypto"; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 000000000..ca8586a3a --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,652 @@ +declare module "node:dgram" { + import { NonSharedBuffer } from "node:buffer"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import { AddressInfo, BlockList } from "node:net"; + interface RemoteInfo { + address: string; + family: "IPv4" | "IPv6"; + port: number; + size: number; + } + interface BindOptions { + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; + } + interface BindSyncOptions { + port?: number | undefined; + address?: string | undefined; + } + type SocketType = "udp4" | "udp6"; + interface SocketOptions extends Abortable { + type: SocketType; + reuseAddr?: boolean | undefined; + reusePort?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: + | (( + hostname: string, + options: dns.LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ) => void) + | undefined; + receiveBlockList?: BlockList | undefined; + sendBlockList?: BlockList | undefined; + } + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ + function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; + interface SocketEventMap { + "close": []; + "connect": []; + "error": [err: Error]; + "listening": []; + "message": [msg: NonSharedBuffer, rinfo: RemoteInfo]; + } + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ + class Socket implements EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'node:cluster'; + * import dgram from 'node:dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ + addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family`, and `port` properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ + address(): AddressInfo; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a + * `'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a + * `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'node:dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.error(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port: number, callback: () => void): this; + bind(callback: () => void): this; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address` that are passed as + * properties of an `options` object passed as the first argument. If + * `port` is not specified or is `0`, the operating system will attempt + * to bind to a random port. If `address` is not specified, the operating + * system will attempt to listen on all addresses. Once binding is + * complete, a `'listening'` event is emitted and the optional `callback` + * function is called. + * + * The `options` object may contain a `fd` property. When a `fd` greater + * than `0` is set, it will wrap around an existing socket with the given + * file descriptor. In this case, the properties of `port` and `address` + * will be ignored. + * + * Specifying both a `'listening'` event listener and passing a + * `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * The `options` object may contain an additional `exclusive` property that is + * used when using `dgram.Socket` objects with the [`cluster`](https://nodejs.org/docs/latest-v26.x/api/cluster.html) module. When + * `exclusive` is set to `false` (the default), cluster workers will use the same + * underlying socket handle allowing connection handling duties to be shared. + * When `exclusive` is `true`, however, the handle is not shared and attempted + * port sharing results in an error. Creating a `dgram.Socket` with the `reusePort` + * option set to `true` causes `exclusive` to always be `true` when `socket.bind()` + * is called. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * An example socket listening on an exclusive port is shown below. + * + * ```js + * socket.bind({ + * address: 'localhost', + * port: 8000, + * exclusive: true, + * }); + * ``` + * @since v0.11.14 + * @param options Required. Supports the following properties: + */ + bind(options: BindOptions, callback?: () => void): this; + /** + * The synchronous counterpart of `socket.bind()`. `bind(2)` is a local, + * non-blocking system call, so the bind is performed inline and the resolved + * address is returned immediately, including the operating-system-assigned + * ephemeral port when `port` is `0`: + * + * ```js + * const dgram = require('node:dgram'); + * + * const socket = dgram.createSocket('udp4'); + * const address = socket.bindSync({ address: '0.0.0.0', port: 0 }); + * console.log(address); // e.g. { address: '0.0.0.0', family: 'IPv4', port: 53124 } + * ``` + * + * A bind failure such as `EADDRINUSE` is thrown synchronously rather than emitted + * as an `'error'` event. After `bindSync()` returns, `socket.address()` is + * valid synchronously and the `'listening'` event is emitted on the next tick. + * + * `address` must be a numeric IP literal; `bindSync()` never performs DNS + * resolution (asynchronous name resolution being the only genuinely blocking part + * of binding). Incoming datagrams continue to be delivered asynchronously via the + * `'message'` event. `bindSync()` always binds the socket's own handle and + * does not participate in [`cluster`](https://nodejs.org/docs/latest-v26.x/api/cluster.html) handle sharing. + * @since v26.4.0 + * @returns The bound address as returned by `socket.address()`. + */ + bindSync(options?: BindSyncOptions): AddressInfo; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + /** + * The synchronous counterpart of `socket.connect()`. For a UDP socket + * `connect(2)` only records the default peer address and is a local, non-blocking + * system call, so the association is performed inline. Any error raised by the + * call itself (for example `EAFNOSUPPORT` for a mismatched address family) is + * thrown synchronously rather than reported via the `'error'` event. Because + * `connect(2)` does not probe reachability, errors such as `ECONNREFUSED` are + * still surfaced asynchronously on a later send or receive, exactly as for + * `socket.connect()`: + * + * ```js + * const dgram = require('node:dgram'); + * + * const socket = dgram.createSocket('udp4'); + * socket.connectSync(41234, '127.0.0.1'); + * console.log(socket.remoteAddress()); // { address: '127.0.0.1', family: 'IPv4', port: 41234 } + * ``` + * + * If the socket is still unbound it is bound synchronously first. After + * `connectSync()` returns, `socket.remoteAddress()` is valid synchronously + * and the `'connect'` event is emitted on the next tick. Trying to call + * `connectSync()` on an already connected socket throws an + * `ERR_SOCKET_DGRAM_IS_CONNECTED` exception, and calling it while an + * asynchronous `socket.bind()` is still in progress throws an + * `ERR_SOCKET_ALREADY_BOUND` exception. + * + * `address` must be a numeric IP literal; `connectSync()` never performs DNS + * resolution (asynchronous name resolution being the only genuinely blocking part + * of connecting). + * @since v26.4.0 + * @param address A numeric IP address to connect to. Unlike + * `socket.connect()`, no DNS resolution is performed, so a host name is not + * accepted. If omitted, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for + * `udp6` sockets) is used. + */ + connectSync(port: number, address?: string): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ + disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ + dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ + getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ + getSendBufferSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of bytes queued for sending. + */ + getSendQueueSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of send requests currently in the queue awaiting to be processed. + */ + getSendQueueCount(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ + remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on `localhost`: + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ + setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ + setMulticastInterface(multicastInterface: string): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setSendBufferSize(size: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no additional effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + unref(): this; + /** + * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument + * is not specified, the operating system will choose one interface and will add + * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 + */ + addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is + * automatically called by the kernel when the + * socket is closed or the process terminates, so most apps will never have + * reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 + */ + dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface Socket extends InternalEventEmitter {} +} +declare module "dgram" { + export * from "node:dgram"; +} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts new file mode 100644 index 000000000..3dee66a1f --- /dev/null +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -0,0 +1,794 @@ +declare module "node:diagnostics_channel" { + import { AsyncLocalStorage } from "node:async_hooks"; + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string | symbol): boolean; + /** + * This is the primary entry-point for anyone wanting to publish to a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + function channel( + name: string | symbol, + ): Channel; + type ChannelListener = (message: unknown, name: string | symbol) => void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * diagnostics_channel.subscribe('my-channel', (message, name) => { + * // Received data + * }); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The handler to receive channel messages + */ + function subscribe(name: string | symbol, onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with {@link subscribe}. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * function onMessage(message, name) { + * // Received data + * } + * + * diagnostics_channel.subscribe('my-channel', onMessage); + * + * diagnostics_channel.unsubscribe('my-channel', onMessage); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; + /** + * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing + * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); + * + * // or... + * + * const channelsByCollection = diagnostics_channel.tracingChannel({ + * start: diagnostics_channel.channel('tracing:my-channel:start'), + * end: diagnostics_channel.channel('tracing:my-channel:end'), + * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), + * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), + * error: diagnostics_channel.channel('tracing:my-channel:error'), + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` + * @return Collection of channels to trace with + */ + function tracingChannel( + nameOrChannels: string | TracingChannelCollection, + ): TracingChannel; + /** + * Creates a {@link BoundedChannel} wrapper for the given channels. If a name is + * given, the corresponding channels will be created in the form of + * `tracing:${name}:${eventType}` where `eventType` is `start` or `end`. + * + * A `BoundedChannel` is a simplified version of {@link TracingChannel} that only + * traces synchronous operations. It only has `start` and `end` events, without + * `asyncStart`, `asyncEnd`, or `error` events, making it suitable for tracing + * operations that don't involve asynchronous continuations or error handling. + * + * ```js + * import { boundedChannel, channel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * // or... + * + * const wc2 = boundedChannel({ + * start: channel('tracing:my-operation:start'), + * end: channel('tracing:my-operation:end'), + * }); + * ``` + * @since v26.1.0 + * @experimental + * @param nameOrChannels Channel name or + * object containing all the [BoundedChannel Channels](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#boundedchannel-channels) + */ + function boundedChannel( + nameOrChannels: string | BoundedChannelCollection, + ): BoundedChannel; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is used to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + private constructor(); + readonly name: string | symbol; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + /** + * Publish a message to any subscribers to the channel. This will trigger + * message handlers synchronously so they will execute within the same context. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.publish({ + * some: 'message', + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param message The message to send to the channel subscribers + */ + publish(message: unknown): void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + unsubscribe(onMessage: ChannelListener): void; + /** + * When `channel.runStores(context, ...)` is called, the given context data + * will be applied to any store bound to the channel. If the store has already been + * bound the previous `transform` function will be replaced with the new one. + * The `transform` function may be omitted to set the given context data as the + * context directly. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (data) => { + * return { data }; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to which to bind the context data + * @param transform Transform context data before setting the store context + */ + bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; + /** + * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store); + * channel.unbindStore(store); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to unbind from the channel. + * @return `true` if the store was found, `false` otherwise. + */ + unbindStore(store: AsyncLocalStorage): boolean; + /** + * Applies the given data to any AsyncLocalStorage instances bound to the channel + * for the duration of the given function, then publishes to the channel within + * the scope of that data is applied to the stores. + * + * If a transform function was given to `channel.bindStore(store)` it will be + * applied to transform the message data before it becomes the context value for + * the store. The prior storage context is accessible from within the transform + * function in cases where context linking is required. + * + * The context applied to the store should be accessible in any async code which + * continues from execution which began during the given function, however + * there are some situations in which `context loss` may occur. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (message) => { + * const parent = store.getStore(); + * return new Span(message, parent); + * }); + * channel.runStores({ some: 'message' }, () => { + * store.getStore(); // Span({ some: 'message' }) + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param context Message to send to subscribers and bind to stores + * @param fn Handler to run within the entered storage context + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runStores( + context: ContextType, + fn: (this: ThisArg, ...args: Args) => Result, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Creates a disposable scope that binds the given data to any AsyncLocalStorage + * instances bound to the channel and publishes it to subscribers. The scope + * automatically restores the previous storage contexts when disposed. + * + * This method enables the use of JavaScript's explicit resource management + * (`using` syntax with `Symbol.dispose`) to manage store contexts without + * closure wrapping. + * + * ```js + * import { channel } from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * const ch = channel('my-channel'); + * + * ch.bindStore(store, (message) => { + * return { ...message, timestamp: Date.now() }; + * }); + * + * { + * using scope = ch.withStoreScope({ request: 'data' }); + * // Store is entered, data is published + * console.log(store.getStore()); // { request: 'data', timestamp: ... } + * } + * // Store is automatically restored on scope exit + * ``` + * @since v26.1.0 + * @experimental + */ + withStoreScope(data: ContextType): RunStoresScope; + } + /** + * The class `RunStoresScope` represents a disposable scope created by + * `channel.withStoreScope(data)`. It manages the lifecycle of store + * contexts and ensures they are properly restored when the scope exits. + * + * The scope must be used with the `using` syntax to ensure proper disposal. + * @since v26.1.0 + * @experimental + */ + interface RunStoresScope extends Disposable {} + interface TracingChannelSubscribers { + start: (message: ContextType) => void; + end: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncStart: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncEnd: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + error: ( + message: ContextType & { + error: unknown; + }, + ) => void; + } + interface TracingChannelCollection { + start: Channel; + end: Channel; + asyncStart: Channel; + asyncEnd: Channel; + error: Channel; + } + /** + * The class `TracingChannel` is a collection of `TracingChannel Channels` which + * together express a single traceable action. It is used to formalize and + * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a + * single `TracingChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v19.9.0 + * @experimental + */ + interface TracingChannel + extends TracingChannelCollection + { + /** + * Helper to subscribe a collection of functions to the corresponding channels. + * This is the same as calling `channel.subscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.subscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + */ + subscribe(subscribers: NodeJS.PartialOptions>): void; + /** + * Helper to unsubscribe a collection of functions from the corresponding channels. + * This is the same as calling `channel.unsubscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.unsubscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. + */ + unsubscribe(subscribers: NodeJS.PartialOptions>): void; + /** + * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. + * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceSync(() => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceSync( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Trace an asynchronous function call which returns a `Promise` or + * [thenable object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables). This will always produce a [`start` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#startevent) and + * [`end` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#endevent) around the synchronous portion of the function execution, and + * will produce an [`asyncStart` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#asyncstartevent) and [`asyncEnd` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#asyncendevent) when the + * returned promise is resolved or rejected. It may also produce an + * [`error` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#errorevent) if the given function throws an error or the returned promise + * is rejected. This will run the given function using + * [`channel.runStores(context, ...)`](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html##channelrunstorescontext-fn-thisarg-args) on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * If the value returned by `fn` is not a Promise or thenable, then it will be + * returned with a warning, and no `asyncStart` or `asyncEnd` events will be + * produced. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.tracePromise(async () => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @returns The return value of the given function. If the return value + * is a Promise or thenable, tracing events will be published when it settles. + * If the return value is not a Promise or thenable, it is returned as-is and + * a warning is emitted. + */ + tracePromise = any>( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the + * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or + * the returned + * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * The `position` will be -1 by default to indicate the final argument should + * be used as the callback. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceCallback((arg1, callback) => { + * // Do something + * callback(null, 'result'); + * }, 1, { + * some: 'thing', + * }, thisArg, arg1, callback); + * ``` + * + * The callback will also be run with `channel.runStores(context, ...)` which + * enables context loss recovery in some cases. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * const myStore = new AsyncLocalStorage(); + * + * // The start channel sets the initial store data to something + * // and stores that store data value on the trace context object + * channels.start.bindStore(myStore, (data) => { + * const span = new Span(data); + * data.span = span; + * return span; + * }); + * + * // Then asyncStart can restore from that data it stored previously + * channels.asyncStart.bindStore(myStore, (data) => { + * return data.span; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn callback using function to wrap a trace around + * @param position Zero-indexed argument position of expected callback + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceCallback( + fn: (this: ThisArg, ...args: Args) => Result, + position?: number, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * `true` if any of the individual channels has a subscriber, `false` if not. + * + * This is a helper method available on a {@link TracingChannel} instance to check + * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers. + * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise. + * + * ```js + * const diagnostics_channel = require('node:diagnostics_channel'); + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * if (channels.hasSubscribers) { + * // Do something + * } + * ``` + * @since v22.0.0, v20.13.0 + */ + readonly hasSubscribers: boolean; + } + interface BoundedChannelSubscribers { + start: (message: ContextType) => void; + end: (message: ContextType) => void; + } + interface BoundedChannelCollection { + start: Channel; + end: Channel; + } + /** + * The class `BoundedChannel` is a simplified version of {@link TracingChannel} that + * only traces synchronous operations. It consists of two channels (`start` and + * `end`) instead of five, omitting the `asyncStart`, `asyncEnd`, and `error` + * events. This makes it suitable for tracing operations that don't involve + * asynchronous continuations or error handling. + * + * Like `TracingChannel`, it is recommended to create and reuse a single + * `BoundedChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v26.1.0 + * @experimental + */ + interface BoundedChannel + extends BoundedChannelCollection + { + /** + * Check if any of the `start` or `end` channels have subscribers. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * if (wc.hasSubscribers) { + * // There are subscribers, perform traced operation + * } + * ``` + * @since v26.1.0 + */ + readonly hasSubscribers: boolean; + /** + * Subscribe to the bounded channel events. This is equivalent to calling + * [`channel.subscribe(onMessage)`][] on each channel individually. + * + * ```mjs + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * wc.subscribe({ + * start(message) { + * // Handle start + * }, + * end(message) { + * // Handle end + * }, + * }); + * ``` + * @since v26.1.0 + * @param handlers Set of channel subscribers + */ + subscribe(handlers: NodeJS.PartialOptions>): void; + /** + * Unsubscribe from the bounded channel events. This is equivalent to calling + * [`channel.unsubscribe(onMessage)`][] on each channel individually. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const handlers = { + * start(message) {}, + * end(message) {}, + * }; + * + * wc.subscribe(handlers); + * wc.unsubscribe(handlers); + * ``` + * @since v26.1.0 + * @param handlers Set of channel subscribers + * @returns `true` if all handlers were successfully unsubscribed, + * `false` otherwise. + */ + unsubscribe(handlers: NodeJS.PartialOptions>): boolean; + /** + * Trace a synchronous function call. This will produce a `start` event and `end` + * event around the execution. This runs the given function using + * [`channel.runStores(context, ...)`][] on the `start` channel which ensures all + * events have any bound stores set to match this trace context. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const result = wc.run({ operationId: '123' }, () => { + * // Perform operation + * return 42; + * }); + * ``` + * @since v26.1.0 + * @param context Shared object to correlate events through + * @param fn Function to wrap a trace around + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @returns The return value of the given function + */ + run( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Create a disposable scope for tracing a synchronous operation using JavaScript's + * explicit resource management (`using` syntax). The scope automatically publishes + * `start` and `end` events, enters bound stores, and handles cleanup when disposed. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const context = { operationId: '123' }; + * { + * using scope = wc.withScope(context); + * // Stores are entered, start event is published + * + * // Perform work and set result on context + * context.result = 42; + * } + * // End event is published, stores are restored automatically + * ``` + * @since v26.1.0 + * @param context Shared object to correlate events through + * @returns Disposable scope object + */ + withScope(context: ContextType): BoundedChannelScope; + } + /** + * The class `BoundedChannelScope` represents a disposable scope created by + * `boundedChannel.withScope(context)`. It manages the lifecycle of a traced + * operation, automatically publishing events and managing store contexts. + * + * The scope must be used with the `using` syntax to ensure proper disposal. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const context = {}; + * { + * using scope = wc.withScope(context); + * // Start event is published, stores are entered + * context.result = performOperation(); + * // End event is automatically published at end of block + * } + * ``` + * @since v26.1.0 + * @experimental + */ + interface BoundedChannelScope extends Disposable {} +} +declare module "diagnostics_channel" { + export * from "node:diagnostics_channel"; +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 000000000..319ee9696 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,876 @@ +declare module "node:dns" { + // Supported getaddrinfo flags. + /** + * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are + * only returned if the current system has at least one IPv4 address configured. + */ + const ADDRCONFIG: number; + /** + * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported + * on some operating systems (e.g. FreeBSD 10.1). + */ + const V4MAPPED: number; + /** + * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as + * well as IPv4 mapped IPv6 addresses. + */ + const ALL: number; + interface LookupOptions { + /** + * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted + * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used + * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. + * @default 0 + */ + family?: number | "IPv4" | "IPv6" | undefined; + /** + * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v26.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be + * passed by bitwise `OR`ing their values. + */ + hints?: number | undefined; + /** + * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. + * @default false + */ + all?: boolean | undefined; + /** + * When `verbatim`, the resolved addresses are returned unsorted. When `ipv4first`, the resolved addresses are sorted + * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 + * addresses before IPv4 addresses. Default value is configurable using + * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--dns-result-orderorder). + * @default `verbatim` (addresses are not reordered) + * @since v22.1.0 + */ + order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; + /** + * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 + * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, + * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} + * @default true (addresses are not reordered) + * @deprecated Please use `order` option + */ + verbatim?: boolean | undefined; + } + interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + interface LookupAllOptions extends LookupOptions { + all: true; + } + interface LookupAddress { + /** + * A string representation of an IPv4 or IPv6 address. + */ + address: string; + /** + * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a + * bug in the name resolution service used by the operating system. + */ + family: number; + } + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then + * IPv4 and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v26.x/api/dns.html#implementation-considerations) + * before using `dns.lookup()`. + * + * Example usage: + * + * ```js + * import dns from 'node:dns'; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v26.x/api/util.html#utilpromisifyoriginal) ed + * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. + * @since v0.1.90 + */ + 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; + namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, + * where `err.code` is the error code. + * + * ```js + * import dns from 'node:dns'; + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v26.x/api/util.html#utilpromisifyoriginal) ed + * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + 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; + } + interface AnyARecord extends RecordWithTtl { + type: "A"; + } + interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + interface CaaRecord { + critical: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + interface AnyCaaRecord extends CaaRecord { + type: "CAA"; + } + 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 TlsaRecord { + certUsage: number; + selector: number; + match: number; + data: ArrayBuffer; + } + interface AnyTlsaRecord extends TlsaRecord { + type: "TLSA"; + } + 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 + | AnyCaaRecord + | AnyCnameRecord + | AnyMxRecord + | AnyNaptrRecord + | AnyNsRecord + | AnyPtrRecord + | AnySoaRecord + | AnySrvRecord + | AnyTlsaRecord + | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, + * where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR", + 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: "CAA", + callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => 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: "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: "TLSA", + callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => 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[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[], + ) => void, + ): void; + namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "CAA"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TLSA"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__( + hostname: string, + rrtype: string, + ): Promise< + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[] + >; + } + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + 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; + namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + 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; + namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + function resolveCname( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, + ): void; + namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + function resolveMx( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100, + * } + * ``` + * @since v0.9.12 + */ + function resolveNaptr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + function resolveNs( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + function resolvePtr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600, + * } + * ``` + * @since v0.11.10 + */ + function resolveSoa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, + ): void; + namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com', + * } + * ``` + * @since v0.1.27 + */ + function resolveSrv( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for + * the `hostname`. The `records` argument passed to the `callback` function is an + * array of objects with these properties: + * + * * `certUsage` + * * `selector` + * * `match` + * * `data` + * + * ```js + * { + * certUsage: 3, + * selector: 1, + * match: 1, + * data: [ArrayBuffer], + * } + * ``` + * @since v23.9.0, v22.15.0 + */ + function resolveTlsa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, + ): void; + namespace resolveTlsa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + function resolveTxt( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ]; + * ``` + * + * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see + * [RFC 8482](https://tools.ietf.org/html/rfc8482). + */ + function resolveAny( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, where `err.code` is + * one of the [DNS error codes](https://nodejs.org/docs/latest-v26.x/api/dns.html#error-codes). + * @since v0.1.16 + */ + function reverse( + ip: string, + callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, + ): void; + /** + * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `order` defaulting to `ipv4first`. + * * `ipv6first`: for `order` defaulting to `ipv6first`. + * * `verbatim`: for `order` defaulting to `verbatim`. + * @since v18.17.0 + */ + function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + function getServers(): string[]; + /** + * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: sets default `order` to `ipv4first`. + * * `ipv6first`: sets default `order` to `ipv6first`. + * * `verbatim`: sets default `order` to `verbatim`. + * + * The default is `verbatim` and {@link setDefaultResultOrder} have higher + * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--dns-result-orderorder). When using + * [worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main + * thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; + // Error codes + const NODATA: "ENODATA"; + const FORMERR: "EFORMERR"; + const SERVFAIL: "ESERVFAIL"; + const NOTFOUND: "ENOTFOUND"; + const NOTIMP: "ENOTIMP"; + const REFUSED: "EREFUSED"; + const BADQUERY: "EBADQUERY"; + const BADNAME: "EBADNAME"; + const BADFAMILY: "EBADFAMILY"; + const BADRESP: "EBADRESP"; + const CONNREFUSED: "ECONNREFUSED"; + const TIMEOUT: "ETIMEOUT"; + const EOF: "EOF"; + const FILE: "EFILE"; + const NOMEM: "ENOMEM"; + const DESTRUCTION: "EDESTRUCTION"; + const BADSTR: "EBADSTR"; + const BADFLAGS: "EBADFLAGS"; + const NONAME: "ENONAME"; + const BADHINTS: "EBADHINTS"; + const NOTINITIALIZED: "ENOTINITIALIZED"; + const LOADIPHLPAPI: "ELOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; + const CANCELLED: "ECANCELLED"; + interface ResolverOptions { + /** + * Query timeout in milliseconds, or `-1` to use the default timeout. + */ + timeout?: number | undefined; + /** + * The number of tries the resolver will try contacting each name server before giving up. + * @default 4 + */ + tries?: number | undefined; + /** + * The max retry timeout, in milliseconds. + * @default 0 + */ + maxTimeout?: number | undefined; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnssetserversservers) does not affect + * other resolvers: + * + * ```js + * import { Resolver } from 'node:dns'; + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `node:dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTlsa: typeof resolveTlsa; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "node:dns" { + export * as promises from "node:dns/promises"; +} +declare module "dns" { + export * from "node:dns"; +} diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts new file mode 100644 index 000000000..9e7e1c9a8 --- /dev/null +++ b/node_modules/@types/node/dns/promises.d.ts @@ -0,0 +1,497 @@ +declare module "node:dns/promises" { + import { + AnyRecord, + CaaRecord, + LookupAddress, + LookupAllOptions, + LookupOneOptions, + LookupOptions, + MxRecord, + NaptrRecord, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + ResolveWithTtlOptions, + SoaRecord, + SrvRecord, + TlsaRecord, + } from "node:dns"; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * import dns from 'node:dns'; + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * + * ```js + * import dnsPromises from 'node:dns'; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CAA"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TLSA"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve(hostname: string, rrtype: string): Promise< + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[] + >; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ]; + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100, + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600, + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com', + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for + * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions + * with these properties: + * + * * `certUsage` + * * `selector` + * * `match` + * * `data` + * + * ```js + * { + * certUsage: 3, + * selector: 1, + * match: 1, + * data: [ArrayBuffer], + * } + * ``` + * @since v23.9.0, v22.15.0 + */ + function resolveTlsa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `verbatim` defaulting to `false`. + * * `verbatim`: for `verbatim` defaulting to `true`. + * @since v20.1.0 + */ + function getDefaultResultOrder(): "ipv4first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: + * + * * `ipv4first`: sets default `order` to `ipv4first`. + * * `ipv6first`: sets default `order` to `ipv6first`. + * * `verbatim`: sets default `order` to `verbatim`. + * + * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). + * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * from the main thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; + // Error codes + const NODATA: "ENODATA"; + const FORMERR: "EFORMERR"; + const SERVFAIL: "ESERVFAIL"; + const NOTFOUND: "ENOTFOUND"; + const NOTIMP: "ENOTIMP"; + const REFUSED: "EREFUSED"; + const BADQUERY: "EBADQUERY"; + const BADNAME: "EBADNAME"; + const BADFAMILY: "EBADFAMILY"; + const BADRESP: "EBADRESP"; + const CONNREFUSED: "ECONNREFUSED"; + const TIMEOUT: "ETIMEOUT"; + const EOF: "EOF"; + const FILE: "EFILE"; + const NOMEM: "ENOMEM"; + const DESTRUCTION: "EDESTRUCTION"; + const BADSTR: "EBADSTR"; + const BADFLAGS: "EBADFLAGS"; + const NONAME: "ENONAME"; + const BADHINTS: "EBADHINTS"; + const NOTINITIALIZED: "ENOTINITIALIZED"; + const LOADIPHLPAPI: "ELOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; + const CANCELLED: "ECANCELLED"; + + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect + * other resolvers: + * + * ```js + * import { promises } from 'node:dns'; + * const resolver = new promises.Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org').then((addresses) => { + * // ... + * }); + * + * // Alternatively, the same code can be written using async-await style. + * (async function() { + * const addresses = await resolver.resolve4('example.org'); + * })(); + * ``` + * + * The following methods from the `dnsPromises` API are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v10.6.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTlsa: typeof resolveTlsa; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "dns/promises" { + export * from "node:dns/promises"; +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 000000000..8e03a7d6d --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,150 @@ +declare module "node:domain" { + import { EventEmitter } from "node:events"; + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ + class Domain extends EventEmitter { + /** + * An array of event emitters that have been explicitly added to the domain. + */ + members: EventEmitter[]; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and low-level requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * import domain from 'node:domain'; + * import fs from 'node:fs'; + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * If the `EventEmitter` was already bound to a domain, it is removed from that + * one, and bound to this one instead. + * @param emitter emitter to be added to the domain + */ + add(emitter: EventEmitter): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter to be removed from the domain + */ + remove(emitter: EventEmitter): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; + } + function create(): Domain; +} +declare module "domain" { + export * from "node:domain"; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 000000000..3191046e5 --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,1008 @@ +declare module "node:events" { + import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; + // #region Event map helpers + type EventMap = Record; + type IfEventMap, True, False> = {} extends Events ? False : True; + type Args, EventName extends string | symbol> = IfEventMap< + Events, + EventName extends keyof Events ? Events[EventName] + : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] + : any[], + any[] + >; + type EventNames, EventName extends string | symbol> = IfEventMap< + Events, + EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap, + string | symbol + >; + type Listener, EventName extends string | symbol> = IfEventMap< + Events, + ( + ...args: EventName extends keyof Events ? Events[EventName] + : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] + : any[] + ) => void, + (...args: any[]) => void + >; + interface EventEmitterEventMap { + newListener: [eventName: string | symbol, listener: (...args: any[]) => void]; + removeListener: [eventName: string | symbol, listener: (...args: any[]) => void]; + } + // #endregion + interface EventEmitterOptions { + /** + * It enables + * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v26.x/api/events.html#capture-rejections-of-promises). + * @default false + */ + captureRejections?: boolean | undefined; + } + /** + * The `EventEmitter` class is defined and exposed by the `node:events` module: + * + * ```js + * import { EventEmitter } from 'node:events'; + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ + class EventEmitter = any> { + constructor(options?: EventEmitterOptions); + } + interface EventEmitter = any> extends NodeJS.EventEmitter {} + global { + namespace NodeJS { + interface EventEmitter = any> { + /** + * The `Symbol.for('nodejs.rejection')` method is called in case a + * promise rejection happens when emitting an event and + * `captureRejections` is enabled on the emitter. + * It is possible to use `events.captureRejectionSymbol` in + * place of `Symbol.for('nodejs.rejection')`. + * + * ```js + * import { EventEmitter, captureRejectionSymbol } from 'node:events'; + * + * class MyClass extends EventEmitter { + * constructor() { + * super({ captureRejections: true }); + * } + * + * [captureRejectionSymbol](err, event, ...args) { + * console.log('rejection happened for', event, 'with', err, ...args); + * this.destroy(err); + * } + * + * destroy(err) { + * // Tear the resource down here. + * } + * } + * ``` + * @since v13.4.0, v12.16.0 + */ + [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void; + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: EventNames, listener: Listener): this; + /** + * Synchronously calls each of the listeners registered for the event named + * `eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: EventNames, ...args: Args): boolean; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. + * + * ```js + * import { EventEmitter } from 'node:events'; + * + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ + eventNames(): (string | symbol)[]; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to + * `events.defaultMaxListeners`. + * @since v1.0.0 + */ + getMaxListeners(): number; + /** + * Returns the number of listeners listening for the event named `eventName`. + * If `listener` is provided, it will return how many times the listener is found + * in the list of the listeners of the event. + * @since v3.2.0 + * @param eventName The name of the event being listened for + * @param listener The event handler function + */ + listenerCount( + eventName: EventNames, + listener?: Listener, + ): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: EventNames): Listener[]; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: EventNames, listener: Listener): this; + /** + * Adds the `listener` function to the end of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The + * `emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: EventNames, listener: Listener): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The + * `emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: EventNames, listener: Listener): this; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: EventNames, listener: Listener): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName` to the + * _beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener( + eventName: EventNames, + listener: Listener, + ): this; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: EventNames): Listener[]; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: EventNames): this; + /** + * Removes the specified `listener` from the listener array for the event named + * `eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any + * `removeListener()` or `removeAllListeners()` calls _after_ emitting and + * _before_ the last listener finishes execution will not remove them from + * `emit()` in progress. Subsequent events behave as expected. + * + * ```js + * import { EventEmitter } from 'node:events'; + * class MyEmitter extends EventEmitter {} + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indexes of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')` + * listener is removed: + * + * ```js + * import { EventEmitter } from 'node:events'; + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: EventNames, listener: Listener): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to + * `Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ + setMaxListeners(n: number): this; + } + } + } + namespace EventEmitter { + export { EventEmitter, EventEmitterEventMap, EventEmitterOptions }; + } + namespace EventEmitter { + interface Abortable { + signal?: AbortSignal | undefined; + } + /** + * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v26.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args). + * @since v13.4.0, v12.16.0 + */ + const captureRejectionSymbol: unique symbol; + /** + * Change the default `captureRejections` option on all new `EventEmitter` objects. + * @since v13.4.0, v12.16.0 + */ + let captureRejections: boolean; + /** + * By default, a maximum of `10` listeners can be registered for any single + * event. This limit can be changed for individual `EventEmitter` instances + * using the `emitter.setMaxListeners(n)` method. To change the default + * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners` + * property can be used. If this value is not a positive number, a `RangeError` + * is thrown. + * + * Take caution when setting the `events.defaultMaxListeners` because the + * change affects _all_ `EventEmitter` instances, including those created before + * the change is made. However, calling `emitter.setMaxListeners(n)` still has + * precedence over `events.defaultMaxListeners`. + * + * This is not a hard limit. The `EventEmitter` instance will allow + * more listeners to be added but will output a trace warning to stderr indicating + * that a "possible EventEmitter memory leak" has been detected. For any single + * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` + * methods can be used to temporarily avoid this warning: + * + * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is + * still possible to use `emitter.setMaxListeners(n)` to set a warning limit + * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.setMaxListeners(emitter.getMaxListeners() + 1); + * emitter.once('event', () => { + * // do stuff + * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); + * }); + * ``` + * + * The `--trace-warnings` command-line flag can be used to display the + * stack trace for such warnings. + * + * The emitted warning can be inspected with `process.on('warning')` and will + * have the additional `emitter`, `type`, and `count` properties, referring to + * the event emitter instance, the event's name and the number of attached + * listeners, respectively. + * Its `name` property is set to `'MaxListenersExceededWarning'`. + * @since v0.11.2 + */ + let defaultMaxListeners: number; + /** + * This symbol shall be used to install a listener for only monitoring `'error'` + * events. Listeners installed using this symbol are called before the regular + * `'error'` listeners are called. + * + * Installing a listener using this symbol does not change the behavior once an + * `'error'` event is emitted. Therefore, the process will still crash if no + * regular `'error'` listener is installed. + * @since v13.6.0, v12.17.0 + */ + const errorMonitor: unique symbol; + /** + * Listens once to the `abort` event on the provided `signal`. + * + * Listening to the `abort` event on abort signals is unsafe and may + * lead to resource leaks since another third party with the signal can + * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change + * this since it would violate the web standard. Additionally, the original + * API makes it easy to forget to remove listeners. + * + * This API allows safely using `AbortSignal`s in Node.js APIs by solving these + * two issues by listening to the event such that `stopImmediatePropagation` does + * not prevent the listener from running. + * + * Returns a disposable so that it may be unsubscribed from more easily. + * + * ```js + * import { addAbortListener } from 'node:events'; + * + * function example(signal) { + * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + * // addAbortListener() returns a disposable, so the `using` keyword ensures + * // the abort listener is automatically removed when this scope exits. + * using _ = addAbortListener(signal, (e) => { + * // Do something when signal is aborted. + * }); + * } + * ``` + * @since v20.5.0 + * @return Disposable that removes the `abort` listener. + */ + function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * import { getEventListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] + * } + * ``` + * @since v15.2.0, v14.17.0 + */ + function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[]; + function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[]; + /** + * Returns the currently set max amount of listeners. + * + * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the max event listeners for the + * event target. If the number of event handlers on a single EventTarget exceeds + * the max set, the EventTarget will print a warning. + * + * ```js + * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * console.log(getMaxListeners(ee)); // 10 + * setMaxListeners(11, ee); + * console.log(getMaxListeners(ee)); // 11 + * } + * { + * const et = new EventTarget(); + * console.log(getMaxListeners(et)); // 10 + * setMaxListeners(11, et); + * console.log(getMaxListeners(et)); // 11 + * } + * ``` + * @since v19.9.0 + */ + function getMaxListeners(emitter: EventEmitter | EventTarget): number; + /** + * Returns the number of registered listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listenerCount` + * on the emitter. + * + * For `EventTarget`s this is the only way to obtain the listener count. This can + * be useful for debugging and diagnostic purposes. + * @since v0.9.12 + */ + function listenerCount(emitter: EventEmitter, eventName: string | symbol): number; + function listenerCount(emitter: EventTarget, eventName: string): number; + interface OnOptions extends Abortable { + /** + * Names of events that will end the iteration. + */ + close?: readonly string[] | undefined; + /** + * The high watermark. The emitter is paused every time the size of events + * being buffered is higher than it. Supported only on emitters implementing + * `pause()` and `resume()` methods. + * @default Number.MAX_SAFE_INTEGER + */ + highWaterMark?: number | undefined; + /** + * The low watermark. The emitter is resumed every time the size of events + * being buffered is lower than it. Supported only on emitters implementing + * `pause()` and `resume()` methods. + * @default 1 + */ + lowWaterMark?: number | undefined; + } + /** + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter` + */ + function on( + emitter: EventEmitter, + eventName: string | symbol, + options?: OnOptions, + ): NodeJS.AsyncIterator; + function on( + emitter: EventTarget, + eventName: string, + options?: OnOptions, + ): NodeJS.AsyncIterator; + interface OnceOptions extends Abortable {} + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform + * [EventTarget][WHATWG-EventTarget] interface, which has no special + * `'error'` event semantics and does not listen to the `'error'` event. + * + * ```js + * import { once, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.error('error happened', err); + * } + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()` + * is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.error('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + function once( + emitter: EventEmitter, + eventName: string | symbol, + options?: OnceOptions, + ): Promise; + function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise; + /** + * ```js + * import { setMaxListeners, EventEmitter } from 'node:events'; + * + * const target = new EventTarget(); + * const emitter = new EventEmitter(); + * + * setMaxListeners(5, target, emitter); + * ``` + * @since v15.4.0 + * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. + * @param eventTargets Zero or more `EventTarget` + * or `EventEmitter` instances. If none are specified, `n` is set as the default + * max for all newly created `EventTarget` and `EventEmitter` objects. + * objects. + */ + function setMaxListeners(n: number, ...eventTargets: ReadonlyArray): void; + /** + * This is the interface from which event-emitting Node.js APIs inherit in the types package. + * **It is not intended for consumer use.** + * + * It provides event-mapped definitions similar to EventEmitter, except that its signatures + * are deliberately permissive: they provide type _hinting_, but not rigid type-checking, + * for compatibility reasons. + * + * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from + * this interface in the type definitions. Classes that are more than one inheritance level + * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead + * copy these method definitions into the derived class. Search "#region InternalEventEmitter" + * for examples. + * @internal + */ + interface InternalEventEmitter> extends EventEmitter { + addListener(eventName: E, listener: (...args: T[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: T[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount(eventName: E, listener?: (...args: T[E]) => void): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: T[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: T[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: T[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: T[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener(eventName: E, listener: (...args: T[E]) => void): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(eventName: E, listener: (...args: T[E]) => void): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: T[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener(eventName: E, listener: (...args: T[E]) => void): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + } + interface EventEmitterReferencingAsyncResource extends AsyncResource { + readonly eventEmitter: EventEmitterAsyncResource; + } + interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { + /** + * The type of async event. + * @default new.target.name + */ + name?: string | undefined; + } + /** + * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that + * require manual async tracking. Specifically, all events emitted by instances + * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v26.x/api/async_context.html). + * + * ```js + * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; + * import { notStrictEqual, strictEqual } from 'node:assert'; + * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; + * + * // Async tracking tooling will identify this as 'Q'. + * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); + * + * // 'foo' listeners will run in the EventEmitters async context. + * ee1.on('foo', () => { + * strictEqual(executionAsyncId(), ee1.asyncId); + * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); + * }); + * + * const ee2 = new EventEmitter(); + * + * // 'foo' listeners on ordinary EventEmitters that do not track async + * // context, however, run in the same async context as the emit(). + * ee2.on('foo', () => { + * notStrictEqual(executionAsyncId(), ee2.asyncId); + * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); + * }); + * + * Promise.resolve().then(() => { + * ee1.emit('foo'); + * ee2.emit('foo'); + * }); + * ``` + * + * The `EventEmitterAsyncResource` class has the same methods and takes the + * same options as `EventEmitter` and `AsyncResource` themselves. + * @since v17.4.0, v16.14.0 + */ + class EventEmitterAsyncResource extends EventEmitter { + constructor(options?: EventEmitterAsyncResourceOptions); + /** + * The unique `asyncId` assigned to the resource. + */ + readonly asyncId: number; + /** + * The returned `AsyncResource` object has an additional `eventEmitter` property + * that provides a reference to this `EventEmitterAsyncResource`. + */ + readonly asyncResource: EventEmitterReferencingAsyncResource; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + */ + emitDestroy(): void; + /** + * The same `triggerAsyncId` that is passed to the + * `AsyncResource` constructor. + */ + readonly triggerAsyncId: number; + } + /** + * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` + * that emulates a subset of the `EventEmitter` API. + * @since v14.5.0 + */ + interface NodeEventTarget extends EventTarget { + /** + * Node.js-specific extension to the `EventTarget` class that emulates the + * equivalent `EventEmitter` API. The only difference between `addListener()` and + * `addEventListener()` is that `addListener()` will return a reference to the + * `EventTarget`. + * @since v14.5.0 + */ + addListener(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class that dispatches the + * `arg` to the list of handlers for `type`. + * @since v15.2.0 + * @returns `true` if event listeners registered for the `type` exist, + * otherwise `false`. + */ + emit(type: string, arg: any): boolean; + /** + * Node.js-specific extension to the `EventTarget` class that returns an array + * of event `type` names for which event listeners are registered. + * @since 14.5.0 + */ + eventNames(): string[]; + /** + * Node.js-specific extension to the `EventTarget` class that returns the number + * of event listeners registered for the `type`. + * @since v14.5.0 + */ + listenerCount(type: string): number; + /** + * Node.js-specific extension to the `EventTarget` class that sets the number + * of max event listeners as `n`. + * @since v14.5.0 + */ + setMaxListeners(n: number): void; + /** + * Node.js-specific extension to the `EventTarget` class that returns the number + * of max event listeners. + * @since v14.5.0 + */ + getMaxListeners(): number; + /** + * Node.js-specific alias for `eventTarget.removeEventListener()`. + * @since v14.5.0 + */ + off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; + /** + * Node.js-specific alias for `eventTarget.addEventListener()`. + * @since v14.5.0 + */ + on(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class that adds a `once` + * listener for the given event `type`. This is equivalent to calling `on` + * with the `once` option set to `true`. + * @since v14.5.0 + */ + once(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class. If `type` is specified, + * removes all registered listeners for `type`, otherwise removes all registered + * listeners. + * @since v14.5.0 + */ + removeAllListeners(type?: string): this; + /** + * Node.js-specific extension to the `EventTarget` class that removes the + * `listener` for the given `type`. The only difference between `removeListener()` + * and `removeEventListener()` is that `removeListener()` will return a reference + * to the `EventTarget`. + * @since v14.5.0 + */ + removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; + } + /** @internal */ + type InternalEventTargetEventProperties = { + [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null; + }; + } + export = EventEmitter; +} +declare module "events" { + import events = require("node:events"); + export = events; +} diff --git a/node_modules/@types/node/ffi.d.ts b/node_modules/@types/node/ffi.d.ts new file mode 100644 index 000000000..6b9932023 --- /dev/null +++ b/node_modules/@types/node/ffi.d.ts @@ -0,0 +1,500 @@ +declare module "node:ffi" { + import { NonSharedBuffer } from "node:buffer"; + interface FunctionSignature { + return?: ReturnType | undefined; + arguments?: readonly ArgumentType[] | undefined; + } + interface FunctionDefinitions { + [symbol: string]: FunctionSignature; + } + type CallbackFunction = ( + ...args: { [K in keyof P]: ArgumentTypeMap[DataTypeMap[P[K]]] } + ) => ReturnTypeMap[DataTypeMap[R]]; + interface WrappedFunction + extends CallbackFunction + { + readonly pointer: bigint; + } + type CallbackFunctionFromSignature = CallbackFunction< + ReturnTypeFromFunctionSignature, + ArgumentTypesFromFunctionSignature + >; + type WrappedFunctionFromSignature = WrappedFunction< + ReturnTypeFromFunctionSignature, + ArgumentTypesFromFunctionSignature + >; + type WrappedFunctionsFromDefinitions = { + [K in keyof T]: WrappedFunctionFromSignature; + }; + type ReturnTypeFromFunctionSignature = "return" extends keyof T + ? T extends { return: infer R extends ReturnType } ? R : any + : "void"; + type ArgumentTypesFromFunctionSignature = "arguments" extends keyof T + ? T extends { arguments: infer P extends readonly ArgumentType[] } ? P : any[] + : []; + interface DynamicLibraryResult extends Disposable { + lib: DynamicLibrary; + functions: WrappedFunctionsFromDefinitions; + } + /** + * The native shared library suffix for the current platform: + * + * * `'dylib'` on macOS + * * `'so'` on Unix-like platforms + * * `'dll'` on Windows + * + * This can be used to build portable library paths: + * + * ```js + * const { suffix } = require('node:ffi'); + * + * const path = `libsqlite3.${suffix}`; + * ``` + * @since v26.1.0 + */ + const suffix: string; + /** + * Loads a dynamic library and resolves the requested function definitions. + * + * On Windows passing `null` is not supported. + * + * When `definitions` is omitted, `functions` is returned as an empty object until + * symbols are resolved explicitly. + * + * The returned object also implements the explicit resource management protocol, + * so it can be used with the `using` declaration. Disposing the returned + * object closes the library handle. + * + * ```js + * import { dlopen } from 'node:ffi'; + * + * { + * using handle = dlopen('./mylib.so', { + * add_i32: { arguments: ['i32', 'i32'], return: 'i32' }, + * }); + * console.log(handle.functions.add_i32(20, 22)); + * } // handle.lib.close() is invoked automatically here. + * ``` + * + * ```js + * import { dlopen } from 'node:ffi'; + * + * const { lib, functions } = dlopen('./mylib.so', { + * add_i32: { arguments: ['i32', 'i32'], return: 'i32' }, + * string_length: { arguments: ['pointer'], return: 'u64' }, + * }); + * + * console.log(functions.add_i32(20, 22)); + * ``` + * @since v26.1.0 + * @param path Path to a dynamic library, or `null` to resolve symbols + * from the current process image. + * @param definitions Symbol definitions to resolve immediately. + */ + function dlopen( + path: string | null, + definitions?: T, + ): DynamicLibraryResult; + /** + * Closes a dynamic library. + * + * This is equivalent to calling `handle.close()`. + * @since v26.1.0 + */ + function dlclose(handle: DynamicLibrary): void; + /** + * Resolves a symbol address from a loaded library. + * + * This is equivalent to calling `handle.getSymbol(symbol)`. + * @since v26.1.0 + */ + function dlsym(handle: DynamicLibrary, symbol: string): bigint; + /** + * @since v26.1.0 + */ + class DynamicLibrary { + /** + * Loads the dynamic library without resolving any functions eagerly. + * + * On Windows passing `null` is not supported. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * ``` + * @param path Path to a dynamic library, or `null` to resolve symbols + * from the current process image. + */ + constructor(path: string | null); + /** + * The path used to load the library. + */ + readonly path: string; + /** + * An object containing previously resolved symbol addresses as `bigint` values. + */ + readonly symbols: { [symbol: string]: bigint }; + /** + * Closes the library handle. + * + * `DynamicLibrary` implements the explicit resource management protocol, so a + * library instance can be managed with the `using` declaration. Leaving the + * enclosing scope invokes `library.close()` automatically. + * + * ```js + * import { DynamicLibrary } from 'node:ffi'; + * + * { + * using lib = new DynamicLibrary('./mylib.so'); + * // Use `lib` here; `lib.close()` is called when the block exits. + * } + * ``` + * + * Calling `library.close()` (or disposing the library) more than once is a no-op. + * + * After a library has been closed: + * + * * Resolved function wrappers become invalid. + * * Further symbol and function resolution throws. + * * Registered callbacks are invalidated. + * + * Closing a library does not make previously exported callback pointers safe to + * reuse. Node.js does not track or revoke callback pointers that have already + * been handed to native code. + * + * If native code still holds a callback pointer after `library.close()` or after + * `library.unregisterCallback(pointer)`, invoking that pointer has undefined + * behavior, is not allowed, and is dangerous: it can crash the process, produce + * incorrect output, or corrupt memory. Native code must stop using callback + * addresses before the library is closed or before the callback is unregistered. + * + * Calling `library.close()` from one of the library's active callbacks is + * unsupported and dangerous. The callback must return before the library is + * closed. + */ + close(): void; + /** + * Calls `library.close()`. This allows `DynamicLibrary` instances to be used with + * the `using` declaration for automatic cleanup when the enclosing scope + * exits. It is a no-op on a library that has already been closed. + * @since v26.1.0 + */ + [Symbol.dispose](): void; + /** + * Resolves a symbol and returns a callable JavaScript wrapper. + * + * The returned function has a `.pointer` property containing the native function + * address as a `bigint`. + * + * If the same symbol has already been resolved, requesting it again with a + * different signature throws. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * const add = lib.getFunction('add_i32', { + * arguments: ['i32', 'i32'], + * return: 'i32', + * }); + * + * console.log(add(20, 22)); + * console.log(add.pointer); + * ``` + */ + getFunction(name: string, signature: T): WrappedFunctionFromSignature; + /** + * When `definitions` is provided, resolves each named symbol and returns an + * object containing callable wrappers. + * + * When `definitions` is omitted, returns wrappers for all functions that have + * already been resolved on the library. + */ + getFunctions(): { [symbol: string]: WrappedFunction }; + getFunctions(definitions: T): WrappedFunctionsFromDefinitions; + /** + * Resolves a symbol and returns its native address as a `bigint`. + */ + getSymbol(name: string): bigint; + /** + * Returns an object containing all previously resolved symbol addresses. + */ + getSymbols(): Record; + /** + * Creates a native callback pointer backed by a JavaScript function. + * + * When `signature` is omitted, the callback uses a default `void ()` signature. + * + * The return value is the callback pointer address as a `bigint`. It can be + * passed to native functions expecting a callback pointer. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * + * const callback = lib.registerCallback( + * { arguments: ['i32'], return: 'i32' }, + * (value) => value * 2, + * ); + * ``` + * + * Callbacks are subject to the following restrictions: + * + * * They must be invoked on the same system thread where they were created. + * * They must not throw exceptions. + * * They must not return promises. + * * They must return a value compatible with the declared return type. + * * They must not call `library.close()` on their owning library while running. + * * They must not unregister themselves while running. + * + * Closing the owning library or unregistering the currently executing callback + * from inside the callback is unsupported and dangerous. Doing so may crash the + * process, produce incorrect output, or corrupt memory. + */ + registerCallback(callback: () => void): bigint; + registerCallback( + signature: T, + callback: CallbackFunctionFromSignature, + ): bigint; + /** + * Releases a callback previously created with `library.registerCallback()`. + * + * Calling `library.unregisterCallback(pointer)` for a callback that is currently + * executing is unsupported and dangerous. The callback must return before it is + * unregistered. + * + * After `library.unregisterCallback(pointer)` returns, invoking that callback + * pointer from native code has undefined behavior, is not allowed, and is + * dangerous: it can crash the process, produce incorrect output, or corrupt + * memory. + */ + unregisterCallback(pointer: bigint): void; + /** + * Keeps the callback strongly referenced by JavaScript. + */ + refCallback(pointer: bigint): void; + /** + * Allows the callback to become weakly referenced by JavaScript. + * + * If the callback function is later garbage collected, subsequent native + * invocations become a no-op. Non-void return values are zero-initialized before + * returning to native code. + */ + unrefCallback(pointer: bigint): void; + } + function getInt8(pointer: bigint, offset?: number): number; + function getUint8(pointer: bigint, offset?: number): number; + function getInt16(pointer: bigint, offset?: number): number; + function getUint16(pointer: bigint, offset?: number): number; + function getInt32(pointer: bigint, offset?: number): number; + function getUint32(pointer: bigint, offset?: number): number; + function getInt64(pointer: bigint, offset?: number): bigint; + function getUint64(pointer: bigint, offset?: number): bigint; + function getFloat32(pointer: bigint, offset?: number): number; + function getFloat64(pointer: bigint, offset?: number): number; + function setInt8(pointer: bigint, offset: number, value: number): void; + function setUint8(pointer: bigint, offset: number, value: number): void; + function setInt16(pointer: bigint, offset: number, value: number): void; + function setUint16(pointer: bigint, offset: number, value: number): void; + function setInt32(pointer: bigint, offset: number, value: number): void; + function setUint32(pointer: bigint, offset: number, value: number): void; + function setInt64(pointer: bigint, offset: number, value: number | bigint): void; + function setUint64(pointer: bigint, offset: number, value: number | bigint): void; + function setFloat32(pointer: bigint, offset: number, value: number): void; + function setFloat64(pointer: bigint, offset: number, value: number): void; + /** + * Reads a NUL-terminated UTF-8 string from native memory. + * + * If `pointer` is `0n`, `null` is returned. + * + * This function does not validate that `pointer` refers to readable memory or + * that the pointed-to data is terminated with `\0`. Passing an invalid pointer, + * a pointer to freed memory, or a pointer to bytes without a terminating NUL can + * read unrelated memory, crash the process, or produce truncated or garbled + * output. + * @since v26.1.0 + */ + function toString(pointer: bigint): string | null; + /** + * Creates a `Buffer` from native memory. + * + * When `copy` is `true`, the returned `Buffer` owns its own copied memory. + * When `copy` is `false`, the returned `Buffer` references the original native + * memory directly. + * + * Using `copy: false` is a zero-copy escape hatch. The returned `Buffer` is a + * writable view onto foreign memory, so writes in JavaScript update the original + * native memory directly. The caller must guarantee that: + * + * * `pointer` remains valid for the entire lifetime of the returned `Buffer`. + * * `length` stays within the allocated native region. + * * no native code frees or repurposes that memory while JavaScript still uses + * the `Buffer`. + * * Memory protection is observed. For example, read-only memory pages must not + * be written to. + * + * If these guarantees are not met, reading or writing the `Buffer` can corrupt + * memory or crash the process. + * @since v26.1.0 + * @param copy When `false`, creates a zero-copy view. **Default:** `true`. + */ + function toBuffer(pointer: bigint, length: number, copy?: boolean): NonSharedBuffer; + /** + * Creates an `ArrayBuffer` from native memory. + * + * When `copy` is `true`, the returned `ArrayBuffer` contains copied bytes. + * When `copy` is `false`, the returned `ArrayBuffer` references the original + * native memory directly. + * + * The same lifetime and bounds requirements described for + * `ffi.toBuffer(pointer, length, copy)` apply + * here. With `copy: false`, the + * returned `ArrayBuffer` is a zero-copy view of foreign memory and is only safe + * while that memory remains allocated, unchanged in layout, and valid for the + * entire exposed range. + * @since v26.1.0 + * @param copy When `false`, creates a zero-copy view. **Default:** `true`. + */ + function toArrayBuffer(pointer: bigint, length: number, copy?: boolean): ArrayBuffer; + /** + * Copies a JavaScript string into native memory and appends a trailing NUL + * terminator. + * + * `length` must be large enough to hold the full encoded string plus the trailing + * NUL terminator. For UTF-16 and UCS-2 encodings, the trailing terminator uses + * two zero bytes. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * + * `string` must be a JavaScript string. `encoding` must be a string. + * @since v26.1.0 + * @param encoding **Default:** `'utf8'`. + */ + function exportString(string: string, pointer: bigint, length: number, encoding?: BufferEncoding): void; + /** + * Copies bytes from a `Buffer` into native memory. + * + * `length` must be at least `buffer.length`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * + * `buffer` must be a Node.js `Buffer`. + * @since v26.1.0 + */ + function exportBuffer(buffer: Buffer, pointer: bigint, length: number): void; + /** + * Copies bytes from an `ArrayBuffer` into native memory. + * + * `length` must be at least `arrayBuffer.byteLength`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * @since v26.1.0 + */ + function exportArrayBuffer(arrayBuffer: ArrayBuffer, pointer: bigint, length: number): void; + /** + * Copies bytes from an `ArrayBufferView` into native memory. + * + * `length` must be at least `arrayBufferView.byteLength`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * @since v26.1.0 + */ + function exportArrayBufferView(arrayBufferView: NodeJS.ArrayBufferView, pointer: bigint, length: number): void; + /** + * Returns the raw memory address of JavaScript-managed byte storage. + * + * This is unsafe and dangerous. The returned pointer can become invalid if the + * underlying memory is detached, resized, transferred, or otherwise invalidated. + * Using stale pointers can cause memory corruption or process crashes. + * @since v26.1.0 + */ + function getRawPointer(source: ArrayBuffer | NodeJS.ArrayBufferView): bigint; + /** + * Returns the address of the current thread's `uv_loop_t` as a `bigint`. + * + * The returned address is for the current Node.js environment. In the main thread, + * this is the main thread event loop. In a worker thread, this is that worker's + * event loop. + * + * This is unsafe and dangerous. The returned pointer is only valid for the lifetime + * of the current environment. Using it after the environment exits, or from native + * code that assumes a different thread or lifetime, can crash the process or + * corrupt memory. + * @since v26.6.0 + */ + function getCurrentEventLoop(): bigint; + type ReturnType = { [K in keyof DataTypeMap]: K }[keyof DataTypeMap]; + type ArgumentType = Exclude; + interface DataTypeMap { + void: "void"; + char: "number"; + bool: "number"; + i8: "number"; + int8: "number"; + u8: "number"; + uint8: "number"; + i16: "number"; + int16: "number"; + u16: "number"; + uint16: "number"; + i32: "number"; + int32: "number"; + u32: "number"; + uint32: "number"; + i64: "bigint"; + int64: "bigint"; + u64: "bigint"; + uint64: "bigint"; + float: "number"; + f32: "number"; + double: "number"; + f64: "number"; + pointer: "pointer"; + ptr: "pointer"; + function: "pointer"; + buffer: "pointer"; + arraybuffer: "pointer"; + string: "pointer"; + str: "pointer"; + } + interface ArgumentTypeMap { + "number": number; + "bigint": bigint; + "pointer": bigint | string | ArrayBuffer | NodeJS.ArrayBufferView | null; + } + interface ReturnTypeMap { + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + "void": void; + "number": number; + "bigint": bigint; + "pointer": bigint; + } + enum types { + VOID = "void", + POINTER = "pointer", + BUFFER = "buffer", + ARRAY_BUFFER = "arraybuffer", + FUNCTION = "function", + BOOL = "bool", + CHAR = "char", + STRING = "string", + FLOAT = "float", + DOUBLE = "double", + INT_8 = "int8", + UINT_8 = "uint8", + INT_16 = "int16", + UINT_16 = "uint16", + INT_32 = "int32", + UINT_32 = "uint32", + INT_64 = "int64", + UINT_64 = "uint64", + FLOAT_32 = "float32", + FLOAT_64 = "float64", + } +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 000000000..e2626e67e --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,4803 @@ +declare module "node:fs" { + import { BufferView, NonSharedBuffer } from "node:buffer"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import { FileHandle } from "node:fs/promises"; + import * as stream from "node:stream"; + import { URL } from "node:url"; + /** + * Valid types for path values in "fs". + */ + type PathLike = string | Buffer | URL; + type PathOrFileDescriptor = PathLike | number; + type TimeLike = string | number | Date; + type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + type BufferEncodingOption = + | "buffer" + | { + encoding: "buffer"; + }; + interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; + } + type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; + type OpenMode = number | string; + type Mode = number | string; + interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: T; + ino: T; + mode: T; + nlink: T; + uid: T; + gid: T; + rdev: T; + size: T; + blksize: T; + blocks: T; + atimeMs: T; + mtimeMs: T; + ctimeMs: T; + birthtimeMs: T; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + // Deliberately not defining a type alias here... it'd be exported, and something in the ecosystem would inevitably start using it. + // TODO: replace with Temporal builtins once @types/node no longer supports TS <6.0. + atimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + mtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + ctimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + birthtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T + : unknown; + } + interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + class Stats { + private constructor(); + } + interface StatsFsBase { + /** Type of file system. */ + type: T; + /** Optimal transfer block size. */ + bsize: T; + /** Total data blocks in file system. */ + blocks: T; + /** Free blocks in file system. */ + bfree: T; + /** Available blocks for unprivileged users */ + bavail: T; + /** Total file nodes in file system. */ + files: T; + /** Fundamental file system block size. */ + frsize: T; + /** Free file nodes in file system. */ + ffree: T; + } + interface StatsFs extends StatsFsBase {} + /** + * Provides information about a mounted file system. + * + * Objects returned from {@link statfs} and its synchronous counterpart are of + * this type. If `bigint` in the `options` passed to those methods is `true`, the + * numeric values will be `bigint` instead of `number`. + * + * ```console + * StatFs { + * type: 1397114950, + * bsize: 4096, + * blocks: 121938943, + * bfree: 61058895, + * bavail: 61058895, + * files: 999, + * ffree: 1000000 + * } + * ``` + * + * `bigint` version: + * + * ```console + * StatFs { + * type: 1397114950n, + * bsize: 4096n, + * blocks: 121938943n, + * bfree: 61058895n, + * bavail: 61058895n, + * files: 999n, + * ffree: 1000000n + * } + * ``` + * @since v19.6.0, v18.15.0 + */ + class StatsFs {} + interface BigIntStatsFs extends StatsFsBase {} + interface StatFsOptions { + bigint?: boolean | undefined; + } + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ + class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ + isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ + isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ + isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ + isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ + isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ + isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ + isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ + name: Name; + /** + * The path to the parent directory of the file this `fs.Dirent` object refers to. + * @since v20.12.0, v18.20.0 + */ + parentPath: string; + } + /** + * A class representing a directory stream. + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ + readonly path: string; + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * + * A promise is returned that will be fulfilled after the resource has been + * closed. + * @since v12.12.0 + */ + close(): Promise; + close(cb: NoParamCallback): void; + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * @since v12.12.0 + */ + closeSync(): void; + /** + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + /** + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + */ + readSync(): Dirent | null; + /** + * Calls `dir.close()` if the directory handle is open, and returns a promise that + * fulfills when disposal is complete. + * @since v24.1.0 + */ + [Symbol.asyncDispose](): Promise; + /** + * Calls `dir.closeSync()` if the directory handle is open, and returns + * `undefined`. + * @since v24.1.0 + */ + [Symbol.dispose](): void; + } + /** + * Class: fs.StatWatcher + * @since v14.3.0, v12.20.0 + * Extends `EventEmitter` + * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. + */ + interface StatWatcher extends EventEmitter { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + interface FSWatcherEventMap { + "change": [eventType: string, filename: string | NonSharedBuffer]; + "close": []; + "error": [error: Error]; + } + interface FSWatcher extends InternalEventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ + close(): void; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.FSWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.FSWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + interface ReadStreamEventMap extends stream.ReadableEventMap { + "close": []; + "data": [chunk: string | NonSharedBuffer]; + "open": [fd: number]; + "ready": []; + } + /** + * Instances of `fs.ReadStream` cannot be constructed directly. They are created and + * returned using the `fs.createReadStream()` function. + * @since v0.1.93 + */ + class ReadStream extends stream.Readable { + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ + bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ + pending: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ReadStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ReadStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Utf8StreamOptions { + /** + * Appends writes to dest file instead of truncating it. + * @default true + */ + append?: boolean | undefined; + /** + * Which type of data you can send to the write + * function, supported values are `'utf8'` or `'buffer'`. + * @default 'utf8' + */ + contentMode?: "utf8" | "buffer" | undefined; + /** + * A path to a file to be written to (mode controlled by the + * append option). + */ + dest?: string | undefined; + /** + * A file descriptor, something that is returned by `fs.open()` + * or `fs.openSync()`. + */ + fd?: number | undefined; + /** + * An object that has the same API as the `fs` module, useful + * for mocking, testing, or customizing the behavior of the stream. + */ + fs?: object | undefined; + /** + * Perform a `fs.fsyncSync()` every time a write is + * completed. + */ + fsync?: boolean | undefined; + /** + * The maximum length of the internal buffer. If a write + * operation would cause the buffer to exceed `maxLength`, the data written is + * dropped and a drop event is emitted with the dropped data + */ + maxLength?: number | undefined; + /** + * The maximum number of bytes that can be written; + * @default 16384 + */ + maxWrite?: number | undefined; + /** + * The minimum length of the internal buffer that is + * required to be full before flushing. + */ + minLength?: number | undefined; + /** + * Ensure directory for `dest` file exists when true. + * @default false + */ + mkdir?: boolean | undefined; + /** + * Specify the creating file mode (see `fs.open()`). + */ + mode?: number | string | undefined; + /** + * Calls flush every `periodicFlush` milliseconds. + */ + periodicFlush?: number | undefined; + /** + * A function that will be called when `write()`, + * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error. + * If the return value is `true` the operation will be retried, otherwise it + * will bubble the error. The `err` is the error that caused this function to + * be called, `writeBufferLen` is the length of the buffer that was written, + * and `remainingBufferLen` is the length of the remaining buffer that the + * stream did not try to write. + */ + retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined; + /** + * Perform writes synchronously. + */ + sync?: boolean | undefined; + } + interface Utf8StreamEventMap { + "close": []; + "drain": []; + "drop": [data: string | Buffer]; + "error": [error: Error]; + "finish": []; + "ready": []; + "write": [n: number]; + } + /** + * An optimized UTF-8 stream writer that allows for flushing all the internal + * buffering on demand. It handles `EAGAIN` errors correctly, allowing for + * customization, for example, by dropping content if the disk is busy. + * @since v24.6.0 + * @experimental + */ + class Utf8Stream implements EventEmitter { + constructor(options: Utf8StreamOptions); + /** + * Whether the stream is appending to the file or truncating it. + */ + readonly append: boolean; + /** + * The type of data that can be written to the stream. Supported + * values are `'utf8'` or `'buffer'`. + * @default 'utf8' + */ + readonly contentMode: "utf8" | "buffer"; + /** + * Close the stream immediately, without flushing the internal buffer. + */ + destroy(): void; + /** + * Close the stream gracefully, flushing the internal buffer before closing. + */ + end(): void; + /** + * The file descriptor that is being written to. + */ + readonly fd: number; + /** + * The file that is being written to. + */ + readonly file: string; + /** + * Writes the current buffer to the file if a write was not in progress. Do + * nothing if `minLength` is zero or if it is already writing. + */ + flush(callback: (err: Error | null) => void): void; + /** + * Flushes the buffered data synchronously. This is a costly operation. + */ + flushSync(): void; + /** + * Whether the stream is performing a `fs.fsyncSync()` after every + * write operation. + */ + readonly fsync: boolean; + /** + * The maximum length of the internal buffer. If a write + * operation would cause the buffer to exceed `maxLength`, the data written is + * dropped and a drop event is emitted with the dropped data. + */ + readonly maxLength: number; + /** + * The minimum length of the internal buffer that is required to be + * full before flushing. + */ + readonly minLength: number; + /** + * Whether the stream should ensure that the directory for the + * `dest` file exists. If `true`, it will create the directory if it does not + * exist. + * @default false + */ + readonly mkdir: boolean; + /** + * The mode of the file that is being written to. + */ + readonly mode: number | string; + /** + * The number of milliseconds between flushes. If set to `0`, no + * periodic flushes will be performed. + */ + readonly periodicFlush: number; + /** + * Reopen the file in place, useful for log rotation. + * @param file A path to a file to be written to (mode + * controlled by the append option). + */ + reopen(file: PathLike): void; + /** + * Whether the stream is writing synchronously or asynchronously. + */ + readonly sync: boolean; + /** + * When the `options.contentMode` is set to `'utf8'` when the stream is created, + * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`, + * the `data` argument must be a `Buffer`. + * @param data The data to write. + */ + write(data: string | Buffer): boolean; + /** + * Whether the stream is currently writing data to the file. + */ + readonly writing: boolean; + /** + * Calls `utf8Stream.destroy()`. + */ + [Symbol.dispose](): void; + } + interface Utf8Stream extends InternalEventEmitter {} + interface WriteStreamEventMap extends stream.WritableEventMap { + "close": []; + "open": [fd: number]; + "ready": []; + } + /** + * Instances of `fs.WriteStream` cannot be constructed directly. They are created and + * returned using the `fs.createWriteStream()` function. + * @since v0.1.93 + */ + class WriteStream extends stream.Writable { + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ + bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ + pending: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WriteStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'node:fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 + */ + function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + /** + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 + */ + function renameSync(oldPath: PathLike, newPath: PathLike): void; + /** + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] + */ + function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function truncate(path: PathLike, callback: NoParamCallback): void; + namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number): Promise; + } + /** + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] + */ + function truncateSync(path: PathLike, len?: number): void; + /** + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] + */ + function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + function ftruncate(fd: number, callback: NoParamCallback): void; + namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number): Promise; + } + /** + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] + */ + function ftruncateSync(fd: number, len?: number): void; + /** + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + function chownSync(path: PathLike, uid: number, gid: number): void; + /** + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + /** + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + function fchownSync(fd: number, uid: number, gid: number): void; + /** + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. + */ + function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + function lchownSync(path: PathLike, uid: number, gid: number): void; + /** + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace lutimes { + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, + * with the difference that if the path refers to a symbolic link, then the link is not + * dereferenced: instead, the timestamps of the symbolic link itself are changed. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'node:fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 + */ + function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 + */ + function chmodSync(path: PathLike, mode: Mode): void; + /** + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; + namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: Mode): Promise; + } + /** + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchmodSync(fd: number, mode: Mode): void; + /** + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + /** @deprecated */ + namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + function lchmodSync(path: PathLike, mode: Mode): void; + /** + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * {@link stat} follows symbolic links. Use {@link lstat} to look at the + * links themselves. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'node:fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 + */ + function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void, + ): void; + namespace stat { + // TODO: aliased promisify signatures + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** @deprecated This orphaned interface will be removed in a future version. */ + interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + }, + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + }, + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + }, + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function statSync(path: PathLike): Stats; + function statSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; + /** + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function fstat( + fd: number, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; + } + /** + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Stats; + function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): BigIntStats; + function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; + /** + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 + */ + function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function lstat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** + * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; + function statfs( + path: PathLike, + options: + | (StatFsOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, + ): void; + function statfs( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, + ): void; + function statfs( + path: PathLike, + options: StatFsOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, + ): void; + namespace statfs { + /** + * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. + * @param path A path to an existing file or directory on the file system to be queried. + */ + function __promisify__( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatFsOptions): Promise; + } + /** + * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + function statfsSync( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): StatsFs; + function statfsSync( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): BigIntStatsFs; + function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstatSync(path: PathLike): Stats; + function lstatSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 + */ + function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 + */ + function linkSync(existingPath: PathLike, newPath: PathLike): void; + /** + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. + * If the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction + * points on NTFS volumes can only point to directories. + * + * Relative targets are relative to the link's parent directory. + * + * ```js + * import { symlink } from 'node:fs'; + * + * symlink('./mew', './mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` which points to `mew` in the + * same directory: + * + * ```bash + * $ tree . + * . + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 + * @param [type='null'] + */ + function symlink( + target: PathLike, + path: PathLike, + type: symlink.Type | undefined | null, + callback: NoParamCallback, + ): void; + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + type Type = "dir" | "file" | "junction"; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 + * @param [type='null'] + */ + function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + /** + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readlink( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + } + /** + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + function readlinkSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..`, and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function realpath( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + function native( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, + ): void; + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, + ): void; + function native( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + } + /** + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 + */ + function realpathSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + namespace realpathSync { + function native(path: PathLike, options?: EncodingOption): string; + function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + } + /** + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 + */ + function unlink(path: PathLike, callback: NoParamCallback): void; + namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 + */ + function unlinkSync(path: PathLike): void; + /** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */ + // TODO: remove in future major + interface RmDirOptions {} + /** + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 + */ + function rmdir(path: PathLike, callback: NoParamCallback): void; + namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 + */ + function rmdirSync(path: PathLike): void; + interface RmOptions { + /** + * When `true`, exceptions will be ignored if `path` does not exist. + * @default false + */ + force?: boolean | undefined; + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 + */ + function rm(path: PathLike, callback: NoParamCallback): void; + function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; + namespace rm { + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + */ + function __promisify__(path: PathLike, options?: RmOptions): Promise; + } + /** + * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. + * @since v14.14.0 + */ + function rmSync(path: PathLike, options?: RmOptions): void; + interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * If a folder was created, the path to the first created folder will be returned. + * @default false + */ + recursive?: boolean | undefined; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777 + */ + mode?: Mode | undefined; + } + /** + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created (for instance, if it was previously created). + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. If `recursive` is false and the directory exists, + * an `EEXIST` error occurs. + * + * ```js + * import { mkdir } from 'node:fs'; + * + * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. + * mkdir('./tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'node:fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options: Mode | MakeDirectoryOptions | null | undefined, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function mkdir(path: PathLike, callback: NoParamCallback): void; + namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: Mode | MakeDirectoryOptions | null, + ): Promise; + } + /** + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 + */ + function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): string | undefined; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): void; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; + /** + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`import { sep } from 'node:path'`). + * + * ```js + * import { tmpdir } from 'node:os'; + * import { mkdtemp } from 'node:fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'node:path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + function mkdtemp( + prefix: string, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + } + /** + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 + */ + function mkdtempSync(prefix: string, options?: EncodingOption): string; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer; + interface DisposableTempDir extends Disposable { + /** + * The path of the created directory. + */ + path: string; + /** + * A function which removes the created directory. + */ + remove(): void; + /** + * The same as `remove`. + */ + [Symbol.dispose](): void; + } + /** + * Returns a disposable object whose `path` property holds the created directory + * path. When the object is disposed, the directory and its contents will be + * removed if it still exists. If the directory cannot be deleted, disposal will + * throw an error. The object has a `remove()` method which will perform the same + * task. + * + * + * + * For detailed information, see the documentation of `fs.mkdtemp()`. + * + * There is no callback-based version of this API because it is designed for use + * with the `using` syntax. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v24.4.0 + */ + function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir; + /** + * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 + */ + function readdir( + path: PathLike, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readdir( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdir( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options: + | "buffer" + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function __promisify__( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise[]>; + } + /** + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): string[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): NonSharedBuffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): string[] | NonSharedBuffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdirSync( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + function close(fd: number, callback?: NoParamCallback): void; + namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 + */ + function closeSync(fd: number): void; + /** + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + function open( + path: PathLike, + flags: OpenMode | undefined, + mode: Mode | undefined | null, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param [flags='r'] See `support of file system `flags``. + */ + function open( + path: PathLike, + flags: OpenMode | undefined, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; + } + /** + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] + */ + function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v0.4.2 + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 + */ + function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 + */ + function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 + */ + function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 + */ + function fsync(fd: number, callback: NoParamCallback): void; + namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 + */ + function fsyncSync(fd: number): void; + interface WriteOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `buffer.byteLength - offset` + */ + length?: number | undefined; + /** + * @default null + */ + position?: number | null | undefined; + } + /** + * Write `buffer` to the file specified by `fd`. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + function write( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param options An object with the following properties: + * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. + * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + buffer: TBuffer, + options: WriteOptions, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write( + fd: number, + string: string, + position: number | undefined | null, + encoding: BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + string: string, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + */ + function write( + fd: number, + string: string, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param options An object with the following properties: + * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. + * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + options?: WriteOptions, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + * @return The number of bytes written. + */ + function writeSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset?: number | null, + length?: number | null, + position?: number | null, + ): number; + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function writeSync( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): number; + type ReadPosition = number | bigint; + interface ReadOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + interface ReadOptionsWithBuffer extends ReadOptions { + buffer?: T | undefined; + } + /** + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 + * @param buffer The buffer that the data will be written to. + * @param offset The position in `buffer` to write the data to. + * @param length The number of bytes to read. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. + */ + function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + /** + * Similar to the above `fs.read` function, this version takes an optional `options` object. + * If not otherwise specified in an `options` object, + * `buffer` defaults to `Buffer.alloc(16384)`, + * `offset` defaults to `0`, + * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 + * `position` defaults to `null` + * @since v12.17.0, 13.11.0 + */ + function read( + fd: number, + options: ReadOptionsWithBuffer, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + buffer: TBuffer, + options: ReadOptions, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void, + ): void; + namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__( + fd: number, + options: ReadOptionsWithBuffer, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__(fd: number): Promise<{ + bytesRead: number; + buffer: NonSharedBuffer; + }>; + } + /** + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 + * @param [position='null'] + */ + function readSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset: number, + length: number, + position: ReadPosition | null, + ): number; + /** + * Similar to the above `fs.readSync` function, this version takes an optional `options` object. + * If no `options` object is specified, it will default with the above values. + */ + function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number; + interface ReadFileOptions extends Abortable { + encoding?: BufferEncoding | null | undefined; + flag?: OpenMode | undefined; + } + interface ReadFileOptionsWithStringEncoding extends ReadFileOptions { + encoding: BufferEncoding; + } + interface ReadFileOptionsWithBufferEncoding extends ReadFileOptions { + encoding?: null | undefined; + } + interface ReadFileOptionsWithBuffer extends ReadFileOptionsWithBufferEncoding { + buffer: T | ((size: number) => T); + } + /** + * Asynchronously reads the entire contents of a file. + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `buffer` is provided and no encoding is specified, the returned `Buffer` is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, the callback is + * called with an error. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and + * `fs.readFileSync()` is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * An example using the `buffer` option with a pre-allocated buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { readFile } from 'node:fs'; + * + * const buf = Buffer.alloc(16384); + * readFile('/path/to/file', { buffer: buf }, (err, data) => { + * if (err) throw err; + * console.log(data); // A view over `buf` containing only the bytes read + * }); + * ``` + * + * An example using the `buffer` option with a function returning a buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { readFile } from 'node:fs'; + * + * readFile('/path/to/file', { + * buffer: (size) => Buffer.alloc(size), + * }, (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * @since v0.1.29 + * @param path filename or file descriptor + */ + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithBuffer, + callback: (err: NodeJS.ErrnoException | null, data: BufferView) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithBufferEncoding | null | undefined, + callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithStringEncoding | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptions | BufferEncoding | null | undefined, + callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, + ): void; + namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null, + ): Promise; + } + interface ReadFileSyncOptions { + encoding?: BufferEncoding | null | undefined; + flag?: OpenMode | undefined; + } + interface ReadFileSyncOptionsWithStringEncoding extends ReadFileSyncOptions { + encoding: BufferEncoding; + } + interface ReadFileSyncOptionsWithBufferEncoding extends ReadFileSyncOptions { + encoding?: null | undefined; + } + interface ReadFileSyncOptionsWithBuffer + extends ReadFileSyncOptionsWithBufferEncoding + { + buffer: T | ((size: number) => T); + } + /** + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: `fs.readFile()`. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * If `buffer` is provided and no encoding is specified, the returned {Buffer} is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, an error will be + * thrown. + * + * Similar to `fs.readFile()`, when the path is a directory, the behavior of + * `fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + function readFileSync( + path: PathOrFileDescriptor, + options: ReadFileSyncOptionsWithBuffer, + ): BufferView; + function readFileSync( + path: PathOrFileDescriptor, + options?: ReadFileSyncOptionsWithBufferEncoding | null, + ): NonSharedBuffer; + function readFileSync( + path: PathOrFileDescriptor, + options: ReadFileSyncOptionsWithStringEncoding | BufferEncoding, + ): string; + function readFileSync(path: PathOrFileDescriptor, options: ReadFileSyncOptions): string | NonSharedBuffer; + type WriteFileOptions = + | ( + & ObjectEncodingOptions + & Abortable + & { + mode?: Mode | undefined; + flag?: string | undefined; + flush?: boolean | undefined; + } + ) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'node:fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + function writeFile( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function writeFile( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + callback: NoParamCallback, + ): void; + namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): Promise; + } + /** + * Returns `undefined`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + function writeFileSync( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + function appendFile( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; + namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__( + file: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): Promise; + } + /** + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'node:fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + function appendFileSync( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + interface WatchFileOptions { + bigint?: boolean | undefined; + persistent?: boolean | undefined; + interval?: number | undefined; + } + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint?: false | undefined; + }) + | undefined, + listener: StatsListener, + ): StatWatcher; + function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint: true; + }) + | undefined, + listener: BigIntStatsListener, + ): StatWatcher; + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; + /** + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` + */ + function unwatchFile(filename: PathLike, listener?: StatsListener): void; + function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; + type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean); + interface WatchOptions extends Abortable { + encoding?: BufferEncoding | "buffer" | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined; + } + interface WatchOptionsWithBufferEncoding extends WatchOptions { + encoding: "buffer"; + } + interface WatchOptionsWithStringEncoding extends WatchOptions { + encoding?: BufferEncoding | undefined; + } + type WatchEventType = "rename" | "change"; + type WatchListener = (event: WatchEventType, filename: T | null) => void; + type StatsListener = (curr: Stats, prev: Stats) => void; + type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener + */ + function watch( + filename: PathLike, + options?: WatchOptionsWithStringEncoding | BufferEncoding | null, + listener?: WatchListener, + ): FSWatcher; + function watch( + filename: PathLike, + options: WatchOptionsWithBufferEncoding | "buffer", + listener: WatchListener, + ): FSWatcher; + function watch( + filename: PathLike, + options: WatchOptions | BufferEncoding | "buffer" | null, + listener: WatchListener, + ): FSWatcher; + function watch(filename: PathLike, listener: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'node:fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won't be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. + */ + function exists(path: PathLike, callback: (exists: boolean) => void): void; + /** @deprecated */ + namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'node:fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 + */ + function existsSync(path: PathLike): boolean; + namespace constants { + // File Access Constants + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + // File Copy Constants + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + // File Open Constants + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + // File Type Constants + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + // File Mode Constants + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'node:fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file is readable and writable. + * access(file, constants.R_OK | constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + function access(path: PathLike, callback: NoParamCallback): void; + namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + /** + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and + * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'node:fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + function accessSync(path: PathLike, mode?: number): void; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + signal?: AbortSignal | null | undefined; + highWaterMark?: number | undefined; + } + interface FSImplementation { + open?: (...args: any[]) => any; + close?: (...args: any[]) => any; + } + interface CreateReadStreamFSImplementation extends FSImplementation { + read: (...args: any[]) => any; + } + interface CreateWriteStreamFSImplementation extends FSImplementation { + write: (...args: any[]) => any; + writev?: (...args: any[]) => any; + } + interface ReadStreamOptions extends StreamOptions { + fs?: CreateReadStreamFSImplementation | null | undefined; + end?: number | undefined; + } + interface WriteStreamOptions extends StreamOptions { + fs?: CreateWriteStreamFSImplementation | null | undefined; + flush?: boolean | undefined; + } + /** + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` option to be set to `r+` rather than the + * default `w`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 + */ + function fdatasync(fd: number, callback: NoParamCallback): void; + namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 + */ + function fdatasyncSync(fd: number): void; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'node:fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; + namespace copyFile { + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; + } + /** + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'node:fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] + */ + function writev( + fd: number, + buffers: TBuffers, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, + ): void; + function writev( + fd: number, + buffers: TBuffers, + position: number | null, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, + ): void; + // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 + // TODO: remove default in future major version + interface WriteVResult { + bytesWritten: number; + buffers: T; + } + namespace writev { + function __promisify__( + fd: number, + buffers: TBuffers, + position?: number, + ): Promise>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @param [position='null'] + * @return The number of bytes written. + */ + function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + */ + function readv( + fd: number, + buffers: TBuffers, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, + ): void; + function readv( + fd: number, + buffers: TBuffers, + position: number | null, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, + ): void; + // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 + // TODO: remove default in future major version + interface ReadVResult { + bytesRead: number; + buffers: T; + } + namespace readv { + function __promisify__( + fd: number, + buffers: TBuffers, + position?: number, + ): Promise>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + * @return The number of bytes read. + */ + function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + + interface OpenAsBlobOptions { + /** + * An optional mime type for the blob. + * + * @default 'undefined' + */ + type?: string | undefined; + } + + /** + * Returns a `Blob` whose data is backed by the given file. + * + * The file must not be modified after the `Blob` is created. Any modifications + * will cause reading the `Blob` data to fail with a `DOMException` error. + * Synchronous stat operations on the file when the `Blob` is created, and before + * each read in order to detect whether the file data has been modified on disk. + * + * ```js + * import { openAsBlob } from 'node:fs'; + * + * const blob = await openAsBlob('the.file.txt'); + * const ab = await blob.arrayBuffer(); + * blob.stream(); + * ``` + * @since v19.8.0 + */ + function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; + + interface OpenDirOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * Number of directory entries that are buffered + * internally when reading from the directory. Higher values lead to better + * performance but higher memory usage. + * @default 32 + */ + bufferSize?: number | undefined; + /** + * @default false + */ + recursive?: boolean | undefined; + } + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + function opendir( + path: PathLike, + options: OpenDirOptions, + cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, + ): void; + namespace opendir { + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; + } + interface BigIntStats extends StatsBase { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; + } + interface BigIntOptions { + bigint: true; + } + interface StatOptions { + // TODO: add signal option once we sort its behavior out upstream + bigint?: boolean | undefined; + throwIfNoEntry?: boolean | undefined; + } + /** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */ + interface StatSyncOptions extends StatOptions {} + interface CopyOptionsBase { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean | undefined; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean | undefined; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean | undefined; + /** + * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} + */ + mode?: number | undefined; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean | undefined; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean | undefined; + /** + * When true, path resolution for symlinks will be skipped + * @default false + */ + verbatimSymlinks?: boolean | undefined; + } + interface CopyOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?: ((source: string, destination: string) => boolean | Promise) | undefined; + } + interface CopySyncOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?: ((source: string, destination: string) => boolean) | undefined; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + function cp( + source: string | URL, + destination: string | URL, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + function cp( + source: string | URL, + destination: string | URL, + opts: CopyOptions, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; + interface GlobOptions { + /** + * Current working directory. + * @default process.cwd() + */ + cwd?: string | URL | undefined; + /** + * Function to filter out files/directories or a + * list of glob patterns to be excluded. If a function is provided, return + * `true` to exclude the item, `false` to include it. + * If a string array is provided, each string should be a glob pattern that + * specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are + * not supported. + * @default undefined + */ + exclude?: ((fileName: T) => boolean) | readonly string[] | undefined; + /** + * When `true`, symbolic links to directories are + * followed while expanding `**` patterns. + * @default false + */ + followSymlinks?: boolean | undefined; + /** + * `true` if the glob should return paths as `Dirent`s, `false` otherwise. + * @default false + * @since v22.2.0 + */ + withFileTypes?: boolean | undefined; + } + interface GlobOptionsWithFileTypes extends GlobOptions { + withFileTypes: true; + } + interface GlobOptionsWithoutFileTypes extends GlobOptions { + withFileTypes?: false | undefined; + } + + /** + * Retrieves the files matching the specified pattern. + * + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { glob } from 'node:fs'; + * + * glob('*.js', (err, matches) => { + * if (err) throw err; + * console.log(matches); + * }); + * ``` + * @since v22.0.0 + */ + function glob( + pattern: string | readonly string[], + callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + callback: ( + err: NodeJS.ErrnoException | null, + matches: Dirent[], + ) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + callback: ( + err: NodeJS.ErrnoException | null, + matches: string[], + ) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptions, + callback: ( + err: NodeJS.ErrnoException | null, + matches: Dirent[] | string[], + ) => void, + ): void; + /** + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { globSync } from 'node:fs'; + * + * console.log(globSync('*.js')); + * ``` + * @since v22.0.0 + * @returns paths of files that match the pattern. + */ + function globSync(pattern: string | readonly string[]): string[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + ): Dirent[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + ): string[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptions, + ): Dirent[] | string[]; +} +declare module "node:fs" { + export * as promises from "node:fs/promises"; +} +declare module "fs" { + export * from "node:fs"; +} diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts new file mode 100644 index 000000000..9366b971a --- /dev/null +++ b/node_modules/@types/node/fs/promises.d.ts @@ -0,0 +1,1477 @@ +declare module "node:fs/promises" { + import { BufferView, NonSharedBuffer } from "node:buffer"; + import { Abortable } from "node:events"; + import { Interface as ReadlineInterface } from "node:readline"; + import { + BigIntStats, + BigIntStatsFs, + BufferEncodingOption, + constants as fsConstants, + CopyOptions, + Dir, + Dirent, + EncodingOption, + GlobOptions, + GlobOptionsWithFileTypes, + GlobOptionsWithoutFileTypes, + MakeDirectoryOptions, + Mode, + ObjectEncodingOptions, + OpenDirOptions, + OpenMode, + PathLike, + ReadFileOptions, + ReadFileOptionsWithBuffer, + ReadFileOptionsWithBufferEncoding, + ReadFileOptionsWithStringEncoding, + ReadOptions, + ReadOptionsWithBuffer, + ReadPosition, + ReadStream, + ReadVResult, + RmOptions, + StatFsOptions, + StatOptions, + Stats, + StatsFs, + TimeLike, + WatchEventType, + WatchOptions as _WatchOptions, + WriteStream, + WriteVResult, + } from "node:fs"; + import { ByteReadableStream, Transform, Writer } from "node:stream/iter"; + import { ReadableStream } from "node:stream/web"; + interface FileChangeInfo { + eventType: WatchEventType; + filename: T | null; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */ + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: ReadPosition | null; + } + interface CreateReadStreamOptions extends Abortable { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + flush?: boolean | undefined; + } + interface ReadableWebStreamOptions { + autoClose?: boolean | undefined; + } + interface PullOptions extends Abortable { + /** + * Close the file handle when the stream ends. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to begin reading from. When specified, + * reads use explicit positioning (`pread` semantics). + */ + start?: number | undefined; + /** + * Maximum number of bytes to read before ending the + * iterator. Reads stop when `limit` bytes have been delivered or EOF is + * reached, whichever comes first. + */ + limit?: number | undefined; + /** + * Size in bytes of the buffer allocated for each + * read operation. + * @default 131072 + */ + chunkSize?: number | undefined; + } + interface WriterOptions { + /** + * Close the file handle when the writer ends or fails. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to start writing at. When specified, + * writes use explicit positioning. + */ + start?: number | undefined; + /** + * Maximum number of bytes the writer will accept. + * Async writes (`write()`, `writev()`) that would exceed the limit reject + * with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`) + * return `false`. + */ + limit?: number | undefined; + /** + * Maximum chunk size in bytes for synchronous write + * operations. Writes larger than this threshold fall back to async I/O. + * Set this to match the reader's `chunkSize` for optimal `pipeTo()` + * performance. + * @default 131072 + */ + chunkSize?: number | undefined; + } + // TODO: Add `EventEmitter` close + interface FileHandle { + /** + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 + */ + readonly fd: number; + /** + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + appendFile( + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. + */ + chown(uid: number, gid: number): Promise; + /** + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. + */ + chmod(mode: Mode): Promise; + /** + * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 KiB. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` `open` option to be set to `r+` rather than + * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + datasync(): Promise; + /** + * Return the file contents as an async iterable using the + * [`node:stream/iter`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte + * chunks (default 128 KB). If transforms are provided, they are applied + * via [`stream/iter pull()`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html#pullsource-transforms-options). + * + * The file handle is locked while the iterable is being consumed and unlocked + * when iteration completes, an error occurs, or the consumer breaks. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { text } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const fh = await open('input.txt', 'r'); + * + * // Read as text + * console.log(await text(fh.pull({ autoClose: true }))); + * + * // Read 1 KB starting at byte 100 + * const fh2 = await open('input.txt', 'r'); + * console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true }))); + * + * // Read with compression + * const fh3 = await open('input.txt', 'r'); + * const compressed = fh3.pull(compressGzip(), { autoClose: true }); + * ``` + * @since v25.9.0 + * @experimental + */ + pull(...transforms: Transform[]): ByteReadableStream; + pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + sync(): Promise; + /** + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. + * @param length The number of bytes to read. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: + */ + read( + buffer: T, + offset?: number | null, + length?: number | null, + position?: ReadPosition | null, + ): Promise>; + read( + buffer: T, + options?: ReadOptions, + ): Promise>; + read( + options?: ReadOptionsWithBuffer, + ): Promise>; + /** + * Returns a byte-oriented `ReadableStream` that may be used to read the file's + * contents. + * + * An error will be thrown if this method is called more than once or is called + * after the `FileHandle` is closed or closing. + * + * ```js + * import { + * open, + * } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const chunk of file.readableWebStream()) + * console.log(chunk); + * + * await file.close(); + * ``` + * + * While the `ReadableStream` will read the file to completion, it will not + * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. + * @since v17.0.0 + */ + readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * If `buffer` is provided and no encoding is specified, the returned {Buffer} is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, the operation will + * fail. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a + * `filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * + * An example using the `buffer` option with a pre-allocated buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * try { + * const buf = Buffer.alloc(16384); + * const contents = await file.readFile({ buffer: buf }); + * console.log(contents); // A view over `buf` containing only the bytes read + * } finally { + * await file.close(); + * } + * ``` + * + * An example using the `buffer` option with a function returning a buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * try { + * const contents = await file.readFile({ + * buffer: (size) => Buffer.alloc(size), + * }); + * console.log(contents); + * } finally { + * await file.close(); + * } + * ``` + * @since v10.0.0 + * @returns Fulfills upon a successful read with the contents of the + * file. If no encoding is specified (using `options.encoding`), the data is + * returned as a `Buffer` object. Otherwise, the data will be a string. + */ + readFile( + options: Omit, "flag">, + ): Promise>; + readFile(options?: Omit | null): Promise; + readFile(options: Omit | BufferEncoding): Promise; + readFile(options: Omit | BufferEncoding | null): Promise; + /** + * Convenience method to create a `readline` interface and stream over the file. + * See `filehandle.createReadStream()` for the options. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const line of file.readLines()) { + * console.log(line); + * } + * ``` + * @since v18.11.0 + */ + readLines(options?: CreateReadStreamOptions): ReadlineInterface; + /** + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. + */ + stat( + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + }, + ): Promise; + stat(opts?: StatOptions): Promise; + /** + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + truncate(len?: number): Promise; + /** + * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. + * @since v10.0.0 + */ + utimes(atime: TimeLike, mtime: TimeLike): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * The promise is fulfilled with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 + */ + writeFile( + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Write `buffer` to the file. + * + * The promise is fulfilled with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). For this + * scenario, use `filehandle.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param offset The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. + * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current + * position. See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + buffer: TBuffer, + options?: { offset?: number; length?: number; position?: number }, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + /** + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is fulfilled with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be fulfilled (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. + */ + writev( + buffers: TBuffers, + position?: number, + ): Promise>; + /** + * Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html) writer backed by this file handle. + * + * The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`: + * + * * `await using w = fh.writer()` — if the writer is still open (no `end()` + * called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits + * for it to complete. + * * `using w = fh.writer()` — calls `fail()` unconditionally. + * + * The `writeSync()` and `writevSync()` methods enable the try-sync fast path + * used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the + * writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete + * synchronously with zero promise overhead. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { from, pipeTo } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * // Async pipeline + * const fh = await open('output.gz', 'w'); + * await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true })); + * + * // Sync pipeline with limit + * const src = await open('input.txt', 'r'); + * const dst = await open('output.txt', 'w'); + * const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB + * await pipeTo(src.pull({ autoClose: true }), w); + * await w.end(); + * await dst.close(); + * ``` + * @since v25.9.0 + * @experimental + */ + writer(options?: WriterOptions): Writer; + /** + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: + */ + readv( + buffers: TBuffers, + position?: number, + ): Promise>; + /** + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + close(): Promise; + /** + * Calls `filehandle.close()` and returns a promise that fulfills when the + * filehandle is closed. + * @since v20.4.0, v18.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + const constants: typeof fsConstants; + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If the accessibility check is successful, the promise is fulfilled with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access, constants } from 'node:fs/promises'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. + */ + function access(path: PathLike, mode?: number): Promise; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { copyFile, constants } from 'node:fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. + */ + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; + /** + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. + */ + function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; + /** + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + /** + * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + function truncate(path: PathLike, len?: number): Promise; + /** + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rmdir(path: PathLike): Promise; + /** + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. + */ + function rm(path: PathLike, options?: RmOptions): Promise; + /** + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * + * ```js + * import { mkdir } from 'node:fs/promises'; + * + * try { + * const projectFolder = new URL('./test/project/', import.meta.url); + * const createDir = await mkdir(projectFolder, { recursive: true }); + * + * console.log(`created ${createDir}`); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + /** + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'node:fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdir( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise[]>; + /** + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * fulfilled with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options?: ObjectEncodingOptions | string | null, + ): Promise; + /** + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will + * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not + * exist, `'file'` will be used. Windows junction points require the destination + * path to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. Junction points on NTFS volumes + * can only point to directories. + * @since v10.0.0 + * @param [type='null'] + * @return Fulfills with `undefined` upon success. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + /** + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. + */ + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + }, + ): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. + */ + function stat(path: PathLike): Promise; + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v19.6.0, v18.15.0 + * @return Fulfills with the {fs.StatFs} object for the given `path`. + */ + function statfs( + path: PathLike, + opts?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function statfs( + path: PathLike, + opts: StatFsOptions & { + bigint: true; + }, + ): Promise; + function statfs(path: PathLike, opts?: StatFsOptions): Promise; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + /** + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function unlink(path: PathLike): Promise; + /** + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + /** + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs/promises'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * try { + * await mkdtemp(join(tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing + * platform-specific path separator + * (`import { sep } from 'node:path'`). + * @since v10.0.0 + * @return Fulfills with a string containing the file system path of the newly created temporary directory. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + interface DisposableTempDir extends AsyncDisposable { + /** + * The path of the created directory. + */ + path: string; + /** + * A function which removes the created directory. + */ + remove(): Promise; + /** + * The same as `remove`. + */ + [Symbol.asyncDispose](): Promise; + } + /** + * The resulting Promise holds an async-disposable object whose `path` property + * holds the created directory path. When the object is disposed, the directory + * and its contents will be removed asynchronously if it still exists. If the + * directory cannot be deleted, disposal will throw an error. The object has an + * async `remove()` method which will perform the same task. + * + * Both this function and the disposal function on the resulting object are + * async, so it should be used with `await` + `await using` as in + * `await using dir = await fsPromises.mkdtempDisposable('prefix')`. + * + * + * + * For detailed information, see the documentation of `fsPromises.mkdtemp()`. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v24.4.0 + */ + function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs/promises'; + * import { Buffer } from 'node:buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. + */ + function writeFile( + file: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + /** + * If all data is successfully written to the file, and `flush` + * is `true`, `filehandle.sync()` is used to flush the data. + * @default false + */ + flush?: boolean | undefined; + } & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. + */ + function appendFile( + path: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * An example of reading a `package.json` file located in the same directory of the + * running code: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * try { + * const filePath = new URL('./package.json', import.meta.url); + * const contents = await readFile(filePath, { encoding: 'utf8' }); + * console.log(contents); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. + */ + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptionsWithBuffer, + ): Promise>; + function readFile( + path: PathLike | FileHandle, + options?: ReadFileOptionsWithBufferEncoding | null, + ): Promise; + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptionsWithStringEncoding | BufferEncoding, + ): Promise; + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptions | BufferEncoding | null, + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + interface WatchOptions extends _WatchOptions { + maxQueue?: number | undefined; + overflow?: "ignore" | "throw" | undefined; + } + interface WatchOptionsWithBufferEncoding extends WatchOptions { + encoding: "buffer"; + } + interface WatchOptionsWithStringEncoding extends WatchOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * import { watch } from 'node:fs/promises'; + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0, v14.18.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options?: WatchOptionsWithStringEncoding | BufferEncoding, + ): NodeJS.AsyncIterator>; + function watch( + filename: PathLike, + options: WatchOptionsWithBufferEncoding | "buffer", + ): NodeJS.AsyncIterator>; + function watch( + filename: PathLike, + options: WatchOptions | BufferEncoding | "buffer", + ): NodeJS.AsyncIterator>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; + /** + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { glob } from 'node:fs/promises'; + * + * for await (const entry of glob('*.js')) + * console.log(entry); + * ``` + * @since v22.0.0 + * @returns An AsyncIterator that yields the paths of files + * that match the pattern. + */ + function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + ): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + ): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptions, + ): NodeJS.AsyncIterator; +} +declare module "fs/promises" { + export * from "node:fs/promises"; +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 000000000..0c2f0b09e --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,150 @@ +declare var global: typeof globalThis; + +declare var process: NodeJS.Process; + +interface ErrorConstructor { + /** + * Creates a `.stack` property on `targetObject`, which when accessed returns + * a string representing the location in the code at which + * `Error.captureStackTrace()` was called. + * + * ```js + * const myObject = {}; + * Error.captureStackTrace(myObject); + * myObject.stack; // Similar to `new Error().stack` + * ``` + * + * The first line of the trace will be prefixed with + * `${myObject.name}: ${myObject.message}`. + * + * The optional `constructorOpt` argument accepts a function. If given, all frames + * above `constructorOpt`, including `constructorOpt`, will be omitted from the + * generated stack trace. + * + * The `constructorOpt` argument is useful for hiding implementation + * details of error generation from the user. For instance: + * + * ```js + * function a() { + * b(); + * } + * + * function b() { + * c(); + * } + * + * function c() { + * // Create an error without stack trace to avoid calculating the stack trace twice. + * const { stackTraceLimit } = Error; + * Error.stackTraceLimit = 0; + * const error = new Error(); + * Error.stackTraceLimit = stackTraceLimit; + * + * // Capture the stack trace above function b + * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace + * throw error; + * } + * + * a(); + * ``` + */ + captureStackTrace(targetObject: object, constructorOpt?: Function): void; + /** + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces + */ + prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any; + /** + * The `Error.stackTraceLimit` property specifies the number of stack frames + * collected by a stack trace (whether generated by `new Error().stack` or + * `Error.captureStackTrace(obj)`). + * + * The default value is `10` but may be set to any valid JavaScript number. Changes + * will affect any stack trace captured _after_ the value has been changed. + * + * If set to a non-number value, or set to a negative number, stack traces will + * not capture any frames. + */ + stackTraceLimit: number; +} + +/** + * Enable this API with the `--expose-gc` CLI flag. + */ +declare var gc: NodeJS.GCFunction | undefined; + +declare namespace NodeJS { + interface CallSite { + getColumnNumber(): number | null; + getEnclosingColumnNumber(): number | null; + getEnclosingLineNumber(): number | null; + getEvalOrigin(): string | undefined; + getFileName(): string | null; + getFunction(): Function | undefined; + getFunctionName(): string | null; + getLineNumber(): number | null; + getMethodName(): string | null; + getPosition(): number; + getPromiseIndex(): number | null; + getScriptHash(): string; + getScriptNameOrSourceURL(): string | null; + getThis(): unknown; + getTypeName(): string | null; + isAsync(): boolean; + isConstructor(): boolean; + isEval(): boolean; + isNative(): boolean; + isPromiseAll(): boolean; + isToplevel(): boolean; + } + + interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + } + + interface RefCounted { + ref(): this; + unref(): this; + } + + interface Dict { + [key: string]: T | undefined; + } + + interface ReadOnlyDict { + readonly [key: string]: T | undefined; + } + + type PartialOptions = { [K in keyof T]?: T[K] | undefined }; + + interface GCFunction { + (minor?: boolean): void; + (options: NodeJS.GCOptions & { execution: "async" }): Promise; + (options: NodeJS.GCOptions): void; + } + + interface GCOptions { + execution?: "sync" | "async" | undefined; + flavor?: "regular" | "last-resort" | undefined; + type?: "major-snapshot" | "major" | "minor" | undefined; + filename?: string | undefined; + } + + /** An iterable iterator returned by the Node.js API. */ + interface Iterator extends IteratorObject { + [Symbol.iterator](): NodeJS.Iterator; + } + + /** An async iterable iterator returned by the Node.js API. */ + interface AsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + } + + /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */ + type BufferSource = NonSharedArrayBufferView | ArrayBuffer; + + /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */ + type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike; +} diff --git a/node_modules/@types/node/globals.typedarray.d.ts b/node_modules/@types/node/globals.typedarray.d.ts new file mode 100644 index 000000000..e69dd0cd8 --- /dev/null +++ b/node_modules/@types/node/globals.typedarray.d.ts @@ -0,0 +1,101 @@ +export {}; // Make this a module + +declare global { + namespace NodeJS { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float16Array + | Float32Array + | Float64Array; + type ArrayBufferView = + | TypedArray + | DataView; + + // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node + // while maintaining compatibility with TS <=5.6. + // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types. + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint8Array = Uint8Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint8ClampedArray = Uint8ClampedArray; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint16Array = Uint16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint32Array = Uint32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt8Array = Int8Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt16Array = Int16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt32Array = Int32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBigUint64Array = BigUint64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBigInt64Array = BigInt64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat16Array = Float16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat32Array = Float32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat64Array = Float64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedDataView = DataView; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedTypedArray = TypedArray; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedArrayBufferView = ArrayBufferView; + } +} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 000000000..73a7024da --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,2218 @@ +declare module "node:http" { + import { NonSharedBuffer } from "node:buffer"; + import { LookupOptions } from "node:dns"; + import { EventEmitter } from "node:events"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import { URL } from "node:url"; + // incoming headers will never contain number + interface IncomingHttpHeaders extends NodeJS.Dict { + accept?: string | undefined; + "accept-encoding"?: string | undefined; + "accept-language"?: string | undefined; + "accept-patch"?: string | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + "alt-svc"?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + connection?: string | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + "proxy-authenticate"?: string | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "retry-after"?: string | undefined; + "sec-fetch-site"?: string | undefined; + "sec-fetch-mode"?: string | undefined; + "sec-fetch-user"?: string | undefined; + "sec-fetch-dest"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | undefined; + "sec-websocket-version"?: string | undefined; + "set-cookie"?: string[] | undefined; + "strict-transport-security"?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + upgrade?: string | undefined; + "user-agent"?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + "www-authenticate"?: string | undefined; + } + // outgoing headers allows numbers (as they are converted internally to strings) + type OutgoingHttpHeader = number | string | string[]; + interface OutgoingHttpHeaders extends NodeJS.Dict { + accept?: string | string[] | undefined; + "accept-charset"?: string | string[] | undefined; + "accept-encoding"?: string | string[] | undefined; + "accept-language"?: string | string[] | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + "cdn-cache-control"?: string | undefined; + connection?: string | string[] | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | number | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-security-policy"?: string | undefined; + "content-security-policy-report-only"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | string[] | undefined; + dav?: string | string[] | undefined; + dnt?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-range"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + link?: string | string[] | undefined; + location?: string | undefined; + "max-forwards"?: string | undefined; + origin?: string | undefined; + pragma?: string | string[] | undefined; + "proxy-authenticate"?: string | string[] | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + "public-key-pins-report-only"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "referrer-policy"?: string | undefined; + refresh?: string | undefined; + "retry-after"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | string[] | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | string[] | undefined; + "sec-websocket-version"?: string | undefined; + server?: string | undefined; + "set-cookie"?: string | string[] | undefined; + "strict-transport-security"?: string | undefined; + te?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + "user-agent"?: string | undefined; + upgrade?: string | undefined; + "upgrade-insecure-requests"?: string | undefined; + vary?: string | undefined; + via?: string | string[] | undefined; + warning?: string | undefined; + "www-authenticate"?: string | string[] | undefined; + "x-content-type-options"?: string | undefined; + "x-dns-prefetch-control"?: string | undefined; + "x-frame-options"?: string | undefined; + "x-xss-protection"?: string | undefined; + } + interface ClientRequestArgs extends Pick { + _defaultAgent?: Agent | undefined; + agent?: Agent | boolean | undefined; + auth?: string | null | undefined; + createConnection?: + | (( + options: ClientRequestArgs, + oncreate: (err: Error | null, socket: stream.Duplex) => void, + ) => stream.Duplex | null | undefined) + | undefined; + defaultPort?: number | string | undefined; + family?: number | undefined; + headers?: OutgoingHttpHeaders | readonly string[] | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + httpValidation?: "strict" | "relaxed" | "insecure" | undefined; + insecureHTTPParser?: boolean | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + lookup?: net.LookupFunction | undefined; + /** + * @default 16384 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + port?: number | string | null | undefined; + protocol?: string | null | undefined; + setDefaultHeaders?: boolean | undefined; + setHost?: boolean | undefined; + signal?: AbortSignal | undefined; + socketPath?: string | undefined; + timeout?: number | undefined; + uniqueHeaders?: Array | undefined; + joinDuplicateHeaders?: boolean | undefined; + } + interface ServerOptions< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > { + /** + * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. + */ + IncomingMessage?: Request | undefined; + /** + * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. + */ + ServerResponse?: Response | undefined; + /** + * Sets the timeout value in milliseconds for receiving the entire request from the client. + * @see Server.requestTimeout for more information. + * @default 300000 + * @since v18.0.0 + */ + requestTimeout?: number | undefined; + /** + * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. + * @default false + * @since v18.14.0 + */ + joinDuplicateHeaders?: boolean | undefined; + /** + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * @see Server.keepAliveTimeout for more information. + * @default 65000 + * @since v18.0.0 + */ + keepAliveTimeout?: number | undefined; + /** + * An additional buffer time added to the + * `server.keepAliveTimeout` to extend the internal socket timeout. + * @since 24.6.0 + * @default 1000 + */ + keepAliveTimeoutBuffer?: number | undefined; + /** + * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. + * @default 30000 + */ + connectionsCheckingInterval?: number | undefined; + /** + * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. + * See {@link Server.headersTimeout} for more information. + * @default 60000 + * @since 18.0.0 + */ + headersTimeout?: number | undefined; + /** + * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. + * Default: @see stream.getDefaultHighWaterMark(). + * @since v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * Controls HTTP header value validation strictness + * for incoming requests. Accepted values are: + * * `'strict'`: Strictest validation; rejects any non-ASCII or control + * characters in header values. + * * `'relaxed'`: Allows a limited set of non-ASCII characters in header + * values, aligning with the + * [Fetch specification](https://fetch.spec.whatwg.org/). + * * `'insecure'`: Disables all header value validation (equivalent to + * `insecureHTTPParser: true`). + * + * Cannot be used together with `insecureHTTPParser`. **Default:** `'strict'`. + * @since v26.3.0 + */ + httpValidation?: "strict" | "relaxed" | "insecure" | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. + * Using the insecure parser should be avoided. + * See --insecure-http-parser for more information. + * @default false + */ + insecureHTTPParser?: boolean | undefined; + /** + * Optionally overrides the value of `--max-http-header-size` for requests received by + * this server, i.e. the maximum length of request headers in bytes. + * @default 16384 + * @since v13.3.0 + */ + maxHeaderSize?: number | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default true + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code + * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). + * @default true + * @since 20.0.0 + */ + requireHostHeader?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive()`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * A list of response headers that should be sent only once. + * If the header's value is an array, the items will be joined using `; `. + */ + uniqueHeaders?: Array | undefined; + /** + * A callback which receives an + * incoming request and returns a boolean, to control which upgrade attempts + * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or + * their sockets will be destroyed, if no listener is registered) while + * rejected upgrades will fire a `'request'` event like any non-upgrade + * request. + * @since v24.9.0 + * @default () => server.listenerCount('upgrade') > 0 + */ + shouldUpgradeCallback?: ((request: InstanceType) => boolean) | undefined; + /** + * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body. + * @default false + * @since v18.17.0, v20.2.0 + */ + rejectNonStandardBodyWrites?: boolean | undefined; + /** + * If set to `true`, requests without `Content-Length` + * or `Transfer-Encoding` headers (indicating no body) will be initialized with an + * already-ended body stream, so they will never emit any stream events + * (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case. + * @since v25.1.0 + * @default false + */ + optimizeEmptyRequests?: boolean | undefined; + } + type RequestListener< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > = (request: InstanceType, response: InstanceType & { req: InstanceType }) => void; + interface ServerEventMap< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > extends net.ServerEventMap { + "checkContinue": Parameters>; + "checkExpectation": Parameters>; + "clientError": [exception: Error, socket: stream.Duplex]; + "connect": [request: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; + "connection": [socket: net.Socket]; + "dropRequest": [request: InstanceType, socket: stream.Duplex]; + "request": Parameters>; + "upgrade": [req: InstanceType, stream: stream.Duplex, head: NonSharedBuffer]; + } + /** + * @since v0.1.17 + */ + class Server< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > extends net.Server { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ + setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this; + setTimeout(callback: (socket: net.Socket) => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @since v0.7.0 + */ + maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v11.3.0, v10.14.0 + */ + headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. + * + * This timeout value is combined with the + * `server.keepAliveTimeoutBuffer` option to determine the actual socket + * timeout, calculated as: + * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer + * If the server receives new data before the keep-alive timeout has fired, it + * will reset the regular inactivity timeout, i.e., `server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the HTTP server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ + keepAliveTimeout: number; + /** + * An additional buffer time added to the + * `server.keepAliveTimeout` to extend the internal socket timeout. + * + * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing + * the socket timeout slightly beyond the advertised keep-alive timeout. + * + * This option applies only to new incoming connections. + * @since v24.6.0 + * @default 1000 + */ + keepAliveTimeoutBuffer: number; + /** + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 + */ + requestTimeout: number; + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request + * or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface OutgoingMessageEventMap extends stream.WritableEventMap { + "prefinish": []; + } + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from + * the perspective of the participants of an HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + constructor(); + readonly req: Request; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + /** + * @deprecated Use `writableEnded` instead. + */ + finished: boolean; + /** + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 + */ + readonly headersSent: boolean; + /** + * Alias of `outgoingMessage.socket`. + * @since v0.3.0 + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. + */ + readonly connection: net.Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: net.Socket | null; + /** + * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * Sets a single header value. If the header already exists in the to-be-sent + * headers, its value will be replaced. Use an array of strings to send multiple + * headers with the same name. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | readonly string[]): this; + /** + * Sets multiple header values for implicit headers. headers must be an instance of + * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its + * value will be replaced. + * + * ```js + * const headers = new Headers({ foo: 'bar' }); + * outgoingMessage.setHeaders(headers); + * ``` + * + * or + * + * ```js + * const headers = new Map([['foo', 'bar']]); + * outgoingMessage.setHeaders(headers); + * ``` + * + * When headers have been set with `outgoingMessage.setHeaders()`, they will be + * merged with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * const headers = new Headers({ 'Content-Type': 'text/html' }); + * res.setHeaders(headers); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * @since v19.6.0, v18.15.0 + * @param name Header name + * @param value Header value + */ + setHeaders(headers: Headers | Map): this; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple + * times. + * + * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. + * + * Depending of the value of `options.uniqueHeaders` when the client request or the + * server were created, this will end up in the header being sent multiple times or + * a single time with values joined using `; `. + * @since v18.3.0, v16.17.0 + * @param name Header name + * @param value Header value + */ + appendHeader(name: string, value: string | readonly string[]): this; + /** + * Gets the value of the HTTP header with the given name. If that header is not + * set, the returned value will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ + getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript `Object`. This means that + * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v7.7.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All names are lowercase. + * @since v7.7.0 + */ + getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v7.7.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + * @param name Header name + */ + removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers will **only** be emitted if the message is chunked encoded. If not, + * the trailers will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header field names in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ + addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Flushes the message headers. + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. + * @since v1.6.0 + */ + flushHeaders(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: OutgoingMessageEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: OutgoingMessageEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: OutgoingMessageEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ + statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ + statusMessage: string; + /** + * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. + * Mismatching the `Content-Length` header value will result + * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * @since v18.10.0, v16.18.0 + */ + strictContentLength: boolean; + constructor(req: Request); + assignSocket(socket: net.Socket): void; + detachSocket(socket: net.Socket): void; + /** + * Sends an HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on `Server`. + * @since v0.3.0 + */ + writeContinue(callback?: () => void): void; + /** + * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. The optional `callback` argument will be called when + * the response message has been written. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics', + * }); + * + * const earlyHintsCallback = () => console.log('early hints message sent'); + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }, earlyHintsCallback); + * ``` + * @since v18.11.0 + * @param hints An object containing the values of headers + * @param callback Will be called when the response message has been written + */ + writeEarlyHints(hints: Record, callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain', + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * will check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `Error` being thrown. + * @since v0.1.30 + */ + writeHead( + statusCode: number, + statusMessage?: string, + headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], + ): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends an arbitrary HTTP/1.1 1xx informational response to the client. This + * is a generic equivalent of `response.writeContinue()`, + * `response.writeProcessing()` and `response.writeEarlyHints()`, and + * can be called multiple times before the final response. After the final + * response headers have been sent (via `response.writeHead()` or an + * implicit header), calling this method throws `ERR_HTTP_HEADERS_SENT`. + * + * Clients receive these responses via the [`'information'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-information) + * event on `http.ClientRequest`. + * + * ```js + * response.writeInformation(110, { 'X-Progress': '50%' }); + * ``` + * @since v26.2.0 + * @param statusCode An HTTP 1xx informational status code, between `100` + * and `199` inclusive, excluding `101` (Switching Protocols) which is only + * available through the [`'upgrade'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-upgrade) event. + * @param headers An optional set of headers to send with the + * informational response. Accepts the same shapes as + * `response.writeHead()`. + * @param callback Optional, called once the message has been written + * to the socket. + */ + writeInformation( + statusCode: number, + headers?: OutgoingHttpHeaders | readonly string[], + callback?: () => void, + ): void; + writeInformation(statusCode: number, callback: () => void): void; + /** + * Sends a HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ + writeProcessing(callback?: () => void): void; + } + interface InformationEvent { + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + statusCode: number; + statusMessage: string; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + interface ClientRequestEventMap extends stream.WritableEventMap { + /** @deprecated Listen for the `'close'` event instead. */ + "abort": []; + "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; + "continue": []; + "information": [info: InformationEvent]; + "response": [response: IncomingMessage]; + "socket": [socket: net.Socket]; + "timeout": []; + "upgrade": [response: IncomingMessage, stream: net.Socket, head: NonSharedBuffer]; + } + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. + * + * Set `Content-Length` header to limit the response body size. + * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, + * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * + * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. + * @since v0.1.17 + */ + class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. + */ + aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ + host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ + protocol: string; + /** + * When sending request through a keep-alive enabled agent, the underlying socket + * might be reused. But if server closes connection at unfortunate time, client + * may run into a 'ECONNRESET' error. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * // Server has a 5 seconds keep-alive timeout by default + * http + * .createServer((req, res) => { + * res.write('hello\n'); + * res.end(); + * }) + * .listen(3000); + * + * setInterval(() => { + * // Adapting a keep-alive agent + * http.get('http://localhost:3000', { agent }, (res) => { + * res.on('data', (data) => { + * // Do nothing + * }); + * }); + * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout + * ``` + * + * By marking a request whether it reused socket or not, we can do + * automatic error retry base on it. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * function retriableRequest() { + * const req = http + * .get('http://localhost:3000', { agent }, (res) => { + * // ... + * }) + * .on('error', (err) => { + * // Check if retry is needed + * if (req.reusedSocket && err.code === 'ECONNRESET') { + * retriableRequest(); + * } + * }); + * } + * + * retriableRequest(); + * ``` + * @since v13.0.0, v12.16.0 + */ + reusedSocket: boolean; + /** + * Limits maximum response headers count. If set to 0, no limit will be applied. + */ + maxHeadersCount: number; + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + /** + * The request method. + * @since v0.1.97 + */ + method: string; + /** + * The request path. + * @since v0.4.0 + */ + path: string; + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ + abort(): void; + onSocket(socket: net.Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ + setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0, v14.17.0 + */ + getRawHeaderNames(): string[]; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientRequestEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientRequestEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientRequestEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface IncomingMessageEventMap extends stream.ReadableEventMap { + /** @deprecated Listen for `'close'` event instead. */ + "aborted": []; + } + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers, and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ + class IncomingMessage extends stream.Readable { + constructor(socket: net.Socket); + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. + */ + aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v0.1.1 + */ + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST', + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ + complete: boolean; + /** + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. + */ + connection: net.Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket` or internally nulled. + * @since v0.3.0 + */ + socket: net.Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. + * To allow duplicate values of the headers listed above to be joined, + * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more + * information. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with `; `. + * * For all other headers, the values are joined together with `, `. + * @since v0.1.5 + */ + headers: IncomingHttpHeaders; + /** + * Similar to `message.headers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': ['curl/7.22.0'], + * // host: ['127.0.0.1:8000'], + * // accept: ['*'] } + * console.log(request.headersDistinct); + * ``` + * @since v18.3.0, v16.17.0 + */ + headersDistinct: NodeJS.Dict; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ + rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ + trailers: NodeJS.Dict; + /** + * Similar to `message.trailers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * Only populated at the `'end'` event. + * @since v18.3.0, v16.17.0 + */ + trailersDistinct: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ + rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * An `AbortSignal` that is aborted when the underlying socket closes or the + * request is destroyed. The signal is created lazily on first access — no + * `AbortController` is allocated for requests that never use this property. + * + * This is useful for cancelling downstream asynchronous work such as database + * queries or `fetch` calls when a client disconnects mid-request. + * + * ```js + * import http from 'node:http'; + * + * http.createServer(async (req, res) => { + * try { + * const data = await fetch('https://example.com/api', { signal: req.signal }); + * res.end(JSON.stringify(await data.json())); + * } catch (err) { + * if (err.name === 'AbortError') return; + * res.statusCode = 500; + * res.end('Internal Server Error'); + * } + * }).listen(3000); + * ``` + * @since v26.1.0 + */ + readonly signal: AbortSignal; + /** + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: + * + * ```console + * $ node + * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); + * URL { + * href: 'http://localhost/status?name=ryan', + * origin: 'http://localhost', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost', + * hostname: 'localhost', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * + * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper + * validation is used, as clients may specify a custom `Host` header. + * @since v0.1.90 + */ + url?: string | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 + */ + statusCode?: number | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 + */ + statusMessage?: string | undefined; + /** + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 + */ + destroy(error?: Error): this; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: IncomingMessageEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: IncomingMessageEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: IncomingMessageEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: IncomingMessageEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ProxyEnv extends NodeJS.ProcessEnv { + HTTP_PROXY?: string | undefined; + HTTPS_PROXY?: string | undefined; + NO_PROXY?: string | undefined; + http_proxy?: string | undefined; + https_proxy?: string | undefined; + no_proxy?: string | undefined; + } + interface AgentOptions extends NodeJS.PartialOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean | undefined; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number | undefined; + /** + * Milliseconds to subtract from + * the server-provided `keep-alive: timeout=...` hint when determining socket + * expiration time. This buffer helps ensure the agent closes the socket + * slightly before the server does, reducing the chance of sending a request + * on a socket that’s about to be closed by the server. + * @since v24.7.0 + * @default 1000 + */ + agentKeepAliveTimeoutBuffer?: number | undefined; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number | undefined; + /** + * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. + */ + maxTotalSockets?: number | undefined; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number | undefined; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number | undefined; + /** + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` + */ + scheduling?: "fifo" | "lifo" | undefined; + /** + * Environment variables for proxy configuration. See + * [Built-in Proxy Support](https://nodejs.org/docs/latest-v26.x/api/http.html#built-in-proxy-support) for details. + * @since v24.5.0 + */ + proxyEnv?: ProxyEnv | undefined; + /** + * Default port to use when the port is not specified in requests. + * @since v24.5.0 + */ + defaultPort?: number | undefined; + /** + * The protocol to use for the agent. + * @since v24.5.0 + */ + protocol?: string | undefined; + } + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false, // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * + * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v26.x/api/net.html#socketconnectoptions-connectlistener) are also supported. + * + * To configure any of them, a custom {@link Agent} instance must be created. + * + * ```js + * import http from 'node:http'; + * const keepAliveAgent = new http.Agent({ keepAlive: true }); + * options.agent = keepAliveAgent; + * http.request(options, onResponseCallback) + * ``` + * @since v0.3.4 + */ + class Agent extends EventEmitter { + /** + * By default set to 256. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ + maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ + maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ + maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ + readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ + readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ + readonly requests: NodeJS.ReadOnlyDict; + constructor(opts?: AgentOptions); + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 + */ + destroy(): void; + /** + * Produces a socket/stream to be used for HTTP requests. + * + * By default, this function behaves identically to `net.createConnection()`, + * synchronously returning the created socket. The optional `callback` parameter in the + * signature is **not** used by this default implementation. + * + * However, custom agents may override this method to provide greater flexibility, + * for example, to create sockets asynchronously. When overriding `createConnection`: + * + * 1. **Synchronous socket creation**: The overriding method can return the + * socket/stream directly. + * 2. **Asynchronous socket creation**: The overriding method can accept the `callback` + * and pass the created socket/stream to it (e.g., `callback(null, newSocket)`). + * If an error occurs during socket creation, it should be passed as the first + * argument to the `callback` (e.g., `callback(err)`). + * + * The agent will call the provided `createConnection` function with `options` and + * this internal `callback`. The `callback` provided by the agent has a signature + * of `(err, stream)`. + * @since v0.11.4 + * @param options Options containing connection details. Check + * `net.createConnection` for the format of the options. For custom agents, + * this object is passed to the custom `createConnection` function. + * @param callback (Optional, primarily for custom agents) A function to be + * called by a custom `createConnection` implementation when the socket is + * created, especially for asynchronous operations. + * @returns The created socket. This is returned by the default + * implementation or by a custom synchronous `createConnection` implementation. + * If a custom `createConnection` uses the `callback` for asynchronous + * operation, this return value might not be the primary way to obtain the socket. + */ + createConnection( + options: ClientRequestArgs, + callback?: (err: Error | null, stream: stream.Duplex) => void, + ): stream.Duplex | null | undefined; + /** + * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to: + * + * ```js + * socket.setKeepAlive(true, this.keepAliveMsecs); + * socket.unref(); + * return true; + * ``` + * + * This method can be overridden by a particular `Agent` subclass. If this + * method returns a falsy value, the socket will be destroyed instead of persisting + * it for use with the next request. + * + * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. + * @since v8.1.0 + */ + keepSocketAlive(socket: stream.Duplex): void; + /** + * Called when `socket` is attached to `request` after being persisted because of + * the keep-alive options. Default behavior is to: + * + * ```js + * socket.ref(); + * ``` + * + * This method can be overridden by a particular `Agent` subclass. + * + * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. + * @since v8.1.0 + */ + reuseSocket(socket: stream.Duplex, request: ClientRequest): void; + /** + * Get a unique name for a set of request options, to determine whether a + * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent, + * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options + * that determine socket reusability. + * @since v0.11.4 + * @param options A set of options providing information for name generation + */ + getName(options?: ClientRequestArgs): string; + } + const METHODS: string[]; + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer(); + * + * // Listen to the request event + * server.on('request', (request, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.1.13 + */ + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + >(requestListener?: RequestListener): Server; + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + >( + options: ServerOptions, + requestListener?: RequestListener, + ): Server; + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs {} + /** + * `options` in `socket.connect()` are also supported. + * + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import http from 'node:http'; + * import { Buffer } from 'node:buffer'; + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!', + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData), + * }, + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'close'` + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'close'` + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the + * request. Specifically, the `'error'` event will be emitted with an error with + * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. + * @since v0.3.6 + */ + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: IncomingMessage) => void, + ): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to + * consume the response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. + */ + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + /** + * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. + * + * Passing illegal value as `name` will result in a `TypeError` being thrown, + * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Example: + * + * ```js + * import { validateHeaderName } from 'node:http'; + * + * try { + * validateHeaderName(''); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' + * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' + * } + * ``` + * @since v14.3.0 + * @param [label='Header name'] Label for error message. + */ + function validateHeaderName(name: string): void; + /** + * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. + * + * Passing illegal value as `value` will result in a `TypeError` being thrown. + * + * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. + * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Examples: + * + * ```js + * import { validateHeaderValue } from 'node:http'; + * + * try { + * validateHeaderValue('x-my-header', undefined); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true + * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' + * } + * + * try { + * validateHeaderValue('x-my-header', 'oʊmɪɡə'); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true + * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' + * } + * ``` + * @since v14.3.0 + * @param name Header name + * @param value Header value + */ + function validateHeaderValue(name: string, value: string): void; + /** + * Set the maximum number of idle HTTP parsers. + * @since v18.8.0, v16.18.0 + * @param [max=1000] + */ + function setMaxIdleHTTPParsers(max: number): void; + /** + * Dynamically resets the global configurations to enable built-in proxy support for + * `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative + * to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable. + * It can also be used to override settings configured from the environment variables. + * + * As this function resets the global configurations, any previously configured + * `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be + * overridden after this function is invoked. It's recommended to invoke it before any + * requests are made and avoid invoking it in the middle of any requests. + * + * See [Built-in Proxy Support](https://nodejs.org/docs/latest-v26.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY` + * syntax. + * @since v25.4.0 + * @param proxyEnv An object containing proxy configuration. This accepts the + * same options as the `proxyEnv` option accepted by {@link Agent}. **Default:** + * `process.env`. + * @returns A function that restores the original agent and dispatcher + * settings to the state before this `http.setGlobalProxyFromEnv()` is invoked. + */ + function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void; + /** + * Global instance of `Agent` which is used as the default for all HTTP client + * requests. Diverges from a default `Agent` configuration by having `keepAlive` + * enabled and a `timeout` of 5 seconds. + * @since v0.5.9 + */ + let globalAgent: Agent; + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. + */ + const maxHeaderSize: number; + /** + * A browser-compatible implementation of `WebSocket`. + * @since v22.5.0 + */ + const WebSocket: typeof import("undici-types").WebSocket; + /** + * @since v22.5.0 + */ + const CloseEvent: typeof import("undici-types").CloseEvent; + /** + * @since v22.5.0 + */ + const MessageEvent: typeof import("undici-types").MessageEvent; +} +declare module "http" { + export * from "node:http"; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 000000000..1899b0ef6 --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,2498 @@ +declare module "node:http2" { + import { NonSharedBuffer } from "node:buffer"; + import { InternalEventEmitter } from "node:events"; + import * as fs from "node:fs"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import * as tls from "node:tls"; + import * as url from "node:url"; + import { + IncomingHttpHeaders as Http1IncomingHttpHeaders, + IncomingMessage, + OutgoingHttpHeaders, + ServerResponse, + } from "node:http"; + interface IncomingHttpStatusHeader { + ":status"?: number | undefined; + } + interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string | undefined; + ":method"?: string | undefined; + ":authority"?: string | undefined; + ":scheme"?: string | undefined; + ":protocol"?: string | undefined; + } + // Http2Stream + interface StreamState { + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + /** @deprecated */ + sumDependencyWeight?: number | undefined; + /** @deprecated */ + weight?: number | undefined; + } + interface ServerStreamResponseOptions { + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; + } + interface StatOptions { + offset: number; + length: number; + } + interface ServerStreamFileResponseOptions { + statCheck?: + | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void) + | undefined; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; + } + interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?: ((err: NodeJS.ErrnoException) => void) | undefined; + } + interface Http2StreamEventMap extends stream.DuplexEventMap { + "aborted": []; + "data": [chunk: string | NonSharedBuffer]; + "frameError": [type: number, code: number, id: number]; + "ready": []; + "streamClosed": [code: number]; + "timeout": []; + "trailers": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + "wantTrailers": []; + } + interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ + readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ + readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Set to `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 + */ + readonly endAfterHeaders: boolean; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ + readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ + readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentHeaders: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ + readonly session: Http2Session | undefined; + /** + * Provides miscellaneous information about the current state of the `Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ + readonly state: StreamState; + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ + close(code?: number, callback?: () => void): void; + /** + * @deprecated Priority signaling is no longer supported in Node.js. + */ + priority(options: unknown): void; + /** + * ```js + * import http2 from 'node:http2'; + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ + sendTrailers(headers: OutgoingHttpHeaders): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: Http2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: Http2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ClientHttp2StreamEventMap extends Http2StreamEventMap { + "continue": []; + "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; + "push": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; + } + interface ClientHttp2Stream extends Http2Stream { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientHttp2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ + readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ + additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ + pushStream( + headers: OutgoingHttpHeaders, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + pushStream( + headers: OutgoingHttpHeaders, + options?: Pick, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + /** + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ + respond(headers?: OutgoingHttpHeaders | readonly string[], options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will + * perform an `fs.fstat()` call to collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to send trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` + * or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ + respondWithFD( + fd: number | fs.promises.FileHandle, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptions, + ): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an + * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.error(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate `304` response: + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to send trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ + respondWithFile( + path: string, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptionsWithError, + ): void; + } + // Http2Session + interface Settings { + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; + customSettings?: { [key: number]: number }; + } + interface ClientSessionRequestOptions { + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + waitForTrailers?: boolean | undefined; + signal?: AbortSignal | undefined; + } + interface SessionState { + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; + } + interface Http2SessionEventMap { + "close": []; + "connect": [session: Http2Session, socket: net.Socket | tls.TLSSocket]; + "error": [err: Error]; + "frameError": [type: number, code: number, id: number]; + "goaway": [errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer]; + "localSettings": [settings: Settings]; + "ping": [payload: Buffer]; + "remoteSettings": [settings: Settings]; + "stream": [ + stream: Http2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + rawHeaders: string[], + ]; + "timeout": []; + } + interface Http2Session extends InternalEventEmitter { + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. + * @since v10.0.0 + */ + readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this `Http2Session`. + * The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ + readonly localSettings: Settings; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. + * Will be `false` once all sent `SETTINGS` frames have been acknowledged. + * @since v8.4.0 + */ + readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. + * The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ + readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `destroy`, `setTimeout`, `ref`, and `unref` methods will be called on this + * `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ + readonly state: SessionState; + /** + * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ + readonly type: number; + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ + close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ + destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ + ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean; + ping( + payload: NodeJS.ArrayBufferView, + callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void, + ): boolean; + /** + * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. + * @since v9.4.0 + */ + ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * import http2 from 'node:http2'; + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0, v14.18.0 + */ + setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings( + settings: Settings, + callback?: (err: Error | null, settings: Settings, duration: number) => void, + ): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + unref(): void; + } + interface ClientHttp2SessionEventMap extends Http2SessionEventMap { + "altsvc": [alt: string, origin: string, streamId: number]; + "connect": [session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket]; + "origin": [origins: string[]]; + "stream": [ + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + rawHeaders: string[], + ]; + } + interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * When a `ClientHttp2Session` is first created, the socket may not yet be + * connected. If `clienthttp2session.request()` is called during this time, the + * actual request will be deferred until the socket is ready to go. + * + * If the session becomes unavailable before the request can be created, the + * returned stream will emit `ERR_HTTP2_GOAWAY_SESSION` or + * `ERR_HTTP2_INVALID_SESSION` asynchronously. + * + * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * import http2 from 'node:http2'; + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS, + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ + request( + headers?: OutgoingHttpHeaders | readonly string[], + options?: ClientSessionRequestOptions, + ): ClientHttp2Stream; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientHttp2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + interface ServerHttp2SessionEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2SessionEventMap { + "connect": [ + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ]; + "stream": [stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + } + interface ServerHttp2Session< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2Session { + readonly server: + | Http2Server + | Http2SecureServer; + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * import http2 from 'node:http2'; + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * import http2 from 'node:http2'; + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * import http2 from 'node:http2'; + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: ServerHttp2SessionEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): (( + ...args: ServerHttp2SessionEventMap[E] + ) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): (( + ...args: ServerHttp2SessionEventMap[E] + ) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + // Http2Server + interface SessionOptions { + /** + * Sets the maximum dynamic table size for deflating header fields. + * @default 4Kib + */ + maxDeflateDynamicTableSize?: number | undefined; + /** + * Sets the maximum number of settings entries per `SETTINGS` frame. + * The minimum value allowed is `1`. + * @default 32 + */ + maxSettings?: number | undefined; + /** + * Sets the maximum memory that the `Http2Session` is permitted to use. + * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. + * The minimum value allowed is `1`. + * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded, + * but new `Http2Stream` instances will be rejected while this limit is exceeded. + * The current number of `Http2Stream` sessions, the current memory use of the header compression tables, + * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit. + * @default 10 + */ + maxSessionMemory?: number | undefined; + /** + * Sets the maximum number of header entries. + * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module. + * The minimum value is `1`. + * @default 128 + */ + maxHeaderListPairs?: number | undefined; + /** + * Sets the maximum number of uniq origin the sever + * can send via ORIGIN frames. **Default:** `128`. + */ + maxOriginSetSize?: number | undefined; + /** + * Sets the maximum number of outstanding, unacknowledged pings. + * @default 10 + */ + maxOutstandingPings?: number | undefined; + /** + * Sets the maximum allowed size for a serialized, compressed block of headers. + * Attempts to send headers that exceed this limit will result in + * a `'frameError'` event being emitted and the stream being closed and destroyed. + */ + maxSendHeaderBlockLength?: number | undefined; + /** + * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames. + * @default http2.constants.PADDING_STRATEGY_NONE + */ + paddingStrategy?: number | undefined; + /** + * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received. + * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. + * @default 100 + */ + peerMaxConcurrentStreams?: number | undefined; + /** + * The initial settings to send to the remote peer upon connection. + */ + settings?: Settings | undefined; + /** + * The array of integer values determines the settings types, + * which are included in the `CustomSettings`-property of the received remoteSettings. + * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types. + */ + remoteCustomSettings?: number[] | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; + /** + * If `true`, it turns on strict leading + * and trailing whitespace validation for HTTP/2 header field names and values + * as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1). + * @since v24.2.0 + * @default true + */ + strictFieldWhitespaceValidation?: boolean | undefined; + } + interface ClientSessionOptions extends SessionOptions { + /** + * Sets the maximum number of reserved push streams the client will accept at any given time. + * Once the current number of currently reserved push streams exceeds reaches this limit, + * new push streams sent by the server will be automatically rejected. + * The minimum allowed value is 0. The maximum allowed value is 232-1. + * A negative value sets this option to the maximum allowed value. + * @default 200 + */ + maxReservedRemoteStreams?: number | undefined; + /** + * An optional callback that receives the `URL` instance passed to `connect` and the `options` object, + * and returns any `Duplex` stream that is to be used as the connection for this session. + */ + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + /** + * The protocol to connect with, if not set in the `authority`. + * Value may be either `'http:'` or `'https:'`. + * @default 'https:' + */ + protocol?: "http:" | "https:" | undefined; + } + interface ServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SessionOptions { + maxSessionRejectedStreams?: number | undefined; + maxSessionInvalidFrames?: number | undefined; + streamResetBurst?: number | undefined; + streamResetRate?: number | undefined; + /** @deprecated Use `http1Options.IncomingMessage` instead. */ + Http1IncomingMessage?: Http1Request | undefined; + /** @deprecated Use `http1Options.ServerResponse` instead. */ + Http1ServerResponse?: Http1Response | undefined; + http1Options?: Http1Options | undefined; + Http2ServerRequest?: Http2Request | undefined; + Http2ServerResponse?: Http2Response | undefined; + strictSingleValueFields?: boolean | undefined; + } + interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + interface SecureServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions, tls.TlsOptions {} + interface ServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions {} + interface SecureServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SecureServerSessionOptions { + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface Http1Options< + Request extends typeof IncomingMessage, + Response extends typeof ServerResponse>, + > { + IncomingMessage?: Request | undefined; + ServerResponse?: Response | undefined; + keepAliveTimeout?: number | undefined; + } + interface Http2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; + } + interface Http2ServerEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.ServerEventMap, Pick { + "checkContinue": [request: InstanceType, response: InstanceType]; + "request": [request: InstanceType, response: InstanceType]; + "session": [session: ServerHttp2Session]; + "sessionError": [ + err: Error, + session: ServerHttp2Session, + ]; + } + interface Http2Server< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.Server, Http2ServerCommon { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: Http2ServerEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: Http2ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: Http2ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Http2SecureServerEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.ServerEventMap, Http2ServerEventMap { + "unknownProtocol": [socket: tls.TLSSocket]; + } + interface Http2SecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.Server, Http2ServerCommon { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: Http2SecureServerEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): (( + ...args: Http2SecureServerEventMap[E] + ) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): (( + ...args: Http2SecureServerEventMap[E] + ) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Http2ServerRequestEventMap extends stream.ReadableEventMap { + "aborted": [hadError: boolean, code: number]; + "data": [chunk: string | NonSharedBuffer]; + } + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ + class Http2ServerRequest extends stream.Readable { + constructor( + stream: ServerHttp2Stream, + headers: IncomingHttpHeaders, + options: stream.ReadableOptions, + rawHeaders: readonly string[], + ); + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. + * @since v8.4.0 + */ + readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ + readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ + readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns `'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v8.4.0 + */ + readonly httpVersion: string; + readonly httpVersionMinor: number; + readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ + readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ + readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ + readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly trailers: IncomingHttpHeaders; + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```json + * "/status?name=ryan" + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream`s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: Http2ServerRequestEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: Http2ServerRequestEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + class Http2ServerResponse extends stream.Writable { + constructor(stream: ServerHttp2Stream); + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple times. + * + * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. + * + * Attempting to set a header field name or value that contains invalid characters will result in a + * [TypeError](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-typeerror) being thrown. + * + * ```js + * // Returns headers including "set-cookie: a" and "set-cookie: b" + * const server = http2.createServer((req, res) => { + * res.setHeader('set-cookie', 'a'); + * res.appendHeader('set-cookie', 'b'); + * res.writeHead(200); + * res.end('ok'); + * }); + * ``` + * @since v20.12.0 + */ + appendHeader(name: string, value: string | string[]): void; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ + readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * A reference to the original HTTP2 `request` object. + * @since v15.7.0 + */ + readonly req: Request; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ + sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ + statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ + statusMessage: ""; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + addTrailers(trailers: OutgoingHttpHeaders): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): this; + end(data: string | Uint8Array, callback?: () => void): this; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ + getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ + getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ + removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ + setHeader(name: string, value: number | string | readonly string[]): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `node:http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. + * @since v8.4.0 + */ + writeContinue(): void; + /** + * Sends a status `103 Early Hints` to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }); + * ``` + * @since v18.11.0 + */ + writeEarlyHints(hints: Record): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | readonly string[]): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | readonly string[]): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ + createPushResponse( + headers: OutgoingHttpHeaders, + callback: (err: Error | null, res: Http2ServerResponse) => void, + ): void; + } + namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ + function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * import http2 from 'node:http2'; + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ + function getPackedSettings(settings: Settings): NonSharedBuffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ + function getUnpackedSettings(buf: Uint8Array): Settings; + /** + * Returns a `net.Server` instance that creates and manages `Http2Session` instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * import http2 from 'node:http2'; + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8000); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + function createServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2Server; + function createServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: ServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2Server; + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8443); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + function createSecureServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2SecureServer; + function createSecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: SecureServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2SecureServer; + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * import http2 from 'node:http2'; + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ + function connect( + authority: string | url.URL, + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + /** + * Create an HTTP/2 server session from an existing socket. + * @param socket A Duplex Stream + * @param options Any `{@link createServer}` options can be provided. + * @since v20.12.0 + */ + function performServerHandshake< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + socket: stream.Duplex, + options?: ServerOptions, + ): ServerHttp2Session; +} +declare module "node:http2" { + export { OutgoingHttpHeaders } from "node:http"; +} +declare module "http2" { + export * from "node:http2"; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 000000000..b10aad0c2 --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,400 @@ +declare module "node:https" { + import * as http from "node:http"; + import { Duplex } from "node:stream"; + import * as tls from "node:tls"; + import { URL } from "node:url"; + interface ServerOptions< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.ServerOptions, tls.TlsOptions {} + interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions { + checkServerIdentity?: + | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined) + | undefined; + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + } + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + maxCachedSessions?: number | undefined; + } + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * + * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden + * to customize how TLS connections are established. + * + * > See `agent.createConnection()` for details on overriding this method, + * > including asynchronous socket creation with a callback. + * @since v0.4.5 + */ + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + createConnection( + options: RequestOptions, + callback?: (err: Error | null, stream: Duplex) => void, + ): Duplex | null | undefined; + getName(options?: RequestOptions): string; + } + interface ServerEventMap< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.ServerEventMap, tls.ServerEventMap {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor( + options: ServerOptions, + requestListener?: http.RequestListener, + ); + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.Server {} + /** + * ```js + * // curl -k https://localhost:8000/ + * import https from 'node:https'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * import https from 'node:https'; + * import fs from 'node:fs'; + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample', + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + >(requestListener?: http.RequestListener): Server; + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + >( + options: ServerOptions, + requestListener?: http.RequestListener, + ): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import https from 'node:https'; + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false, + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * import tls from 'node:tls'; + * import https from 'node:https'; + * import crypto from 'node:crypto'; + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha256 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * import https from 'node:https'; + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function get( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + let globalAgent: Agent; +} +declare module "https" { + export * from "node:https"; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 000000000..c8cdf6bd9 --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,116 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. 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. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.8+. + +// Reference required TypeScript libraries: +/// +/// +/// + +// Definitions for Node.js modules specific to TypeScript 5.7+: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 000000000..0dd4ca9a4 --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,265 @@ +declare module "node:inspector" { + import { EventEmitter } from "node:events"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + */ + connect(): void; + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if this API was not called on a Worker thread. + * @since v12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * `session.connect()` will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + } + /** + * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the [security warning](https://nodejs.org/docs/latest-v26.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) + * regarding the `host` parameter usage. + * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Defaults to what was specified on the CLI. + * @returns Disposable that calls `inspector.close()`. + */ + function open(port?: number, host?: string, wait?: boolean): Disposable; + /** + * Deactivates the inspector. If there are active connections, they are forcibly + * terminated. Blocks until the inspector server has fully stopped. + */ + function close(): void; + /** + * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help, see: https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help, see: https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` + */ + function url(): string | undefined; + /** + * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. + * + * An exception will be thrown if there is no active inspector. + * @since v12.7.0 + */ + function waitForDebugger(): void; + // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). + // The method signatures differ from those of the Node.js console, and are deliberately + // typed permissively. + interface InspectorConsole { + debug(...data: any[]): void; + error(...data: any[]): void; + info(...data: any[]): void; + log(...data: any[]): void; + warn(...data: any[]): void; + dir(...data: any[]): void; + dirxml(...data: any[]): void; + table(...data: any[]): void; + trace(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(...data: any[]): void; + clear(...data: any[]): void; + count(label?: any): void; + countReset(label?: any): void; + assert(value?: any, ...data: any[]): void; + profile(label?: any): void; + profileEnd(label?: any): void; + time(label?: any): void; + timeLog(label?: any): void; + timeStamp(label?: any): void; + } + /** + * An object to send messages to the remote inspector console. + * @since v11.0.0 + */ + const console: InspectorConsole; + // DevTools protocol event broadcast methods + namespace Network { + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that + * the application is about to send an HTTP request. + * @since v22.6.0 + */ + function requestWillBeSent(params: RequestWillBeSentEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if + * `Network.streamResourceContent` command was not invoked for the given request yet. + * + * Also enables `Network.getResponseBody` command to retrieve the response data. + * @since v24.2.0 + */ + function dataReceived(params: DataReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Enables `Network.getRequestPostData` command to retrieve the request data. + * @since v24.3.0 + */ + function dataSent(params: unknown): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that + * HTTP response is available. + * @since v22.6.0 + */ + function responseReceived(params: ResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that + * HTTP request has finished loading. + * @since v22.6.0 + */ + function loadingFinished(params: LoadingFinishedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that + * HTTP request has failed to load. + * @since v22.7.0 + */ + function loadingFailed(params: LoadingFailedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that + * a WebSocket connection has been initiated. + * @since v24.7.0 + */ + function webSocketCreated(params: WebSocketCreatedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends. + * This event indicates that the WebSocket handshake response has been received. + * @since v24.7.0 + */ + function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketClosed` event to connected frontends. + * This event indicates that a WebSocket connection has been closed. + * @since v24.7.0 + */ + function webSocketClosed(params: WebSocketClosedEventDataType): void; + } + namespace NetworkResources { + /** + * This feature is only available with the `--experimental-inspector-network-resource` flag enabled. + * + * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource + * request issued via the Chrome DevTools Protocol (CDP). + * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as + * Chrome—requests the resource to retrieve the source map. + * + * This method allows developers to predefine the resource content to be served in response to such CDP requests. + * + * ```js + * const inspector = require('node:inspector'); + * // By preemptively calling put to register the resource, a source map can be resolved when + * // a loadNetworkResource request is made from the frontend. + * async function setNetworkResources() { + * const mapUrl = 'http://localhost:3000/dist/app.js.map'; + * const tsUrl = 'http://localhost:3000/src/app.ts'; + * const distAppJsMap = await fetch(mapUrl).then((res) => res.text()); + * const srcAppTs = await fetch(tsUrl).then((res) => res.text()); + * inspector.NetworkResources.put(mapUrl, distAppJsMap); + * inspector.NetworkResources.put(tsUrl, srcAppTs); + * }; + * setNetworkResources().then(() => { + * require('./dist/app'); + * }); + * ``` + * + * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource) + * @since v24.5.0 + * @experimental + */ + function put(url: string, data: string): void; + } + namespace DOMStorage { + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends. + * This event indicates that a new item has been added to the storage. + * @since v25.5.0 + */ + function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends. + * This event indicates that an item has been removed from the storage. + * @since v25.5.0 + */ + function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + + * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends. + * This event indicates that a storage item has been updated. + * @since v25.5.0 + */ + function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected + * frontends. This event indicates that all items have been cleared from the + * storage. + * @since v25.5.0 + */ + function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * @since v25.5.0 + */ + function registerStorage(params: unknown): void; + } +} +declare module "inspector" { + export * from "node:inspector"; +} diff --git a/node_modules/@types/node/inspector.generated.d.ts b/node_modules/@types/node/inspector.generated.d.ts new file mode 100644 index 000000000..0e2e4416d --- /dev/null +++ b/node_modules/@types/node/inspector.generated.d.ts @@ -0,0 +1,4406 @@ +// These definitions are automatically generated by the generate-inspector script. +// Do not edit this file directly. +// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. +// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). + +declare module "node:inspector" { + interface InspectorNotification { + method: string; + params: T; + } + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string | undefined; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId | undefined; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview | undefined; + /** + * @experimental + */ + customPreview?: CustomPreview | undefined; + } + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; + } + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[] | undefined; + } + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string | undefined; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview | undefined; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + } + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview | undefined; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean | undefined; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject | undefined; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject | undefined; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean | undefined; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean | undefined; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject | undefined; + } + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + } + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId | undefined; + } + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: object | undefined; + } + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId | undefined; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string | undefined; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace | undefined; + /** + * Exception object if available. + */ + exception?: RemoteObject | undefined; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId | undefined; + } + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string | undefined; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace | undefined; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId | undefined; + } + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId | undefined; + } + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + } + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId | undefined; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[] | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string | undefined; + } + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean | undefined; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean | undefined; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean | undefined; + } + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[] | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace | undefined; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string | undefined; + } + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: object; + } + } + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + /** + * Call frame identifier. + */ + type CallFrameId = string; + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + } + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location | undefined; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject | undefined; + } + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string | undefined; + /** + * Location in the source code where scope starts + */ + startLocation?: Location | undefined; + /** + * Location in the source code where scope ends + */ + endLocation?: Location | undefined; + } + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + type?: string | undefined; + } + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string | undefined; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string | undefined; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string | undefined; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number | undefined; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location | undefined; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean | undefined; + } + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string | undefined; + } + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean | undefined; + } + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + } + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean | undefined; + } + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string | undefined; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean | undefined; + } + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[] | undefined; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + } + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: object | undefined; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: object | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: object | undefined; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[] | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; + } + } + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string | undefined; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number | undefined; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number | undefined; + } + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number | undefined; + /** + * Child node ids. + */ + children?: number[] | undefined; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string | undefined; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[] | undefined; + } + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[] | undefined; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[] | undefined; + } + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean | undefined; + /** + * Collect block-based coverage. + */ + detailed?: boolean | undefined; + } + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + } + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean | undefined; + } + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean | undefined; + } + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean | undefined; + } + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + } + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number | undefined; + } + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean | undefined; + } + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + namespace IO { + type StreamHandle = string; + interface ReadParameterType { + /** + * Handle of the stream to read. + */ + handle: StreamHandle; + /** + * Seek to the specified offset before reading (if not specified, proceed with offset + * following the last read). Some types of streams may only support sequential reads. + */ + offset?: number | undefined; + /** + * Maximum number of bytes to read (left upon the agent discretion if not specified). + */ + size?: number | undefined; + } + interface CloseParameterType { + /** + * Handle of the stream to close. + */ + handle: StreamHandle; + } + interface ReadReturnType { + /** + * Data that were read. + */ + data: string; + /** + * Set if the end-of-file condition occurred while reading. + */ + eof: boolean; + } + } + namespace Network { + /** + * Resource type as it was perceived by the rendering engine. + */ + type ResourceType = string; + /** + * Unique request identifier. + */ + type RequestId = string; + /** + * UTC time in seconds, counted from January 1, 1970. + */ + type TimeSinceEpoch = number; + /** + * Monotonically increasing time in seconds since an arbitrary point in the past. + */ + type MonotonicTime = number; + /** + * Information about the request initiator. + */ + interface Initiator { + /** + * Type of this initiator. + */ + type: string; + /** + * Initiator JavaScript stack trace, set for Script only. + * Requires the Debugger domain to be enabled. + */ + stack?: Runtime.StackTrace | undefined; + /** + * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. + */ + url?: string | undefined; + /** + * Initiator line number, set for Parser type or for Script type (when script is importing + * module) (0-based). + */ + lineNumber?: number | undefined; + /** + * Initiator column number, set for Parser type or for Script type (when script is importing + * module) (0-based). + */ + columnNumber?: number | undefined; + /** + * Set if another request triggered this request (e.g. preflight). + */ + requestId?: RequestId | undefined; + } + /** + * HTTP request data. + */ + interface Request { + url: string; + method: string; + headers: Headers; + hasPostData: boolean; + } + /** + * HTTP response data. + */ + interface Response { + url: string; + status: number; + statusText: string; + headers: Headers; + mimeType: string; + charset: string; + } + /** + * Request / response headers as keys / values of JSON object. + */ + interface Headers { + } + interface LoadNetworkResourcePageResult { + success: boolean; + stream?: IO.StreamHandle | undefined; + } + /** + * WebSocket response data. + */ + interface WebSocketResponse { + /** + * HTTP response status code. + */ + status: number; + /** + * HTTP response status text. + */ + statusText: string; + /** + * HTTP response headers. + */ + headers: Headers; + } + interface EnableParameterType { + /** + * Buffer size in bytes to use when preserving network payloads (XHRs, etc). + * @experimental + */ + maxTotalBufferSize?: number | undefined; + /** + * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). + * @experimental + */ + maxResourceBufferSize?: number | undefined; + } + interface GetRequestPostDataParameterType { + /** + * Identifier of the network request to get content for. + */ + requestId: RequestId; + } + interface GetResponseBodyParameterType { + /** + * Identifier of the network request to get content for. + */ + requestId: RequestId; + } + interface StreamResourceContentParameterType { + /** + * Identifier of the request to stream. + */ + requestId: RequestId; + } + interface LoadNetworkResourceParameterType { + /** + * URL of the resource to get content for. + */ + url: string; + } + interface GetRequestPostDataReturnType { + /** + * Request body string, omitting files from multipart requests + */ + postData: string; + } + interface GetResponseBodyReturnType { + /** + * Response body. + */ + body: string; + /** + * True, if content was sent as base64. + */ + base64Encoded: boolean; + } + interface StreamResourceContentReturnType { + /** + * Data that has been buffered until streaming is enabled. + */ + bufferedData: string; + } + interface LoadNetworkResourceReturnType { + resource: LoadNetworkResourcePageResult; + } + interface RequestWillBeSentEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Request data. + */ + request: Request; + /** + * Request initiator. + */ + initiator: Initiator; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Timestamp. + */ + wallTime: TimeSinceEpoch; + } + interface ResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Response data. + */ + response: Response; + } + interface LoadingFailedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Error message. + */ + errorText: string; + } + interface LoadingFinishedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + interface DataReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Data chunk length. + */ + dataLength: number; + /** + * Actual bytes received (might be less than dataLength for compressed encodings). + */ + encodedDataLength: number; + /** + * Data that was received. + * @experimental + */ + data?: string | undefined; + } + interface WebSocketCreatedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * WebSocket request URL. + */ + url: string; + /** + * Request initiator. + */ + initiator: Initiator; + } + interface WebSocketClosedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + interface WebSocketHandshakeResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * WebSocket response data. + */ + response: WebSocketResponse; + } + } + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string | undefined; + /** + * Included category filters. + */ + includedCategories: string[]; + } + interface StartParameterType { + traceConfig: TraceConfig; + } + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + interface DataCollectedEventDataType { + value: object[]; + } + } + namespace NodeWorker { + type WorkerID = string; + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + interface DetachParameterType { + sessionId: SessionID; + } + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + namespace Target { + type SessionID = string; + type TargetID = string; + interface TargetInfo { + targetId: TargetID; + type: string; + title: string; + url: string; + attached: boolean; + canAccessOpener: boolean; + } + interface SetAutoAttachParameterType { + autoAttach: boolean; + waitForDebuggerOnStart: boolean; + } + interface GetTargetsReturnType { + targetInfos: TargetInfo[]; + } + interface TargetCreatedEventDataType { + targetInfo: TargetInfo; + } + interface AttachedToTargetEventDataType { + sessionId: SessionID; + targetInfo: TargetInfo; + waitingForDebugger: boolean; + } + } + namespace DOMStorage { + type SerializedStorageKey = string; + /** + * DOM Storage identifier. + */ + interface StorageId { + /** + * Security origin for the storage. + */ + securityOrigin?: string | undefined; + /** + * Represents a key by which DOM Storage keys its CachedStorageAreas + */ + storageKey?: SerializedStorageKey | undefined; + /** + * Whether the storage is local storage (not session storage). + */ + isLocalStorage: boolean; + } + /** + * DOM Storage item. + */ + type Item = string[]; + interface ClearParameterType { + storageId: StorageId; + } + interface GetDOMStorageItemsParameterType { + storageId: StorageId; + } + interface RemoveDOMStorageItemParameterType { + storageId: StorageId; + key: string; + } + interface SetDOMStorageItemParameterType { + storageId: StorageId; + key: string; + value: string; + } + interface GetDOMStorageItemsReturnType { + entries: Item[]; + } + interface DomStorageItemAddedEventDataType { + storageId: StorageId; + key: string; + newValue: string; + } + interface DomStorageItemRemovedEventDataType { + storageId: StorageId; + key: string; + } + interface DomStorageItemUpdatedEventDataType { + storageId: StorageId; + key: string; + oldValue: string; + newValue: string; + } + interface DomStorageItemsClearedEventDataType { + storageId: StorageId; + } + } + namespace Storage { + type SerializedStorageKey = string; + interface GetStorageKeyParameterType { + frameId?: string | undefined; + } + interface GetStorageKeyReturnType { + storageKey: SerializedStorageKey; + } + } + interface Session { + /** + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the + * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + */ + post(method: string, callback?: (err: Error | null, params?: object) => void): void; + post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: "Runtime.globalLexicalScopeNames", + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: "Debugger.getPossibleBreakpoints", + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + post( + method: "HeapProfiler.getObjectByHeapObjectId", + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + /** + * Read a chunk of the stream + */ + post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; + post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; + post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void; + post(method: "IO.close", callback?: (err: Error | null) => void): void; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: "Network.disable", callback?: (err: Error | null) => void): void; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "Network.enable", callback?: (err: Error | null) => void): void; + /** + * Returns post data sent with the request. Returns an error when no data was sent with the request. + */ + post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; + post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; + /** + * Returns content served for the given request. + */ + post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; + post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; + /** + * Enables streaming of the response for the given requestId. + * If enabled, the dataReceived event contains the data that was received during streaming. + * @experimental + */ + post( + method: "Network.streamResourceContent", + params?: Network.StreamResourceContentParameterType, + callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void + ): void; + post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void; + /** + * Fetches the resource and returns the content. + */ + post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; + post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; + /** + * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void; + /** + * Disable NodeRuntime events + */ + post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; + post(method: "Target.getTargets", callback?: (err: Error | null, params: Target.GetTargetsReturnType) => void): void; + post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void; + post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.clear", callback?: (err: Error | null) => void): void; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + */ + post(method: "DOMStorage.disable", callback?: (err: Error | null) => void): void; + /** + * Enables storage tracking, storage events will now be delivered to the client. + */ + post(method: "DOMStorage.enable", callback?: (err: Error | null) => void): void; + post( + method: "DOMStorage.getDOMStorageItems", + params?: DOMStorage.GetDOMStorageItemsParameterType, + callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void + ): void; + post(method: "DOMStorage.getDOMStorageItems", callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void): void; + post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.removeDOMStorageItem", callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.setDOMStorageItem", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType, callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; + post(method: "Storage.getStorageKey", callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; + emit(event: "Network.responseReceived", message: InspectorNotification): boolean; + emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; + emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; + emit(event: "Network.dataReceived", message: InspectorNotification): boolean; + emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; + emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; + emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + emit(event: "NodeRuntime.waitingForDebugger"): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "Target.targetCreated", message: InspectorNotification): boolean; + emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + } +} +declare module "node:inspector/promises" { + export { + Schema, + Runtime, + Debugger, + Console, + Profiler, + HeapProfiler, + IO, + Network, + NodeRuntime, + NodeTracing, + NodeWorker, + Target, + DOMStorage, + Storage, + } from 'inspector'; +} +declare module "node:inspector/promises" { + import { + InspectorNotification, + Schema, + Runtime, + Debugger, + Console, + Profiler, + HeapProfiler, + IO, + Network, + NodeRuntime, + NodeTracing, + NodeWorker, + Target, + DOMStorage, + Storage, + } from "inspector"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + * @since v19.0.0 + */ + interface Session { + /** + * Posts a message to the inspector back-end. + * + * ```js + * import { Session } from 'node:inspector/promises'; + * try { + * const session = new Session(); + * session.connect(); + * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); + * console.log(result); + * } catch (error) { + * console.error(error); + * } + * // Output: { result: { type: 'number', value: 4, description: '4' } } + * ``` + * + * The latest version of the V8 inspector protocol is published on the + * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + */ + post(method: string, params?: object): Promise; + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains"): Promise; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise; + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise; + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger"): Promise; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable"): Promise; + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable"): Promise; + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries"): Promise; + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise; + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise; + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise; + /** + * Returns all let, const and class variables from global scope. + */ + post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable"): Promise; + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable"): Promise; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise; + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise; + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise; + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise; + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver"): Promise; + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise; + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut"): Promise; + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause"): Promise; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync"): Promise; + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume"): Promise; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise; + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise; + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise; + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise; + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise; + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise; + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable"): Promise; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable"): Promise; + /** + * Does nothing. + */ + post(method: "Console.clearMessages"): Promise; + post(method: "Profiler.enable"): Promise; + post(method: "Profiler.disable"): Promise; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise; + post(method: "Profiler.start"): Promise; + post(method: "Profiler.stop"): Promise; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage"): Promise; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage"): Promise; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage"): Promise; + post(method: "HeapProfiler.enable"): Promise; + post(method: "HeapProfiler.disable"): Promise; + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; + post(method: "HeapProfiler.collectGarbage"): Promise; + post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise; + post(method: "HeapProfiler.stopSampling"): Promise; + post(method: "HeapProfiler.getSamplingProfile"): Promise; + /** + * Read a chunk of the stream + */ + post(method: "IO.read", params?: IO.ReadParameterType): Promise; + post(method: "IO.close", params?: IO.CloseParameterType): Promise; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: "Network.disable"): Promise; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: "Network.enable", params?: Network.EnableParameterType): Promise; + /** + * Returns post data sent with the request. Returns an error when no data was sent with the request. + */ + post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise; + /** + * Returns content served for the given request. + */ + post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise; + /** + * Enables streaming of the response for the given requestId. + * If enabled, the dataReceived event contains the data that was received during streaming. + * @experimental + */ + post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise; + /** + * Fetches the resource and returns the content. + */ + post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise; + /** + * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.enable"): Promise; + /** + * Disable NodeRuntime events + */ + post(method: "NodeRuntime.disable"): Promise; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories"): Promise; + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop"): Promise; + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable"): Promise; + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise; + post(method: "Target.getTargets"): Promise; + post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise; + post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + */ + post(method: "DOMStorage.disable"): Promise; + /** + * Enables storage tracking, storage events will now be delivered to the client. + */ + post(method: "DOMStorage.enable"): Promise; + post(method: "DOMStorage.getDOMStorageItems", params?: DOMStorage.GetDOMStorageItemsParameterType): Promise; + post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType): Promise; + post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType): Promise; + /** + * @experimental + */ + post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType): Promise; + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; + emit(event: "Network.responseReceived", message: InspectorNotification): boolean; + emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; + emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; + emit(event: "Network.dataReceived", message: InspectorNotification): boolean; + emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; + emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; + emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + emit(event: "NodeRuntime.waitingForDebugger"): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "Target.targetCreated", message: InspectorNotification): boolean; + emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + } +} diff --git a/node_modules/@types/node/inspector/promises.d.ts b/node_modules/@types/node/inspector/promises.d.ts new file mode 100644 index 000000000..e75ff20a3 --- /dev/null +++ b/node_modules/@types/node/inspector/promises.d.ts @@ -0,0 +1,35 @@ +declare module "node:inspector/promises" { + import { EventEmitter } from "node:events"; + export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + * @since v19.0.0 + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + */ + connect(): void; + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if this API was not called on a Worker thread. + * @since v12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * `session.connect()` will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + } +} +declare module "inspector/promises" { + export * from "node:inspector/promises"; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 000000000..792a0bd5d --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,726 @@ +declare module "node:module" { + import { URL } from "node:url"; + class Module { + constructor(id: string, parent?: Module); + } + interface Module extends NodeJS.Module {} + namespace Module { + export { Module }; + } + namespace Module { + /** + * A list of the names of all modules provided by Node.js. Can be used to verify + * if a module is maintained by a third party or not. + * + * Note: the list doesn't contain prefix-only modules like `node:test`. + * @since v9.3.0, v8.10.0, v6.13.0 + */ + const builtinModules: readonly string[]; + /** + * @since v12.2.0 + * @param path Filename to be used to construct the require + * function. Must be a file URL object, file URL string, or absolute path + * string. + */ + function createRequire(path: string | URL): NodeJS.Require; + namespace constants { + /** + * The following constants are returned as the `status` field in the object returned by + * {@link enableCompileCache} to indicate the result of the attempt to enable the + * [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache). + * @since v22.8.0 + */ + namespace compileCacheStatus { + /** + * Node.js has enabled the compile cache successfully. The directory used to store the + * compile cache will be returned in the `directory` field in the + * returned object. + */ + const ENABLED: number; + /** + * The compile cache has already been enabled before, either by a previous call to + * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` + * environment variable. The directory used to store the + * compile cache will be returned in the `directory` field in the + * returned object. + */ + const ALREADY_ENABLED: number; + /** + * Node.js fails to enable the compile cache. This can be caused by the lack of + * permission to use the specified directory, or various kinds of file system errors. + * The detail of the failure will be returned in the `message` field in the + * returned object. + */ + const FAILED: number; + /** + * Node.js cannot enable the compile cache because the environment variable + * `NODE_DISABLE_COMPILE_CACHE=1` has been set. + */ + const DISABLED: number; + } + } + interface EnableCompileCacheOptions { + /** + * Optional. Directory to store the compile cache. If not specified, + * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable + * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` + * otherwise. + * @since v25.0.0 + */ + directory?: string | undefined; + /** + * Optional. If `true`, enables portable compile cache so that + * the cache can be reused even if the project directory is moved. This is a best-effort + * feature. If not specified, it will depend on whether the environment variable + * `NODE_COMPILE_CACHE_PORTABLE=1` is set. + * @since v25.0.0 + */ + portable?: boolean | undefined; + } + interface EnableCompileCacheResult { + /** + * One of the {@link constants.compileCacheStatus} + */ + status: number; + /** + * If Node.js cannot enable the compile cache, this contains + * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. + */ + message?: string; + /** + * If the compile cache is enabled, this contains the directory + * where the compile cache is stored. Only set if `status` is + * `module.constants.compileCacheStatus.ENABLED` or + * `module.constants.compileCacheStatus.ALREADY_ENABLED`. + */ + directory?: string; + } + /** + * Enable [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * in the current Node.js instance. + * + * For general use cases, it's recommended to call `module.enableCompileCache()` without + * specifying the `options.directory`, so that the directory can be overridden by the + * `NODE_COMPILE_CACHE` environment variable when necessary. + * + * Since compile cache is supposed to be a optimization that is not mission critical, this + * method is designed to not throw any exception when the compile cache cannot be enabled. + * Instead, it will return an object containing an error message in the `message` field to + * aid debugging. If compile cache is enabled successfully, the `directory` field in the + * returned object contains the path to the directory where the compile cache is stored. The + * `status` field in the returned object would be one of the `module.constants.compileCacheStatus` + * values to indicate the result of the attempt to enable the + * [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache). + * + * This method only affects the current Node.js instance. To enable it in child worker threads, + * either call this method in child worker threads too, or set the + * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can + * be inherited into the child workers. The directory can be obtained either from the + * `directory` field returned by this method, or with {@link getCompileCacheDir}. + * @since v22.8.0 + * @param options Optional. If a string is passed, it is considered to be `options.directory`. + */ + function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult; + /** + * Flush the [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * accumulated from modules already loaded + * in the current Node.js instance to disk. This returns after all the flushing + * file system operations come to an end, no matter they succeed or not. If there + * are any errors, this will fail silently, since compile cache misses should not + * interfere with the actual operation of the application. + * @since v22.10.0 + */ + function flushCompileCache(): void; + /** + * @since v22.8.0 + * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * directory if it is enabled, or `undefined` otherwise. + */ + function getCompileCacheDir(): string | undefined; + /** + * ```text + * /path/to/project + * ├ packages/ + * ├ bar/ + * ├ bar.js + * └ package.json // name = '@foo/bar' + * └ qux/ + * ├ node_modules/ + * └ some-package/ + * └ package.json // name = 'some-package' + * ├ qux.js + * └ package.json // name = '@foo/qux' + * ├ main.js + * └ package.json // name = '@foo' + * ``` + * ```js + * // /path/to/project/packages/bar/bar.js + * import { findPackageJSON } from 'node:module'; + * + * findPackageJSON('..', import.meta.url); + * // '/path/to/project/package.json' + * // Same result when passing an absolute specifier instead: + * findPackageJSON(new URL('../', import.meta.url)); + * findPackageJSON(import.meta.resolve('../')); + * + * findPackageJSON('some-package', import.meta.url); + * // '/path/to/project/packages/bar/node_modules/some-package/package.json' + * // When passing an absolute specifier, you might get a different result if the + * // resolved module is inside a subfolder that has nested `package.json`. + * findPackageJSON(import.meta.resolve('some-package')); + * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' + * + * findPackageJSON('@foo/qux', import.meta.url); + * // '/path/to/project/packages/qux/package.json' + * ``` + * @since v22.14.0 + * @param specifier The specifier for the module whose `package.json` to + * retrieve. When passing a _bare specifier_, the `package.json` at the root of + * the package is returned. When passing a _relative specifier_ or an _absolute specifier_, + * the closest parent `package.json` is returned. + * @param base The absolute location (`file:` URL string or FS path) of the + * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use + * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_. + * @returns A path if the `package.json` is found. When `startLocation` + * is a package, the package's root `package.json`; when a relative or unresolved, the closest + * `package.json` to the `startLocation`. + */ + function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined; + /** + * @since v18.6.0, v16.17.0 + */ + function isBuiltin(moduleName: string): boolean; + interface RegisterOptions { + /** + * If you want to resolve `specifier` relative to a + * base URL, such as `import.meta.url`, you can pass that URL here. This + * property is ignored if the `parentURL` is supplied as the second argument. + * @default 'data:' + */ + parentURL?: string | URL | undefined; + /** + * Any arbitrary, cloneable JavaScript value to pass into the + * {@link initialize} hook. + */ + data?: Data | undefined; + /** + * [Transferable objects](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#portpostmessagevalue-transferlist) + * to be passed into the `initialize` hook. + */ + transferList?: any[] | undefined; + } + /* eslint-disable @definitelytyped/no-unnecessary-generics */ + /** + * Register a module that exports hooks that customize Node.js module + * resolution and loading behavior. See + * [Customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks). + * + * This feature requires `--allow-worker` if used with the + * [Permission Model](https://nodejs.org/docs/latest-v26.x/api/permissions.html#permission-model). + * @since v20.6.0, v18.19.0 + * @deprecated Use `module.registerHooks()` instead. + * @param specifier Customization hooks to be registered; this should be + * the same string that would be passed to `import()`, except that if it is + * relative, it is resolved relative to `parentURL`. + * @param parentURL f you want to resolve `specifier` relative to a base + * URL, such as `import.meta.url`, you can pass that URL here. + */ + function register( + specifier: string | URL, + parentURL?: string | URL, + options?: RegisterOptions, + ): void; + function register(specifier: string | URL, options?: RegisterOptions): void; + interface RegisterHooksOptions { + /** + * See [load hook](https://nodejs.org/docs/latest-v26.x/api/module.html#loadurl-context-nextload). + * @default undefined + */ + load?: LoadHookSync | undefined; + /** + * See [resolve hook](https://nodejs.org/docs/latest-v26.x/api/module.html#resolvespecifier-context-nextresolve). + * @default undefined + */ + resolve?: ResolveHookSync | undefined; + } + interface ModuleHooks { + /** + * Deregister the hook instance. + */ + deregister(): void; + } + /** + * Register [hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) + * that customize Node.js module resolution and loading behavior. + * @since v22.15.0 + * @experimental + */ + function registerHooks(options: RegisterHooksOptions): ModuleHooks; + interface StripTypeScriptTypesOptions { + /** + * Possible values are: + * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. + * @default 'strip' + */ + mode?: "strip" | undefined; + /** + * Specifies the source url used in the source map. + */ + sourceUrl?: string | undefined; + } + /** + * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It + * can be used to strip type annotations from TypeScript code before running it + * with `vm.runInContext()` or `vm.compileFunction()`. + * + * By default, it will throw an error if the code contains TypeScript features + * that require transformation, such as `enum`s. See [type-stripping](https://nodejs.org/docs/latest-v26.x/api/typescript.md#type-stripping) for more information. + * + * _WARNING_: The output of this function should not be considered stable across Node.js versions, + * due to changes in the TypeScript parser. + * + * ```js + * import { stripTypeScriptTypes } from 'node:module'; + * const code = 'const a: number = 1;'; + * const strippedCode = stripTypeScriptTypes(code); + * console.log(strippedCode); + * // Prints: const a = 1; + * ``` + * + * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: + * + * ```js + * import { stripTypeScriptTypes } from 'node:module'; + * const code = 'const a: number = 1;'; + * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); + * console.log(strippedCode); + * // Prints: const a = 1\n\n//# sourceURL=source.ts; + * ``` + * @since v22.13.0 + * @param code The code to strip type annotations from. + * @returns The code with type annotations stripped. + */ + function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string; + /* eslint-enable @definitelytyped/no-unnecessary-generics */ + /** + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * import fs from 'node:fs'; + * import assert from 'node:assert'; + * import { syncBuiltinESMExports } from 'node:module'; + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('node:fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 + */ + function syncBuiltinESMExports(): void; + interface ImportAttributes extends NodeJS.Dict { + type?: string | undefined; + } + type ImportPhase = "source" | "evaluation"; + type ModuleFormat = + | "addon" + | "builtin" + | "commonjs" + | "commonjs-typescript" + | "json" + | "module" + | "module-typescript" + | "wasm"; + type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; + type InitializeHook = (data: Data) => void | Promise; + interface ResolveHookContext { + conditions: string[]; + importAttributes: ImportAttributes; + parentURL: string | undefined; + } + interface ResolveFnOutput { + format?: string | null | undefined; + importAttributes?: ImportAttributes | undefined; + shortCircuit?: boolean | undefined; + url: string; + } + type ResolveHook = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: Partial, + ) => ResolveFnOutput | Promise, + ) => ResolveFnOutput | Promise; + type ResolveHookSync = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: Partial, + ) => ResolveFnOutput, + ) => ResolveFnOutput; + interface LoadHookContext { + conditions: string[]; + format: string | null | undefined; + importAttributes: ImportAttributes; + } + interface LoadFnOutput { + format: string | null | undefined; + shortCircuit?: boolean | undefined; + source?: ModuleSource | undefined; + } + type LoadHook = ( + url: string, + context: LoadHookContext, + nextLoad: ( + url: string, + context?: Partial, + ) => LoadFnOutput | Promise, + ) => LoadFnOutput | Promise; + type LoadHookSync = ( + url: string, + context: LoadHookContext, + nextLoad: ( + url: string, + context?: Partial, + ) => LoadFnOutput, + ) => LoadFnOutput; + interface SourceMapsSupport { + /** + * If the source maps support is enabled + */ + enabled: boolean; + /** + * If the support is enabled for files in `node_modules`. + */ + nodeModules: boolean; + /** + * If the support is enabled for generated code from `eval` or `new Function`. + */ + generatedCode: boolean; + } + /** + * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack + * traces is enabled. + * @since v23.7.0, v22.14.0 + */ + function getSourceMapsSupport(): SourceMapsSupport; + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. + */ + function findSourceMap(path: string): SourceMap | undefined; + interface SetSourceMapsSupportOptions { + /** + * If enabling the support for files in `node_modules`. + * @default false + */ + nodeModules?: boolean | undefined; + /** + * If enabling the support for generated code from `eval` or `new Function`. + * @default false + */ + generatedCode?: boolean | undefined; + } + /** + * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options + * `--enable-source-maps`, with additional options to alter the support for files + * in `node_modules` or generated codes. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. Preferably, use the commandline options + * `--enable-source-maps` to avoid losing track of source maps of modules loaded + * before this API call. + * @since v23.7.0, v22.14.0 + */ + function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void; + interface SourceMapConstructorOptions { + /** + * @since v21.0.0, v20.5.0 + */ + lineLengths?: readonly number[] | undefined; + } + interface SourceMapPayload { + file: string; + version: number; + sources: string[]; + sourcesContent: string[]; + names: string[]; + mappings: string; + sourceRoot: string; + } + interface SourceMapping { + generatedLine: number; + generatedColumn: number; + originalSource: string; + originalLine: number; + originalColumn: number; + } + interface SourceOrigin { + /** + * The name of the range in the source map, if one was provided + */ + name: string | undefined; + /** + * The file name of the original source, as reported in the SourceMap + */ + fileName: string; + /** + * The 1-indexed lineNumber of the corresponding call site in the original source + */ + lineNumber: number; + /** + * The 1-indexed columnNumber of the corresponding call site in the original source + */ + columnNumber: number; + } + /** + * @since v13.7.0, v12.17.0 + */ + class SourceMap { + constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions); + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ + readonly payload: SourceMapPayload; + /** + * Given a line offset and column offset in the generated source + * file, returns an object representing the SourceMap range in the + * original file if found, or an empty object if not. + * + * The object returned contains the following keys: + * + * The returned value represents the raw range as it appears in the + * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and + * column numbers as they appear in Error messages and CallSite + * objects. + * + * To get the corresponding 1-indexed line and column numbers from a + * lineNumber and columnNumber as they are reported by Error stacks + * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` + * @param lineOffset The zero-indexed line number offset in the generated source + * @param columnOffset The zero-indexed column number offset in the generated source + */ + findEntry(lineOffset: number, columnOffset: number): SourceMapping | {}; + /** + * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, + * find the corresponding call site location in the original source. + * + * If the `lineNumber` and `columnNumber` provided are not found in any source map, + * then an empty object is returned. + * @param lineNumber The 1-indexed line number of the call site in the generated source + * @param columnNumber The 1-indexed column number of the call site in the generated source + */ + findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; + } + function runMain(main?: string): void; + function wrap(script: string): string; + } + global { + namespace NodeJS { + interface Module { + /** + * The module objects required for the first time by this one. + * @since v0.1.16 + */ + children: Module[]; + /** + * The `module.exports` object is created by the `Module` system. Sometimes this is + * not acceptable; many want their module to be an instance of some class. To do + * this, assign the desired export object to `module.exports`. + * @since v0.1.16 + */ + exports: any; + /** + * The fully resolved filename of the module. + * @since v0.1.16 + */ + filename: string; + /** + * The identifier for the module. Typically this is the fully resolved + * filename. + * @since v0.1.16 + */ + id: string; + /** + * `true` if the module is running during the Node.js preload + * phase. + * @since v15.4.0, v14.17.0 + */ + isPreloading: boolean; + /** + * Whether or not the module is done loading, or is in the process of + * loading. + * @since v0.1.16 + */ + loaded: boolean; + /** + * The module that first required this one, or `null` if the current module is the + * entry point of the current process, or `undefined` if the module was loaded by + * something that is not a CommonJS module (e.g. REPL or `import`). + * @since v0.1.16 + * @deprecated Please use `require.main` and `module.children` instead. + */ + parent: Module | null | undefined; + /** + * The directory name of the module. This is usually the same as the + * `path.dirname()` of the `module.id`. + * @since v11.14.0 + */ + path: string; + /** + * The search paths for the module. + * @since v0.4.0 + */ + paths: string[]; + /** + * The `module.require()` method provides a way to load a module as if + * `require()` was called from the original module. + * @since v0.5.1 + */ + require(id: string): any; + } + interface Require { + /** + * Used to import modules, `JSON`, and local files. + * @since v0.1.13 + */ + (id: string): any; + /** + * Modules are cached in this object when they are required. By deleting a key + * value from this object, the next `require` will reload the module. + * This does not apply to + * [native addons](https://nodejs.org/docs/latest-v26.x/api/addons.html), + * for which reloading will result in an error. + * @since v0.3.0 + */ + cache: Dict; + /** + * Instruct `require` on how to handle certain file extensions. + * @since v0.3.0 + * @deprecated + */ + extensions: RequireExtensions; + /** + * The `Module` object representing the entry script loaded when the Node.js + * process launched, or `undefined` if the entry point of the program is not a + * CommonJS module. + * @since v0.1.17 + */ + main: Module | undefined; + /** + * @since v0.3.0 + */ + resolve: RequireResolve; + } + /** @deprecated */ + interface RequireExtensions extends Dict<(module: Module, filename: string) => any> { + ".js": (module: Module, filename: string) => any; + ".json": (module: Module, filename: string) => any; + ".node": (module: Module, filename: string) => any; + } + interface RequireResolveOptions { + /** + * Paths to resolve module location from. If present, these + * paths are used instead of the default resolution paths, with the exception + * of + * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v26.x/api/modules.html#loading-from-the-global-folders) + * like `$HOME/.node_modules`, which are + * always included. Each of these paths is used as a starting point for + * the module resolution algorithm, meaning that the `node_modules` hierarchy + * is checked from this location. + * @since v8.9.0 + */ + paths?: string[] | undefined; + } + interface RequireResolve { + /** + * Use the internal `require()` machinery to look up the location of a module, + * but rather than loading the module, just return the resolved filename. + * + * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown. + * @since v0.3.0 + * @param request The module path to resolve. + */ + (request: string, options?: RequireResolveOptions): string; + /** + * Returns an array containing the paths searched during resolution of `request` or + * `null` if the `request` string references a core module, for example `http` or + * `fs`. + * @since v8.9.0 + * @param request The module path whose lookup paths are being retrieved. + */ + paths(request: string): string[] | null; + } + } + /** + * The directory name of the current module. This is the same as the + * `path.dirname()` of the `__filename`. + * @since v0.1.27 + */ + var __dirname: string; + /** + * The file name of the current module. This is the current module file's absolute + * path with symlinks resolved. + * + * For a main program this is not necessarily the same as the file name used in the + * command line. + * @since v0.0.1 + */ + var __filename: string; + /** + * The `exports` variable is available within a module's file-level scope, and is + * assigned the value of `module.exports` before the module is evaluated. + * @since v0.1.16 + */ + var exports: NodeJS.Module["exports"]; + /** + * A reference to the current module. + * @since v0.1.16 + */ + var module: NodeJS.Module; + /** + * @since v0.1.13 + */ + var require: NodeJS.Require; + // Global-scope aliases for backwards compatibility with @types/node <13.0.x + // TODO: consider removing in a future major version update + /** @deprecated Use `NodeJS.Module` instead. */ + interface NodeModule extends NodeJS.Module {} + /** @deprecated Use `NodeJS.Require` instead. */ + interface NodeRequire extends NodeJS.Require {} + /** @deprecated Use `NodeJS.RequireResolve` instead. */ + interface RequireResolve extends NodeJS.RequireResolve {} + } + export = Module; +} +declare module "module" { + import module = require("node:module"); + export = module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 000000000..3f104c583 --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,1074 @@ +declare module "node:net" { + import { NonSharedBuffer } from "node:buffer"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import * as stream from "node:stream"; + type LookupFunction = ( + hostname: string, + options: dns.LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, + ) => void; + interface AddressInfo { + address: string; + family: string; + port: number; + } + interface SocketConstructorOpts { + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + onread?: OnReadOpts | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + signal?: AbortSignal | undefined; + noDelay?: boolean | undefined; + keepAlive?: boolean | undefined; + keepAliveInitialDelay?: number | undefined; + blockList?: BlockList | undefined; + typeOfService?: number | undefined; + handle?: BoundSocket | undefined; + } + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. + * Return `false` from this function to implicitly `pause()` the socket. + */ + callback(bytesWritten: number, buffer: Uint8Array): boolean; + } + interface TcpSocketConnectOpts { + port: number; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamily?: boolean | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamilyAttemptTimeout?: number | undefined; + } + interface IpcSocketConnectOpts { + path: string; + } + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; + interface SetKeepAliveOptions { + enable?: boolean | undefined; + initialDelay?: number | undefined; + interval?: number | undefined; + count?: number | undefined; + } + interface SocketEventMap extends Omit { + "close": [hadError: boolean]; + "connect": []; + "connectionAttempt": [ip: string, port: number, family: number]; + "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error]; + "connectionAttemptTimeout": [ip: string, port: number, family: number]; + "data": [data: string | NonSharedBuffer]; + "lookup": [err: Error | null, address: string, family: number | null, host: string]; + "ready": []; + "timeout": []; + } + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + /** + * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. + * If the socket is still writable it implicitly calls `socket.end()`. + * @since v0.3.4 + */ + destroySoon(): void; + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + */ + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + /** + * Sends data on the socket, with an explicit encoding for string data. + * @see {@link Socket.write} for full details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ + write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ + setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ + pause(): this; + /** + * Close the TCP connection by sending an RST packet and destroy the stream. + * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. + * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. + * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. + * @since v18.3.0, v16.17.0 + */ + resetAndDestroy(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ + resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ + setNoDelay(noDelay?: boolean): this; + /** + * Configure keep-alive using an options object. See `socket.setKeepAlive()` + * for a description of each property. + * + * ```js + * socket.setKeepAlive({ enable: true, initialDelay: 1000, interval: 1000, count: 10 }); + * ``` + * @since v26.4.0 + * @returns The socket itself. + */ + setKeepAlive(options: SetKeepAliveOptions): this; + /** + * Configure keep-alive using positional arguments. See + * `socket.setKeepAlive()` for a description of each argument. + * @since v0.1.92 + * @param enable **Default:** `false` + * @param initialDelay **Default:** `0` + * @param interval **Default:** `1000` + * @param count **Default:** `10` + * @returns The socket itself. + */ + setKeepAlive(enable?: boolean, initialDelay?: number, interval?: number, count?: number): this; + /** + * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic + * Class for IPv6 packets for this socket. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @returns The current TOS value. + */ + getTypeOfService(): number; + /** + * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6 + * Packets sent from this socket. This can be used to prioritize network traffic. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @param tos The TOS value to set (0-255). + * @returns The socket itself. + */ + setTypeOfService(tos: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ + address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + ref(): this; + /** + * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` + * and it is an array of the addresses that have been attempted. + * + * Each address is a string in the form of `$IP:$PORT`. + * If the connection was successful, then the last address is the one that the socket is currently connected to. + * @since v19.4.0 + */ + readonly autoSelectFamilyAttemptedAddresses: string[]; + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ + readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ + readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ + readonly bytesWritten: number; + /** + * If `true`, `socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ + readonly connecting: boolean; + /** + * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting + * (see `socket.connecting`). + * @since v11.2.0, v10.16.0 + */ + readonly pending: boolean; + /** + * See `writable.destroyed` for further details. + */ + readonly destroyed: boolean; + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. + * @since v18.8.0, v16.18.0 + */ + readonly localFamily?: string; + /** + * This property represents the state of the connection as a string. + * + * * If the socket is connecting, `socket.readyState` is `opening`. + * * If the socket is readable and writable, it is `open`. + * * If the socket is readable and not writable, it is `readOnly`. + * * If the socket is not readable and writable, it is `writeOnly`. + * * Otherwise, it is `closed`. + * @since v0.5.0 + */ + readonly readyState: SocketReadyState; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.11.14 + */ + readonly remoteFamily: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remotePort: number | undefined; + /** + * Reference to the server that accepted the socket. This is `null` for sockets + * that were not accepted by a server. + * @since v0.3.4 + */ + readonly server: Server | null; + /** + * The socket timeout in milliseconds as set by `socket.setTimeout()`. + * It is `undefined` if a timeout has not been set. + * @since v10.7.0 + */ + readonly timeout?: number; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): this; + /** + * Half-closes the socket, with one final chunk of data. + * @see {@link Socket.end} for full details. + * @since v0.1.90 + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(buffer: Uint8Array | string, callback?: () => void): this; + /** + * Half-closes the socket, with one final chunk of data. + * @see {@link Socket.end} for full details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; + // #region InternalEventEmitter + addListener(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: SocketEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: SocketEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface BoundSocketOptions { + /** + * Local address to bind. Must be a numeric IP literal; no DNS + * resolution is performed. **Default:** `'0.0.0.0'`, or `'::'` when + * `ipv6Only` is `true`. + */ + host?: string | undefined; + /** + * Local port. `0` requests an OS-assigned ephemeral port. + * **Default:** `0`. + */ + port?: number | undefined; + /** + * Sets `IPV6_V6ONLY`, disabling dual-stack support so the + * socket binds IPv6 only. Only meaningful for IPv6 binds. **Default:** + * `false`. + */ + ipv6Only?: boolean | undefined; + /** + * Sets `SO_REUSEPORT`, allowing multiple sockets to bind + * the same address and port for kernel-level load balancing. Support is + * platform-dependent. **Default:** `false`. + */ + reusePort?: boolean | undefined; + } + /** + * Allows for the synchronous creation of a pre-bound socket, that can be passed + * to `listen()` or `new net.Socket()` later on. For `listen()` this enables + * synchronous port reservation, while for `new net.Socket()`, it allows control + * over the local egress port/IP, via `bind(2)` semantics. + * + * Adoption transfers ownership of the socket; afterwards `address()` and `close()` + * throw `ERR_SOCKET_HANDLE_ADOPTED`. A handle that is never adopted must be + * closed to avoid leaking the socket. + * + * When an adopted `BoundSocket` connects to a numeric IP literal, `connect(2)` is + * issued synchronously, so `socket.localAddress` is resolved once + * `socket.connect()` returns. Connection failures are still reported via a + * deferred `'error'` event. + * + * ```js + * import net from 'node:net'; + * + * const bound = new net.BoundSocket(); + * const { port } = bound.address(); + * console.log(`Reserved port ${port} for server`); + * + * const server = net.createServer(); + * server.listen(bound); // Adopt as a server, or pass to new net.Socket() instead. + * ``` + * @since v26.4.0 + */ + class BoundSocket { + /** + * @since v26.4.0 + */ + constructor(options?: BoundSocketOptions); + /** + * Returns the bound local address. When bound with `port: 0`, `port` is the + * OS-assigned ephemeral port. + * @since v26.4.0 + * @returns An object with `address`, `family`, and `port` properties, + * as `server.address()` returns. + */ + address(): AddressInfo; + /** + * Returns the file descriptor of the bound socket. Ownership remains with the + * `BoundSocket`, so the descriptor must not be closed by the caller. The + * descriptor is only available before the handle is adopted; afterwards it belongs + * to the adopting `net.Server` or `net.Socket` and `fd()` throws + * `ERR_SOCKET_HANDLE_ADOPTED`. + * @since v26.4.0 + * @returns The underlying OS file descriptor, or `-1` on platforms + * that do not expose one for sockets (such as Windows). + */ + fd(): number; + /** + * Releases the bound socket. Only needed when the handle is never adopted. + * @since v26.4.0 + */ + close(): void; + /** + * Closes the handle if it has not been adopted or closed; otherwise a no-op. + * @since v26.4.0 + */ + [Symbol.dispose](): void; + } + interface ListenOptions extends Abortable { + backlog?: number | undefined; + exclusive?: boolean | undefined; + handle?: BoundSocket | undefined; + host?: string | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + reusePort?: boolean | undefined; + path?: string | undefined; + port?: number | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + } + interface ServerOpts { + /** + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default false + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). + * @since v18.17.0, v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * `blockList` can be used for disabling inbound + * access to specific IP addresses, IP ranges, or IP subnets. This does not + * work if the server is behind a reverse proxy, NAT, etc. because the address + * checked against the block list is the address of the proxy, or the one + * specified by the NAT. + * @since v22.13.0 + */ + blockList?: BlockList | undefined; + } + interface DropArgument { + localAddress?: string; + localPort?: number; + localFamily?: string; + remoteAddress?: string; + remotePort?: number; + remoteFamily?: string; + } + interface ServerEventMap { + "close": []; + "connection": [socket: Socket]; + "error": [err: Error]; + "listening": []; + "drop": [data?: DropArgument]; + } + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ + class Server implements EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.error('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ + close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ + address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ + getConnections(cb: (error: Error | null, count: number) => void): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ + ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ + unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ + maxConnections: number; + connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ + readonly listening: boolean; + /** + * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface Server extends InternalEventEmitter {} + type IPVersion = "ipv4" | "ipv6"; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0, v14.18.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0, v14.18.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0, v14.18.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0, v14.18.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0, v14.18.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; + /** + * The list of rules added to the blocklist. + * @since v15.0.0, v14.18.0 + */ + rules: readonly string[]; + /** + * Returns `true` if the `value` is a `net.BlockList`. + * @since v22.13.0 + * @param value Any JS value + */ + static isBlockList(value: unknown): value is BlockList; + /** + * ```js + * const blockList = new net.BlockList(); + * const data = [ + * 'Subnet: IPv4 192.168.1.0/24', + * 'Address: IPv4 10.0.0.5', + * 'Range: IPv4 192.168.2.1-192.168.2.10', + * 'Range: IPv4 10.0.0.1-10.0.0.10', + * ]; + * blockList.fromJSON(data); + * blockList.fromJSON(JSON.stringify(data)); + * ``` + * @since v24.5.0 + * @experimental + */ + fromJSON(data: string | readonly string[]): void; + /** + * @since v24.5.0 + * @experimental + */ + toJSON(): readonly string[]; + } + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of a TCP echo server which listens for connections + * on port 8124: + * + * ```js + * import net from 'node:net'; + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```bash + * telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```bash + * nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. + * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function getDefaultAutoSelectFamily(): boolean; + /** + * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. + * @param value The new default value. + * The initial default value is `true`, unless the command line option + * `--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function setDefaultAutoSelectFamily(value: boolean): void; + /** + * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. + * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. + * @since v19.8.0, v18.8.0 + */ + function getDefaultAutoSelectFamilyAttemptTimeout(): number; + /** + * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line + * option `--network-family-autoselection-attempt-timeout`. + * @since v19.8.0, v18.8.0 + */ + function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; + /** + * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 + * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. + * + * ```js + * net.isIP('::1'); // returns 6 + * net.isIP('127.0.0.1'); // returns 4 + * net.isIP('127.000.000.001'); // returns 0 + * net.isIP('127.0.0.1/24'); // returns 0 + * net.isIP('fhqwhgads'); // returns 0 + * ``` + * @since v0.3.0 + */ + function isIP(input: string): number; + /** + * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no + * leading zeroes. Otherwise, returns `false`. + * + * ```js + * net.isIPv4('127.0.0.1'); // returns true + * net.isIPv4('127.000.000.001'); // returns false + * net.isIPv4('127.0.0.1/24'); // returns false + * net.isIPv4('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv4(input: string): boolean; + /** + * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. + * + * ```js + * net.isIPv6('::1'); // returns true + * net.isIPv6('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0, v14.18.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0, v14.18.0 + */ + readonly port: number; + /** + * @since v15.14.0, v14.18.0 + */ + readonly flowlabel: number; + /** + * @since v22.13.0 + * @param input An input string containing an IP address and optional port, + * e.g. `123.1.2.3:1234` or `[1::1]:1234`. + * @returns Returns a `SocketAddress` if parsing was successful. + * Otherwise returns `undefined`. + */ + static parse(input: string): SocketAddress | undefined; + } +} +declare module "net" { + export * from "node:net"; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 000000000..751d4b41e --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,498 @@ +declare module "node:os" { + import { NonSharedBuffer } from "buffer"; + interface CpuInfo { + model: string; + speed: number; + times: { + /** The number of milliseconds the CPU has spent in user mode. */ + user: number; + /** The number of milliseconds the CPU has spent in nice mode. */ + nice: number; + /** The number of milliseconds the CPU has spent in sys mode. */ + sys: number; + /** The number of milliseconds the CPU has spent in idle mode. */ + idle: number; + /** The number of milliseconds the CPU has spent in irq mode. */ + irq: number; + }; + } + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + scopeid?: number; + } + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T | null; + homedir: T; + } + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ + function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ + function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ + function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ + function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ + function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20, + * }, + * }, + * ]; + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * + * `os.cpus().length` should not be used to calculate the amount of parallelism + * available to an application. Use {@link availableParallelism} for this purpose. + * @since v0.3.3 + */ + function cpus(): CpuInfo[]; + /** + * Returns an estimate of the default amount of parallelism a program should use. + * Always returns a value greater than zero. + * + * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). + * @since v19.4.0, v18.14.0 + */ + function availableParallelism(): number; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ + function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ + function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```json + * { + * "lo": [ + * { + * "address:": "127.0.0.1", + * "netmask:": "255.0.0.0", + * "family:": "IPv4", + * "mac:": "00:00:00:00:00:00", + * "internal:": true, + * "cidr:": "127.0.0.1/8" + * }, + * { + * "address:": "::1", + * "netmask:": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + * "family:": "IPv6", + * "mac:": "00:00:00:00:00:00", + * "scopeid:": 0, + * "internal:": true, + * "cidr:": "::1/128" + * } + * ], + * "eth0": [ + * { + * "address:": "192.168.1.108", + * "netmask:": "255.255.255.0", + * "family:": "IPv4", + * "mac:": "01:02:03:0a:0b:0c", + * "internal:": false, + * "cidr:": "192.168.1.108/24" + * }, + * { + * "address:": "fe80::a00:27ff:fe4e:66a1", + * "netmask:": "ffff:ffff:ffff:ffff::", + * "family:": "IPv6", + * "mac:": "01:02:03:0a:0b:0c", + * "scopeid:": 1, + * "internal:": false, + * "cidr:": "fe80::a00:27ff:fe4e:66a1/64" + * } + * ] + * } + * ``` + * @since v0.6.0 + */ + function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ + function homedir(): string; + interface UserInfoOptions { + encoding?: BufferEncoding | "buffer" | undefined; + } + interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions { + encoding: "buffer"; + } + interface UserInfoOptionsWithStringEncoding extends UserInfoOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a [`SystemError`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. + * @since v6.0.0 + */ + function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo; + function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo; + function userInfo(options: UserInfoOptions): UserInfo; + type SignalConstants = { + [key in NodeJS.Signals]: number; + }; + namespace constants { + const UV_UDP_REUSEADDR: number; + namespace signals {} + const signals: SignalConstants; + namespace errno { + 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 EDQUOT: 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 EMULTIHOP: 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 ESTALE: 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; + } + namespace dlopen { + const RTLD_LAZY: number; + const RTLD_NOW: number; + const RTLD_GLOBAL: number; + const RTLD_LOCAL: number; + const RTLD_DEEPBIND: number; + } + namespace priority { + const PRIORITY_LOW: number; + const PRIORITY_BELOW_NORMAL: number; + const PRIORITY_NORMAL: number; + const PRIORITY_ABOVE_NORMAL: number; + const PRIORITY_HIGH: number; + const PRIORITY_HIGHEST: number; + } + } + const devNull: string; + /** + * The operating system-specific end-of-line marker. + * * `\n` on POSIX + * * `\r\n` on Windows + */ + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, + * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * + * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v26.x/api/process.html#processarch). + * @since v0.5.0 + */ + function arch(): NodeJS.Architecture; + /** + * Returns a string identifying the kernel version. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 + */ + function version(): string; + /** + * Returns a string identifying the operating system platform for which + * the Node.js binary was compiled. The value is set at compile time. + * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ + function platform(): NodeJS.Platform; + /** + * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, + * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`. + * + * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v18.9.0, v16.18.0 + */ + function machine(): string; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ + function tmpdir(): string; + /** + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 + */ + function endianness(): "BE" | "LE"; + /** + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. + */ + function getPriority(pid?: number): number; + /** + * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. + */ + function setPriority(priority: number): void; + function setPriority(pid: number, priority: number): void; +} +declare module "os" { + export * from "node:os"; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 000000000..e111aa84c --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,140 @@ +{ + "name": "@types/node", + "version": "26.6.5", + "description": "TypeScript definitions for node", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "githubUsername": "Microsoft", + "url": "https://github.com/Microsoft" + }, + { + "name": "Alberto Schiabel", + "githubUsername": "jkomyno", + "url": "https://github.com/jkomyno" + }, + { + "name": "Andrew Makarov", + "githubUsername": "r3nya", + "url": "https://github.com/r3nya" + }, + { + "name": "Benjamin Toueg", + "githubUsername": "btoueg", + "url": "https://github.com/btoueg" + }, + { + "name": "David Junger", + "githubUsername": "touffy", + "url": "https://github.com/touffy" + }, + { + "name": "Mohsen Azimi", + "githubUsername": "mohsen1", + "url": "https://github.com/mohsen1" + }, + { + "name": "Nikita Galkin", + "githubUsername": "galkin", + "url": "https://github.com/galkin" + }, + { + "name": "Sebastian Silbermann", + "githubUsername": "eps1lon", + "url": "https://github.com/eps1lon" + }, + { + "name": "Wilco Bakker", + "githubUsername": "WilcoBakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "Trivikram Kamat", + "githubUsername": "trivikr", + "url": "https://github.com/trivikr" + }, + { + "name": "Junxiao Shi", + "githubUsername": "yoursunny", + "url": "https://github.com/yoursunny" + }, + { + "name": "ExE Boss", + "githubUsername": "ExE-Boss", + "url": "https://github.com/ExE-Boss" + }, + { + "name": "Piotr Błażejewicz", + "githubUsername": "peterblazejewicz", + "url": "https://github.com/peterblazejewicz" + }, + { + "name": "Anna Henningsen", + "githubUsername": "addaleax", + "url": "https://github.com/addaleax" + }, + { + "name": "NodeJS Contributors", + "githubUsername": "NodeJS", + "url": "https://github.com/NodeJS" + }, + { + "name": "Linus Unnebäck", + "githubUsername": "LinusU", + "url": "https://github.com/LinusU" + }, + { + "name": "wafuwafu13", + "githubUsername": "wafuwafu13", + "url": "https://github.com/wafuwafu13" + }, + { + "name": "Matteo Collina", + "githubUsername": "mcollina", + "url": "https://github.com/mcollina" + }, + { + "name": "Dmitry Semigradsky", + "githubUsername": "Semigradsky", + "url": "https://github.com/Semigradsky" + }, + { + "name": "René", + "githubUsername": "Renegade334", + "url": "https://github.com/Renegade334" + }, + { + "name": "Yagiz Nizipli", + "githubUsername": "anonrig", + "url": "https://github.com/anonrig" + } + ], + "main": "", + "types": "index.d.ts", + "typesVersions": { + "<=5.6": { + "*": [ + "ts5.6/*" + ] + }, + "<=5.7": { + "*": [ + "ts5.7/*" + ] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": { + "undici-types": "~8.9.0" + }, + "peerDependencies": {}, + "typesPublisherContentHash": "3196021f34db9bcb68a729bd29ff60434d3b4c5f49619270db25e7dbd6dc651c", + "typeScriptVersion": "5.6" +} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 000000000..ae8fd973f --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,178 @@ +declare module "node:path" { + namespace path { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string | undefined; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string | undefined; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string | undefined; + /** + * The file extension (if any) such as '.html' + */ + ext?: string | undefined; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string | undefined; + } + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory. + * + * @param path string path to normalize. + * @throws {TypeError} if `path` is not a string. + */ + function normalize(path: string): string; + /** + * Join all arguments together and normalize the resulting path. + * + * @param paths paths to join. + * @throws {TypeError} if any of the path segments is not a string. + */ + function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param paths A sequence of paths or path segments. + * @throws {TypeError} if any of the arguments is not a string. + */ + function resolve(...paths: string[]): string; + /** + * The `path.matchesGlob()` method determines if `path` matches the `pattern`. + * @param path The path to glob-match against. + * @param pattern The glob to check the path against. + * @returns Whether or not the `path` matched the `pattern`. + * @throws {TypeError} if `path` or `pattern` are not strings. + * @since v22.5.0 + */ + function matchesGlob(path: string, pattern: string): boolean; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * If the given {path} is a zero-length string, `false` will be returned. + * + * @param path path to test. + * @throws {TypeError} if `path` is not a string. + */ + function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to} based on the current working directory. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @throws {TypeError} if either `from` or `to` is not a string. + */ + function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function dirname(path: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param path the path to evaluate. + * @param suffix optionally, an extension to remove from the result. + * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. + */ + function basename(path: string, suffix?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function extname(path: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + const sep: "\\" | "/"; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + const delimiter: ";" | ":"; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param path path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function parse(path: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathObject path to evaluate. + */ + function format(pathObject: FormatInputPathObject): string; + /** + * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. + * If path is not a string, path will be returned without modifications. + * This method is meaningful only on Windows system. + * On POSIX systems, the method is non-operational and always returns path without modifications. + */ + function toNamespacedPath(path: string): string; + } + namespace path { + export { + /** + * The `path.posix` property provides access to POSIX specific implementations of the `path` methods. + * + * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`. + */ + path as posix, + /** + * The `path.win32` property provides access to Windows-specific implementations of the `path` methods. + * + * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`. + */ + path as win32, + }; + } + export = path; +} +declare module "path" { + import path = require("node:path"); + export = path; +} diff --git a/node_modules/@types/node/path/posix.d.ts b/node_modules/@types/node/path/posix.d.ts new file mode 100644 index 000000000..d60f629fb --- /dev/null +++ b/node_modules/@types/node/path/posix.d.ts @@ -0,0 +1,8 @@ +declare module "node:path/posix" { + import path = require("node:path"); + export = path.posix; +} +declare module "path/posix" { + import path = require("path"); + export = path.posix; +} diff --git a/node_modules/@types/node/path/win32.d.ts b/node_modules/@types/node/path/win32.d.ts new file mode 100644 index 000000000..e6aa9fa61 --- /dev/null +++ b/node_modules/@types/node/path/win32.d.ts @@ -0,0 +1,8 @@ +declare module "node:path/win32" { + import path = require("node:path"); + export = path.win32; +} +declare module "path/win32" { + import path = require("path"); + export = path.win32; +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 000000000..e4bea8f3b --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,617 @@ +declare module "node:perf_hooks" { + import { InternalEventTargetEventProperties } from "node:events"; + // #region web types + type EntryType = + | "dns" // Node.js only + | "function" // Node.js only + | "gc" // Node.js only + | "http2" // Node.js only + | "http" // Node.js only + | "mark" // available on the Web + | "measure" // available on the Web + | "net" // Node.js only + | "node" // Node.js only + | "quic" // Node.js only + | "resource"; // available on the Web + interface ConnectionTimingInfo { + domainLookupStartTime: number; + domainLookupEndTime: number; + connectionStartTime: number; + connectionEndTime: number; + secureConnectionStartTime: number; + ALPNNegotiatedProtocol: string; + } + interface FetchTimingInfo { + startTime: number; + redirectStartTime: number; + redirectEndTime: number; + postRedirectStartTime: number; + finalServiceWorkerStartTime: number; + finalNetworkRequestStartTime: number; + finalNetworkResponseStartTime: number; + endTime: number; + finalConnectionTimingInfo: ConnectionTimingInfo | null; + encodedBodySize: number; + decodedBodySize: number; + } + type PerformanceEntryList = PerformanceEntry[]; + interface PerformanceMarkOptions { + detail?: any; + startTime?: number; + } + interface PerformanceMeasureOptions { + detail?: any; + duration?: number; + end?: string | number; + start?: string | number; + } + interface PerformanceObserverCallback { + (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; + } + interface PerformanceObserverInit { + buffered?: boolean; + entryTypes?: EntryType[]; + type?: EntryType; + } + interface PerformanceEventMap { + "resourcetimingbufferfull": Event; + } + interface Performance extends EventTarget, InternalEventTargetEventProperties { + readonly nodeTiming: PerformanceNodeTiming; + readonly timeOrigin: number; + clearMarks(markName?: string): void; + clearMeasures(measureName?: string): void; + clearResourceTimings(resourceTimingName?: string): void; + getEntries(): PerformanceEntryList; + getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; + getEntriesByType(type: EntryType): PerformanceEntryList; + mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + markResourceTiming( + timingInfo: FetchTimingInfo, + requestedUrl: string, + initiatorType: string, + global: unknown, + cacheMode: string, + bodyInfo: unknown, + responseStatus: number, + deliveryType?: string, + ): PerformanceResourceTiming; + measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure; + measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; + now(): number; + setResourceTimingBufferSize(maxSize: number): void; + toJSON(): any; + addEventListener( + type: K, + listener: (ev: PerformanceEventMap[K]) => void, + options?: AddEventListenerOptions | boolean, + ): void; + addEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: AddEventListenerOptions | boolean, + ): void; + removeEventListener( + type: K, + listener: (ev: PerformanceEventMap[K]) => void, + options?: EventListenerOptions | boolean, + ): void; + removeEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: EventListenerOptions | boolean, + ): void; + /** + * This is an alias of `perf_hooks.eventLoopUtilization()`. + * + * _This property is an extension by Node.js. It is not available in Web browsers._ + * @since v14.10.0, v12.19.0 + * @param utilization1 The result of a previous call to + * `eventLoopUtilization()`. + * @param utilization2 The result of a previous call to + * `eventLoopUtilization()` prior to `utilization1`. + */ + eventLoopUtilization( + utilization1?: EventLoopUtilization, + utilization2?: EventLoopUtilization, + ): EventLoopUtilization; + /** + * This is an alias of `perf_hooks.timerify()`. + * + * _This property is an extension by Node.js. It is not available in Web browsers._ + * @since v8.5.0 + */ + timerify any>(fn: T, options?: TimerifyOptions): T; + } + var Performance: { + prototype: Performance; + new(): Performance; + }; + interface PerformanceEntry { + readonly duration: number; + readonly entryType: EntryType; + readonly name: string; + readonly startTime: number; + toJSON(): any; + } + var PerformanceEntry: { + prototype: PerformanceEntry; + new(): PerformanceEntry; + }; + interface PerformanceMark extends PerformanceEntry { + readonly detail: any; + readonly entryType: "mark"; + } + var PerformanceMark: { + prototype: PerformanceMark; + new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + }; + interface PerformanceMeasure extends PerformanceEntry { + readonly detail: any; + readonly entryType: "measure"; + } + var PerformanceMeasure: { + prototype: PerformanceMeasure; + new(): PerformanceMeasure; + }; + interface PerformanceObserver { + disconnect(): void; + observe(options: PerformanceObserverInit): void; + takeRecords(): PerformanceEntryList; + } + var PerformanceObserver: { + prototype: PerformanceObserver; + new(callback: PerformanceObserverCallback): PerformanceObserver; + readonly supportedEntryTypes: readonly EntryType[]; + }; + interface PerformanceObserverEntryList { + getEntries(): PerformanceEntryList; + getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; + getEntriesByType(type: EntryType): PerformanceEntryList; + } + var PerformanceObserverEntryList: { + prototype: PerformanceObserverEntryList; + new(): PerformanceObserverEntryList; + }; + interface PerformanceResourceTiming extends PerformanceEntry { + readonly connectEnd: number; + readonly connectStart: number; + readonly decodedBodySize: number; + readonly domainLookupEnd: number; + readonly domainLookupStart: number; + readonly encodedBodySize: number; + readonly entryType: "resource"; + readonly fetchStart: number; + readonly initiatorType: string; + readonly nextHopProtocol: string; + readonly redirectEnd: number; + readonly redirectStart: number; + readonly requestStart: number; + readonly responseEnd: number; + readonly responseStart: number; + readonly responseStatus: number; + readonly secureConnectionStart: number; + readonly transferSize: number; + readonly workerStart: number; + toJSON(): any; + } + var PerformanceResourceTiming: { + prototype: PerformanceResourceTiming; + new(): PerformanceResourceTiming; + }; + var performance: Performance; + // #endregion + /** + * _This class is an extension by Node.js. It is not available in Web browsers._ + * + * Provides detailed Node.js timing data. + * + * The constructor of this class is not exposed to users directly. + * @since v19.0.0 + */ + class PerformanceNodeEntry extends PerformanceEntry { + /** + * Additional detail specific to the `entryType`. + * @since v16.0.0 + */ + readonly detail: any; + readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node" | "quic"; + } + interface UVMetrics { + /** + * Number of event loop iterations. + */ + readonly loopCount: number; + /** + * Number of events that have been processed by the event handler. + */ + readonly events: number; + /** + * Number of events that were waiting to be processed when the event provider was called. + */ + readonly eventsWaiting: number; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 + */ + readonly bootstrapComplete: number; + readonly entryType: "node"; + /** + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 + */ + readonly environment: number; + /** + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 + */ + readonly idleTime: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 + */ + readonly loopExit: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 + */ + readonly loopStart: number; + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + * @since v8.5.0 + */ + readonly nodeStart: number; + /** + * This is a wrapper to the `uv_metrics_info` function. + * It returns the current set of event loop metrics. + * + * It is recommended to use this property inside a function whose execution was + * scheduled using `setImmediate` to avoid collecting metrics before finishing all + * operations scheduled during the current loop iteration. + * @since v22.8.0, v20.18.0 + */ + readonly uvMetricsInfo: UVMetrics; + /** + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 + */ + readonly v8Start: number; + } + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + const NODE_PERFORMANCE_GC_FLAGS_NO: number; + const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; + const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; + const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; + const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; + } + interface EventLoopMonitorOptions { + /** + * When `true`, samples are taken once per + * event loop iteration. **Default:** `false`. + */ + samplePerIteration?: boolean | undefined; + /** + * The sampling rate in milliseconds for interval-based + * sampling. Must be greater than zero. This option is ignored when + * `samplePerIteration` is `true`. **Default:** `10`. + */ + resolution?: number | undefined; + } + interface Histogram { + /** + * The number of samples recorded by the histogram. + * @since v17.4.0, v16.14.0 + */ + readonly count: number; + /** + * The number of samples recorded by the histogram. + * v17.4.0, v16.14.0 + */ + readonly countBigInt: bigint; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 + */ + readonly exceeds: number; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. + * @since v17.4.0, v16.14.0 + */ + readonly exceedsBigInt: bigint; + /** + * The maximum recorded event loop delay. + * @since v11.10.0 + */ + readonly max: number; + /** + * The maximum recorded event loop delay. + * v17.4.0, v16.14.0 + */ + readonly maxBigInt: number; + /** + * The mean of the recorded event loop delays. + * @since v11.10.0 + */ + readonly mean: number; + /** + * The minimum recorded event loop delay. + * @since v11.10.0 + */ + readonly min: number; + /** + * The minimum recorded event loop delay. + * v17.4.0, v16.14.0 + */ + readonly minBigInt: bigint; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; + /** + * Returns the value at the given percentile. + * @since v17.4.0, v16.14.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentileBigInt(percentile: number): bigint; + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 + */ + readonly percentiles: Map; + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v17.4.0, v16.14.0 + */ + readonly percentilesBigInt: Map; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * The standard deviation of the recorded event loop delays. + * @since v11.10.0 + */ + readonly stddev: number; + } + /** + * A `Histogram` that records event loop delay, returned by + * `perf_hooks.monitorEventLoopDelay()`. + */ + interface ELDHistogram extends Histogram { + /** + * Disables event loop delay sampling. Returns `true` if sampling was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + /** + * Enables event loop delay sampling. Returns `true` if sampling was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables event loop delay sampling when the histogram is disposed. + * + * ```js + * const { monitorEventLoopDelay } = require('node:perf_hooks'); + * { + * using hist = monitorEventLoopDelay({ resolution: 20 }); + * hist.enable(); + * // The histogram will be disabled when the block is exited. + * } + * ``` + * @since v24.2.0 + */ + [Symbol.dispose](): void; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0, v14.18.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * @since v15.9.0, v14.18.0 + */ + recordDelta(): void; + /** + * Adds the values from `other` to this histogram. + * @since v17.4.0, v16.14.0 + */ + add(other: RecordableHistogram): void; + } + interface EventLoopUtilization { + idle: number; + active: number; + utilization: number; + } + /** + * The `eventLoopUtilization()` function returns an object that contains the + * cumulative duration of time the event loop has been both idle and active as a + * high resolution milliseconds timer. The `utilization` value is the calculated + * Event Loop Utilization (ELU). + * + * If bootstrapping has not yet finished on the main thread the properties have + * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#worker-threads) since + * bootstrap happens within the event loop. + * + * Both `utilization1` and `utilization2` are optional parameters. + * + * If `utilization1` is passed, then the delta between the current call's `active` + * and `idle` times, as well as the corresponding `utilization` value are + * calculated and returned (similar to `process.hrtime()`). + * + * If `utilization1` and `utilization2` are both passed, then the delta is + * calculated between the two arguments. This is a convenience option because, + * unlike `process.hrtime()`, calculating the ELU is more complex than a + * single subtraction. + * + * ELU is similar to CPU utilization, except that it only measures event loop + * statistics and not CPU usage. It represents the percentage of time the event + * loop has spent outside the event loop's event provider (e.g. `epoll_wait`). + * No other CPU idle time is taken into consideration. The following is an example + * of how a mostly idle process will have a high ELU. + * + * ```js + * import { eventLoopUtilization } from 'node:perf_hooks'; + * import { spawnSync } from 'node:child_process'; + * + * setImmediate(() => { + * const elu = eventLoopUtilization(); + * spawnSync('sleep', ['5']); + * console.log(eventLoopUtilization(elu).utilization); + * }); + * ``` + * + * Although the CPU is mostly idle while running this script, the value of + * `utilization` is `1`. This is because the call to + * `child_process.spawnSync()` blocks the event loop from proceeding. + * + * Passing in a user-defined object instead of the result of a previous call to + * `eventLoopUtilization()` will lead to undefined behavior. The return values + * are not guaranteed to reflect any correct state of the event loop. + * @since v25.2.0 + * @param utilization1 The result of a previous call to + * `eventLoopUtilization()`. + * @param utilization2 The result of a previous call to + * `eventLoopUtilization()` prior to `utilization1`. + */ + function eventLoopUtilization( + utilization1?: EventLoopUtilization, + utilization2?: EventLoopUtilization, + ): EventLoopUtilization; + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates a histogram object that samples and reports the event loop delay over + * time. The delays will be reported in nanoseconds. + * + * By default, the histogram is updated by a timer using the configured + * `resolution`. When `samplePerIteration` is `true`, samples are taken once per + * event loop iteration using `uv_prepare_t` and `uv_check_t` hooks. In that mode, + * the histogram does not keep the loop alive or force additional iterations when + * the application is idle. + * The two sampling modes produce significantly different results and should not + * be compared directly. + * + * ```js + * import { monitorEventLoopDelay } from 'node:perf_hooks'; + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): ELDHistogram; + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Wraps a function within a new function that measures the running time of the + * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'` + * event type in order for the timing details to be accessed. + * + * ```js + * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks'; + * + * function someFunction() { + * console.log('hello world'); + * } + * + * const wrapped = timerify(someFunction); + * + * const obs = new PerformanceObserver((list) => { + * console.log(list.getEntries()[0].duration); + * + * performance.clearMarks(); + * performance.clearMeasures(); + * obs.disconnect(); + * }); + * obs.observe({ entryTypes: ['function'] }); + * + * // A performance timeline entry will be created + * wrapped(); + * ``` + * + * If the wrapped function returns a promise, a finally handler will be attached + * to the promise and the duration will be reported once the finally handler is + * invoked. + * @since v25.2.0 + */ + function timerify any>(fn: T, options?: TimerifyOptions): T; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + lowest?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + highest?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0, v14.18.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; +} +declare module "perf_hooks" { + export * from "node:perf_hooks"; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 000000000..51a3d6172 --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,2269 @@ +declare module "node:process" { + import { Control, MessageOptions, SendHandle } from "node:child_process"; + import { PathLike } from "node:fs"; + import * as tty from "node:tty"; + import { Worker } from "node:worker_threads"; + interface BuiltInModule { + "assert": typeof import("assert"); + "node:assert": typeof import("node:assert"); + "assert/strict": typeof import("assert/strict"); + "node:assert/strict": typeof import("node:assert/strict"); + "async_hooks": typeof import("async_hooks"); + "node:async_hooks": typeof import("node:async_hooks"); + "buffer": typeof import("buffer"); + "node:buffer": typeof import("node:buffer"); + "child_process": typeof import("child_process"); + "node:child_process": typeof import("node:child_process"); + "cluster": typeof import("cluster"); + "node:cluster": typeof import("node:cluster"); + "console": typeof import("console"); + "node:console": typeof import("node:console"); + "constants": typeof import("constants"); + "node:constants": typeof import("node:constants"); + "crypto": typeof import("crypto"); + "node:crypto": typeof import("node:crypto"); + "dgram": typeof import("dgram"); + "node:dgram": typeof import("node:dgram"); + "diagnostics_channel": typeof import("diagnostics_channel"); + "node:diagnostics_channel": typeof import("node:diagnostics_channel"); + "dns": typeof import("dns"); + "node:dns": typeof import("node:dns"); + "dns/promises": typeof import("dns/promises"); + "node:dns/promises": typeof import("node:dns/promises"); + "domain": typeof import("domain"); + "node:domain": typeof import("node:domain"); + "events": typeof import("events"); + "node:events": typeof import("node:events"); + "node:ffi": typeof import("node:ffi"); + "fs": typeof import("fs"); + "node:fs": typeof import("node:fs"); + "fs/promises": typeof import("fs/promises"); + "node:fs/promises": typeof import("node:fs/promises"); + "http": typeof import("http"); + "node:http": typeof import("node:http"); + "http2": typeof import("http2"); + "node:http2": typeof import("node:http2"); + "https": typeof import("https"); + "node:https": typeof import("node:https"); + "inspector": typeof import("inspector"); + "node:inspector": typeof import("node:inspector"); + "inspector/promises": typeof import("inspector/promises"); + "node:inspector/promises": typeof import("node:inspector/promises"); + "module": typeof import("module"); + "node:module": typeof import("node:module"); + "net": typeof import("net"); + "node:net": typeof import("node:net"); + "os": typeof import("os"); + "node:os": typeof import("node:os"); + "path": typeof import("path"); + "node:path": typeof import("node:path"); + "path/posix": typeof import("path/posix"); + "node:path/posix": typeof import("node:path/posix"); + "path/win32": typeof import("path/win32"); + "node:path/win32": typeof import("node:path/win32"); + "perf_hooks": typeof import("perf_hooks"); + "node:perf_hooks": typeof import("node:perf_hooks"); + "process": typeof import("process"); + "node:process": typeof import("node:process"); + "punycode": typeof import("punycode"); + "node:punycode": typeof import("node:punycode"); + "querystring": typeof import("querystring"); + "node:querystring": typeof import("node:querystring"); + "node:quic": typeof import("node:quic"); + "readline": typeof import("readline"); + "node:readline": typeof import("node:readline"); + "readline/promises": typeof import("readline/promises"); + "node:readline/promises": typeof import("node:readline/promises"); + "repl": typeof import("repl"); + "node:repl": typeof import("node:repl"); + "node:sea": typeof import("node:sea"); + "node:sqlite": typeof import("node:sqlite"); + "stream": typeof import("stream"); + "node:stream": typeof import("node:stream"); + "stream/consumers": typeof import("stream/consumers"); + "node:stream/consumers": typeof import("node:stream/consumers"); + "stream/iter": typeof import("stream/iter"); + "node:stream/iter": typeof import("node:stream/iter"); + "stream/promises": typeof import("stream/promises"); + "node:stream/promises": typeof import("node:stream/promises"); + "stream/web": typeof import("stream/web"); + "node:stream/web": typeof import("node:stream/web"); + "string_decoder": typeof import("string_decoder"); + "node:string_decoder": typeof import("node:string_decoder"); + "node:test": typeof import("node:test"); + "node:test/reporters": typeof import("node:test/reporters"); + "timers": typeof import("timers"); + "node:timers": typeof import("node:timers"); + "timers/promises": typeof import("timers/promises"); + "node:timers/promises": typeof import("node:timers/promises"); + "tls": typeof import("tls"); + "node:tls": typeof import("node:tls"); + "trace_events": typeof import("trace_events"); + "node:trace_events": typeof import("node:trace_events"); + "tty": typeof import("tty"); + "node:tty": typeof import("node:tty"); + "url": typeof import("url"); + "node:url": typeof import("node:url"); + "util": typeof import("util"); + "node:util": typeof import("node:util"); + "util/types": typeof import("util/types"); + "node:util/types": typeof import("node:util/types"); + "v8": typeof import("v8"); + "node:v8": typeof import("node:v8"); + "node:vfs": typeof import("node:vfs"); + "vm": typeof import("vm"); + "node:vm": typeof import("node:vm"); + "wasi": typeof import("wasi"); + "node:wasi": typeof import("node:wasi"); + "worker_threads": typeof import("worker_threads"); + "node:worker_threads": typeof import("node:worker_threads"); + "zlib": typeof import("zlib"); + "node:zlib": typeof import("node:zlib"); + } + type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] }; + interface ProcessEventMap extends SignalsEventMap { + "beforeExit": [code: number]; + "disconnect": []; + "exit": [code: number]; + "message": [ + message: object | boolean | number | string | null, + sendHandle: SendHandle | undefined, + ]; + "rejectionHandled": [promise: Promise]; + "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; + "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; + "unhandledRejection": [reason: unknown, promise: Promise]; + "warning": [warning: Error]; + "worker": [worker: Worker]; + "workerMessage": [value: any, source: number]; + } + global { + var process: NodeJS.Process; + namespace process { + export { ProcessEventMap }; + } + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } + interface MemoryUsage { + /** + * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the + * process, including all C++ and JavaScript objects and code. + */ + rss: number; + /** + * Refers to V8's memory usage. + */ + heapTotal: number; + /** + * Refers to V8's memory usage. + */ + heapUsed: number; + external: number; + /** + * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included + * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s + * may not be tracked in that case. + */ + arrayBuffers: number; + } + interface CpuUsage { + user: number; + system: number; + } + interface ProcessRelease { + name: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; + } + interface ProcessFeatures { + /** + * A boolean value that is `true` if the current Node.js build is caching builtin modules. + * @since v12.0.0 + */ + readonly cached_builtins: boolean; + /** + * A boolean value that is `true` if the current Node.js build is a debug build. + * @since v0.5.5 + */ + readonly debug: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes the inspector. + * @since v11.10.0 + */ + readonly inspector: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for IPv6. + * + * Since all Node.js builds have IPv6 support, this value is always `true`. + * @since v0.5.3 + * @deprecated This property is always true, and any checks based on it are redundant. + */ + readonly ipv6: boolean; + /** + * A boolean value that is `true` if the current Node.js build supports + * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v26.x/api/modules.md#loading-ecmascript-modules-using-require). + * @since v22.10.0 + */ + readonly require_module: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for TLS. + * @since v0.5.3 + */ + readonly tls: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support. + * This value is therefore identical to that of `process.features.tls`. + * @since v4.8.0 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_alpn: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support. + * This value is therefore identical to that of `process.features.tls`. + * @since v0.11.13 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_ocsp: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support. + * This value is therefore identical to that of `process.features.tls`. + * @since v0.5.3 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_sni: boolean; + /** + * A value that is `"strip"` by default, and `false` if + * Node.js is run with `--no-strip-types`. + * @since v22.10.0 + */ + readonly typescript: "strip" | false; + /** + * A boolean value that is `true` if the current Node.js build includes support for libuv. + * + * Since it's not possible to build Node.js without libuv, this value is always `true`. + * @since v0.5.3 + * @deprecated This property is always true, and any checks based on it are redundant. + */ + readonly uv: boolean; + } + interface ProcessVersions extends Dict { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + type Platform = + | "aix" + | "android" + | "darwin" + | "freebsd" + | "haiku" + | "linux" + | "openbsd" + | "sunos" + | "win32" + | "cygwin" + | "netbsd"; + type Architecture = + | "arm" + | "arm64" + | "ia32" + | "loong64" + | "mips" + | "mipsel" + | "ppc64" + | "riscv64" + | "s390x" + | "x64"; + type Signals = + | "SIGABRT" + | "SIGALRM" + | "SIGBUS" + | "SIGCHLD" + | "SIGCONT" + | "SIGFPE" + | "SIGHUP" + | "SIGILL" + | "SIGINT" + | "SIGIO" + | "SIGIOT" + | "SIGKILL" + | "SIGPIPE" + | "SIGPOLL" + | "SIGPROF" + | "SIGPWR" + | "SIGQUIT" + | "SIGSEGV" + | "SIGSTKFLT" + | "SIGSTOP" + | "SIGSYS" + | "SIGTERM" + | "SIGTRAP" + | "SIGTSTP" + | "SIGTTIN" + | "SIGTTOU" + | "SIGUNUSED" + | "SIGURG" + | "SIGUSR1" + | "SIGUSR2" + | "SIGVTALRM" + | "SIGWINCH" + | "SIGXCPU" + | "SIGXFSZ" + | "SIGBREAK" + | "SIGLOST" + | "SIGINFO"; + type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['beforeExit']) => { ... }; + * ``` + */ + type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['disconnect']) => { ... }; + * ``` + */ + type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['exit']) => { ... }; + * ``` + */ + type ExitListener = (...args: ProcessEventMap["exit"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['message']) => { ... }; + * ``` + */ + type MessageListener = (...args: ProcessEventMap["message"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... }; + * ``` + */ + type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + */ + type SignalsListener = (signal: Signals) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... }; + * ``` + */ + type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... }; + * ``` + */ + type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['warning']) => { ... }; + * ``` + */ + type WarningListener = (...args: ProcessEventMap["warning"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['worker']) => { ... }; + * ``` + */ + type WorkerListener = (...args: ProcessEventMap["worker"]) => void; + interface Socket extends ReadWriteStream { + isTTY?: true | undefined; + } + // Alias for compatibility + interface ProcessEnv extends Dict {} + interface HRTime { + /** + * This is the legacy version of {@link process.hrtime.bigint()} + * before bigint was introduced in JavaScript. + * + * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`, + * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision. + * + * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time. + * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown. + * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior. + * + * These times are relative to an arbitrary time in the past, + * and not related to the time of day and therefore not subject to clock drift. + * The primary use is for measuring performance between intervals: + * ```js + * const { hrtime } = require('node:process'); + * const NS_PER_SEC = 1e9; + * const time = hrtime(); + * // [ 1800216, 25 ] + * + * setTimeout(() => { + * const diff = hrtime(time); + * // [ 1, 552 ] + * + * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); + * // Benchmark took 1000000552 nanoseconds + * }, 1000); + * ``` + * @since 0.7.6 + * @legacy Use {@link process.hrtime.bigint()} instead. + * @param time The result of a previous call to `process.hrtime()` + */ + (time?: [number, number]): [number, number]; + /** + * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`. + * + * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. + * ```js + * import { hrtime } from 'node:process'; + * + * const start = hrtime.bigint(); + * // 191051479007711n + * + * setTimeout(() => { + * const end = hrtime.bigint(); + * // 191052633396993n + * + * console.log(`Benchmark took ${end - start} nanoseconds`); + * // Benchmark took 1154389282 nanoseconds + * }, 1000); + * ``` + * @since v10.7.0 + */ + bigint(): bigint; + } + interface ProcessPermission { + /** + * Verifies that the process is able to access the given scope and reference. + * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` + * will check if the process has ALL file system read permissions. + * + * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. + * + * The available scopes are: + * + * * `fs` - All File System + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * + * ```js + * // Check if the process has permission to read the README file + * process.permission.has('fs.read', './README.md'); + * // Check if the process has read permission operations + * process.permission.has('fs.read'); + * ``` + * @since v20.0.0 + */ + has(scope: string, reference?: string): boolean; + /** + * Drops the specified permission from the current process. This operation is + * **irreversible** — once a permission is dropped, it cannot be restored through + * any Node.js API. + * + * If no reference is provided, the entire scope is dropped. For example, + * `process.permission.drop('fs.read')` will revoke ALL file system read + * permissions. + * + * When a reference is provided, only the permission for that specific resource + * is dropped. For example, `process.permission.drop('fs.read', '/etc/myapp')` + * will revoke read access to that directory while keeping other read + * permissions intact. + * + * **Important:** You can only drop the exact resource that was explicitly + * granted. The reference passed to `drop()` must match the original grant: + * + * * If a permission was granted using a wildcard (`*`), such as + * `--allow-fs-read=*`, individual paths cannot be dropped - only the entire + * scope can be dropped (by calling `drop()` without a reference). + * * If a directory was granted (e.g. `--allow-fs-read=/my/folder`), you cannot + * drop access to individual files inside it. You must drop the same directory + * that was granted. Any remaining grants continue to apply. + * + * The available scopes are the same as [`process.permission.has()`][]: + * + * `fs` - All File System (drops both read and write) + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * * `net` - Network operations + * * `inspector` - Inspector operations + * * `wasi` - WASI operations + * * `addon` - Native addon operations + * + * ```js + * const fs = require('node:fs'); + * + * // Read configuration during startup + * const config = fs.readFileSync('/etc/myapp/config.json', 'utf8'); + * + * // Drop read access to the config directory after initialization + * process.permission.drop('fs.read', '/etc/myapp'); + * + * // This will now throw ERR_ACCESS_DENIED + * fs.readFileSync('/etc/myapp/config.json'); + * ``` + * @since v26.3.0 + * @experimental + */ + drop(scope: string, reference?: string): void; + } + interface ProcessReport { + /** + * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems + * than the default multi-line format designed for human consumption. + * @since v13.12.0, v12.17.0 + */ + compact: boolean; + /** + * Directory where the report is written. + * The default value is the empty string, indicating that reports are written to the current + * working directory of the Node.js process. + */ + directory: string; + /** + * Filename where the report is written. If set to the empty string, the output filename will be comprised + * of a timestamp, PID, and sequence number. The default value is the empty string. + */ + filename: string; + /** + * Returns a JavaScript Object representation of a diagnostic report for the running process. + * The report's JavaScript stack trace is taken from `err`, if present. + */ + getReport(err?: Error): object; + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @default false + */ + reportOnSignal: boolean; + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + /** + * If true, a diagnostic report is generated without the environment variables. + * @default false + */ + excludeEnv: boolean; + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from `err`, if present. + * + * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written + * to the stdout or stderr of the process respectively. + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param err A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string, err?: Error): string; + writeReport(err?: Error): string; + } + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } + interface Process extends EventEmitter { + /** + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'node:process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stdout: WriteStream & { + fd: 1; + }; + /** + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stderr: WriteStream & { + fd: 2; + }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. + */ + stdin: ReadStream & { + fd: 0; + }; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v26.x/api/cli.html#program-entry-point) was provided, the second element + * will be the absolute path to it. The remaining elements are additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'node:process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```bash + * node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ + argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ + argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```bash + * node --icu-data-dir=./foo --require ./bar.js script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```json + * ["--icu-data-dir=./foo", "--require", "./bar.js"] + * ``` + * + * And `process.argv`: + * + * ```json + * ["/usr/local/bin/node", "script.js", "--version"] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ + execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```json + * "/usr/local/bin/node" + * ``` + * @since v0.1.100 + */ + execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ + abort(): never; + /** + * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback + * that will be invoked when an uncaught exception occurs, receiving the exception + * value as its first argument. + * + * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows + * multiple callbacks to be registered and does not conflict with the + * [`domain`](https://nodejs.org/docs/latest-v26.x/api/domain.html) module. Callbacks are called in reverse order of registration + * (most recent first). If a callback returns `true`, subsequent callbacks + * and the default uncaught exception handling are skipped. + * + * ```js + * import process from 'node:process'; + * + * process.addUncaughtExceptionCaptureCallback((err) => { + * console.error('Caught exception:', err.message); + * return true; // Indicates exception was handled + * }); + * ``` + * @since v25.9.0 + */ + addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'node:process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ + chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'node:process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ + cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'node:process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ + debugPort: number; + /** + * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and + * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` + * unless there are specific reasons such as custom dlopen flags or loading from ES modules. + * + * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v26.x/api/os.html#dlopen-constants)` + * documentation for details. + * + * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon + * are then accessible via `module.exports`. + * + * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. + * In this example the constant is assumed to be available. + * + * ```js + * import { dlopen } from 'node:process'; + * import { constants } from 'node:os'; + * import { fileURLToPath } from 'node:url'; + * + * const module = { exports: {} }; + * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), + * constants.dlopen.RTLD_NOW); + * module.exports.foo(); + * ``` + */ + dlopen(module: object, filename: string, flags?: number): void; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string. + * emitWarning('Something happened!'); + * // Emits: (node: 56338) Warning: Something happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string and a type. + * emitWarning('Something Happened!', 'CustomWarning'); + * // Emits: (node:56338) CustomWarning: Something Happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ```js + * + * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'node:process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler + * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using an Error object. + * const myWarning = new Error('Something happened!'); + * // Use the Error name property to specify the type name + * myWarning.name = 'CustomWarning'; + * myWarning.code = 'WARN001'; + * + * emitWarning(myWarning); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ``` + * + * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. + * + * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. + * + * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: + * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. + * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. + * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```json + * { + * "TERM": "xterm-256color", + * "SHELL": "/usr/local/bin/bash", + * "USER": "maciej", + * "PATH": "~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin", + * "PWD": "/Users/maciej", + * "EDITOR": "vim", + * "SHLVL": "1", + * "HOME": "/Users/maciej", + * "LOGNAME": "maciej", + * "_": "/usr/local/bin/node" + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```bash + * node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'node:process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'node:process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread's `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner + * unlike the main thread. + * @since v0.1.27 + */ + env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'node:process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and `process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'node:process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'node:process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. + */ + exit(code?: number | string | null): never; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @default undefined + * @since v0.11.8 + */ + exitCode: number | string | null | undefined; + finalization: { + /** + * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. + * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. + * + * Inside the callback you can release the resources allocated by the `ref` object. + * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, + * this means that there is a possibility that the callback will not be called under special circumstances. + * + * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. + * @param ref The reference to the resource that is being tracked. + * @param callback The callback function to be called when the resource is finalized. + * @since v22.5.0 + * @experimental + */ + register(ref: T, callback: (ref: T, event: "exit") => void): void; + /** + * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. + * + * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. + * @param ref The reference to the resource that is being tracked. + * @param callback The callback function to be called when the resource is finalized. + * @since v22.5.0 + * @experimental + */ + registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; + /** + * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. + * @param ref The reference to the resource that was registered previously. + * @since v22.5.0 + * @experimental + */ + unregister(ref: object): void; + }; + /** + * The `process.getActiveResourcesInfo()` method returns an array of strings containing + * the types of the active resources that are currently keeping the event loop alive. + * + * ```js + * import { getActiveResourcesInfo } from 'node:process'; + * import { setTimeout } from 'node:timers'; + + * console.log('Before:', getActiveResourcesInfo()); + * setTimeout(() => {}, 1000); + * console.log('After:', getActiveResourcesInfo()); + * // Prints: + * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] + * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] + * ``` + * @since v17.3.0, v16.14.0 + */ + getActiveResourcesInfo(): string[]; + /** + * Provides a way to load built-in modules in a globally available function. + * @param id ID of the built-in module being requested. + */ + getBuiltinModule(id: ID): BuiltInModule[ID]; + getBuiltinModule(id: string): object | undefined; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid?: () => number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid?: (id: number | string) => void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid?: () => number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid?: (id: number | string) => void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid?: () => number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid?: (id: number | string) => void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid?: () => number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid?: (id: number | string) => void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups?: () => number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups?: (groups: ReadonlyArray) => void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * To register multiple callbacks that can coexist, use + * `process.addUncaughtExceptionCaptureCallback()` instead. + * @since v9.3.0 + */ + setUncaughtExceptionCaptureCallback(cb: ((err: unknown) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ + hasUncaughtExceptionCaptureCallback(): boolean; + /** + * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. + * @since v20.7.0 + * @experimental + */ + readonly sourceMapsEnabled: boolean; + /** + * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. + * @since v16.6.0, v14.18.0 + * @experimental + */ + setSourceMapsEnabled(value: boolean): void; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'node:process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'node:process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '26.0.0-pre', + * acorn: '8.15.0', + * ada: '3.4.1', + * amaro: '1.1.5', + * ares: '1.34.6', + * brotli: '1.2.0', + * merve: '1.0.0', + * cldr: '48.0', + * icu: '78.2', + * llhttp: '9.3.0', + * modules: '144', + * napi: '10', + * nbytes: '0.1.1', + * ncrypto: '0.0.1', + * nghttp2: '1.68.0', + * nghttp3: '', + * ngtcp2: '', + * openssl: '3.5.4', + * simdjson: '4.2.4', + * simdutf: '7.3.3', + * sqlite: '3.51.2', + * tz: '2025c', + * undici: '7.18.2', + * unicode: '17.0', + * uv: '1.51.0', + * uvwasi: '0.0.23', + * v8: '14.3.127.18-node.10', + * zlib: '1.3.1-e00f703', + * zstd: '1.5.7' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns a frozen `Object` containing the + * JavaScript representation of the configure options used to compile the current + * Node.js executable. This is the same as the `config.gypi` file that was produced + * when running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```json + * { + * "target_defaults": + * { "cflags": [], + * "default_configuration": "Release", + * "defines": [], + * "include_dirs": [], + * "libraries": [] }, + * "variables": + * { + * "host_arch": "x64", + * "napi_build_version": 5, + * "node_install_npm": "true", + * "node_prefix": "", + * "node_shared_cares": "false", + * "node_shared_http_parser": "false", + * "node_shared_libuv": "false", + * "node_shared_zlib": "false", + * "node_use_openssl": "true", + * "node_shared_openssl": "false", + * "target_arch": "x64", + * "v8_use_snapshot": 1 + * } + * } + * ``` + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'node:process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ + kill(pid: number, signal?: string | number): true; + /** + * Loads the environment configuration from a `.env` file into `process.env`. If + * the file is not found, error will be thrown. + * + * To load a specific .env file by specifying its path, use the following code: + * + * ```js + * import { loadEnvFile } from 'node:process'; + * + * loadEnvFile('./development.env') + * ``` + * @since v20.12.0 + * @param path The path to the .env file + */ + loadEnvFile(path?: PathLike): void; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'node:process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'node:process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.threadCpuUsage()` method returns the user and system CPU time usage of + * the current worker thread, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). + * + * The result of a previous call to `process.threadCpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * @since v23.9.0 + * @param previousValue A previous return value from calling + * `process.threadCpuUsage()` + */ + threadCpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ + title: string; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, + * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * + * ```js + * import { arch } from 'node:process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: Architecture; + /** + * The `process.platform` property returns a string identifying the operating + * system platform for which the Node.js binary was compiled. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'node:process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module; + memoryUsage: MemoryUsageFn; + /** + * Gets the amount of memory available to the process (in bytes) based on + * limits imposed by the OS. If there is no such constraint, or the constraint + * is unknown, `0` is returned. + * + * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more + * information. + * @since v19.6.0, v18.15.0 + */ + constrainedMemory(): number; + /** + * Gets the amount of free memory that is still available to the process (in bytes). + * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v26.x/api/process.html#processavailablememory) for more information. + * @since v20.13.0 + */ + availableMemory(): number; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'node:process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ + cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'node:process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ + nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; + /** + * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. + * + * `process.permission` is an object whose methods are used to manage permissions for the current process. + * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). + * @since v20.0.0 + */ + permission: ProcessPermission; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```json + * { + * "name": "node", + * "lts": "Hydrogen", + * "sourceUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz", + * "headersUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz", + * "libUrl": "https://nodejs.org/download/release/v18.12.0/win-x64/node.lib" + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; + readonly features: ProcessFeatures; + /** + * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag + * is set on the current Node.js process. This property allows programmatic control over the + * tracing of warnings, enabling or disabling stack traces for warnings at runtime. + * + * ```js + * // Enable trace warnings + * process.traceProcessWarnings = true; + * + * // Emit a warning with a stack trace + * process.emitWarning('Warning with stack trace'); + * + * // Disable trace warnings + * process.traceProcessWarnings = false; + * ``` + * @since v6.10.0 + */ + traceProcessWarnings: boolean; + /** + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential + * security vulnerability. There is no safe, cross-platform alternative API. + */ + umask(): number; + /** + * Can only be set if not in worker thread. + */ + umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ + uptime(): number; + hrtime: HRTime; + /** + * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. + * If no IPC channel exists, this property is undefined. + * @since v7.1.0 + */ + channel?: Control; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send?( + message: any, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + send?( + message: any, + sendHandle: SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send?( + message: any, + callback: (error: Error | null) => void, + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ + disconnect?(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC + * channel is connected and will return `false` after `process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ + connected: boolean; + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'node:process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 + */ + allowedNodeEnvironmentFlags: ReadonlySet; + /** + * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. + * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v26.x/api/report.html). + * @since v11.8.0 + */ + report: ProcessReport; + /** + * ```js + * import { resourceUsage } from 'node:process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. + */ + resourceUsage(): ResourceUsage; + /** + * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` + * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() + * method for more information. + * + * ```bash + * $ node --throw-deprecation -p "process.throwDeprecation" + * true + * $ node -p "process.throwDeprecation" + * undefined + * $ node + * > process.emitWarning('test', 'DeprecationWarning'); + * undefined + * > (node:26598) DeprecationWarning: test + * > process.throwDeprecation = true; + * true + * > process.emitWarning('test', 'DeprecationWarning'); + * Thrown: + * [DeprecationWarning: test] { name: 'DeprecationWarning' } + * ``` + * @since v0.9.12 + */ + throwDeprecation: boolean; + /** + * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ + traceDeprecation: boolean; + /** + * An object is "refable" if it implements the Node.js "Refable protocol". + * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` + * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js + * event loop alive, while "unref'd" objects will not. Historically, this was + * implemented by using `ref()` and `unref()` methods directly on the objects. + * This pattern, however, is being deprecated in favor of the "Refable protocol" + * in order to better support Web Platform API types whose APIs cannot be modified + * to add `ref()` and `unref()` methods but still need to support that behavior. + * @since v22.14.0 + * @experimental + * @param maybeRefable An object that may be "refable". + */ + ref(maybeRefable: any): void; + /** + * An object is "unrefable" if it implements the Node.js "Refable protocol". + * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` + * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js + * event loop alive, while "unref'd" objects will not. Historically, this was + * implemented by using `ref()` and `unref()` methods directly on the objects. + * This pattern, however, is being deprecated in favor of the "Refable protocol" + * in order to better support Web Platform API types whose APIs cannot be modified + * to add `ref()` and `unref()` methods but still need to support that behavior. + * @since v22.14.0 + * @experimental + * @param maybeRefable An object that may be "unref'd". + */ + unref(maybeRefable: any): void; + /** + * Replaces the current process with a new process. + * + * This is achieved by using the `execve` POSIX function and therefore no memory or other + * resources from the current process are preserved, except for the standard input, + * standard output and standard error file descriptor. + * + * All other resources are discarded by the system when the processes are swapped, without triggering + * any exit or close events and without running any cleanup handler. + * + * On success, all other resources are discarded by the system when the + * processes are swapped, without triggering any exit or close events, without + * running any JavaScript cleanup handler (for example `process.on('exit')`), + * and without invoking native `AtExit` callbacks registered through the + * embedder API. Callers that need to run cleanup logic should do so before + * calling `process.execve()`. + * + * This function does not return on success. If the underlying `execve(2)` + * system call fails, an `Error` is thrown whose `code` property is set to the + * corresponding `errno` string (for example, `'ENOENT'` when `file` does not + * exist), with `syscall` set to `'execve'` and `path` set to `file`. When + * `execve(2)` fails the current process continues to run with its state + * unchanged, so a caller may handle the error and take another action. + * + * This function is not available on Windows or IBM i. + * @since v22.15.0 + * @experimental + * @param file The name or path of the executable file to run. + * @param args List of string arguments. No argument can contain a null-byte (`\u0000`). + * @param env Environment key-value pairs. + * No key or value can contain a null-byte (`\u0000`). + * **Default:** `process.env`. + */ + execve?(file: string, args?: readonly string[], env?: ProcessEnv): never; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ProcessEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ProcessEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + } + } + export = process; +} +declare module "process" { + import process = require("node:process"); + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 000000000..87fdec970 --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,89 @@ +declare module "node:punycode" { + /** + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 + */ + function decode(string: string): string; + /** + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 + */ + function encode(string: string): string; + /** + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toUnicode(domain: string): string; + /** + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toASCII(domain: string): string; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const ucs2: ucs2; + interface ucs2 { + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + decode(string: string): number[]; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + encode(codePoints: readonly number[]): string; + } + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const version: string; +} +declare module "punycode" { + export * from "node:punycode"; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 000000000..6d821a4e0 --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,139 @@ +declare module "node:querystring" { + interface StringifyOptions { + /** + * The function to use when converting URL-unsafe characters to percent-encoding in the query string. + * @default `querystring.escape()` + */ + encodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParseOptions { + /** + * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. + * @default 1000 + */ + maxKeys?: number | undefined; + /** + * The function to use when decoding percent-encoded characters in the query string. + * @default `querystring.unescape()` + */ + decodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends + NodeJS.Dict< + | string + | number + | boolean + | bigint + | ReadonlyArray + | null + > + {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```json + * { + * "foo": "bar", + * "abc": ["xyz", "123"] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] The substring used to delimit keys and values in the query string. + */ + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ + function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ + function unescape(str: string): string; +} +declare module "querystring" { + export * from "node:querystring"; +} diff --git a/node_modules/@types/node/quic.d.ts b/node_modules/@types/node/quic.d.ts new file mode 100644 index 000000000..e48ea2757 --- /dev/null +++ b/node_modules/@types/node/quic.d.ts @@ -0,0 +1,2191 @@ +declare module "node:quic" { + import { NonSharedBuffer } from "node:buffer"; + import { KeyObject, X509Certificate } from "node:crypto"; + import { FileHandle } from "node:fs/promises"; + import { BlockList, SocketAddress } from "node:net"; + import { Writer } from "node:stream/iter"; + import { CertificateCompressionAlgorithm, EphemeralKeyInfo } from "node:tls"; + /** + * @since v23.8.0 + */ + type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void; + /** + * @since v23.8.0 + */ + type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void; + /** + * @since v23.8.0 + */ + type OnDatagramCallback = (this: QuicSession, datagram: NodeJS.NonSharedUint8Array, early: boolean) => void; + /** + * @since v23.8.0 + */ + type OnDatagramStatusCallback = ( + this: QuicSession, + id: bigint, + status: "acknowledged" | "lost" | "abandoned", + ) => void; + /** + * @since v23.8.0 + */ + type OnApplicationCallback = (this: QuicSession, applicationoptions: SessionApplicationOptions) => void; + /** + * @since v23.8.0 + */ + type OnPathValidationCallback = ( + this: QuicSession, + result: "success" | "failure" | "aborted", + newLocalAddress: SocketAddress, + newRemoteAddress: SocketAddress, + oldLocalAddress: SocketAddress | null, + oldRemoteAddress: SocketAddress | null, + preferredAddress: boolean, + ) => void; + /** + * @since v23.8.0 + */ + type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void; + /** + * @since v23.8.0 + */ + type OnVersionNegotiationCallback = ( + this: QuicSession, + version: number, + requestedVersions: number[], + supportedVersions: number[], + ) => void; + /** + * @since v23.8.0 + */ + type OnHandshakeCallback = (this: QuicSession, info: SessionHandshakeInfo) => void; + /** + * @since v26.2.0 + */ + type OnNewTokenCallback = (this: QuicSession, token: NonSharedBuffer, address: SocketAddress) => void; + /** + * @since v26.2.0 + */ + type OnOriginCallback = (this: QuicSession, origins: string[]) => void; + /** + * Called when TLS key material is available. Only fires when + * `sessionOptions.keylog` is `true`. Multiple lines are emitted during the + * TLS 1.3 handshake, each containing a secret label, the client random, and + * the secret value. + * @since v26.2.0 + */ + type OnKeylogCallback = (this: QuicSession, line: string) => void; + /** + * Called when qlog diagnostic data is available. Only fires when + * `sessionOptions.qlog` is `true`. The `data` chunks should be + * concatenated in order to produce the complete qlog output. When `fin` is + * `true`, no more chunks will be emitted and the concatenated result is a + * complete JSON-SEQ document. + * @since v26.2.0 + */ + type OnQlogCallback = (this: QuicSession, data: string, fin: boolean) => void; + /** + * @since v23.8.0 + */ + type OnBlockedCallback = (this: QuicStream) => void; + /** + * @since v23.8.0 + */ + type OnStreamErrorCallback = (this: QuicStream, error: any) => void; + /** + * Called when initial request or response headers are received. For HTTP/3, + * this delivers request pseudo-headers on the server and response headers + * on the client. + * @since v26.2.0 + */ + type OnHeadersCallback = (this: QuicStream, headers: NodeJS.Dict) => void; + /** + * Called when trailing headers are received from the peer. + * @since v26.2.0 + */ + type OnTrailersCallback = (this: QuicStream, trailers: NodeJS.Dict) => void; + /** + * Called when informational (1xx) headers are received from the server + * (e.g., 103 Early Hints). + * @since v26.2.0 + */ + type OnInfoCallback = (this: QuicStream, headers: NodeJS.Dict) => void; + /** + * @since v23.8.0 + */ + interface TransportParams { + /** + * The preferred IPv4 address to advertise (only used by servers). + * @since v23.8.0 + */ + preferredAddressIpv4?: SocketAddress | undefined; + /** + * The preferred IPv6 address to advertise (only used by servers) + * @since v23.8.0 + */ + preferredAddressIpv6?: SocketAddress | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataBidiLocal?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataBidiRemote?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataUni?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxData?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamsBidi?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamsUni?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + maxIdleTimeout?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + activeConnectionIDLimit?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + ackDelayExponent?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + maxAckDelay?: bigint | number | undefined; + /** + * The maximum size in bytes of a DATAGRAM frame payload that this endpoint + * is willing to receive. Set to `0` to disable datagram support. The peer + * will not send datagrams larger than this value. The actual maximum size of + * a datagram that can be _sent_ is determined by the peer's + * `maxDatagramFrameSize`, not this endpoint's value. + * @since v23.8.0 + */ + maxDatagramFrameSize?: bigint | number | undefined; + } + interface SNIEntry { + /** + * The TLS private keys. **Required.** + */ + keys: KeyObject | readonly KeyObject[]; + /** + * The TLS certificates. **Required.** + */ + certs: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray; + /** + * Verify the private key. Default: `false`. + */ + verifyPrivateKey?: boolean | undefined; + /** + * The port to advertise in ORIGIN frames (RFC 9412) for this host name. **Default:** `443`. Only used for HTTP/3 sessions. + */ + port?: number | undefined; + /** + * Whether to include this host name in ORIGIN frames. **Default:** `true`. Set to `false` to exclude a host name + * from ORIGIN advertisements. Wildcard (`'*'`) entries are always excluded regardless of this setting. + */ + authoritative?: boolean | undefined; + } + /** + * @since v26.3.0 + */ + interface ApplicationOptions { + /** + * Maximum number of header name-value pairs accepted per header block. + * Headers beyond this limit are silently dropped. **Default:** `128` + */ + maxHeaderPairs?: bigint | number | undefined; + /** + * Maximum total byte length of all header names and values combined per header + * block. Headers that would push the total over this limit are silently + * dropped. **Default:** `8192` + */ + maxHeaderLength?: bigint | number | undefined; + /** + * Maximum size of a compressed header field section (QPACK). `0` means + * unlimited. **Default:** `0` + */ + maxFieldSectionSize?: bigint | number | undefined; + /** + * QPACK dynamic table capacity in bytes. Set to `0` to disable the dynamic + * table. **Default:** `4096` + */ + qpackMaxDTableCapacity?: bigint | number | undefined; + /** + * QPACK encoder maximum dynamic table capacity. **Default:** `4096` + */ + qpackEncoderMaxDTableCapacity?: bigint | number | undefined; + /** + * Maximum number of streams that can e blocked waiting for QPACK dynamic table + * updates. **Default:** `100` + */ + qpackBlockedStreams?: bigint | number | undefined; + /** + * Enable the extended CONNECT protocol (RFC 9220). **Default:** `false` + */ + enableConnectProtocol?: boolean | undefined; + /** + * Enable HTTP/3 datagrams (RFC 9297). **Default:** `false` + */ + enableDatagrams?: boolean | undefined; + } + type SessionApplicationOptions = { [K in keyof ApplicationOptions]-?: ApplicationOptions[K] & (bigint | boolean) }; + /** + * @since v23.8.0 + */ + interface SessionOptions { + /** + * An endpoint to use. + * @since v23.8.0 + */ + endpoint?: EndpointOptions | QuicEndpoint | undefined; + /** + * The ALPN (Application-Layer Protocol Negotiation) identifier(s). + * + * For **client** sessions, this is a single string specifying the protocol + * the client wants to use (e.g. `'h3'`). + * + * For **server** sessions, this is an array of protocol names in preference + * order that the server supports (e.g. `['h3', 'h3-29']`). During the TLS + * handshake, the server selects the first protocol from its list that the + * client also supports. + * + * The negotiated ALPN determines which Application implementation is used + * for the session. `'h3'` and `'h3-*'` variants select the HTTP/3 + * application; all other values select the default application. + * @since v26.1.0 + */ + alpn?: string | readonly string[] | undefined; + /** + * Application-specific options. + * @since v26.2.0 + */ + application?: ApplicationOptions | undefined; + /** + * The CA certificates to use for client sessions. For server sessions, CA + * certificates are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * Enables TLS certificate compression ([RFC 8879](https://www.rfc-editor.org/rfc/rfc8879)) for this session. When + * omitted, certificate compression is disabled. + * + * On the server side, the certificate chain is compressed using the first + * listed algorithm that the client advertises support for. On the client side, + * the listed algorithms are advertised to the server so that the server may + * compress its certificate. When client authentication is in use, the option + * also controls compression of the client's certificate. + * + * Compressing the certificate chain is especially useful for QUIC because it + * reduces the size of the server's first flight, which is bounded by the + * anti-amplification limit (see [Certificate size and handshake + * performance](https://nodejs.org/docs/latest-v26.x/api/quic.html#certificate-size-and-handshake-performance)). Certificate compression requires TLS 1.3, which QUIC always + * uses. + * + * At most three algorithms may be specified. The option is silently ignored if + * Node.js was built against a shared OpenSSL that lacks certificate compression + * support. + * @since v26.6.0 + */ + certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined; + /** + * Specifies the congestion control algorithm that will be used. + * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`. + * + * This is an advanced option that users typically won't have need to specify. + * @since v23.8.0 + */ + cc?: `${constants.cc}` | undefined; + /** + * The TLS certificates to use for client sessions. For server sessions, + * certificates are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * The list of supported TLS 1.3 cipher algorithms. + * @since v23.8.0 + */ + ciphers?: string | undefined; + /** + * The CRL to use for client sessions. For server sessions, CRLs are specified + * per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * When `true`, enables TLS 0-RTT early data for this session. Early data + * allows the client to send application data before the TLS handshake + * completes, reducing latency on reconnection when a valid session ticket + * is available. Set to `false` to disable early data support. + * @since v26.2.0 + */ + enableEarlyData?: boolean | undefined; + /** + * The list of supported TLS 1.3 cipher groups. + * @since v23.8.0 + */ + groups?: string | undefined; + /** + * When `true`, enables TLS key logging for the session. Key material is + * delivered to the `session.onkeylog` callback in [NSS Key Log Format](https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format). + * Each callback invocation receives a single line of key material. The output + * can be used with tools such as Wireshark to decrypt captured QUIC traffic. + * @since v23.8.0 + */ + keylog?: boolean | undefined; + /** + * The TLS crypto keys to use for client sessions. For server sessions, + * keys are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + keys?: KeyObject | readonly KeyObject[] | undefined; + /** + * Specifies the maximum UDP packet payload size. + * @since v23.8.0 + */ + maxPayloadSize?: bigint | number | undefined; + /** + * Specifies the maximum stream flow-control window size. + * @since v23.8.0 + */ + maxStreamWindow?: bigint | number | undefined; + /** + * Specifies the maximum session flow-control window size. + * @since v23.8.0 + */ + maxWindow?: bigint | number | undefined; + /** + * The minimum QUIC version number to allow. This is an advanced option that users + * typically won't have need to specify. + * @since v23.8.0 + */ + minVersion?: number | undefined; + /** + * When the remote peer advertises a preferred address, this option specifies whether + * to use it or ignore it. The default is `'ignore'` because honoring a server's + * preferred address causes the client to migrate its connection to a different IP + * address, which can be exploited for data exfiltration attacks that are + * indistinguishable from legitimate QUIC connection migration at the network level. + * Set to `'use'` only when connecting to trusted servers that require preferred + * address migration. + * @since v23.8.0 + */ + preferredAddressPolicy?: "use" | "ignore" | "default" | undefined; + /** + * When `true`, enables [qlog](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/) diagnostic output for the session. Qlog data + * is delivered to the `session.onqlog` callback as chunks of [JSON-SEQ](https://www.rfc-editor.org/rfc/rfc7464) + * formatted text. The output can be analyzed with qlog visualization tools + * such as [qvis](https://qvis.quictools.info/). + * @since v23.8.0 + */ + qlog?: boolean | undefined; + /** + * A session ticket to use for 0RTT session resumption. + * @since v23.8.0 + */ + sessionTicket?: NodeJS.ArrayBufferView | undefined; + /** + * Controls which datagram to drop when the pending datagram queue + * (sized by `session.maxPendingDatagrams`) is full. Must be one of + * `'drop-oldest'` (discard the oldest queued datagram to make room) or + * `'drop-newest'` (reject the incoming datagram). Dropped datagrams are + * reported as lost via the `ondatagramstatus` callback. + * + * This option is immutable after session creation. + * @since v26.2.0 + */ + datagramDropPolicy?: "drop-oldest" | "drop-newest" | undefined; + /** + * The maximum time in milliseconds that a peer-initiated stream can be idle + * (no data received) before it is automatically destroyed. This protects + * against slowloris-style attacks where a remote peer opens streams but never + * sends data, holding server resources indefinitely. Only peer-initiated + * streams are checked — locally-initiated streams are the application's + * responsibility. Set to `0` to disable. + * + * The idle check runs as part of the normal send processing loop, so it adds + * no additional timers or event loop overhead. The + * `session.stats.streamsIdleTimedOut` counter tracks how many streams have been + * destroyed by this mechanism. + * @since v26.3.0 + */ + streamIdleTimeout?: bigint | number | undefined; + /** + * The maximum number of `SendPendingData` cycles a datagram can survive + * without being sent before it is abandoned. When a datagram cannot be + * sent due to congestion control or packet size constraints, it remains + * in the queue and the attempt counter increments. Once the limit is + * reached, the datagram is dropped and reported as `'abandoned'` via the + * `ondatagramstatus` callback. Valid range: `1` to `255`. + * @since v26.2.0 + */ + maxDatagramSendAttempts?: number | undefined; + /** + * A multiplier applied to the Probe Timeout (PTO) to compute the draining + * period duration after receiving a `CONNECTION_CLOSE` frame from the peer. + * RFC 9000 Section 10.2 requires the draining period to persist for at least + * three times the current PTO. The valid range is `3` to `255`. Values below + * `3` are clamped to `3`. + * @since v26.2.0 + */ + drainingPeriodMultiplier?: number | undefined; + /** + * Specifies the keep-alive timeout in milliseconds. When set to a non-zero + * value, PING frames will be sent automatically to keep the connection alive + * before the idle timeout fires. The value should be less than the effective + * idle timeout (`maxIdleTimeout` transport parameter) to be useful. + * @since v23.8.0 + */ + handshakeTimeout?: bigint | number | undefined; + /** + * Controls how the client handles server certificate validation: + * + * * `'strict'` — OpenSSL aborts the TLS handshake immediately if the server's + * certificate fails validation. The `session.opened` promise rejects with a + * TLS error. The application cannot inspect the certificate or the error + * details. This is the most secure mode. + * + * * `'auto'` — The TLS handshake completes regardless of validation result. + * If validation fails, the `session.opened` promise is rejected with an error + * containing the validation reason, and the session is destroyed. The + * `onhandshake` callback (if set) fires before rejection, allowing diagnostic + * logging. This is the default and matches the behavior of `tls.connect()` + * with `rejectUnauthorized: true`. + * + * * `'manual'` — The TLS handshake completes regardless of validation result. + * The `session.opened` promise resolves with the handshake info, which includes + * `validationErrorReason` and `validationErrorCode` if validation failed. The + * application is responsible for checking these values and deciding whether to + * continue. Use this mode for custom validation logic, certificate pinning, or + * intentionally accepting self-signed certificates. + * @since v26.3.0 + */ + verifyPeer?: "strict" | "auto" | "manual" | undefined; + /** + * The peer server name to target (SNI). Defaults to `'localhost'`. + * @since v26.1.0 + */ + servername?: string | undefined; + /** + * An object mapping host names to TLS identity options for Server Name + * Indication (SNI) support. This is required for server sessions and must + * contain at least one entry. The special key `'*'` specifies the optional + * default/fallback identity used when no other host name matches. If no + * wildcard entry is provided, connections with unrecognized server names + * will be rejected with a TLS `unrecognized_name` alert. Each entry may + * contain: + * @since v26.1.0 + */ + sni?: Record | undefined; + /** + * True to enable TLS tracing output. + * @since v23.8.0 + */ + tlsTrace?: boolean | undefined; + /** + * An opaque address validation token previously received from the server + * via the `session.onnewtoken` callback. Providing a valid token on + * reconnection allows the client to skip the server's address validation, + * reducing handshake latency. + * @since v26.2.0 + */ + token?: NodeJS.ArrayBufferView | undefined; + /** + * The QUIC transport parameters to use for the session. + * @since v23.8.0 + */ + transportParams?: TransportParams | undefined; + /** + * Specifies the maximum number of unacknowledged packets a session should allow. + * @since v23.8.0 + */ + unacknowledgedPacketThreshold?: bigint | number | undefined; + /** + * If `true`, the peer certificate is verified against the list of supplied CAs. + * An error is emitted if verification fails; the error can be inspected via + * the `validationErrorReason` and `validationErrorCode` fields in the + * handshake callback. If `false`, peer certificate verification errors are + * ignored. + */ + rejectUnauthorized?: boolean | undefined; + /** + * When `true` (the default), `connect()` will attempt to reuse an existing + * endpoint rather than creating a new one for each session. This provides + * connection pooling behavior — multiple sessions can share a single UDP + * socket. The reuse logic will not return an endpoint that is listening on + * the same address as the connect target (to prevent CID routing conflicts). + * + * Set to `false` to force creation of a new endpoint for the session. This + * is useful when endpoint isolation is required (e.g., testing stateless + * reset behavior where source port identity matters). + * @since v26.2.0 + */ + reuseEndpoint?: boolean | undefined; + /** + * True to require verification of TLS client certificate. + * @since v23.8.0 + */ + verifyClient?: boolean | undefined; + /** + * True to require private key verification for client sessions. For server + * sessions, this option is specified per-identity in the + * `sessionOptions.sni` map. + * @since v23.8.0 + */ + verifyPrivateKey?: boolean | undefined; + /** + * The QUIC version number to use. This is an advanced option that users typically + * won't have need to specify. + * @since v23.8.0 + */ + version?: number | undefined; + // Undocumented + onerror?: QuicSession["onerror"] | undefined; + onstream?: QuicSession["onstream"] | undefined; + ondatagram?: QuicSession["ondatagram"] | undefined; + ondatagramstatus?: QuicSession["ondatagramstatus"] | undefined; + onpathvalidation?: QuicSession["onpathvalidation"] | undefined; + onsessionticket?: QuicSession["onsessionticket"] | undefined; + onversionnegotiation?: QuicSession["onversionnegotiation"] | undefined; + onhandshake?: QuicSession["onhandshake"] | undefined; + onnewtoken?: QuicSession["onnewtoken"] | undefined; + onearlyrejected?: QuicSession["onearlyrejected"] | undefined; + onorigin?: QuicSession["onorigin"] | undefined; + ongoaway?: QuicSession["ongoaway"] | undefined; + onkeylog?: QuicSession["onkeylog"] | undefined; + onqlog?: QuicSession["onqlog"] | undefined; + onapplication?: QuicSession["onapplication"] | undefined; + onheaders?: QuicStream["onheaders"] | undefined; + ontrailers?: QuicStream["ontrailers"] | undefined; + oninfo?: QuicStream["oninfo"] | undefined; + onwanttrailers?: QuicStream["onwanttrailers"] | undefined; + } + /** + * Initiate a new client-side session. + * + * ```js + * import { connect } from 'node:quic'; + * import { Buffer } from 'node:buffer'; + * + * const enc = new TextEncoder(); + * const alpn = 'foo'; + * const client = await connect('123.123.123.123:8888', { alpn }); + * await client.createUnidirectionalStream({ + * body: enc.encode('hello world'), + * }); + * ``` + * + * By default, every call to `connect(...)` will create a new local + * `QuicEndpoint` instance bound to a new random local IP port. To + * specify the exact local address to use, or to multiplex multiple + * QUIC sessions over a single local port, pass the `endpoint` option + * with either a `QuicEndpoint` or `EndpointOptions` as the argument. + * + * ```js + * import { QuicEndpoint, connect } from 'node:quic'; + * + * const endpoint = new QuicEndpoint({ + * address: '127.0.0.1:1234', + * }); + * + * const client = await connect('123.123.123.123:8888', { endpoint }); + * ``` + * @since v23.8.0 + */ + function connect(address: string | SocketAddress, options?: SessionOptions): Promise; + /** + * Configures the endpoint to listen as a server. When a new session is initiated by + * a remote peer, the given `onsession` callback will be invoked with the created + * session. + * + * ```js + * import { listen } from 'node:quic'; + * + * const endpoint = await listen((session) => { + * // ... handle the session + * }); + * + * // Closing the endpoint allows any sessions open when close is called + * // to complete naturally while preventing new sessions from being + * // initiated. Once all existing sessions have finished, the endpoint + * // will be destroyed. The call returns a promise that is resolved once + * // the endpoint is destroyed. + * await endpoint.close(); + * ``` + * + * By default, every call to `listen(...)` will create a new local + * `QuicEndpoint` instance bound to a new random local IP port. To + * specify the exact local address to use, or to multiplex multiple + * QUIC sessions over a single local port, pass the `endpoint` option + * with either a `QuicEndpoint` or `EndpointOptions` as the argument. + * + * At most, any single `QuicEndpoint` can only be configured to listen as + * a server once. + * @since v23.8.0 + */ + function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise; + interface ListEndpointsOptions { + /** + * If `true` (the default), only returns endpoints that are + * active (not destroyed, not closing, and not busy). If `false` returns all + * endpoints. + */ + active?: boolean | undefined; + } + /** + * Returns the list of all `QuicEndpoint` instances. By default, only active + * endpoints are returned. + * @since v26.4.0 + */ + function listEndpoints(options?: ListEndpointsOptions): QuicEndpoint[]; + /** + * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance. + * @since v23.8.0 + */ + interface EndpointOptions { + /** + * If not specified the endpoint will bind to IPv4 `localhost` on a random port. + * @since v23.8.0 + */ + address?: SocketAddress | string | undefined; + /** + * An optional `net.BlockList` instance for filtering incoming packets by + * source address. When configured, every received UDP packet is checked against + * the block list before any QUIC processing occurs, minimizing resource + * expenditure on blocked sources. The block list is evaluated live — rules + * added to the `BlockList` object after the endpoint is created take effect + * immediately. + * + * See `endpointOptions.blockListPolicy` for how matches are interpreted. + * @since v26.3.0 + */ + blockList?: BlockList | undefined; + /** + * Controls how the `endpointOptions.blockList` is interpreted: + * + * * `'deny'` — Packets from addresses matching the block list are dropped. + * All other addresses are accepted. This is the typical blocklist mode. + * * `'allow'` — Only packets from addresses matching the block list are + * accepted. All other addresses are dropped. This is an allowlist mode + * for restricting access to known clients. + * + * If no block list is configured, this option has no effect. + * @since v26.3.0 + */ + blockListPolicy?: "deny" | "allow" | undefined; + /** + * The endpoint maintains an internal cache of validated socket addresses as a + * performance optimization. This option sets the maximum number of addresses + * that are cached. This is an advanced option that users typically won't have + * need to specify. + * @since v23.8.0 + */ + addressLRUSize?: bigint | number | undefined; + /** + * When `true`, the endpoint will not send stateless reset packets in response + * to packets from unknown connections. Stateless resets allow a peer to detect + * that a connection has been lost even when the server has no state for it. + * Disabling them may be useful in testing or when stateless resets are handled + * at a different layer. + * @since v26.2.0 + */ + disableStatelessReset?: boolean | undefined; + /** + * The number of seconds an endpoint will remain alive after all sessions have + * closed and it is no longer listening. A value of `0` (default) means the + * endpoint is only destroyed when explicitly closed via `endpoint.close()` or + * `endpoint.destroy()`. A positive value starts an idle timer when the endpoint + * becomes idle; if no new sessions are created before the timer fires, the + * endpoint is automatically destroyed. This is useful for connection pooling + * where endpoints should linger briefly for reuse by future `connect()` calls. + * @since v26.2.0 + */ + idleTimeout?: number | undefined; + /** + * When `true`, indicates that the endpoint should bind only to IPv6 addresses. + * @since v23.8.0 + */ + ipv6Only?: boolean | undefined; + /** + * Specifies the maximum number of concurrent sessions allowed per remote IP + * address (ignoring port). When the limit is reached, new connections from the + * same IP are refused with `CONNECTION_REFUSED`. A value of `0` disables the + * limit. The maximum value is `65535`. + * + * This limit can also be changed dynamically after construction via + * `endpoint.maxConnectionsPerHost`. + * @since v23.8.0 + */ + maxConnectionsPerHost?: number | undefined; + /** + * Specifies the maximum total number of concurrent sessions across all remote + * addresses. When the limit is reached, new connections are refused with + * `CONNECTION_REFUSED`. A value of `0` disables the limit. The maximum value is + * `65535`. + * + * This limit can also be changed dynamically after construction via + * `endpoint.maxConnectionsTotal`. + * @since v23.8.0 + */ + maxConnectionsTotal?: number | undefined; + /** + * The maximum number of QUIC retry packets the endpoint will send per second. + * This is a global rate limit (not per-host) that caps the total server-wide + * retry response rate, preventing spoofed-source floods from consuming unbounded + * resources. + * @since v26.3.0 + */ + retryRate?: number | undefined; + /** + * The maximum burst of retry packets allowed before rate limiting takes effect. + * @since v26.3.0 + */ + retryBurst?: number | undefined; + /** + * The maximum number of stateless reset packets the endpoint will send per second. + * @since v26.3.0 + */ + statelessResetRate?: number | undefined; + /** + * The maximum burst of stateless reset packets allowed before rate limiting + * takes effect. + * @since v26.3.0 + */ + statelessResetBurst?: number | undefined; + /** + * The maximum number of version negotiation packets the endpoint will send per + * second. + * @since v26.3.0 + */ + versionNegotiationRate?: number | undefined; + /** + * The maximum number of immediate connection close packets the endpoint will + * send per second. + * @since v26.3.0 + */ + versionNegotiationBurst?: number | undefined; + /** + * The maximum number of immediate connection close packets the endpoint will + * send per second. + * @since v26.3.0 + */ + immediateCloseRate?: number | undefined; + /** + * The maximum burst of immediate connection close packets allowed before rate + * limiting takes effect. + * @since v26.3.0 + */ + immediateCloseBurst?: number | undefined; + /** + * The maximum number of new sessions that a single remote address can create per + * second. This is a per-host rate limit tracked in the address validation LRU + * cache. It prevents a validated remote address from churning through sessions + * (rapidly opening and abandoning connections) faster than the server can handle. + * For benchmarking where traffic comes from a single source, set this to a high + * value. + * @since v26.3.0 + */ + sessionCreationRate?: number | undefined; + /** + * The maximum burst of new session creations allowed from a single remote address + * before rate limiting takes effect. + * @since v26.3.0 + */ + sessionCreationBurst?: number | undefined; + /** + * Specifies the length of time a QUIC retry token is considered valid. + * @since v23.8.0 + */ + retryTokenExpiration?: bigint | number | undefined; + /** + * Specifies the 16-byte secret used to generate QUIC retry tokens. + * @since v23.8.0 + */ + resetTokenSecret?: NodeJS.ArrayBufferView | undefined; + /** + * Specifies the length of time a QUIC token is considered valid. + * @since v23.8.0 + */ + tokenExpiration?: bigint | number | undefined; + /** + * Specifies the 16-byte secret used to generate QUIC tokens. + * @since v23.8.0 + */ + tokenSecret?: NodeJS.ArrayBufferView | undefined; + /** + * @since v23.8.0 + */ + udpReceiveBufferSize?: number | undefined; + /** + * @since v23.8.0 + */ + udpSendBufferSize?: number | undefined; + /** + * @since v23.8.0 + */ + udpTTL?: number | undefined; + /** + * When `true`, requires that the endpoint validate peer addresses using retry packets + * while establishing a new connection. + * @since v23.8.0 + */ + validateAddress?: boolean | undefined; + } + interface SetSNIContextsOptions { + replace?: boolean | undefined; + } + /** + * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be + * used as both a client and a server. + * @since v23.8.0 + */ + class QuicEndpoint implements AsyncDisposable { + constructor(options?: EndpointOptions); + /** + * The local UDP socket address to which the endpoint is bound, if any. + * + * If the endpoint is not currently bound then the value will be `undefined`. Read only. + * @since v23.8.0 + */ + readonly address: SocketAddress | undefined; + /** + * When `endpoint.busy` is set to true, the endpoint will temporarily reject + * new sessions from being created. Read/write. + * + * ```js + * // Mark the endpoint busy. New sessions will be prevented. + * endpoint.busy = true; + * + * // Mark the endpoint free. New session will be allowed. + * endpoint.busy = false; + * ``` + * + * The `busy` property is useful when the endpoint is under heavy load and needs to + * temporarily reject new sessions while it catches up. + * @since v23.8.0 + */ + busy: boolean; + /** + * Gracefully close the endpoint. The endpoint will close and destroy itself when + * all currently open sessions close. Once called, new sessions will be rejected. + * + * Returns a promise that is fulfilled when the endpoint is destroyed. + * @since v23.8.0 + */ + close(): Promise; + /** + * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is + * returned by the `endpoint.close()` function. Read only. + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * True if `endpoint.close()` has been called and closing the endpoint has not yet completed. + * Read only. + * @since v23.8.0 + */ + readonly closing: boolean; + /** + * Forcefully closes the endpoint by forcing all open sessions to be immediately + * closed. + * @since v23.8.0 + */ + destroy(error?: any): void; + /** + * True if `endpoint.destroy()` has been called. Read only. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * True if the endpoint is actively listening for incoming connections. Read only. + * @since v26.2.0 + */ + readonly listening: boolean; + /** + * The maximum number of concurrent connections allowed per remote IP address. + * `0` means unlimited (default). Can be set at construction time via the + * `maxConnectionsPerHost` option and changed dynamically at any time. + * The valid range is `0` to `65535`. + * @since v26.2.0 + */ + maxConnectionsPerHost: number; + /** + * The maximum total number of concurrent connections across all remote + * addresses. `0` means unlimited (default). Can be set at construction time via + * the `maxConnectionsTotal` option and changed dynamically at any time. + * The valid range is `0` to `65535`. + * @since v26.2.0 + */ + maxConnectionsTotal: number; + /** + * Replaces or updates the SNI TLS contexts for this endpoint. This allows + * changing the TLS identity (key/certificate) used for specific host names + * without restarting the endpoint. Existing sessions are unaffected — only + * new sessions will use the updated contexts. + * + * ```js + * endpoint.setSNIContexts({ + * 'api.example.com': { keys: [newApiKey], certs: [newApiCert] }, + * }); + * + * // Replace the entire SNI map + * endpoint.setSNIContexts({ + * 'api.example.com': { keys: [newApiKey], certs: [newApiCert] }, + * }, { replace: true }); + * ``` + * @since v26.1.0 + * @param entries An object mapping host names to TLS identity options. + * Each entry must include `keys` and `certs`. + */ + setSNIContexts(entries: Record, options?: SetSNIContextsOptions): void; + /** + * The statistics collected for an active endpoint. Read only. + * @since v23.8.0 + */ + readonly stats: QuicEndpoint.Stats; + /** + * Calls `endpoint.close()` and returns a promise that fulfills when the + * endpoint has closed. + * @since v23.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + namespace QuicEndpoint { + /** + * A view of the collected statistics for an endpoint. + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * A timestamp indicating the moment the endpoint was created. Read only. + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * A timestamp indicating the moment the endpoint was destroyed. Read only. + * @since v23.8.0 + */ + readonly destroyedAt: bigint; + /** + * The total number of bytes received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * The total number of bytes sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * The total number of QUIC packets successfully received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly packetsReceived: bigint; + /** + * The total number of QUIC packets successfully sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly packetsSent: bigint; + /** + * The total number of peer-initiated sessions received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly serverSessions: bigint; + /** + * The total number of sessions initiated by this endpoint. Read only. + * @since v23.8.0 + */ + readonly clientSessions: bigint; + /** + * The total number of times an initial packet was rejected due to the + * endpoint being marked busy. Read only. + * @since v23.8.0 + */ + readonly serverBusyCount: bigint; + /** + * The total number of retry packets sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly retryCount: bigint; + /** + * The total number of retry packets dropped by the global rate + * limiter. Read only. A non-zero value indicates the endpoint is under retry + * flood pressure. + * @since v26.3.0 + */ + readonly retryRateLimited: bigint; + /** + * The total number of version negotiation packets sent by this + * endpoint. Read only. + * @since v23.8.0 + */ + readonly versionNegotiationCount: bigint; + /** + * The total number of version negotiation packets dropped by + * the global rate limiter. Read only. + * @since v26.3.0 + */ + readonly versionNegotiationRateLimited: bigint; + /** + * The total number of stateless reset packets sent by this + * endpoint. Read only. + * @since v23.8.0 + */ + readonly statelessResetCount: bigint; + /** + * The total number of stateless reset packets dropped by the + * global rate limiter. Read only. + * @since v26.3.0 + */ + readonly statelessResetRateLimited: bigint; + /** + * The total number of immediate connection close packets sent + * by this endpoint. Read only. + * @since v23.8.0 + */ + readonly immediateCloseCount: bigint; + /** + * The total number of immediate connection close packets + * dropped by the global rate limiter. Read only. + * @since v26.3.0 + */ + readonly immediateCloseRateLimited: bigint; + /** + * The total number of session creation attempts dropped by the + * per-host rate limiter. Read only. A non-zero value indicates one or more + * remote addresses are creating sessions faster than the configured rate allows. + * @since v26.3.0 + */ + readonly sessionCreationRateLimited: bigint; + /** + * The total number of incoming packets dropped by the + * block list filter. Read only. + * @since v26.3.0 + */ + readonly packetsBlocked: bigint; + } + } + interface CreateStreamOptions { + /** + * The outbound body source. See `stream.setBody()` for details on + * supported types. When omitted, the stream's outgoing side remains + * writable with no body queued; no FIN is sent immediately. + */ + body?: StreamBody | undefined; + /** + * Initial request or response headers to send. Only + * used when the session supports headers (e.g. HTTP/3). If `body` is not + * specified and `headers` is provided, the stream is treated as + * headers-only (terminal). + */ + headers?: NodeJS.Dict | readonly string[] | undefined; + /** + * The priority level of the stream. One of `'high'`, + * `'default'`, or `'low'`. **Default:** `'default'`. + */ + priority?: "high" | "default" | "low" | undefined; + /** + * When `true`, data from this stream may be + * interleaved with data from other streams of the same priority level. + * When `false`, the stream should be completed before same-priority peers. + * **Default:** `false`. + */ + incremental?: boolean | undefined; + /** + * The maximum number of bytes that the writer + * will buffer before `writeSync()` returns `false`. When the buffered + * data exceeds this limit, the caller should wait for drain before + * writing more. **Default:** `65536` (64 KB). + */ + highWaterMark?: number | undefined; + /** + * Callback for received initial response headers. + * Called with `(headers)`. + */ + onheaders?: QuicStream["onheaders"] | undefined; + /** + * Callback for received trailing headers. + * Called with `(trailers)`. + */ + ontrailers?: QuicStream["ontrailers"] | undefined; + /** + * Callback for received informational (1xx) headers. + * Called with `(headers)`. + */ + oninfo?: QuicStream["oninfo"] | undefined; + /** + * Callback when trailers should be sent. + */ + onwanttrailers?: QuicStream["onwanttrailers"] | undefined; + } + interface SessionDestroyOptions { + /** + * The error code to include in the `CONNECTION_CLOSE` + * frame sent to the peer. **Default:** `0` (no error). + */ + code?: bigint | number | undefined; + /** + * Either `'transport'` or `'application'`. Determines the + * error code namespace used in the `CONNECTION_CLOSE` frame. When `'transport'` + * (the default), the frame type is `0x1c` and the code is interpreted as a QUIC + * transport error. When `'application'`, the frame type is `0x1d` and the code + * is application-specific. **Default:** `'transport'`. + */ + type?: "transport" | "application" | undefined; + /** + * An optional human-readable reason string included in + * the `CONNECTION_CLOSE` frame. Per RFC 9000, this is for diagnostic purposes + * only and should not be used for machine-readable error descriptions. + */ + reason?: string | undefined; + } + interface SessionHandshakeInfo { + /** + * The local socket address. + */ + local: SocketAddress; + /** + * The remote socket address. + */ + remote: SocketAddress; + /** + * The SNI server name negotiated during the handshake. + */ + servername: string; + /** + * The ALPN protocol negotiated during the handshake. + */ + protocol: string; + /** + * The name of the negotiated TLS cipher suite. + */ + cipher: string; + /** + * The TLS protocol version of the cipher suite + * (e.g., `'TLSv1.3'`). + */ + cipherVersion: string; + /** + * If certificate validation failed, the + * reason string. Empty string if validation succeeded. + */ + validationErrorReason: string; + /** + * If certificate validation failed, the + * error code. `0` if validation succeeded. + */ + validationErrorCode: number; + /** + * Whether 0-RTT early data was attempted. + */ + earlyDataAttempted: boolean; + /** + * Whether 0-RTT early data was accepted by + * the server. + */ + earlyDataAccepted: boolean; + } + interface SessionPath { + local: SocketAddress; + remote: SocketAddress; + } + /** + * A `QuicSession` represents the local side of a QUIC connection. + * @since v23.8.0 + */ + class QuicSession implements AsyncDisposable { + private constructor(); + /** + * The current application-level options for this session. These include settings + * that are specific to the negotiated application protocol (e.g. HTTP/3) and may + * be negotiated separately from the transport parameters. Read only. + * @since v26.3.0 + */ + readonly applicationOptions: SessionApplicationOptions; + /** + * Initiate a graceful close of the session. Existing streams will be allowed + * to complete but no new streams will be opened. Once all streams have closed, + * the session will be destroyed. The returned promise will be fulfilled once + * the session has been destroyed. If a non-zero `code` is specified, the + * promise will reject with an `ERR_QUIC_TRANSPORT_ERROR` or + * `ERR_QUIC_APPLICATION_ERROR` depending on the `type`. + * @since v23.8.0 + */ + close(options?: SessionDestroyOptions): Promise; + /** + * A promise that is fulfilled once the TLS handshake completes successfully. + * The resolved value contains information about the established session + * including the negotiated protocol, cipher suite, certificate validation + * status, and 0-RTT early data status. + * + * If the handshake fails or the session is destroyed before the handshake + * completes, the promise will be rejected. + * @since v26.2.0 + */ + readonly opened: Promise; + /** + * A promise that is fulfilled once the session is destroyed. + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * True if `session.close()` has been called and the session has not yet + * been destroyed. Read only. + * @since v26.2.0 + */ + readonly closing: boolean; + /** + * Immediately destroy the session. All streams will be destroyed and the + * session will be closed. If `error` is provided and [`session.onerror`][] is + * set, the `onerror` callback is invoked before destruction. The + * `session.closed` promise will reject with the error. If `options` is + * provided, the `CONNECTION_CLOSE` frame sent to the peer will include the + * specified error code, type, and reason. + * @since v23.8.0 + */ + destroy(error?: any, options?: SessionDestroyOptions): void; + /** + * True if `session.destroy()` has been called. Read only. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * The endpoint that created this session. Returns `null` if the session + * has been destroyed. Read only. + * @since v23.8.0 + */ + readonly endpoint: QuicEndpoint | null; + /** + * The callback to invoke when new application options, e.g. HTTP/3 settings arrived. + * @since v26.4 + */ + onapplication: OnApplicationCallback | undefined; + /** + * An optional callback invoked when the session is destroyed with an error. + * This includes errors caused by user callbacks that throw or reject (see + * [Callback error handling](https://nodejs.org/docs/latest-v26.x/api/quic.html#callback-error-handling)). The callback receives a single argument: the + * error that triggered the destruction. If the `onerror` callback itself throws + * or returns a promise that rejects, the error is surfaced as an uncaught + * exception. Read/write. + * + * Can also be set via the `onerror` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onerror: ((this: QuicSession, error: any) => void) | undefined; + /** + * The callback to invoke when a new stream is initiated by a remote peer. Read/write. + * @since v23.8.0 + */ + onstream: OnStreamCallback | undefined; + /** + * The callback to invoke when the server rejects 0-RTT early data. When + * this fires, all streams that were opened during the 0-RTT phase have + * been destroyed. The application should re-open streams if needed. + * Read/write. + * + * This callback only fires on the client side when the server rejects + * the client's 0-RTT attempt. The connection falls back to 1-RTT and + * continues normally. + * @since v26.2.0 + */ + onearlyrejected: ((this: QuicSession) => void) | undefined; + /** + * The callback to invoke when a new datagram is received from a remote peer. Read/write. + * @since v23.8.0 + */ + ondatagram: OnDatagramCallback | undefined; + /** + * The callback to invoke when the status of a datagram is updated. Read/write. + * @since v23.8.0 + */ + ondatagramstatus: OnDatagramStatusCallback | undefined; + /** + * The callback to invoke when the path validation is updated. Read/write. + * @since v23.8.0 + */ + onpathvalidation: OnPathValidationCallback | undefined; + /** + * The callback to invoke when a new session ticket is received. Read/write. + * @since v23.8.0 + */ + onsessionticket: OnSessionTicketCallback | undefined; + /** + * The callback to invoke when a version negotiation is initiated. Read/write. + * @since v23.8.0 + */ + onversionnegotiation: OnVersionNegotiationCallback | undefined; + /** + * The callback to invoke when the TLS handshake is completed. Read/write. + * @since v23.8.0 + */ + onhandshake: OnHandshakeCallback | undefined; + /** + * The callback to invoke when a NEW\_TOKEN token is received from the server. + * The token can be passed as the `token` option on a future connection to + * the same server to skip address validation. Read/write. + * @since v26.2.0 + */ + onnewtoken: OnNewTokenCallback | undefined; + /** + * The callback to invoke when an ORIGIN frame (RFC 9412) is received from + * the server, indicating which origins the server is authoritative for. + * Read/write. + * @since v26.2.0 + */ + onorigin: OnOriginCallback | undefined; + /** + * The callback to invoke when the peer sends an HTTP/3 GOAWAY frame, + * indicating it is initiating a graceful shutdown. The callback receives + * `(lastStreamId)` where `lastStreamId` is a `{bigint}`: + * + * * When `lastStreamId` is `-1n`, the peer sent a shutdown notice (intent + * to close) without specifying a stream boundary. All existing streams + * may still be processed. + * * When `lastStreamId` is `>= 0n`, it is the highest stream ID the peer + * may have processed. Streams with IDs above this value were NOT + * processed and can be safely retried on a new connection. + * + * After GOAWAY is received, `session.createBidirectionalStream()` will + * throw `ERR_INVALID_STATE`. Existing streams continue until they + * complete or the session closes. + * + * This callback is only relevant for HTTP/3 sessions. Read/write. + * @since v26.2.0 + */ + ongoaway: ((this: QuicSession, lastStreamId: bigint) => void) | undefined; + /** + * The callback to invoke when TLS key material is available. Requires + * `sessionOptions.keylog` to be `true`. Each invocation receives a single + * line of [NSS Key Log Format](https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format) text (including a trailing newline). This is + * useful for decrypting packet captures with tools like Wireshark. Read/write. + * + * Can also be set via the `onkeylog` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onkeylog: OnKeylogCallback | undefined; + /** + * The callback to invoke when qlog data is available. Requires + * `sessionOptions.qlog` to be `true`. The callback receives a string + * chunk of [JSON-SEQ](https://www.rfc-editor.org/rfc/rfc7464) formatted qlog data and a boolean `fin` flag. When + * `fin` is `true`, the chunk is the final qlog output for this session and + * the concatenated chunks form a complete qlog trace. Read/write. + * + * Qlog data arrives during the connection lifecycle. The first chunk contains + * the qlog header with format metadata. Subsequent chunks contain trace + * events. The final chunk (with `fin` set to `true`) is emitted during + * session destruction and completes the JSON-SEQ output. + * + * Can also be set via the `onqlog` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onqlog: OnQlogCallback | undefined; + /** + * Open a new bidirectional stream. If the `body` option is not specified, + * the stream's outgoing side remains writable and no FIN is sent + * immediately. The `priority` and `incremental` + * options are only used when the session supports priority (e.g. HTTP/3). + * The `headers`, `onheaders`, `ontrailers`, `oninfo`, and `onwanttrailers` + * options are only used when the session supports headers (e.g. HTTP/3). + * @since v23.8.0 + */ + createBidirectionalStream(options?: CreateStreamOptions): Promise; + /** + * Open a new unidirectional stream. If the `body` option is not specified, + * the stream's outgoing side remains writable and no FIN is sent + * immediately. The `priority` and `incremental` + * options are only used when the session supports priority (e.g. HTTP/3). + * @since v23.8.0 + */ + createUnidirectionalStream(options?: CreateStreamOptions): Promise; + /** + * The local and remote socket addresses associated with the session. Read only. + * @since v23.8.0 + */ + path: SessionPath | undefined; + /** + * Sends an unreliable datagram to the remote peer, returning a promise for + * the datagram ID. + * + * If `datagram` is a string, it will be encoded using the specified `encoding`. + * + * If `datagram` is an `ArrayBufferView`, the bytes are copied into an + * internal buffer; the caller's source buffer is unchanged and may be reused + * or mutated immediately after the call returns. Callers that want to ensure + * their source cannot be mutated after the call (for example, when handing + * the buffer off to another async consumer) can call + * `ArrayBuffer.prototype.transfer()` themselves before passing the buffer. + * + * If `datagram` is a `Promise`, it will be awaited before sending. If the + * session closes while awaiting, `0n` is returned silently (datagrams are + * inherently unreliable). + * + * If the datagram payload is zero-length (empty string after encoding, detached + * buffer, or zero-length view), `0n` is returned and no datagram is sent. + * + * For HTTP/3 sessions, the peer must advertise `SETTINGS_H3_DATAGRAM=1` + * (via `application: { enableDatagrams: true }`) for datagrams to be sent. + * If the peer's setting is `0`, `sendDatagram()` returns `0n` (per RFC 9297 + * §3, an endpoint MUST NOT send HTTP Datagrams unless the peer indicated + * support). + * + * Datagrams cannot be fragmented — each must fit within a single QUIC packet. + * The maximum datagram size is determined by the peer's + * `maxDatagramFrameSize` transport parameter (which the peer advertises during + * the handshake). If the peer sets this to `0`, datagrams are not supported + * and `0n` will be returned. If the datagram exceeds the peer's limit, it + * will be silently dropped and `0n` returned. The local + * `maxDatagramFrameSize` transport parameter (default: `1200` bytes) controls + * what this endpoint advertises to the peer as its own maximum. + * @since v23.8.0 + * @param encoding The encoding to use if `datagram` is a string. + * **Default:** `'utf8'`. + */ + sendDatagram( + datagram: string | NodeJS.ArrayBufferView | Promise, + encoding?: BufferEncoding, + ): Promise; + /** + * The SNI (Server Name Indication) host name associated with the session. This is + * `null` before the client hello is processed. Once the hello has been + * processed, this is either the host name string or `false` if the handshake + * had no SNI. + * @since v26.6.0 + */ + readonly servername: string | false | null; + /** + * The negotiated ALPN protocol. This is `null` before the client hello is + * processed. Once ALPN has been negotiated, this is the protocol string. ALPN + * is mandatory in QUIC so this is never `false` on successful connections, + * unlike `node:tls` where this is optional. + * @since v26.6.0 + */ + readonly alpnProtocol: string | null; + /** + * The local certificate as a `crypto.X509Certificate` instance. Server + * sessions return the certificate configured for the negotiated SNI host. + * Client sessions return `undefined` unless a client certificate was sent. + * Returns `undefined` if the session is destroyed. + * @since v26.2.0 + */ + readonly certificate: X509Certificate | undefined; + /** + * The peer's certificate as a `crypto.X509Certificate` instance. Returns + * `undefined` if the peer did not present a certificate or the session is + * destroyed. + * @since v26.2.0 + */ + readonly peerCertificate: X509Certificate | undefined; + /** + * The ephemeral key information for the session, with properties such as + * `type`, `name`, and `size`. Only available on client sessions. Returns + * `undefined` for server sessions or if the session is destroyed. + * @since v26.2.0 + */ + readonly ephemeralKeyInfo: EphemeralKeyInfo | undefined; + /** + * The maximum datagram payload size in bytes that the peer will accept. + * This is derived from the peer's `maxDatagramFrameSize` transport + * parameter minus the DATAGRAM frame overhead (type byte and variable-length + * integer encoding). Returns `0` if the peer does not support datagrams or + * if the handshake has not yet completed. Datagrams larger than this value + * will not be sent. + * @since v26.2.0 + */ + readonly maxDatagramSize: number; + /** + * The maximum number of datagrams that can be queued for sending. Datagrams + * are queued when `sendDatagram()` is called and sent opportunistically + * alongside stream data by the packet serialization loop. When the queue + * is full, the `sessionOptions.datagramDropPolicy` determines whether + * the oldest or newest datagram is dropped. Dropped datagrams are reported + * as lost via the `ondatagramstatus` callback. + * + * This property can be changed dynamically to adjust queue capacity + * based on application activity or memory pressure. The valid range + * is `0` to `65535`. + * @since v26.2.0 + */ + maxPendingDatagrams: number; + /** + * Return the current statistics for the session. Read only. + * @since v23.8.0 + */ + readonly stats: QuicSession.Stats; + /** + * Initiate a key update for the session. + * @since v23.8.0 + */ + updateKey(): void; + /** + * Calls `session.close()` and returns a promise that fulfills when the + * session has closed. + * @since v23.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + namespace QuicSession { + /** + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * @since v23.8.0 + */ + readonly closingAt: bigint; + /** + * @since v23.8.0 + */ + readonly handshakeCompletedAt: bigint; + /** + * @since v23.8.0 + */ + readonly handshakeConfirmedAt: bigint; + /** + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * @since v23.8.0 + */ + readonly bidiInStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly bidiOutStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly uniInStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly uniOutStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly maxBytesInFlight: bigint; + /** + * @since v23.8.0 + */ + readonly bytesInFlight: bigint; + /** + * @since v23.8.0 + */ + readonly blockCount: bigint; + /** + * @since v23.8.0 + */ + readonly cwnd: bigint; + /** + * @since v23.8.0 + */ + readonly latestRtt: bigint; + /** + * @since v23.8.0 + */ + readonly minRtt: bigint; + /** + * @since v23.8.0 + */ + readonly rttVar: bigint; + /** + * @since v23.8.0 + */ + readonly smoothedRtt: bigint; + /** + * @since v23.8.0 + */ + readonly ssthresh: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsReceived: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsSent: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsAcknowledged: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsLost: bigint; + /** + * The total number of peer-initiated streams destroyed by the + * stream idle timeout. Read only. + * @since v26.3.0 + */ + readonly streamsIdleTimedOut: bigint; + } + } + interface QuicErrorOptions { + /** + * The numeric QUIC error code. Numbers + * are coerced to `BigInt`. Must be a non-negative 62-bit unsigned + * varint (`0n <= errorCode <= 2n ** 62n - 1n`). + */ + errorCode?: bigint | number | undefined; + /** + * The Node.js-style error code string assigned to + * `error.code`. Defaults to `'ERR_QUIC_STREAM_ABORTED'`. + */ + code?: string | undefined; + /** + * Either `'application'` (default) or `'transport'`. + * Indicates whether the code is defined by the negotiated + * application protocol (e.g. RFC 9114 for HTTP/3) or by the QUIC + * transport layer (RFC 9000). Stream resets always carry application + * codes, so the default is `'application'`. + */ + type?: "application" | "transport" | undefined; + } + /** + * A `QuicError` is an `Error` subclass that carries an explicit numeric + * QUIC error code. Use it to abort a QUIC stream or session with a + * specific application-protocol-defined error code rather than letting + * the implementation pick a generic fallback. + * + * The class is exported from `node:quic`: + * + * ```js + * import { QuicError } from 'node:quic'; + * ``` + * + * When a `QuicError` is supplied to APIs that emit a wire frame + * (`writer.fail()`, `stream.destroy()`), the QUIC stack uses + * `error.errorCode` as the wire code for the resulting frame. + * When any other value is supplied (for example a plain `Error`), the + * implementation falls back to the negotiated application protocol's + * "internal error" code (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or + * the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * + * The Node.js error code (`error.code`) defaults to + * `'ERR_QUIC_STREAM_ABORTED'`. Callers who need a more specific code + * string can override it via `options.code` — the numeric QUIC code + * is unaffected. + * + * The Node.js error code is fixed at `'ERR_QUIC_STREAM_ABORTED'` so that + * catch blocks can distinguish a `QuicError` from other Node.js errors + * without checking the prototype chain. The numeric QUIC code lives on + * the separate `error.errorCode` property to avoid colliding with + * the Node.js convention that `error.code` is a string. + * @since v26.2.0 + * @experimental + */ + class QuicError extends Error { + /** + * ```js + * import { QuicError } from 'node:quic'; + * + * const err = new QuicError('rejecting stream', { errorCode: 0x10cn }); + * console.log(err.code); // 'ERR_QUIC_STREAM_ABORTED' + * console.log(err.errorCode); // 268n + * console.log(err.type); // 'application' + * + * const custom = new QuicError('custom failure', { + * errorCode: 0x10cn, + * code: 'ERR_MY_QUIC_FAILURE', + * }); + * console.log(custom.code); // 'ERR_MY_QUIC_FAILURE' + * ``` + * @param message A human-readable description of the error. + */ + constructor(message: string, options?: QuicErrorOptions); + /** + * The numeric QUIC error code carried by this error. + * @since v26.2.0 + */ + readonly errorCode: bigint; + /** + * Either `'application'` or `'transport'`. Indicates the namespace of + * `error.errorCode`. + * @since v26.2.0 + */ + readonly type: "application" | "transport"; + } + type StreamBody = + | null + | string + | ArrayBufferLike + | NodeJS.ArrayBufferView + | Blob + | FileHandle + | Iterable + | AsyncIterable + | Promise; + interface StreamPriority { + /** + * One of `'high'`, `'default'`, or `'low'`. + */ + level: "high" | "default" | "low"; + /** + * Whether the stream data should be interleaved + * with other streams of the same priority level. + */ + incremental: boolean; + } + interface StreamDestroyOptions { + /** + * The application error code to include in the + * `RESET_STREAM` and `STOP_SENDING` frames sent to the peer. Numbers are + * coerced to `BigInt`. When omitted, the wire code is derived from `error` + * (see below). + */ + code?: bigint | number | undefined; + /** + * An optional human-readable reason string. Accepted for + * symmetry with `session.close()` and `session.destroy()`, but + * **not transmitted on the wire** — neither `RESET_STREAM` nor + * `STOP_SENDING` carry a reason field. Provided for application logging + * and for use by the `stream.onerror` callback. + */ + reason?: string | undefined; + } + interface StreamSendHeadersOptions { + /** + * If `true`, the stream is closed for sending + * after the headers (no body will follow). **Default:** `false`. + */ + terminal?: boolean | undefined; + } + /** + * @since v23.8.0 + */ + class QuicStream { + private constructor(); + /** + * A promise that is fulfilled when the stream is fully closed. It resolves + * when the stream closes cleanly (including idle timeout). It rejects with + * an `ERR_QUIC_APPLICATION_ERROR` or `ERR_QUIC_TRANSPORT_ERROR` when the + * stream is closed due to a QUIC error (e.g., stream reset by the peer, + * CONNECTION\_CLOSE with a non-zero error code). + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * Immediately and abruptly destroys the stream. If `error` is provided and + * `stream.onerror` is set, the `onerror` callback is invoked before + * destruction. The `stream.closed` promise rejects with the error. + * + * When the stream is destroyed with an `error` (or with an explicit + * `options.code`), the QUIC stack signals the abort to the peer: + * + * * If the writable side is still open, a `RESET_STREAM` frame is sent. + * * If the readable side is still open (a bidirectional stream, or a + * remote-initiated unidirectional stream), a `STOP_SENDING` frame is sent. + * + * Both frames carry the same wire code, resolved with the following + * precedence: + * + * 1. `options.code`, when explicitly provided. + * 2. [`error.errorCode`][], when `error` is a [`QuicError`][]. + * 3. The negotiated application protocol's "internal error" code + * (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or the QUIC transport-layer + * `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * + * A clean destroy — no `error` and no `options.code` — does not emit + * `RESET_STREAM` or `STOP_SENDING`; the stream's existing close machinery + * handles teardown. + * + * See [Aborting a stream](https://nodejs.org/docs/latest-v26.x/api/quic.html#aborting-a-stream) for an overview of the available stream-abort + * APIs. + * @since v23.8.0 + */ + destroy(error?: any, options?: StreamDestroyOptions): void; + /** + * True if `stream.destroy()` has been called. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * True if any data on this stream was received as 0-RTT (early data) + * before the TLS handshake completed. Early data is less secure and + * could potentially be replayed by an attacker. Applications should + * treat early data with appropriate caution. + * + * This property is only meaningful on the server side. On the client + * side, it is always `false`. + * @since v26.2.0 + */ + readonly early: boolean; + /** + * The directionality of the stream, or `null` if the stream has been destroyed + * or is still pending. Read only. + * @since v23.8.0 + */ + readonly direction: "bidi" | "uni" | null; + /** + * The maximum number of bytes that the writer will buffer before + * `writeSync()` returns `false`. When the buffered data exceeds this limit, + * the caller should wait for drain before writing more. + * + * The value can be changed dynamically at any time. This is particularly + * useful for streams received via the `onstream` callback, where the + * default (65536) may need to be adjusted based on application needs. + * The valid range is `0` to `4294967295`. + * @since v26.2.0 + */ + highWaterMark: number; + /** + * The stream ID, or `null` if the stream has been destroyed or is still + * pending. Read only. + * @since v23.8.0 + */ + readonly id: bigint | null; + /** + * An optional callback invoked when the stream is destroyed with an error. + * This includes errors caused by user callbacks that throw or reject (see + * [Callback error handling](https://nodejs.org/docs/latest-26.x/api/quic.html#callback-error-handling)). The callback receives a single argument: the + * error that triggered the destruction. If the `onerror` callback itself throws + * or returns a promise that rejects, the error is surfaced as an uncaught + * exception. Read/write. + * @since v26.2.0 + */ + onerror: ((this: QuicStream, error: any) => void) | undefined; + /** + * The callback to invoke when the stream is blocked. Read/write. + * @since v23.8.0 + */ + onblocked: OnBlockedCallback | undefined; + /** + * The callback to invoke when the peer aborts a direction of the stream by + * sending a `RESET_STREAM` frame (the peer abandons their writable side, so + * no further data will arrive on our readable side) or a `STOP_SENDING` + * frame (the peer asks us to stop writing on our writable side). + * + * The callback receives a Node.js error whose `errorCode` (`bigint`) + * property carries the application error code from the wire frame. + * + * The stream is **not** automatically destroyed when this callback fires — + * the application chooses how to react. Common patterns are: ignore (and + * continue using the still-active direction on a bidirectional stream), + * abort the other direction with `writer.fail()`, or tear down the + * whole stream with `stream.destroy()`. Read/write. + * @since v23.8.0 + */ + onreset: OnStreamErrorCallback | undefined; + /** + * The buffered initial headers received on this stream, or `undefined` if the + * application does not support headers or no headers have been received yet. + * For server-side streams, this contains the request headers (e.g., `:method`, + * `:path`, `:scheme`). For client-side streams, this contains the response + * headers (e.g., `:status`). + * + * Header names are lowercase strings. Multi-value headers are represented as + * arrays. The object has `__proto__: null`. + * @since v26.2.0 + */ + readonly headers: NodeJS.Dict | undefined; + /** + * The callback to invoke when initial headers are received on the stream. The + * callback receives `(headers)` where `headers` is an object (same format as + * `stream.headers`). For HTTP/3, this delivers request pseudo-headers on the + * server side and response headers on the client side. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + onheaders: ((this: QuicStream, headers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when trailing headers are received from the peer. + * The callback receives `(trailers)` where `trailers` is an object in the + * same format as `stream.headers`. Throws `ERR_INVALID_STATE` if set on a + * session that does not support headers. Read/write. + * @since v26.2.0 + */ + ontrailers: ((this: QuicStream, trailers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when informational (1xx) headers are received from + * the server. The callback receives `(headers)` where `headers` is an object + * in the same format as `stream.headers`. Informational headers are sent + * before the final response (e.g., 103 Early Hints). Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + oninfo: ((this: QuicStream, headers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when the application is ready for trailing headers + * to be sent. This is called synchronously — the user must call + * `stream.sendTrailers()` within this callback. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + onwanttrailers: ((this: QuicStream) => void) | undefined; + /** + * Set trailing headers to be sent automatically when the application requests + * them. This is an alternative to the `stream.onwanttrailers` callback + * for cases where the trailers are known before the body completes. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + pendingTrailers: NodeJS.Dict | undefined; + /** + * Sends initial or response headers on the stream. For client-side streams, + * this sends request headers. For server-side streams, this sends response + * headers. Throws `ERR_INVALID_STATE` if the session does not support headers. + * @since v26.2.0 + * @param headers Header object with string keys and string or + * string-array values. Pseudo-headers (`:method`, `:path`, etc.) must + * appear before regular headers. + */ + sendHeaders(headers: NodeJS.Dict, options?: StreamSendHeadersOptions): boolean; + /** + * Sends informational (1xx) response headers. Server only. Throws + * `ERR_INVALID_STATE` if the session does not support headers. + * @since v26.2.0 + * @param headers Header object. Must include `:status` with a 1xx + * value (e.g., `{ ':status': '103', 'link': '; rel=preload' }`). + */ + sendInformationalHeaders(headers: NodeJS.Dict): boolean; + /** + * Sends trailing headers on the stream. Must be called synchronously during + * the `stream.onwanttrailers` callback, or set ahead of time via + * `stream.pendingTrailers`. Throws `ERR_INVALID_STATE` if the session + * does not support headers. + * @since v26.2.0 + * @param headers Trailing header object. Pseudo-headers must not be + * included in trailers. + */ + sendTrailers(headers: NodeJS.Dict): boolean; + /** + * The current priority of the stream. Returns `null` if the session does not + * support priority (e.g. non-HTTP/3) or if the stream has been destroyed. + * Read only. Use `stream.setPriority()` to change the priority. + * + * On client-side HTTP/3 sessions, the value reflects what was set via + * `stream.setPriority()`. On server-side HTTP/3 sessions, the value + * reflects the peer's requested priority (e.g., from `PRIORITY_UPDATE` frames). + * @since v26.2.0 + */ + readonly priority: StreamPriority | null; + /** + * Sets the priority of the stream. Throws `ERR_INVALID_STATE` if the session + * does not support priority (e.g. non-HTTP/3). Has no effect if the stream + * has been destroyed. + * @since v26.2.0 + */ + setPriority(options?: NodeJS.PartialOptions): void; + /** + * The stream implements `Symbol.asyncIterator`, making it directly usable + * in `for await...of` loops. Each iteration yields a batch of `Uint8Array` + * chunks. + * + * Only one async iterator can be obtained per stream. A second call throws + * `ERR_INVALID_STATE`. Non-readable streams (outbound-only unidirectional + * or closed) return an immediately-finished iterator. + * + * ```js + * for await (const chunks of stream) { + * for (const chunk of chunks) { + * // Process each Uint8Array chunk + * } + * } + * ``` + * + * Compatible with stream/iter utilities: + * + * ```js + * import Stream from 'node:stream/iter'; + * const body = await Stream.bytes(stream); + * const text = await Stream.text(stream); + * await Stream.pipeTo(stream, someWriter); + * ``` + * @since v26.2.0 + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * Returns a Writer object for pushing data to the stream incrementally. + * The Writer implements the stream/iter Writer interface with the + * try-sync-fallback-to-async pattern. + * + * Only available when no `body` source was provided at creation time or via + * `stream.setBody()`. Non-writable streams return an already-closed + * Writer. Throws `ERR_INVALID_STATE` if the outbound is already configured. + * + * The Writer has the following methods: + * + * * `writeSync(chunk)` — Synchronous write. Returns `true` if accepted, + * `false` if flow-controlled. Data is NOT accepted on `false`. + * * `write(chunk[, options])` — Async write with drain wait. `options.signal` + * is checked at entry but not observed during the write. + * * `writevSync(chunks)` — Synchronous vectored write. All-or-nothing. + * * `writev(chunks[, options])` — Async vectored write. + * * `endSync()` — Synchronous close. Returns total bytes or `-1`. + * * `end([options])` — Async close. + * * `fail(reason)` — Errors the stream (sends `RESET_STREAM` to peer). + * When `reason` is a `QuicError`, its `error.errorCode` is used + * as the wire code on the resulting `RESET_STREAM` frame; otherwise + * the wire code falls back to the negotiated application protocol's + * "internal error" code (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or + * the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * See `stream.destroy()` for a full-stream abort that also resets + * the readable side via `STOP_SENDING`. + * * `desiredSize` — Available capacity in bytes, or `null` if closed/errored. + * + * The bytes from each `writeSync()` / `writevSync()` / `write()` / `writev()` + * input chunk are copied into an internal buffer, so the caller's source + * buffer is unchanged and may be reused or mutated immediately after the + * call returns. Callers that want to ensure a source buffer cannot be + * mutated after handing it off can call `ArrayBuffer.prototype.transfer()` + * themselves before passing the buffer. + * @since v26.2.0 + */ + readonly writer: Writer; + /** + * Sets the outbound body source for the stream. Can only be called once. + * Mutually exclusive with `stream.writer`. + * + * The following body source types are supported: + * + * * `null` — The writable side is closed immediately (FIN sent with no data). + * * `string` — UTF-8 encoded and sent as a single chunk. + * * `ArrayBuffer`, `SharedArrayBuffer`, `ArrayBufferView` — Sent as a single + * chunk. The bytes are copied into an internal buffer, so the caller's + * source buffer is unchanged and may be reused or mutated immediately + * after the call returns. Callers wanting to ensure their source cannot + * be mutated after handing it off can call + * `ArrayBuffer.prototype.transfer()` themselves before passing the buffer. + * * `Blob` — Sent from the Blob's underlying data queue. + * * {FileHandle} — The file contents are read asynchronously via an + * fd-backed data source. The `FileHandle` must be opened for reading + * (e.g. via [`fs.promises.open(path, 'r')`][]). Once passed as a body, the + * `FileHandle` is locked and cannot be used as a body for another stream. + * The `FileHandle` is automatically closed when the stream finishes. + * * `AsyncIterable`, `Iterable` — Each yielded chunk (string or + * `Uint8Array`) is written incrementally in streaming mode. + * * `Promise` — Awaited; the resolved value is used as the body (subject + * to the same type rules). + * + * Throws `ERR_INVALID_STATE` if the outbound is already configured or if + * the writer has been accessed. + * @since v26.2.0 + */ + setBody(body: StreamBody): void; + /** + * The session that created this stream, or `null` if the stream has been + * destroyed. Read only. + * @since v23.8.0 + */ + readonly session: QuicSession | null; + /** + * The current statistics for the stream. Read only. + * @since v23.8.0 + */ + readonly stats: QuicStream.Stats; + } + namespace QuicStream { + /** + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * @since v23.8.0 + */ + readonly ackedAt: bigint; + /** + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * @since v23.8.0 + */ + readonly destroyedAt: bigint; + /** + * @since v23.8.0 + */ + readonly finalSize: bigint; + /** + * @since v23.8.0 + */ + readonly isConnected: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffset: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffsetAcknowledged: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffsetReceived: bigint; + /** + * @since v23.8.0 + */ + readonly openedAt: bigint; + /** + * @since v23.8.0 + */ + readonly receivedAt: bigint; + } + } + /** + * An object containing commonly used constants for QUIC configuration. + * @since v26.2.0 + */ + namespace constants { + /** + * Congestion control algorithm identifiers, for use with the + * `sessionOptions.cc` option: + * + * * `quic.constants.cc.RENO` — Reno congestion control. + * * `quic.constants.cc.CUBIC` — CUBIC congestion control. + * * `quic.constants.cc.BBR` — BBR congestion control. + */ + enum cc { + RENO = "reno", + CUBIC = "cubic", + BBR = "bbr", + } + /** + * The default TLS 1.3 cipher suite list used when `sessionOptions.ciphers` + * is not specified. + */ + const DEFAULT_CIPHERS: string; + /** + * The default TLS 1.3 key-exchange group list used when + * `sessionOptions.groups` is not specified. + */ + const DEFAULT_GROUPS: string; + } +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 000000000..a9ad29df4 --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,508 @@ +declare module "node:readline" { + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; + } + interface InterfaceEventMap { + "close": []; + "error": [error: Error]; + "history": [history: string[]]; + "line": [input: string]; + "pause": []; + "resume": []; + "SIGCONT": []; + "SIGINT": []; + "SIGTSTP": []; + } + /** + * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a + * single `input` [Readable](https://nodejs.org/docs/latest-v26.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v26.x/api/stream.html#writable-streams) stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + class Interface implements EventEmitter, Disposable { + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor(options: ReadLineOptions); + readonly terminal: boolean; + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' '), + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ + readonly line: string; + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ + readonly cursor: number; + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0, v14.17.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. + * @since v0.1.98 + */ + setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ + prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * An error will be thrown if calling `rl.question()` after `rl.close()`. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ + question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. + * @since v0.3.4 + */ + pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ + resume(): this; + /** + * The `rl.close()` method closes the `Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `Interface` instance. + * @since v0.1.98 + */ + close(): void; + /** + * Alias for `rl.close()`. + * @since v22.15.0 + */ + [Symbol.dispose](): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. + * @since v0.1.98 + */ + write(data: string | Buffer, key?: Key): void; + write(data: undefined | null | string | Buffer, key: Key): void; + /** + * Returns the real position of the cursor in relation to the input + * prompt + string. Long input (wrapping) strings, as well as multiple + * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 + */ + getCursorPos(): CursorPos; + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + } + interface Interface extends InternalEventEmitter {} + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = ( + line: string, + callback: (err?: null | Error, result?: CompleterResult) => void, + ) => void; + type CompleterResult = [string[], string]; + interface ReadLineOptions { + /** + * The [`Readable`](https://nodejs.org/docs/latest-v26.x/api/stream.html#readable-streams) stream to listen to + */ + input: NodeJS.ReadableStream; + /** + * The [`Writable`](https://nodejs.org/docs/latest-v26.x/api/stream.html#writable-streams) stream to write readline data to. + */ + output?: NodeJS.WritableStream | undefined; + /** + * An optional function used for Tab autocompletion. + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * `true` if the `input` and `output` streams should be treated like a TTY, + * and have ANSI/VT100 escape codes written to it. + * Default: checking `isTTY` on the `output` stream upon instantiation. + */ + terminal?: boolean | undefined; + /** + * Initial list of history lines. + * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, + * otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + /** + * Maximum number of history lines retained. + * To disable the history set this value to `0`. + * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, + * otherwise the history caching mechanism is not initialized at all. + * @default 30 + */ + historySize?: number | undefined; + /** + * If `true`, when a new input line added to the history list duplicates an older one, + * this removes the older line from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + /** + * The prompt string to use. + * @default "> " + */ + prompt?: string | undefined; + /** + * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, + * both `\r` and `\n` will be treated as separate end-of-line input. + * `crlfDelay` will be coerced to a number no less than `100`. + * It can be set to `Infinity`, in which case + * `\r` followed by `\n` will always be considered a single newline + * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v26.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). + * @default 100 + */ + crlfDelay?: number | undefined; + /** + * The duration `readline` will wait for a character + * (when reading an ambiguous key sequence in milliseconds + * one that can both form a complete key sequence using the input read so far + * and can take additional input to complete a longer key sequence). + * @default 500 + */ + escapeCodeTimeout?: number | undefined; + /** + * The number of spaces a tab is equal to (minimum 1). + * @default 8 + */ + tabSize?: number | undefined; + /** + * Allows closing the interface using an AbortSignal. + * Aborting the signal will internally call `close` on the interface. + */ + signal?: AbortSignal | undefined; + } + /** + * The `readline.createInterface()` method creates a new `readline.Interface` instance. + * + * ```js + * import readline from 'node:readline'; + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without + * waiting for user input, call `process.stdin.unref()`. + * @since v0.1.98 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * import readline from 'node:readline'; + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ', + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * import fs from 'node:fs'; + * import readline from 'node:readline'; + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity, + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * import fs from 'node:fs'; + * import readline from 'node:readline'; + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * import { once } from 'node:events'; + * import { createReadStream } from 'node:fs'; + * import { createInterface } from 'node:readline'; + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + */ + function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + type Direction = -1 | 0 | 1; + interface CursorPos { + rows: number; + cols: number; + } + /** + * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; + /** @deprecated This alias will be removed in a future version. Use `import { Interface } from 'node:readline'` instead. */ + type ReadLine = Interface; +} +declare module "node:readline" { + export * as promises from "node:readline/promises"; +} +declare module "readline" { + export * from "node:readline"; +} diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts new file mode 100644 index 000000000..ccee49037 --- /dev/null +++ b/node_modules/@types/node/readline/promises.d.ts @@ -0,0 +1,158 @@ +declare module "node:readline/promises" { + import { Abortable } from "node:events"; + import { + CompleterResult, + Direction, + Interface as _Interface, + ReadLineOptions as _ReadLineOptions, + } from "node:readline"; + /** + * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v17.0.0 + */ + class Interface extends _Interface { + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * If the question is called after `rl.close()`, it returns a rejected promise. + * + * Example usage: + * + * ```js + * const answer = await rl.question('What is your favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * Using an `AbortSignal` to cancel a question. + * + * ```js + * const signal = AbortSignal.timeout(10_000); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * const answer = await rl.question('What is your favorite food? ', { signal }); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * @since v17.0.0 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @return A promise that is fulfilled with the user's input in response to the `query`. + */ + question(query: string): Promise; + question(query: string, options: Abortable): Promise; + } + /** + * @since v17.0.0 + */ + class Readline { + /** + * @param stream A TTY stream. + */ + constructor( + stream: NodeJS.WritableStream, + options?: { + autoCommit?: boolean | undefined; + }, + ); + /** + * The `rl.clearLine()` method adds to the internal list of pending action an + * action that clears current line of the associated `stream` in a specified + * direction identified by `dir`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearLine(dir: Direction): this; + /** + * The `rl.clearScreenDown()` method adds to the internal list of pending action an + * action that clears the associated stream from the current position of the + * cursor down. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearScreenDown(): this; + /** + * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. + * @since v17.0.0 + */ + commit(): Promise; + /** + * The `rl.cursorTo()` method adds to the internal list of pending action an action + * that moves cursor to the specified position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + cursorTo(x: number, y?: number): this; + /** + * The `rl.moveCursor()` method adds to the internal list of pending action an + * action that moves the cursor _relative_ to its current position in the + * associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + moveCursor(dx: number, dy: number): this; + /** + * The `rl.rollback` methods clears the internal list of pending actions without + * sending it to the associated `stream`. + * @since v17.0.0 + * @return this + */ + rollback(): this; + } + type Completer = (line: string) => CompleterResult | Promise; + interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { + /** + * An optional function used for Tab autocompletion. + */ + completer?: Completer | undefined; + } + /** + * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. + * + * ```js + * import readlinePromises from 'node:readline/promises'; + * const rl = readlinePromises.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readlinePromises.Interface` instance is created, the most common case + * is to listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * @since v17.0.0 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; +} +declare module "readline/promises" { + export * from "node:readline/promises"; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 000000000..33e2fe97a --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,420 @@ +declare module "node:repl" { + import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline"; + import { InspectOptions } from "node:util"; + import { Context } from "node:vm"; + interface ReplOptions { + /** + * The input prompt to display. + * @default "> " + */ + prompt?: string | undefined; + /** + * The `Readable` stream from which REPL input will be read. + * @default process.stdin + */ + input?: NodeJS.ReadableStream | undefined; + /** + * The `Writable` stream to which REPL output will be written. + * @default process.stdout + */ + output?: NodeJS.WritableStream | undefined; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean | undefined; + /** + * The function to be used when evaluating each given line of input. + * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#custom-evaluation-functions) + * section for more details. + */ + eval?: REPLEval | undefined; + /** + * Defines if the repl prints output previews or not. + * @default `true` Always `false` in case `terminal` is falsy. + */ + preview?: boolean | undefined; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * @default the REPL instance's `terminal` value + */ + useColors?: boolean | undefined; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * @default false + */ + useGlobal?: boolean | undefined; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * @default false + */ + ignoreUndefined?: boolean | undefined; + /** + * The function to invoke to format the output of each command before writing to `output`. + * @default a wrapper for `util.inspect` + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter | undefined; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * @default false + */ + breakEvalOnSigint?: boolean | undefined; + /** + * This function customizes error handling in the REPL. + * It receives the thrown exception as its first argument and must return one + * of the following values synchronously: + * * `'print'` to print the error to the output stream (default behavior). + * * `'ignore'` to skip all remaining error handling. + * * `'unhandled'` to treat the exception as fully unhandled. In this case, + * the error will be passed to process-wide exception handlers, such as + * the `'uncaughtException'` event. + * The `'unhandled'` value may or may not be desirable in situations + * where the `REPLServer` instance has been closed, depending on the particular + * use case. + * @since v25.9.0 + */ + handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined; + } + type REPLEval = ( + this: REPLServer, + evalCmd: string, + context: Context, + file: string, + cb: (err: Error | null, result: any) => void, + ) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { + options: InspectOptions; + }; + type REPLCommandAction = (this: REPLServer, text: string) => void; + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string | undefined; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + interface REPLServerSetupHistoryOptions { + filePath?: string | undefined; + size?: number | undefined; + removeHistoryDuplicates?: boolean | undefined; + onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined; + } + interface REPLServerEventMap extends InterfaceEventMap { + "exit": []; + "reset": [context: Context]; + } + /** + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. + * + * ```js + * import repl from 'node:repl'; + * + * const options = { useColors: true }; + * + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 + */ + class REPLServer extends Interface { + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * @deprecated since v14.3.0 - Use `input` instead. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * @deprecated since v14.3.0 - Use `output` instead. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly input: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly output: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: NodeJS.ReadOnlyDict; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * import repl from 'node:repl'; + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * }, + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: + * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. + * + * When multi-line input is being entered, a pipe `'|'` is printed rather than the + * 'prompt'. + * + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. + * + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v0.1.91 + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v9.0.0 + */ + clearBufferedCommand(): void; + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command-line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error + */ + setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void; + setupHistory( + historyConfig?: REPLServerSetupHistoryOptions, + callback?: (err: Error | null, repl: this) => void, + ): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: REPLServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: REPLServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: unique symbol; + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: unique symbol; + /** + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: + * + * ```js + * import repl from 'node:repl'; + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 + */ + function start(options?: string | ReplOptions): REPLServer; + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + constructor(err: Error); + } +} +declare module "repl" { + export * from "node:repl"; +} diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts new file mode 100644 index 000000000..85ab108b8 --- /dev/null +++ b/node_modules/@types/node/sea.d.ts @@ -0,0 +1,47 @@ +declare module "node:sea" { + type AssetKey = string; + /** + * @since v20.12.0 + * @return Whether this script is running inside a single-executable application. + */ + function isSea(): boolean; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAsset(key: AssetKey): ArrayBuffer; + function getAsset(key: AssetKey, encoding: string): string; + /** + * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAssetAsBlob(key: AssetKey, options?: { + type: string; + }): Blob; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * + * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not + * return a copy. Instead, it returns the raw asset bundled inside the executable. + * + * For now, users should avoid writing to the returned array buffer. If the + * injected section is not marked as writable or not aligned properly, + * writes to the returned array buffer is likely to result in a crash. + * @since v20.12.0 + */ + function getRawAsset(key: AssetKey): ArrayBuffer; + /** + * This method can be used to retrieve an array of all the keys of assets + * embedded into the single-executable application. + * An error is thrown when not running inside a single-executable application. + * @since v24.8.0 + * @returns An array containing all the keys of the assets + * embedded in the executable. If no assets are embedded, returns an empty array. + */ + function getAssetKeys(): string[]; +} diff --git a/node_modules/@types/node/sqlite.d.ts b/node_modules/@types/node/sqlite.d.ts new file mode 100644 index 000000000..70493f065 --- /dev/null +++ b/node_modules/@types/node/sqlite.d.ts @@ -0,0 +1,1140 @@ +declare module "node:sqlite" { + import { PathLike } from "node:fs"; + type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView; + type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array; + interface DatabaseSyncOptions { + /** + * If `true`, the database is opened by the constructor. When + * this value is `false`, the database must be opened via the `open()` method. + * @since v22.5.0 + * @default true + */ + open?: boolean | undefined; + /** + * If `true`, foreign key constraints + * are enabled. This is recommended but can be disabled for compatibility with + * legacy database schemas. The enforcement of foreign key constraints can be + * enabled and disabled after opening the database using + * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys). + * @since v22.10.0 + * @default true + */ + enableForeignKeyConstraints?: boolean | undefined; + /** + * If `true`, SQLite will accept + * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote). + * This is not recommended but can be + * enabled for compatibility with legacy database schemas. + * @since v22.10.0 + * @default false + */ + enableDoubleQuotedStringLiterals?: boolean | undefined; + /** + * If `true`, the database is opened in read-only mode. + * If the database does not exist, opening it will fail. + * @since v22.12.0 + * @default false + */ + readOnly?: boolean | undefined; + /** + * If `true`, the `loadExtension` SQL function + * and the `loadExtension()` method are enabled. + * You can call `enableLoadExtension(false)` later to disable this feature. + * @since v22.13.0 + * @default false + */ + allowExtension?: boolean | undefined; + /** + * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of + * time that SQLite will wait for a database lock to be released before + * returning an error. + * @since v24.0.0 + * @default 0 + */ + timeout?: number | undefined; + /** + * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, + * integer fields are read as JavaScript numbers. + * @since v24.4.0 + * @default false + */ + readBigInts?: boolean | undefined; + /** + * If `true`, query results are returned as arrays instead of objects. + * @since v24.4.0 + * @default false + */ + returnArrays?: boolean | undefined; + /** + * If `true`, allows binding named parameters without the prefix + * character (e.g., `foo` instead of `:foo`). + * @since v24.4.40 + * @default true + */ + allowBareNamedParameters?: boolean | undefined; + /** + * If `true`, unknown named parameters are ignored when binding. + * If `false`, an exception is thrown for unknown named parameters. + * @since v24.4.40 + * @default false + */ + allowUnknownNamedParameters?: boolean | undefined; + /** + * If `true`, enables the defensive flag. When the defensive flag is enabled, + * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. + * The defensive flag can also be set using `enableDefensive()`. + * @since v25.1.0 + * @default true + */ + defensive?: boolean | undefined; + /** + * Configuration for various SQLite limits. These limits + * can be used to prevent excessive resource consumption when handling + * potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html) + * in the SQLite documentation for details. Default values are determined by + * SQLite's compile-time defaults and may vary depending on how SQLite was + * built. The following properties are supported: + * @since v25.8.0 + */ + limits?: NodeJS.PartialOptions | undefined; + } + interface DatabaseLimits { + length: number; + sqlLength: number; + column: number; + exprDepth: number; + compoundSelect: number; + vdbeOp: number; + functionArg: number; + attach: number; + likePatternLength: number; + variableNumber: number; + triggerDepth: number; + } + interface CreateSessionOptions { + /** + * A specific table to track changes for. By default, changes to all tables are tracked. + * @since v22.12.0 + */ + table?: string | undefined; + /** + * Name of the database to track. This is useful when multiple databases have been added using + * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). + * @since v22.12.0 + * @default 'main' + */ + db?: string | undefined; + } + interface ApplyChangesetOptions { + /** + * for each table affected by at least + * one change in the changeset, the `filter` callback is invoked with the + * table name as the first argument. If the return value is falsy, then no + * attempt is made to apply any changes to the table. + * Otherwise, if the return value is truthy or no `filter` callback is provided, + * all changes related to the table are attempted. + * @since v22.12.0 + */ + filter?: ((tableName: string) => boolean) | undefined; + /** + * A function that determines how to handle conflicts. The function receives one argument, + * which can be one of the following values: + * + * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values. + * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist. + * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key. + * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation. + * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint + * violation. + * + * The function should return one of the following values: + * + * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes. + * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with + `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts). + * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database. + * + * When an error is thrown in the conflict handler or when any other value is returned from the handler, + * applying the changeset is aborted and the database is rolled back. + * + * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`. + * @since v22.12.0 + */ + onConflict?: ((conflictType: number) => number) | undefined; + } + interface DeserializeOptions { + /** + * Name of the database to deserialize into. + * @default 'main' + */ + dbName?: string | undefined; + } + interface FunctionOptions { + /** + * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is + * set on the created function. + * @default false + */ + deterministic?: boolean | undefined; + /** + * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on + * the created function. + * @default false + */ + directOnly?: boolean | undefined; + /** + * If `true`, integer arguments to `function` + * are converted to `BigInt`s. If `false`, integer arguments are passed as + * JavaScript numbers. + * @default false + */ + useBigIntArguments?: boolean | undefined; + /** + * If `true`, `function` may be invoked with any number of + * arguments (between zero and + * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`, + * `function` must be invoked with exactly `function.length` arguments. + * @default false + */ + varargs?: boolean | undefined; + } + interface AggregateOptions extends FunctionOptions { + /** + * The identity value for the aggregation function. This value is used when the aggregation + * function is initialized. When a `Function` is passed the identity will be its return value. + */ + start: T | (() => T); + /** + * The function to call for each row in the aggregation. The + * function receives the current state and the row value. The return value of + * this function should be the new state. + */ + step: (accumulator: T, ...args: SQLOutputValue[]) => T; + /** + * The function to call to get the result of the + * aggregation. The function receives the final state and should return the + * result of the aggregation. + */ + result?: ((accumulator: T) => SQLInputValue) | undefined; + /** + * When this function is provided, the `aggregate` method will work as a window function. + * The function receives the current state and the dropped row value. The return value of this function should be the + * new state. + */ + inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined; + } + interface PrepareOptions { + /** + * If `true`, integer fields are read as `BigInt`s. + * @since v25.5.0 + */ + readBigInts?: boolean | undefined; + /** + * If `true`, results are returned as arrays. + * @since v25.5.0 + */ + returnArrays?: boolean | undefined; + /** + * If `true`, allows binding named parameters without the prefix character. + * @since v25.5.0 + */ + allowBareNamedParameters?: boolean | undefined; + /** + * If `true`, unknown named parameters are ignored. + * @since v25.5.0 + */ + allowUnknownNamedParameters?: boolean | undefined; + } + /** + * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs + * exposed by this class execute synchronously. + * @since v22.5.0 + */ + class DatabaseSync implements Disposable { + /** + * Constructs a new `DatabaseSync` instance. + * @param path The path of the database. + * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). + * To use a file-backed database, the path should be a file path. + * To use an in-memory database, the path should be the special name `':memory:'`. + * @param options Configuration options for the database connection. + */ + constructor(path: PathLike, options?: DatabaseSyncOptions); + /** + * Registers a new aggregate function with the SQLite database. This method is a wrapper around + * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html). + * + * When used as a window function, the `result` function will be called multiple times. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * db.exec(` + * CREATE TABLE t3(x, y); + * INSERT INTO t3 VALUES ('a', 4), + * ('b', 5), + * ('c', 3), + * ('d', 8), + * ('e', 1); + * `); + * + * db.aggregate('sumint', { + * start: 0, + * step: (acc, value) => acc + value, + * }); + * + * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 } + * ``` + * @since v24.0.0 + * @param name The name of the SQLite function to create. + * @param options Function configuration settings. + */ + aggregate(name: string, options: AggregateOptions): void; + aggregate(name: string, options: AggregateOptions): void; + /** + * Closes the database connection. An exception is thrown if the database is not + * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). + * @since v22.5.0 + */ + close(): void; + /** + * Loads a shared library into the database connection. This method is a wrapper + * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the + * `allowExtension` option when constructing the `DatabaseSync` instance. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * const database = new DatabaseSync(':memory:', { allowExtension: true }); + * + * // Load using the entry point derived from the filename. + * database.loadExtension('./decimal.dylib'); + * + * // Override the entry point when the derived name does not match. + * database.loadExtension('./base64.dylib', 'sqlite3_base64_init'); + * @since v22.13.0 + * @param path The path to the shared library to load. + * @param entryPoint The name of the extension's entry-point function. When + * omitted, SQLite derives the entry point from the shared library's filename; + * pass this argument explicitly when the derived name does not match. + */ + loadExtension(path: string, entryPoint?: string): void; + /** + * Enables or disables the `loadExtension` SQL function, and the `loadExtension()` + * method. When `allowExtension` is `false` when constructing, you cannot enable + * loading extensions for security reasons. + * @since v22.13.0 + * @param allow Whether to allow loading extensions. + */ + enableLoadExtension(allow: boolean): void; + /** + * Enables or disables the defensive flag. When the defensive flag is active, + * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. + * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) in the SQLite documentation for details. + * @since v25.1.0 + * @param active Whether to set the defensive flag. + */ + enableDefensive(active: boolean): void; + /** + * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) + * @since v24.0.0 + * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other + * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`. + * @returns The location of the database file. When using an in-memory database, + * this method returns null. + */ + location(dbName?: string): string | null; + /** + * This method allows one or more SQL statements to be executed without returning + * any results. This method is useful when executing SQL statements read from a + * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). + * @since v22.5.0 + * @param sql A SQL string to execute. + */ + exec(sql: string): void; + /** + * This method is used to create SQLite user-defined functions. This method is a + * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html). + * @since v22.13.0 + * @param name The name of the SQLite function to create. + * @param options Optional configuration settings for the function. + * @param fn The JavaScript function to call when the SQLite function is + * invoked. The return value of this function should be a valid SQLite data type: + * see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v26.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to + * `NULL` if the return value is `undefined`. + */ + function( + name: string, + options: FunctionOptions, + fn: (...args: SQLOutputValue[]) => SQLInputValue, + ): void; + function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void; + /** + * Sets an authorizer callback that SQLite will invoke whenever it attempts to + * access data or modify the database schema through prepared statements. + * This can be used to implement security policies, audit access, or restrict certain operations. + * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html). + * + * When invoked, the callback receives five arguments: + * + * * `actionCode` {number} The type of operation being performed (e.g., + * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`). + * * `arg1` {string|null} The first argument (context-dependent, often a table name). + * * `arg2` {string|null} The second argument (context-dependent, often a column name). + * * `dbName` {string|null} The name of the database. + * * `triggerOrView` {string|null} The name of the trigger or view causing the access. + * + * The callback must return one of the following constants: + * + * * `SQLITE_OK` - Allow the operation. + * * `SQLITE_DENY` - Deny the operation (causes an error). + * * `SQLITE_IGNORE` - Ignore the operation (silently skip). + * + * ```js + * import { DatabaseSync, constants } from 'node:sqlite'; + * const db = new DatabaseSync(':memory:'); + * + * // Set up an authorizer that denies all table creation + * db.setAuthorizer((actionCode) => { + * if (actionCode === constants.SQLITE_CREATE_TABLE) { + * return constants.SQLITE_DENY; + * } + * return constants.SQLITE_OK; + * }); + * + * // This will work + * db.prepare('SELECT 1').get(); + * + * // This will throw an error due to authorization denial + * try { + * db.exec('CREATE TABLE blocked (id INTEGER)'); + * } catch (err) { + * console.log('Operation blocked:', err.message); + * } + * ``` + * @since v24.10.0 + * @param callback The authorizer function to set, or `null` to + * clear the current authorizer. + */ + setAuthorizer( + callback: + | (( + actionCode: number, + arg1: string | null, + arg2: string | null, + dbName: string | null, + triggerOrView: string | null, + ) => number) + | null, + ): void; + /** + * Whether the database is currently open or not. + * @since v22.15.0 + */ + readonly isOpen: boolean; + /** + * Whether the database is currently within a transaction. This method + * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html). + * @since v24.0.0 + */ + readonly isTransaction: boolean; + /** + * An object for getting and setting SQLite database limits at runtime. + * Each property corresponds to an SQLite limit and can be read or written. + * + * ```js + * const db = new DatabaseSync(':memory:'); + * + * // Read current limit + * console.log(db.limits.length); + * + * // Set a new limit + * db.limits.sqlLength = 100000; + * + * // Reset a limit to its compile-time maximum + * db.limits.sqlLength = Infinity; + * ``` + * + * Available properties: `length`, `sqlLength`, `column`, `exprDepth`, + * `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`, + * `variableNumber`, `triggerDepth`. + * + * Setting a property to `Infinity` resets the limit to its compile-time maximum value. + * @since v25.8.0 + */ + readonly limits: DatabaseLimits; + /** + * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via + * the constructor. An exception is thrown if the database is already open. + * @since v22.5.0 + */ + open(): void; + /** + * Serializes the database into a binary representation, returned as a + * `Uint8Array`. This is useful for saving, cloning, or transferring an in-memory + * database. This method is a wrapper around [`sqlite3_serialize()`](https://sqlite.org/c3ref/serialize.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * db.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)'); + * db.exec("INSERT INTO t VALUES (1, 'hello')"); + * const buffer = db.serialize(); + * console.log(buffer.length); // Prints the byte length of the database + * ``` + * @since v26.1.0 + * @param dbName Name of the database to serialize. This can be `'main'` + * (the default primary database) or any other database that has been added with + * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). **Default:** `'main'`. + * @returns A binary representation of the database. + */ + serialize(dbName?: string): NodeJS.NonSharedUint8Array; + /** + * Loads a serialized database into this connection, replacing the current + * database. The deserialized database is writable. Existing prepared statements + * are finalized before deserialization is attempted, even if the operation + * subsequently fails. This method is a wrapper around + * [`sqlite3_deserialize()`](https://sqlite.org/c3ref/deserialize.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const original = new DatabaseSync(':memory:'); + * original.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)'); + * original.exec("INSERT INTO t VALUES (1, 'hello')"); + * const buffer = original.serialize(); + * original.close(); + * + * const clone = new DatabaseSync(':memory:'); + * clone.deserialize(buffer); + * console.log(clone.prepare('SELECT value FROM t').get()); + * // Prints: { value: 'hello' } + * ``` + * @since v26.1.0 + * @param buffer A binary representation of a database, such as the + * output of `database.serialize()`. + * @param options Optional configuration for the deserialization. + */ + deserialize(buffer: Uint8Array, options?: DeserializeOptions): void; + /** + * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper + * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). + * @since v22.5.0 + * @param sql A SQL string to compile to a prepared statement. + * @param options Optional configuration for the prepared statement. + * @return The prepared statement. + */ + prepare(sql: string, options?: PrepareOptions): StatementSync; + /** + * Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache + * for storing prepared statements. This allows for the efficient reuse of + * prepared statements by tagging them with a unique identifier. + * + * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared + * statement for the corresponding SQL query string already exists in the cache. + * If it does, the cached statement is used. If not, a new prepared statement is + * created, executed, and then stored in the cache for future use. This mechanism + * helps to avoid the overhead of repeatedly parsing and preparing the same SQL + * statements. + * + * Tagged statements bind the placeholder values from the template literal as + * parameters to the underlying prepared statement. For example: + * + * ```js + * sqlTagStore.get`SELECT ${value}`; + * ``` + * + * is equivalent to: + * + * ```js + * db.prepare('SELECT ?').get(value); + * ``` + * + * However, in the first example, the tag store will cache the underlying prepared + * statement for future use. + * + * > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to + * > the prepared statement. This differs from its behavior in _untagged_ template + * > literals, where it performs string interpolation. + * > + * > ```js + * > // This a safe example of binding a parameter to a tagged statement. + * > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`; + * > + * > // This is an *unsafe* example of an untagged template string. + * > // `id` is interpolated into the query text as a string. + * > // This can lead to SQL injection and data corruption. + * > db.run(`INSERT INTO t1 (id) VALUES (${id})`); + * > ``` + * + * The tag store will match a statement from the cache if the query strings + * (including the positions of any bound placeholders) are identical. + * + * ```js + * // The following statements will match in the cache: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`; + * + * // The following statements will not match, as the query strings + * // and bound placeholders differ: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`; + * + * // The following statements will not match, as matches are case-sensitive: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`select * from t1 where id = ${id} and active = 1`; + * ``` + * + * The only way of binding parameters in tagged statements is with the `${value}` + * syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query + * string itself. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * const sql = db.createSQLTagStore(); + * + * db.exec('CREATE TABLE users (id INT, name TEXT)'); + * + * // Using the 'run' method to insert data. + * // The tagged literal is used to identify the prepared statement. + * sql.run`INSERT INTO users VALUES (1, 'Alice')`; + * sql.run`INSERT INTO users VALUES (2, 'Bob')`; + * + * // Using the 'get' method to retrieve a single row. + * const name = 'Alice'; + * const user = sql.get`SELECT * FROM users WHERE name = ${name}`; + * console.log(user); // { id: 1, name: 'Alice' } + * + * // Using the 'all' method to retrieve all rows. + * const allUsers = sql.all`SELECT * FROM users ORDER BY id`; + * console.log(allUsers); + * // [ + * // { id: 1, name: 'Alice' }, + * // { id: 2, name: 'Bob' } + * // ] + * ``` + * @since v24.9.0 + * @returns A new SQL tag store for caching prepared statements. + */ + createTagStore(maxSize?: number): SQLTagStore; + /** + * Creates and attaches a session to the database. This method is a wrapper around + * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and + * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html). + * @param options The configuration options for the session. + * @returns A session handle. + * @since v22.12.0 + */ + createSession(options?: CreateSessionOptions): Session; + /** + * An exception is thrown if the database is not + * open. This method is a wrapper around + * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const sourceDb = new DatabaseSync(':memory:'); + * const targetDb = new DatabaseSync(':memory:'); + * + * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); + * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); + * + * const session = sourceDb.createSession(); + * + * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); + * insert.run(1, 'hello'); + * insert.run(2, 'world'); + * + * const changeset = session.changeset(); + * targetDb.applyChangeset(changeset); + * // Now that the changeset has been applied, targetDb contains the same data as sourceDb. + * ``` + * @param changeset A binary changeset or patchset. + * @param options The configuration options for how the changes will be applied. + * @returns Whether the changeset was applied successfully without being aborted. + * @since v22.12.0 + */ + applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean; + /** + * Closes the database connection. If the database connection is already closed + * then this is a no-op. + * @since v22.15.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v22.12.0 + */ + interface Session { + /** + * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times. + * An exception is thrown if the database or the session is not open. This method is a wrapper around + * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html). + * @returns Binary changeset that can be applied to other databases. + * @since v22.12.0 + */ + changeset(): NodeJS.NonSharedUint8Array; + /** + * Similar to the method above, but generates a more compact patchset. See + * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets) + * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a + * wrapper around + * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html). + * @returns Binary patchset that can be applied to other databases. + * @since v22.12.0 + */ + patchset(): NodeJS.NonSharedUint8Array; + /** + * Closes the session. An exception is thrown if the database or the session is not open. This method is a + * wrapper around + * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). + */ + close(): void; + /** + * Closes the session. If the session is already closed, does nothing. + * @since v24.9.0 + */ + [Symbol.dispose](): void; + } + /** + * This class represents a single LRU (Least Recently Used) cache for storing + * prepared statements. + * + * Instances of this class are created via the `database.createTagStore()` + * method, not by using a constructor. The store caches prepared statements based + * on the provided SQL query string. When the same query is seen again, the store + * retrieves the cached statement and safely applies the new values through + * parameter binding, thereby preventing attacks like SQL injection. + * + * The cache has a maxSize that defaults to 1000 statements, but a custom size can + * be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this + * class execute synchronously. + * @since v24.9.0 + */ + interface SQLTagStore { + /** + * Executes the given SQL query and returns all resulting rows as an array of + * objects. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An array of objects representing the rows returned by the query. + */ + all( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): Record[]; + /** + * Executes the given SQL query and returns the first resulting row as an object. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An object representing the first row returned by + * the query, or `undefined` if no rows are returned. + */ + get( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): Record | undefined; + /** + * Executes the given SQL query and returns an iterator over the resulting rows. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An iterator that yields objects representing the rows returned by the query. + */ + iterate( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): NodeJS.Iterator>; + /** + * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE). + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An object containing information about the execution, including `changes` and `lastInsertRowid`. + */ + run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges; + /** + * A read-only property that returns the number of prepared statements currently in the cache. + * @since v24.9.0 + */ + readonly size: number; + /** + * A read-only property that returns the maximum number of prepared statements the cache can hold. + * @since v24.9.0 + */ + readonly capacity: number; + /** + * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`. + * @since v24.9.0 + */ + readonly db: DatabaseSync; + /** + * Resets the LRU cache, clearing all stored prepared statements. + * @since v24.9.0 + */ + clear(): void; + } + interface StatementColumnMetadata { + /** + * The unaliased name of the column in the origin + * table, or `null` if the column is the result of an expression or subquery. + * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + column: string | null; + /** + * The unaliased name of the origin database, or + * `null` if the column is the result of an expression or subquery. This + * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + database: string | null; + /** + * The name assigned to the column in the result set of a + * `SELECT` statement. This property is the result of + * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html). + */ + name: string; + /** + * The unaliased name of the origin table, or `null` if + * the column is the result of an expression or subquery. This property is the + * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + table: string | null; + /** + * The declared data type of the column, or `null` if the + * column is the result of an expression or subquery. This property is the + * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html). + */ + type: string | null; + } + interface StatementResultingChanges { + /** + * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. + * This field is either a number or a `BigInt` depending on the prepared statement's configuration. + * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). + */ + changes: number | bigint; + /** + * The most recently inserted rowid. + * This field is either a number or a `BigInt` depending on the prepared statement's configuration. + * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). + */ + lastInsertRowid: number | bigint; + } + /** + * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be + * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute + * synchronously. + * + * A prepared statement is an efficient binary representation of the SQL used to + * create it. Prepared statements are parameterizable, and can be invoked multiple + * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are + * preferred + * over hand-crafted SQL strings when handling user input. + * @since v22.5.0 + */ + class StatementSync { + private constructor(); + /** + * This method executes a prepared statement and returns all results as an array of + * objects. If the prepared statement does not return any results, this method + * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using + * the values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of + * the row. + */ + all(...anonymousParameters: SQLInputValue[]): Record[]; + all( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): Record[]; + /** + * This method is used to retrieve information about the columns returned by the + * prepared statement. + * @since v23.11.0 + * @returns An array of objects. Each object corresponds to a column + * in the prepared statement, and contains the following properties: + */ + columns(): StatementColumnMetadata[]; + /** + * The source SQL text of the prepared statement with parameter + * placeholders replaced by the values that were used during the most recent + * execution of this prepared statement. This property is a wrapper around + * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). + * @since v22.5.0 + */ + readonly expandedSQL: string; + /** + * This method executes a prepared statement and returns the first result as an + * object. If the prepared statement does not return any results, this method + * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the + * values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no + * rows were returned from the database then this method returns `undefined`. + */ + get(...anonymousParameters: SQLInputValue[]): Record | undefined; + get( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): Record | undefined; + /** + * This method executes a prepared statement and returns an iterator of + * objects. If the prepared statement does not return any results, this method + * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using + * the values in `namedParameters` and `anonymousParameters`. + * @since v22.13.0 + * @param namedParameters An optional object used to bind named parameters. + * The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @returns An iterable iterator of objects. Each object corresponds to a row + * returned by executing the prepared statement. The keys and values of each + * object correspond to the column names and values of the row. + */ + iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator>; + iterate( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): NodeJS.Iterator>; + /** + * This method executes a prepared statement and returns an object summarizing the + * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the + * values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + */ + run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges; + run( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): StatementResultingChanges; + /** + * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding + * parameters. However, with the exception of dollar sign character, these + * prefix characters also require extra quoting when used in object keys. + * + * To improve ergonomics, this method can be used to also allow bare named + * parameters, which do not require the prefix character in JavaScript code. There + * are several caveats to be aware of when enabling bare named parameters: + * + * * The prefix character is still required in SQL. + * * The prefix character is still allowed in JavaScript. In fact, prefixed names + * will have slightly better binding performance. + * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared + * statement will result in an exception as it cannot be determined how to bind + * a bare name. + * @since v22.5.0 + * @param enabled Enables or disables support for binding named parameters without the prefix character. + */ + setAllowBareNamedParameters(enabled: boolean): void; + /** + * By default, if an unknown name is encountered while binding parameters, an + * exception is thrown. This method allows unknown named parameters to be ignored. + * @since v22.15.0 + * @param enabled Enables or disables support for unknown named parameters. + */ + setAllowUnknownNamedParameters(enabled: boolean): void; + /** + * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead + * of objects. + * @since v24.0.0 + * @param enabled Enables or disables the return of query results as arrays. + */ + setReturnArrays(enabled: boolean): void; + /** + * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript + * numbers by default. However, SQLite `INTEGER`s can store values larger than + * JavaScript numbers are capable of representing. In such cases, this method can + * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no + * impact on database write operations where numbers and `BigInt`s are both + * supported at all times. + * @since v22.5.0 + * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. + */ + setReadBigInts(enabled: boolean): void; + /** + * The source SQL text of the prepared statement. This property is a + * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). + * @since v22.5.0 + */ + readonly sourceSQL: string; + } + interface BackupOptions { + /** + * Name of the source database. This can be `'main'` (the default primary database) or any other + * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) + * @default 'main' + */ + source?: string | undefined; + /** + * Name of the target database. This can be `'main'` (the default primary database) or any other + * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) + * @default 'main' + */ + target?: string | undefined; + /** + * Number of pages to be transmitted in each batch of the backup. + * @default 100 + */ + rate?: number | undefined; + /** + * An optional callback function that will be called after each backup step. The argument passed + * to this callback is an `Object` with `remainingPages` and `totalPages` properties, describing the current progress + * of the backup operation. + */ + progress?: ((progressInfo: BackupProgressInfo) => void) | undefined; + } + interface BackupProgressInfo { + totalPages: number; + remainingPages: number; + } + /** + * This method makes a database backup. This method abstracts the + * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit), + * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep) + * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions. + * + * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same + * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause + * the backup process to restart. + * + * ```js + * import { backup, DatabaseSync } from 'node:sqlite'; + * + * const sourceDb = new DatabaseSync('source.db'); + * const totalPagesTransferred = await backup(sourceDb, 'backup.db', { + * rate: 1, // Copy one page at a time. + * progress: ({ totalPages, remainingPages }) => { + * console.log('Backup in progress', { totalPages, remainingPages }); + * }, + * }); + * + * console.log('Backup completed', totalPagesTransferred); + * ``` + * @since v23.8.0 + * @param sourceDb The database to backup. The source database must be open. + * @param path The path where the backup will be created. If the file already exists, + * the contents will be overwritten. + * @param options Optional configuration for the backup. The + * following properties are supported: + * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an + * error occurs. + */ + function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise; + /** + * @since v22.13.0 + */ + namespace constants { + /** + * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_DATA: number; + /** + * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_NOTFOUND: number; + /** + * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_CONFLICT: number; + /** + * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_FOREIGN_KEY: number; + /** + * Conflicting changes are omitted. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_OMIT: number; + /** + * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_REPLACE: number; + /** + * Abort when a change encounters a conflict and roll back database. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_ABORT: number; + /** + * Deny the operation and cause an error to be returned. + * @since v24.10.0 + */ + const SQLITE_DENY: number; + /** + * Ignore the operation and continue as if it had never been requested. + * @since 24.10.0 + */ + const SQLITE_IGNORE: number; + /** + * Allow the operation to proceed normally. + * @since v24.10.0 + */ + const SQLITE_OK: number; + const SQLITE_CREATE_INDEX: number; + const SQLITE_CREATE_TABLE: number; + const SQLITE_CREATE_TEMP_INDEX: number; + const SQLITE_CREATE_TEMP_TABLE: number; + const SQLITE_CREATE_TEMP_TRIGGER: number; + const SQLITE_CREATE_TEMP_VIEW: number; + const SQLITE_CREATE_TRIGGER: number; + const SQLITE_CREATE_VIEW: number; + const SQLITE_DELETE: number; + const SQLITE_DROP_INDEX: number; + const SQLITE_DROP_TABLE: number; + const SQLITE_DROP_TEMP_INDEX: number; + const SQLITE_DROP_TEMP_TABLE: number; + const SQLITE_DROP_TEMP_TRIGGER: number; + const SQLITE_DROP_TEMP_VIEW: number; + const SQLITE_DROP_TRIGGER: number; + const SQLITE_DROP_VIEW: number; + const SQLITE_INSERT: number; + const SQLITE_PRAGMA: number; + const SQLITE_READ: number; + const SQLITE_SELECT: number; + const SQLITE_TRANSACTION: number; + const SQLITE_UPDATE: number; + const SQLITE_ATTACH: number; + const SQLITE_DETACH: number; + const SQLITE_ALTER_TABLE: number; + const SQLITE_REINDEX: number; + const SQLITE_ANALYZE: number; + const SQLITE_CREATE_VTABLE: number; + const SQLITE_DROP_VTABLE: number; + const SQLITE_FUNCTION: number; + const SQLITE_SAVEPOINT: number; + const SQLITE_COPY: number; + const SQLITE_RECURSIVE: number; + } +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 000000000..c9b0811e8 --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,1806 @@ +declare module "node:stream" { + import { Blob } from "node:buffer"; + import { Abortable, EventEmitter } from "node:events"; + import { ByteReadableStream, toAsyncStreamable } from "node:stream/iter"; + import * as promises from "node:stream/promises"; + import * as web from "node:stream/web"; + class Stream extends EventEmitter { + /** + * @since v0.9.4 + */ + pipe( + destination: T, + options?: Stream.PipeOptions, + ): T; + } + namespace Stream { + export { promises, Stream }; + } + namespace Stream { + interface PipeOptions { + /** + * End the writer when the reader ends. + * @default true + */ + end?: boolean | undefined; + } + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; + destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; + read?: ((this: T, size: number) => void) | undefined; + } + interface ReadableIteratorOptions { + /** + * When set to `false`, calling `return` on the async iterator, + * or exiting a `for await...of` iteration using a `break`, + * `return`, or `throw` will not destroy the stream. + * @default true + */ + destroyOnReturn?: boolean | undefined; + } + interface ReadableOperatorOptions extends Abortable { + /** + * The maximum concurrent invocations of `fn` to call + * on the stream at once. + * @default 1 + */ + concurrency?: number | undefined; + /** + * How many items to buffer while waiting for user consumption + * of the output. + * @default concurrency * 2 - 1 + */ + highWaterMark?: number | undefined; + } + /** @deprecated Use `ReadableOperatorOptions` instead. */ + interface ArrayOptions extends ReadableOperatorOptions {} + interface ReadableToWebOptions { + strategy?: web.QueuingStrategy | undefined; + type?: web.ReadableStreamType | undefined; + } + interface ReadableEventMap { + "close": []; + "data": [chunk: any]; + "end": []; + "error": [err: Error]; + "pause": []; + "readable": []; + "resume": []; + } + /** + * @since v0.9.4 + */ + class Readable extends Stream implements NodeJS.ReadableStream { + constructor(options?: ReadableOptions); + /** + * A utility method for creating Readable Streams out of iterators. + * @since v12.3.0, v10.17.0 + * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. + * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + /** + * A utility method for creating a `Readable` from a web `ReadableStream`. + * @since v17.0.0 + */ + static fromWeb( + readableStream: web.ReadableStream, + options?: Pick, + ): Readable; + /** + * A utility method for creating a web `ReadableStream` from a `Readable`. + * @since v17.0.0 + */ + static toWeb( + streamReadable: NodeJS.ReadableStream, + options?: ReadableToWebOptions, + ): web.ReadableStream; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call {@link read}, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ + readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0, v14.18.0 + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. + * @since v12.7.0 + */ + readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v26.x/api/stream.html#event-end) event is emitted. + * @since v12.9.0 + */ + readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the [Three states](https://nodejs.org/docs/latest-v26.x/api/stream.html#three-states) section. + * @since v9.4.0 + */ + readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ + readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ + readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + _construct?(callback: (error?: Error | null) => void): void; + _read(size: number): void; + /** + * The `readable.read()` method reads data out of the internal buffer and + * returns it. If no data is available to be read, `null` is returned. By default, + * the data is returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If + * `size` bytes are not available to be read, `null` will be returned _unless_ the + * stream has ended, in which case all of the data remaining in the internal buffer + * will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the `size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ + read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ + setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the `Readable`. + * This is used primarily by the mechanism that underlies the `readable.pipe()` method. + * In most typical cases, there will be no reason to use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ + isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * import fs from 'node:fs'; + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ + unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * import { StringDecoder } from 'node:string_decoder'; + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.includes('\n\n')) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * return; + * } + * // Still reading the header. + * header += str; + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must + * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ + unshift(chunk: any, encoding?: BufferEncoding): void; + /** + * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more + * information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * import { OldReader } from './old-api-module.js'; + * import { Readable } from 'node:stream'; + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: BufferEncoding): boolean; + /** + * ```js + * import { Readable } from 'node:stream'; + * + * async function* splitToWords(source) { + * for await (const chunk of source) { + * const words = String(chunk).split(' '); + * + * for (const word of words) { + * yield word; + * } + * } + * } + * + * const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords); + * const words = await wordsStream.toArray(); + * + * console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream'] + * ``` + * + * `readable.compose(s)` is equivalent to `stream.compose(readable, s)`. + * + * This method also allows for an `AbortSignal` to be provided, which will destroy + * the composed stream when aborted. + * + * See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamcomposestreams) for more information. + * @since v19.1.0, v18.13.0 + * @returns a stream composed with the stream `stream`. + */ + compose( + stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void), + options?: Abortable, + ): Duplex; + /** + * The iterator created by this method gives users the option to cancel the destruction + * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, + * or if the iterator should destroy the stream if the stream emitted an error during iteration. + * @since v16.3.0 + */ + iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator; + /** + * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. + * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. + * @since v17.4.0, v16.14.0 + * @param fn a function to map over every chunk in the stream. Async or not. + * @returns a stream mapped with the function *fn*. + */ + map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable; + /** + * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called + * and if it returns a truthy value, the chunk will be passed to the result stream. + * If the *fn* function returns a promise - that promise will be `await`ed. + * @since v17.4.0, v16.14.0 + * @param fn a function to filter chunks from the stream. Async or not. + * @returns a stream filtered with the predicate *fn*. + */ + filter( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: ReadableOperatorOptions, + ): Readable; + /** + * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. + * If the *fn* function returns a promise - that promise will be `await`ed. + * + * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. + * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option + * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. + * In either case the stream will be destroyed. + * + * This method is different from listening to the `'data'` event in that it uses the `readable` event + * in the underlying machinary and can limit the number of concurrent *fn* calls. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise for when the stream has finished. + */ + forEach( + fn: (data: any, options?: Abortable) => void | Promise, + options?: Pick, + ): Promise; + /** + * This method allows easily obtaining the contents of a stream. + * + * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended + * for interoperability and convenience, not as the primary way to consume streams. + * @since v17.5.0 + * @returns a promise containing an array with the contents of the stream. + */ + toArray(options?: Abortable): Promise; + /** + * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream + * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk + * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. + * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. + */ + some( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream + * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, + * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. + * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, + * or `undefined` if no element was found. + */ + find( + fn: (data: any, options?: Abortable) => data is T, + options?: Pick, + ): Promise; + find( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream + * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk + * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. + * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. + */ + every( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method returns a new stream by applying the given callback to each chunk of the stream + * and then flattening the result. + * + * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams + * will be merged (flattened) into the returned stream. + * @since v17.5.0 + * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. + * @returns a stream flat-mapped with the function *fn*. + */ + flatMap( + fn: (data: any, options?: Abortable) => any, + options?: Pick, + ): Readable; + /** + * This method returns a new stream with the first *limit* chunks dropped from the start. + * @since v17.5.0 + * @param limit the number of chunks to drop from the readable. + * @returns a stream with *limit* chunks dropped from the start. + */ + drop(limit: number, options?: Abortable): Readable; + /** + * This method returns a new stream with the first *limit* chunks. + * @since v17.5.0 + * @param limit the number of chunks to take from the readable. + * @returns a stream with *limit* chunks taken. + */ + take(limit: number, options?: Abortable): Readable; + /** + * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation + * on the previous element. It returns a promise for the final value of the reduction. + * + * If no *initial* value is supplied the first chunk of the stream is used as the initial value. + * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. + * + * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter + * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. + * @since v17.5.0 + * @param fn a reducer function to call over every chunk in the stream. Async or not. + * @param initial the initial value to use in the reduction. + * @returns a promise for the final value of the reduction. + */ + reduce(fn: (previous: any, data: any, options?: Abortable) => T): Promise; + reduce( + fn: (previous: T, data: any, options?: Abortable) => T, + initial: T, + options?: Abortable, + ): Promise; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()` will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): this; + /** + * @returns `AsyncIterator` to fully consume the stream. + * @since v10.0.0 + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * When the `--experimental-stream-iter` flag is enabled, `Readable` streams + * implement the `Stream.toAsyncStreamable` protocol, enabling efficient + * consumption by the `stream/iter` API. + * + * This provides a batched async iterator that drains the stream's internal + * buffer into `Uint8Array[]` batches, amortizing the per-chunk Promise overhead + * of the standard `Symbol.asyncIterator` path. For byte-mode streams, chunks + * are yielded directly as `Buffer` instances (which are `Uint8Array` subclasses). + * For object-mode or encoded streams, each chunk is normalized to `Uint8Array` + * before batching. + * + * The returned iterator is tagged as a validated source, so `from()` + * passes it through without additional normalization. + * + * ```js + * import { Readable } from 'node:stream'; + * import { text, from } from 'node:stream/iter'; + * + * const readable = new Readable({ + * read() { this.push('hello'); this.push(null); }, + * }); + * + * // Readable is automatically consumed via toAsyncStreamable + * console.log(await text(from(readable))); // 'hello' + * ``` + * + * Without the `--experimental-stream-iter` flag, calling this method throws + * `ERR_STREAM_ITER_MISSING_FLAG`. + */ + [toAsyncStreamable](): ByteReadableStream; + /** + * Calls `readable.destroy()` with an `AbortError` and returns + * a promise that fulfills when the stream is finished. + * @since v20.4.0 + */ + [Symbol.asyncDispose](): Promise; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ReadableEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ReadableEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; + write?: + | (( + this: T, + chunk: any, + encoding: BufferEncoding, + callback: (error?: Error | null) => void, + ) => void) + | undefined; + writev?: + | (( + this: T, + chunks: { + chunk: any; + encoding: BufferEncoding; + }[], + callback: (error?: Error | null) => void, + ) => void) + | undefined; + final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; + } + interface WritableEventMap { + "close": []; + "drain": []; + "error": [err: Error]; + "finish": []; + "pipe": [src: Readable]; + "unpipe": [src: Readable]; + } + /** + * @since v0.9.4 + */ + class Writable extends Stream implements NodeJS.WritableStream { + constructor(options?: WritableOptions); + /** + * A utility method for creating a `Writable` from a web `WritableStream`. + * @since v17.0.0 + */ + static fromWeb( + writableStream: web.WritableStream, + options?: Pick, + ): Writable; + /** + * A utility method for creating a web `WritableStream` from a `Writable`. + * @since v17.0.0 + */ + static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream; + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored, or ended. + * @since v11.4.0 + */ + writable: boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'finish'`. + * @since v18.0.0, v16.17.0 + */ + readonly writableAborted: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ + readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ + readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ + readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ + readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ + readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + /** + * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. + * @since v15.2.0, v14.17.0 + */ + readonly writableNeedDrain: boolean; + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: { + chunk: any; + encoding: BufferEncoding; + }[], + callback: (error?: Error | null) => void, + ): void; + _construct?(callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * Once `write()` returns false, do not write more chunks + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + /** + * Writes data to the stream, with an explicit encoding for string data. + * @see {@link Writable.write} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param encoding The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ + setDefaultEncoding(encoding: BufferEncoding): this; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * import fs from 'node:fs'; + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param cb Callback for when the stream is finished. + */ + end(cb?: () => void): this; + /** + * Signals that no more data will be written, with one final chunk of data. + * @see {@link Writable.end} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param cb Callback for when the stream is finished. + */ + end(chunk: any, cb?: () => void): this; + /** + * Signals that no more data will be written, with one final chunk of data. + * @see {@link Writable.end} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param cb Callback for when the stream is finished. + */ + end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ + cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event + * loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ + uncork(): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): this; + /** + * Calls `writable.destroy()` with an `AbortError` and returns + * a promise that fulfills when the stream is finished. + * @since v22.4.0, v20.16.0 + */ + [Symbol.asyncDispose](): Promise; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WritableEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WritableEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + } + interface DuplexToWebOptions { + readableType?: web.ReadableStreamType | undefined; + } + interface DuplexEventMap extends ReadableEventMap, WritableEventMap {} + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Duplex extends Stream implements NodeJS.ReadWriteStream { + constructor(options?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from( + src: + | NodeJS.ReadableStream + | NodeJS.WritableStream + | Blob + | string + | Iterable + | AsyncIterable + | ((source: AsyncIterable) => AsyncIterable) + | ((source: AsyncIterable) => Promise) + | Promise + | web.ReadableWritablePair + | web.ReadableStream + | web.WritableStream, + ): Duplex; + /** + * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. + * @since v17.0.0 + */ + static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair; + /** + * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. + * @since v17.0.0 + */ + static fromWeb( + duplexStream: web.ReadableWritablePair, + options?: Pick< + DuplexOptions, + "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" + >, + ): Duplex; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `true`. + * + * This can be changed manually to change the half-open behavior of an existing + * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: DuplexEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: DuplexEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Duplex extends Readable, Writable {} + /** + * The utility function `duplexPair` returns an Array with two items, + * each being a `Duplex` stream connected to the other side: + * + * ```js + * const [ sideA, sideB ] = duplexPair(); + * ``` + * + * Whatever is written to one stream is made readable on the other. It provides + * behavior analogous to a network connection, where the data written by the client + * becomes readable by the server, and vice-versa. + * + * The Duplex streams are symmetrical; one or the other may be used without any + * difference in behavior. + * @param options A value to pass to both {@link Duplex} constructors, + * to set options such as buffering. + * @since v22.6.0 + */ + function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; + type TransformCallback = (error?: Error | null, data?: any) => void; + interface TransformOptions extends DuplexOptions { + transform?: + | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void) + | undefined; + flush?: ((this: T, callback: TransformCallback) => void) | undefined; + } + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Transform extends Duplex { + constructor(options?: TransformOptions); + _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * A stream to attach a signal to. + * + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the + * stream, and `controller.error(new AbortError())` for webstreams. + * + * ```js + * import fs from 'node:fs'; + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * + * Or using an `AbortSignal` with a ReadableStream: + * + * ```js + * const controller = new AbortController(); + * const rs = new ReadableStream({ + * start(controller) { + * controller.enqueue('hello'); + * controller.enqueue('world'); + * controller.close(); + * }, + * }); + * + * addAbortSignal(controller.signal, rs); + * + * finished(rs, (err) => { + * if (err) { + * if (err.name === 'AbortError') { + * // The operation was cancelled + * } + * } + * }); + * + * const reader = rs.getReader(); + * + * reader.read().then(({ value, done }) => { + * console.log(value); // hello + * console.log(done); // false + * controller.abort(); + * }); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream A stream to attach a signal to. + */ + function addAbortSignal< + T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + >(signal: AbortSignal, stream: T): T; + /** + * Returns the default highWaterMark used by streams. + * Defaults to `65536` (64 KiB), or `16` for `objectMode`. + * @since v19.9.0 + */ + function getDefaultHighWaterMark(objectMode: boolean): number; + /** + * Sets the default highWaterMark used by streams. + * @since v19.9.0 + * @param value highWaterMark value + */ + function setDefaultHighWaterMark(objectMode: boolean, value: number): void; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + /** + * A readable and/or writable stream/webstream. + * + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * import { finished } from 'node:stream'; + * import fs from 'node:fs'; + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. + * + * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options). + * + * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @returns A cleanup function which removes all registered listeners. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + options: FinishedOptions, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + namespace finished { + import __promisify__ = promises.finished; + export { __promisify__ }; + } + type PipelineSourceFunction = (options?: Abortable) => Iterable | AsyncIterable; + type PipelineSource = + | NodeJS.ReadableStream + | web.ReadableStream + | web.TransformStream + | Iterable + | AsyncIterable + | PipelineSourceFunction; + type PipelineSourceArgument = (T extends (...args: any[]) => infer R ? R : T) extends infer S + ? S extends web.TransformStream ? web.ReadableStream : S + : never; + type PipelineTransformGenerator, O> = ( + source: PipelineSourceArgument, + options?: Abortable, + ) => AsyncIterable; + type PipelineTransformStreams = + | NodeJS.ReadWriteStream + | web.TransformStream; + type PipelineTransform, O> = S extends + PipelineSource | PipelineTransformStreams | ((...args: any[]) => infer I) + ? PipelineTransformStreams | PipelineTransformGenerator + : never; + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationFunction, R> = ( + source: PipelineSourceArgument, + options?: Abortable, + ) => R; + type PipelineDestination, R> = S extends + PipelineSource | PipelineTransform ? + | NodeJS.WritableStream + | web.WritableStream + | web.TransformStream + | PipelineDestinationFunction + : never; + type PipelineCallback> = ( + err: NodeJS.ErrnoException | null, + value: S extends (...args: any[]) => PromiseLike ? R : undefined, + ) => void; + type PipelineResult> = S extends NodeJS.WritableStream ? S : Duplex; + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * import { pipeline } from 'node:stream'; + * import fs from 'node:fs'; + * import zlib from 'node:zlib'; + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * }, + * ); + * ``` + * + * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-options). + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. If the last + * stream is readable, dangling event listeners will be removed so that the last + * stream can be consumed later. + * + * `stream.pipeline()` closes all the streams when an error is raised. + * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior + * once it would destroy the socket without sending the expected response. + * See the example below: + * + * ```js + * import fs from 'node:fs'; + * import http from 'node:http'; + * import { pipeline } from 'node:stream'; + * + * const server = http.createServer((req, res) => { + * const fileStream = fs.createReadStream('./fileNotExist.txt'); + * pipeline(fileStream, res, (err) => { + * if (err) { + * console.log(err); // No such file + * // this message can't be sent once `pipeline` already destroyed the socket + * return res.end('error!!!'); + * } + * }); + * }); + * ``` + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, D extends PipelineDestination>( + source: S, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform: T, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + transform3: T3, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline( + streams: ReadonlyArray | PipelineTransform | PipelineDestination>, + callback: (err: NodeJS.ErrnoException | null) => void, + ): NodeJS.WritableStream; + function pipeline( + ...streams: [ + ...[PipelineSource, ...PipelineTransform[], PipelineDestination], + callback: ((err: NodeJS.ErrnoException | null) => void), + ] + ): NodeJS.WritableStream; + namespace pipeline { + import __promisify__ = promises.pipeline; + export { __promisify__ }; + } + type ComposeSource = + | NodeJS.ReadableStream + | web.ReadableStream + | Iterable + | AsyncIterable + | (() => AsyncIterable); + type ComposeTransformStreams = NodeJS.ReadWriteStream | web.TransformStream; + type ComposeTransformGenerator = (source: AsyncIterable) => AsyncIterable; + type ComposeTransform, O> = S extends + ComposeSource | ComposeTransformStreams | ComposeTransformGenerator + ? ComposeTransformStreams | ComposeTransformGenerator + : never; + type ComposeTransformSource = ComposeSource | ComposeTransform; + type ComposeDestination> = S extends ComposeTransformSource ? + | NodeJS.WritableStream + | web.WritableStream + | web.TransformStream + | ((source: AsyncIterable) => void) + : never; + /** + * Combines two or more streams into a `Duplex` stream that writes to the + * first stream and reads from the last. Each provided stream is piped into + * the next, using `stream.pipeline`. If any of the streams error then all + * are destroyed, including the outer `Duplex` stream. + * + * Because `stream.compose` returns a new stream that in turn can (and + * should) be piped into other streams, it enables composition. In contrast, + * when passing streams to `stream.pipeline`, typically the first stream is + * a readable stream and the last a writable stream, forming a closed + * circuit. + * + * If passed a `Function` it must be a factory method taking a `source` + * `Iterable`. + * + * ```js + * import { compose, Transform } from 'node:stream'; + * + * const removeSpaces = new Transform({ + * transform(chunk, encoding, callback) { + * callback(null, String(chunk).replace(' ', '')); + * }, + * }); + * + * async function* toUpper(source) { + * for await (const chunk of source) { + * yield String(chunk).toUpperCase(); + * } + * } + * + * let res = ''; + * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) { + * res += buf; + * } + * + * console.log(res); // prints 'HELLOWORLD' + * ``` + * + * `stream.compose` can be used to convert async iterables, generators and + * functions into streams. + * + * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield + * `null`. + * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`. + * Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * * `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined`. + * + * ```js + * import { compose } from 'node:stream'; + * import { finished } from 'node:stream/promises'; + * + * // Convert AsyncIterable into readable Duplex. + * const s1 = compose(async function*() { + * yield 'Hello'; + * yield 'World'; + * }()); + * + * // Convert AsyncGenerator into transform Duplex. + * const s2 = compose(async function*(source) { + * for await (const chunk of source) { + * yield String(chunk).toUpperCase(); + * } + * }); + * + * let res = ''; + * + * // Convert AsyncFunction into writable Duplex. + * const s3 = compose(async function(source) { + * for await (const chunk of source) { + * res += chunk; + * } + * }); + * + * await finished(compose(s1, s2, s3)); + * + * console.log(res); // prints 'HELLOWORLD' + * ``` + * + * For convenience, the `readable.compose(stream)` method is available on + * `Readable` and `Duplex` streams as a wrapper for this function. + * @since v16.9.0 + * @experimental + */ + /* eslint-disable @definitelytyped/no-unnecessary-generics */ + function compose(stream: ComposeSource | ComposeDestination): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >( + source: S, + destination: D, + ): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform: T, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + T3 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + T3 extends ComposeTransform, + T4 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex; + function compose( + ...streams: [ + ComposeSource, + ...ComposeTransform[], + ComposeDestination, + ] + ): Duplex; + /* eslint-enable @definitelytyped/no-unnecessary-generics */ + /** + * Returns whether the stream has encountered an error. + * @since v17.3.0, v16.14.0 + */ + function isErrored( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + ): boolean; + /** + * Returns whether the stream is readable. + * @since v17.4.0, v16.14.0 + * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`. + */ + function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null; + /** + * Returns whether the stream is writable. + * @since v20.0.0 + * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`. + */ + function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null; + } + global { + namespace NodeJS { + // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces + // from early versions of Node.js, but they are still used widely across the ecosystem. + // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that + // eg. streams returned from older libraries will still be considered valid input to + // functions which accept stream arguments. + // It's not possible to change or remove these without astronomical levels of breakage. + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: BufferEncoding): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean | undefined }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): this; + end(data: string | Uint8Array, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; + } + interface ReadWriteStream extends ReadableStream, WritableStream {} + } + } + export = Stream; +} +declare module "stream" { + import stream = require("node:stream"); + export = stream; +} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts new file mode 100644 index 000000000..27a474c5e --- /dev/null +++ b/node_modules/@types/node/stream/consumers.d.ts @@ -0,0 +1,114 @@ +declare module "node:stream/consumers" { + import { Blob, NonSharedBuffer } from "node:buffer"; + import { ReadableStream } from "node:stream/web"; + /** + * ```js + * import { arrayBuffer } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { TextEncoder } from 'node:util'; + * + * const encoder = new TextEncoder(); + * const dataArray = encoder.encode('hello world from consumers!'); + * + * const readable = Readable.from(dataArray); + * const data = await arrayBuffer(readable); + * console.log(`from readable: ${data.byteLength}`); + * // Prints: from readable: 76 + * ``` + * @since v16.7.0 + * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream. + */ + function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { blob } from 'node:stream/consumers'; + * + * const dataBlob = new Blob(['hello world from consumers!']); + * + * const readable = dataBlob.stream(); + * const data = await blob(readable); + * console.log(`from readable: ${data.size}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with a `Blob` containing the full contents of the stream. + */ + function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { buffer } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { Buffer } from 'node:buffer'; + * + * const dataBuffer = Buffer.from('hello world from consumers!'); + * + * const readable = Readable.from(dataBuffer); + * const data = await buffer(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with a `Buffer` containing the full contents of the stream. + */ + function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { bytes } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { Buffer } from 'node:buffer'; + * + * const dataBuffer = Buffer.from('hello world from consumers!'); + * + * const readable = Readable.from(dataBuffer); + * const data = await bytes(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v25.6.0 + * @returns Fulfills with a `Uint8Array` containing the full contents of the stream. + */ + function bytes( + stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable, + ): Promise; + /** + * ```js + * import { json } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * + * const items = Array.from( + * { + * length: 100, + * }, + * () => ({ + * message: 'hello world from consumers!', + * }), + * ); + * + * const readable = Readable.from(JSON.stringify(items)); + * const data = await json(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 100 + * ``` + * @since v16.7.0 + * @returns Fulfills with the contents of the stream parsed as a + * UTF-8 encoded string that is then passed through `JSON.parse()`. + */ + function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { text } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * + * const readable = Readable.from('Hello world from consumers!'); + * const data = await text(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string. + */ + function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; +} +declare module "stream/consumers" { + export * from "node:stream/consumers"; +} diff --git a/node_modules/@types/node/stream/iter.d.ts b/node_modules/@types/node/stream/iter.d.ts new file mode 100644 index 000000000..f42fb5276 --- /dev/null +++ b/node_modules/@types/node/stream/iter.d.ts @@ -0,0 +1,449 @@ +declare module "node:stream/iter" { + import { Abortable } from "node:events"; + import { Readable, Writable } from "node:stream"; + // Symbols and custom typedefs + const broadcastProtocol: unique symbol; + const drainableProtocol: unique symbol; + const shareProtocol: unique symbol; + const shareSyncProtocol: unique symbol; + const toAsyncStreamable: unique symbol; + const toStreamable: unique symbol; + type Source = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable + | Streamable + | AsyncStreamable; + type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable | Streamable; + type Transform = StatelessTransformFn | StatefulTransform; + type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform; + type TransformResult = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable; + type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable; + interface AsyncStreamable { + [toAsyncStreamable](): Source; + } + interface Broadcastable { + [broadcastProtocol](options: BroadcastOptions): Broadcast; + } + interface Drainable { + [drainableProtocol](): Promise | null; + } + interface Shareable { + [shareProtocol](options: ShareOptions): Share; + } + interface Streamable { + [toStreamable](): SyncSource; + } + interface SyncShareable { + [shareSyncProtocol](options: ShareSyncOptions): SyncShare; + } + // IDL dictionaries, enums, typedefs + type BackpressurePolicy = "strict" | "unbounded" | "drop-oldest" | "drop-newest"; + type ByteReadableStream = AsyncIterable; + type SyncByteReadableStream = Iterable; + interface WriteOptions { + signal?: AbortSignal; + } + interface PushStreamOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface PullOptions { + signal?: AbortSignal; + } + interface PipeToOptions { + signal?: AbortSignal; + preventClose?: boolean; + preventFail?: boolean; + } + interface PipeToSyncOptions { + preventClose?: boolean; + preventFail?: boolean; + } + interface ConsumeOptions { + signal?: AbortSignal; + limit?: number; + } + interface ConsumeSyncOptions { + limit?: number; + } + interface TextConsumeOptions extends ConsumeOptions { + encoding?: string; + } + interface TextConsumeSyncOptions extends ConsumeSyncOptions { + encoding?: string; + } + interface MergeOptions { + signal?: AbortSignal; + } + interface BroadcastOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareSyncOptions { + budget?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexDirectionOptions { + budget?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + a?: DuplexDirectionOptions; + b?: DuplexDirectionOptions; + signal?: AbortSignal; + } + interface TransformCallbackOptions { + signal: AbortSignal; + } + interface StatelessTransformFn { + ( + chunks: Uint8Array[] | null, + options: TransformCallbackOptions, + ): Promise | TransformResult | null; + } + interface SyncStatelessTransformFn { + (chunks: Uint8Array[] | null): SyncTransformResult | null; + } + interface StatefulTransform { + transform( + source: AsyncIterable, + options: TransformCallbackOptions, + ): AsyncIterable; + } + interface SyncStatefulTransform { + transform(source: Iterable): Iterable; + } + // IDL interfaces + interface PushWriter extends Writer, Drainable {} + interface PushStreamResult { + writer: PushWriter; + readable: ByteReadableStream; + } + interface BroadcastWriter extends Writer, Drainable {} + interface BroadcastResult { + writer: BroadcastWriter; + broadcast: Broadcast; + } + interface Writer extends Disposable, AsyncDisposable { + readonly canWrite: boolean | null; + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + writev(chunks: Array, options?: WriteOptions): Promise; + writeSync(chunk: Uint8Array | string): boolean; + writevSync(chunks: Array): boolean; + end(options?: WriteOptions): Promise; + endSync(): number; + fail(reason?: any): void; + } + interface PartialWriter extends Partial { + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + } + interface SyncWriter extends Disposable { + readonly canWrite: boolean | null; + writeSync(chunk: Uint8Array | string): number; + writevSync(chunks: Array): number; + endSync(): number; + fail(reason?: any): void; + } + interface PartialSyncWriter extends Partial { + writeSync(chunk: Uint8Array | string): number; + } + interface Broadcast extends Disposable { + readonly consumerCount: number; + push(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface Share extends Disposable { + readonly consumerCount: number; + pull(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface SyncShare extends Disposable { + readonly consumerCount: number; + pull(...args: any): SyncByteReadableStream; + cancel(reason?: any): void; + } + interface DuplexChannel extends AsyncDisposable { + readonly writer: Writer; + readonly readable: ByteReadableStream; + close(): Promise; + } + // Push stream creation + function push(...transforms: Transform[]): PushStreamResult; + function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult; + // Stream factories + function from(input: Source): ByteReadableStream; + function fromSync(input: SyncSource): SyncByteReadableStream; + // Pull pipelines + function pull(source: Source, ...transforms: Transform[]): ByteReadableStream; + function pull( + source: Source, + ...args: [...transforms: Transform[], options: PullOptions] + ): ByteReadableStream; + function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream; + // Pipe operations + function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise; + function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise; + function pipeTo( + source: Source, + ...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions] + ): Promise; + function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter] + ): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions] + ): number; + // Consumers + function bytes(source: Source, options?: ConsumeOptions): Promise; + function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array; + function text(source: Source, options?: TextConsumeOptions): Promise; + function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string; + function arrayBuffer(source: Source, options?: ConsumeOptions): Promise; + function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer; + function array(source: Source, options?: ConsumeOptions): Promise; + function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[]; + // Utilities + function tap(callback: StatelessTransformFn): StatelessTransformFn; + function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn; + function merge(...sources: Source[]): ByteReadableStream; + function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream; + function ondrain(drainable: any): Promise | null; + // Multi-consumer + function broadcast(options?: BroadcastOptions): BroadcastResult; + function share(source: Source, options?: ShareOptions): Share; + function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare; + // Duplex + function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel]; + // Node.js-specific extensions + namespace Broadcast { + /** + * Create a `Broadcast` from an existing source. The source is consumed + * automatically and pushed to all subscribers. + * @since v25.9.0 + * @param options Same as `broadcast()`. + */ + function from( + input: ByteReadableStream | SyncByteReadableStream | Broadcastable, + options?: BroadcastOptions, + ): BroadcastResult; + } + namespace Share { + /** + * Create a `Share` from an existing source. + * @since v25.9.0 + * @param options Same as `share()`. + */ + function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share; + } + namespace SyncShare { + /** + * @since v25.9.0 + */ + function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare; + } + /** + * Converts a classic Readable stream (or duck-typed equivalent) into a + * stream/iter async iterable source that can be passed to `from()`, + * `pull()`, `text()`, etc. + * + * If the object implements the `toAsyncStreamable` protocol (as + * `stream.Readable` does), that protocol is used. Otherwise, the function + * duck-types on `read()`, `on()`, and `off()` (EventEmitter) and wraps the + * stream with a batched async iterator. + * + * The result is cached per instance -- calling `fromReadable()` twice with the + * same stream returns the same iterable. + * + * For object-mode or encoded Readable streams, chunks are automatically + * normalized to `Uint8Array`. + * + * ```js + * import { Readable } from 'node:stream'; + * import { fromReadable, text } from 'node:stream/iter'; + * + * const readable = new Readable({ + * read() { this.push('hello world'); this.push(null); }, + * }); + * + * const result = await text(fromReadable(readable)); + * console.log(result); // 'hello world' + * ``` + * @since v26.1.0 + * @experimental + * @param readable A classic Readable stream or any object + * with `read()`, `on()` and `off()` methods. + * @returns A stream/iter async iterable source. + */ + function fromReadable(readable: NodeJS.ReadableStream): ByteReadableStream; + interface FromWritableOptions { + backpressure?: BackpressurePolicy | undefined; + } + /** + * Creates a stream/iter Writer adapter from a classic Writable stream (or + * duck-typed equivalent). The adapter can be passed to `pipeTo()` as a + * destination. + * + * Since all writes on a classic Writable are fundamentally asynchronous, + * the synchronous Writer methods (`writeSync`, `writevSync`, `endSync`) always + * return `false` or `-1`, deferring to the async path. The per-write + * `options.signal` parameter from the Writer interface is also ignored. + * + * The result is cached per instance and backpressure policy -- calling + * `fromWritable()` twice with the same stream and `backpressure` option returns + * the same Writer. + * + * For duck-typed streams that do not expose `writableHighWaterMark`, + * `writableLength`, or similar properties, sensible defaults are used. + * Object-mode writables (if detectable) are rejected since the Writer + * interface is bytes-only. + * + * ```js + * import { Writable } from 'node:stream'; + * import { from, fromWritable, pipeTo } from 'node:stream/iter'; + * + * const writable = new Writable({ + * write(chunk, encoding, cb) { console.log(chunk.toString()); cb(); }, + * }); + * + * await pipeTo(from('hello world'), + * fromWritable(writable, { backpressure: 'unbounded' })); + * ``` + * @since v26.1.0 + * @experimental + * @param writable A classic Writable stream or any object + * with `write()` and `on()` methods. + * @returns A stream/iter Writer adapter. + */ + function fromWritable(writable: NodeJS.WritableStream, options?: FromWritableOptions): Writer; + interface ToReadableOptions extends Abortable { + highWaterMark?: number | undefined; + } + /** + * Creates a byte-mode `stream.Readable` from an `AsyncIterable` + * (the native batch format used by the stream/iter API). Each `Uint8Array` in a + * yielded batch is pushed as a separate chunk into the Readable. + * + * ```js + * import { createWriteStream } from 'node:fs'; + * import { from, pull, toReadable } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const source = pull(from('hello world'), compressGzip()); + * const readable = toReadable(source); + * + * readable.pipe(createWriteStream('output.gz')); + * ``` + * @since v26.1.0 + * @experimental + * @param source An `AsyncIterable` source, such as + * the return value of `pull()` or `from()`. + */ + function toReadable(source: Source, options?: ToReadableOptions): Readable; + interface ToReadableSyncOptions { + highWaterMark?: number | undefined; + } + /** + * Creates a byte-mode `stream.Readable` from a synchronous + * `Iterable`. The `_read()` method pulls from the iterator + * synchronously, so data is available immediately via `readable.read()`. + * + * ```js + * import { fromSync, toReadableSync } from 'node:stream/iter'; + * + * const source = fromSync('hello world'); + * const readable = toReadableSync(source); + * + * console.log(readable.read().toString()); // 'hello world' + * ``` + * @since v26.1.0 + * @experimental + * @param source An `Iterable` source, such as the + * return value of `pullSync()` or `fromSync()`. + */ + function toReadableSync(source: SyncSource, options?: ToReadableSyncOptions): Readable; + /** + * Creates a classic `stream.Writable` backed by a stream/iter Writer. + * + * Each `_write()` / `_writev()` call attempts the Writer's synchronous method + * first (`writeSync` / `writevSync`), falling back to the async method if the + * sync path returns `false`. Similarly, `_final()` tries `endSync()` + * before `end()`. When the sync path succeeds, the callback is deferred via + * `queueMicrotask` to preserve the async resolution contract. + * + * The Writable's `highWaterMark` is set to `Number.MAX_SAFE_INTEGER` to + * effectively disable its internal buffering, allowing the underlying Writer + * to manage backpressure directly. + * + * ```js + * import { push, toWritable } from 'node:stream/iter'; + * + * const { writer, readable } = push(); + * const writable = toWritable(writer); + * + * writable.write('hello'); + * writable.end(); + * ``` + * @since v26.1.0 + * @experimental + * @param writer A stream/iter Writer. Only the `write()` method is + * required; `end()`, `fail()`, `writeSync()`, `writevSync()`, `endSync()`, + * and `writev()` are optional. + */ + function toWritable(writer: PartialWriter): Writable; + namespace Stream { + export { + array, + arrayBuffer, + arrayBufferSync, + arraySync, + broadcast, + broadcastProtocol, + bytes, + bytesSync, + drainableProtocol, + duplex, + from, + fromSync, + merge, + ondrain, + pipeTo, + pipeToSync, + pull, + pullSync, + push, + share, + shareProtocol, + shareSync, + shareSyncProtocol, + tap, + tapSync, + text, + textSync, + toAsyncStreamable, + toStreamable, + }; + } +} +declare module "stream/iter" { + export * from "node:stream/iter"; +} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts new file mode 100644 index 000000000..c57fe1e34 --- /dev/null +++ b/node_modules/@types/node/stream/promises.d.ts @@ -0,0 +1,211 @@ +declare module "node:stream/promises" { + import { Abortable } from "node:events"; + import { + FinishedOptions as _FinishedOptions, + PipelineDestination, + PipelineSource, + PipelineTransform, + } from "node:stream"; + import { ReadableStream, WritableStream } from "node:stream/web"; + interface FinishedOptions extends _FinishedOptions { + /** + * If true, removes the listeners registered by this function before the promise is fulfilled. + * @default false + */ + cleanup?: boolean | undefined; + } + /** + * ```js + * import { finished } from 'node:stream/promises'; + * import { createReadStream } from 'node:fs'; + * + * const rs = createReadStream('archive.tar'); + * + * async function run() { + * await finished(rs); + * console.log('Stream is done reading.'); + * } + * + * run().catch(console.error); + * rs.resume(); // Drain the stream. + * ``` + * + * The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options-callback). + * + * `stream.finished()` leaves dangling event listeners (in particular + * `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is + * resolved or rejected. The reason for this is so that unexpected `'error'` + * events (due to incorrect stream implementations) do not cause unexpected + * crashes. If this is unwanted behavior then `options.cleanup` should be set to + * `true`: + * + * ```js + * await finished(rs, { cleanup: true }); + * ``` + * @since v15.0.0 + * @returns Fulfills when the stream is no longer readable or writable. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream, + options?: FinishedOptions, + ): Promise; + interface PipelineOptions extends Abortable { + end?: boolean | undefined; + } + type PipelineResult> = S extends (...args: any[]) => PromiseLike + ? Promise + : Promise; + /** + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * import { createGzip } from 'node:zlib'; + * + * await pipeline( + * createReadStream('archive.tar'), + * createGzip(), + * createWriteStream('archive.tar.gz'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * To use an `AbortSignal`, pass it inside an options object, as the last argument. + * When the signal is aborted, `destroy` will be called on the underlying pipeline, + * with an `AbortError`. + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * import { createGzip } from 'node:zlib'; + * + * const ac = new AbortController(); + * const { signal } = ac; + * setImmediate(() => ac.abort()); + * try { + * await pipeline( + * createReadStream('archive.tar'), + * createGzip(), + * createWriteStream('archive.tar.gz'), + * { signal }, + * ); + * } catch (err) { + * console.error(err); // AbortError + * } + * ``` + * + * The `pipeline` API also supports async generators: + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * + * await pipeline( + * createReadStream('lowercase.txt'), + * async function* (source, { signal }) { + * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. + * for await (const chunk of source) { + * yield await processChunk(chunk, { signal }); + * } + * }, + * createWriteStream('uppercase.txt'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * Remember to handle the `signal` argument passed into the async generator. + * Especially in the case where the async generator is the source for the + * pipeline (i.e. first argument) or the pipeline will never complete. + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import fs from 'node:fs'; + * await pipeline( + * async function* ({ signal }) { + * await someLongRunningfn({ signal }); + * yield 'asd'; + * }, + * fs.createWriteStream('uppercase.txt'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-callback): + * @since v15.0.0 + * @returns Fulfills when the pipeline is complete. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline( + streams: readonly [PipelineSource, ...PipelineTransform[], PipelineDestination], + options?: PipelineOptions, + ): Promise; + function pipeline( + ...streams: [PipelineSource, ...PipelineTransform[], PipelineDestination] + ): Promise; + function pipeline( + ...streams: [ + PipelineSource, + ...PipelineTransform[], + PipelineDestination, + options: PipelineOptions, + ] + ): Promise; +} +declare module "stream/promises" { + export * from "node:stream/promises"; +} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts new file mode 100644 index 000000000..e3a612527 --- /dev/null +++ b/node_modules/@types/node/stream/web.d.ts @@ -0,0 +1,320 @@ +declare module "node:stream/web" { + import { TextDecoderCommon, TextDecoderOptions, TextEncoderCommon } from "node:util"; + type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip"; + type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; + type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; + type ReadableStreamReaderMode = "byob"; + type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; + type ReadableStreamType = "bytes"; + interface GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategyInit { + highWaterMark: number; + } + interface QueuingStrategySize { + (chunk: T): number; + } + interface ReadableStreamBYOBReaderReadOptions { + min?: number; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamGetReaderOptions { + mode?: ReadableStreamReaderMode; + } + interface ReadableStreamIteratorOptions { + preventCancel?: boolean; + } + interface ReadableStreamReadDoneResult { + done: true; + value: T | undefined; + } + interface ReadableStreamReadValueResult { + done: false; + value: T; + } + interface ReadableWritablePair { + readable: ReadableStream; + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + preventClose?: boolean; + signal?: AbortSignal; + } + interface Transformer { + cancel?: TransformerCancelCallback; + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformerCancelCallback { + (reason: any): void | PromiseLike; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: UnderlyingSourceCancelCallback; + pull?: (controller: ReadableByteStreamController) => void | PromiseLike; + start?: (controller: ReadableByteStreamController) => any; + type: "bytes"; + } + interface UnderlyingDefaultSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: (controller: ReadableStreamDefaultController) => void | PromiseLike; + start?: (controller: ReadableStreamDefaultController) => any; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSource { + autoAllocateChunkSize?: number; + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: ReadableStreamType; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + var ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var CompressionStream: { + prototype: CompressionStream; + new(format: CompressionFormat): CompressionStream; + }; + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + var CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new(init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var DecompressionStream: { + prototype: DecompressionStream; + new(format: CompressionFormat): DecompressionStream; + }; + interface ReadableByteStreamController { + readonly byobRequest: ReadableStreamBYOBRequest | null; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: NodeJS.NonSharedArrayBufferView): void; + error(e?: any): void; + } + var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; + }; + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; + getReader(): ReadableStreamDefaultReader; + getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + } + var ReadableStream: { + prototype: ReadableStream; + new( + underlyingSource: UnderlyingByteSource, + strategy?: { highWaterMark?: number }, + ): ReadableStream; + new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; + new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + from(iterable: Iterable | AsyncIterable): ReadableStream; + }; + interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; + } + interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { + read( + view: T, + options?: ReadableStreamBYOBReaderReadOptions, + ): Promise>; + releaseLock(): void; + } + var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(stream: ReadableStream): ReadableStreamBYOBReader; + }; + interface ReadableStreamBYOBRequest { + readonly view: NodeJS.NonSharedArrayBufferView | null; + respond(bytesWritten: number): void; + respondWithNewView(view: NodeJS.NonSharedArrayBufferView): void; + } + var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: R): void; + error(e?: any): void; + } + var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(stream: ReadableStream): ReadableStreamDefaultReader; + }; + interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TextDecoderStream: { + prototype: TextDecoderStream; + new(label?: string, options?: TextDecoderOptions): TextDecoderStream; + }; + interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TextEncoderStream: { + prototype: TextEncoderStream; + new(): TextEncoderStream; + }; + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TransformStream: { + prototype: TransformStream; + new( + transformer?: Transformer, + writableStrategy?: QueuingStrategy, + readableStrategy?: QueuingStrategy, + ): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk: O): void; + error(reason?: any): void; + terminate(): void; + } + var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; + }; + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + var WritableStream: { + prototype: WritableStream; + new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + interface WritableStreamDefaultController { + readonly signal: AbortSignal; + error(e?: any): void; + } + var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; + }; + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk: W): Promise; + } + var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(stream: WritableStream): WritableStreamDefaultWriter; + }; + // Node.js extensions + /** + * Runs the WHATWG `ReadableStreamTee` abstract operation on `stream`. + * + * This differs from `readableStream.tee()` only when `cloneForBranch2` is + * `true`. The `tee()` method always passes `false`, while other web platform + * specifications, such as Fetch body cloning, pass `true` so that the second + * branch receives cloned chunks and consumption of one branch cannot mutate chunks + * seen by the other. + * @since v26.5.0 + * @experimental + * @param cloneForBranch2 When `true`, chunks enqueued into the second + * branch are cloned from chunks enqueued into the first branch. **Default:** + * `false`. + * @returns Two `ReadableStream` branches. + */ + function ReadableStreamTee( + stream: ReadableStream, + cloneForBranch2?: boolean, + ): [ReadableStream, ReadableStream]; +} +declare module "stream/web" { + export * from "node:stream/web"; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 000000000..568e3f654 --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,27 @@ +declare module "node:string_decoder" { + class StringDecoder { + constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer The bytes to decode. + */ + write(buffer: string | NodeJS.ArrayBufferView): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer The bytes to decode. + */ + end(buffer?: string | NodeJS.ArrayBufferView): string; + } +} +declare module "string_decoder" { + export * from "node:string_decoder"; +} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts new file mode 100644 index 000000000..22acc430b --- /dev/null +++ b/node_modules/@types/node/test.d.ts @@ -0,0 +1,2558 @@ +declare module "node:test" { + import { AssertMethodNames, AssertPredicate } from "node:assert"; + import { Readable, ReadableEventMap } from "node:stream"; + import { TestEvent } from "node:test/reporters"; + import { URL } from "node:url"; + import TestFn = test.TestFn; + import TestOptions = test.TestOptions; + /** + * The `test()` function is the value imported from the `test` module. Each + * invocation of this function results in reporting the test to the `TestsStream`. + * + * The `TestContext` object passed to the `fn` argument can be used to perform + * actions related to the current test. Examples include skipping the test, adding + * additional diagnostic information, or creating subtests. + * + * `test()` returns a `Promise` that fulfills once the test completes. + * if `test()` is called within a suite, it fulfills immediately. + * The return value can usually be discarded for top level tests. + * However, the return value from subtests should be used to prevent the parent + * test from finishing first and cancelling the subtest + * as shown in the following example. + * + * ```js + * test('top level test', async (t) => { + * // The setTimeout() in the following subtest would cause it to outlive its + * // parent test if 'await' is removed on the next line. Once the parent test + * // completes, it will cancel any outstanding subtests. + * await t.test('longer running subtest', async (t) => { + * return new Promise((resolve, reject) => { + * setTimeout(resolve, 1000); + * }); + * }); + * }); + * ``` + * + * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for + * canceling tests because a running test might block the application thread and + * thus prevent the scheduled cancellation. + * @since v18.0.0, v16.17.0 + * @param name The name of the test, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the test. + * @param fn The function under test. The first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. + */ + function test(name?: string, fn?: TestFn): Promise; + function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function test(options?: TestOptions, fn?: TestFn): Promise; + function test(fn?: TestFn): Promise; + namespace test { + export { test }; + export { suite as describe, test as it }; + } + namespace test { + /** + * **Note:** `shard` is used to horizontally parallelize test running across + * machines or processes, ideal for large-scale executions across varied + * environments. It's incompatible with `watch` mode, tailored for rapid + * code iteration by automatically rerunning tests on file changes. + * + * ```js + * import { tap } from 'node:test/reporters'; + * import { run } from 'node:test'; + * import process from 'node:process'; + * import path from 'node:path'; + * + * run({ files: [path.resolve('./tests/test.js')] }) + * .compose(tap) + * .pipe(process.stdout); + * ``` + * @since v18.9.0, v16.19.0 + * @param options Configuration options for running tests. + */ + function run(options?: RunOptions): TestsStream; + /** + * The `suite()` function is imported from the `node:test` module. + * @param name The name of the suite, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the suite. This supports the same options as {@link test}. + * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. + * @return Immediately fulfilled with `undefined`. + * @since v20.13.0 + */ + function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function suite(name?: string, fn?: SuiteFn): Promise; + function suite(options?: TestOptions, fn?: SuiteFn): Promise; + function suite(fn?: SuiteFn): Promise; + namespace suite { + /** + * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. + * @since v20.13.0 + */ + function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function skip(name?: string, fn?: SuiteFn): Promise; + function skip(options?: TestOptions, fn?: SuiteFn): Promise; + function skip(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. + * @since v20.13.0 + */ + function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function todo(name?: string, fn?: SuiteFn): Promise; + function todo(options?: TestOptions, fn?: SuiteFn): Promise; + function todo(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. + * @since v20.13.0 + */ + function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function only(name?: string, fn?: SuiteFn): Promise; + function only(options?: TestOptions, fn?: SuiteFn): Promise; + function only(fn?: SuiteFn): Promise; + /** + * This flips the pass/fail reporting for a specific test or suite: a flagged test + * case must throw in order to pass, and a flagged test case that does not throw + * fails. + * @since v25.5.0 + */ + function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function expectFailure(name?: string, fn?: SuiteFn): Promise; + function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise; + function expectFailure(fn?: SuiteFn): Promise; + } + /** + * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. + * @since v20.2.0 + */ + function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function skip(name?: string, fn?: TestFn): Promise; + function skip(options?: TestOptions, fn?: TestFn): Promise; + function skip(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. + * @since v20.2.0 + */ + function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function todo(name?: string, fn?: TestFn): Promise; + function todo(options?: TestOptions, fn?: TestFn): Promise; + function todo(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. + * @since v20.2.0 + */ + function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function only(name?: string, fn?: TestFn): Promise; + function only(options?: TestOptions, fn?: TestFn): Promise; + function only(fn?: TestFn): Promise; + // added in v25.5.0, undocumented + function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function expectFailure(name?: string, fn?: TestFn): Promise; + function expectFailure(options?: TestOptions, fn?: TestFn): Promise; + function expectFailure(fn?: TestFn): Promise; + /** + * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + */ + type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; + /** + * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. + */ + type SuiteFn = (s: SuiteContext) => void | Promise; + interface TestShard { + /** + * A positive integer between 1 and `total` that specifies the index of the shard to run. + */ + index: number; + /** + * A positive integer that specifies the total number of shards to split the test files to. + */ + total: number; + } + interface RunOptions { + /** + * If a number is provided, then that many tests would run asynchronously (they are still managed by the single-threaded event loop). + * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * Specifies the current working directory to be used by the test runner. + * Serves as the base path for resolving files according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + * @since v23.0.0 + * @default process.cwd() + */ + cwd?: string | undefined; + /** + * An array containing the list of files to run. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + */ + files?: readonly string[] | undefined; + /** + * Configures the test runner to exit the process once all known + * tests have finished executing even if the event loop would + * otherwise remain active. + * @default false + */ + forceExit?: boolean | undefined; + /** + * An array containing the list of glob patterns to match test files. + * This option cannot be used together with `files`. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + * @since v22.6.0 + */ + globPatterns?: readonly string[] | undefined; + /** + * Sets inspector port of test child process. + * This can be a number, or a function that takes no arguments and returns a + * number. If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. This option is ignored + * if the `isolation` option is set to `'none'` as no child processes are + * spawned. + * @default undefined + */ + inspectPort?: number | (() => number) | undefined; + /** + * Configures the type of test isolation. If set to + * `'process'`, each test file is run in a separate child process. If set to + * `'none'`, all test files run in the current process. + * @default 'process' + * @since v22.8.0 + */ + isolation?: "process" | "none" | undefined; + /** + * If truthy, the test context will only run tests that have the `only` option set + */ + only?: boolean | undefined; + /** + * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. + * @default undefined + */ + setup?: ((reporter: TestsStream) => void | Promise) | undefined; + /** + * An array of CLI flags to pass to the `node` executable when + * spawning the subprocesses. This option has no effect when `isolation` is `'none`'. + * @since v22.10.0 + * @default [] + */ + execArgv?: readonly string[] | undefined; + /** + * An array of CLI flags to pass to each test file when spawning the + * subprocesses. This option has no effect when `isolation` is `'none'`. + * @since v22.10.0 + * @default [] + */ + argv?: readonly string[] | undefined; + /** + * Allows aborting an in-progress test execution. + */ + signal?: AbortSignal | undefined; + /** + * If provided, only run tests whose name matches the provided pattern. + * Strings are interpreted as JavaScript regular expressions. + * @default undefined + */ + testNamePatterns?: string | RegExp | ReadonlyArray | undefined; + /** + * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose + * name matches the provided pattern. Test name patterns are interpreted as JavaScript + * regular expressions. For each test that is executed, any corresponding test hooks, + * such as `beforeEach()`, are also run. + * @default undefined + * @since v22.1.0 + */ + testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; + /** + * A tag name, or an array of tag names, + * used to filter tests by their declared tags. Tests must contain every + * listed tag to run. Equivalent to passing `--experimental-test-tag-filter` + * on the command line. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @default undefined + * @since v26.2.0 + */ + testTagFilters?: string | readonly string[] | undefined; + /** + * The number of milliseconds after which the test execution will fail. + * If unspecified, subtests inherit this value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + /** + * Whether to run in watch mode or not. + * @default false + */ + watch?: boolean | undefined; + /** + * Running tests in a specific shard. + * @default undefined + */ + shard?: TestShard | undefined; + /** + * Randomize execution order for test files and queued tests. + * This option is not supported with `watch: true`. + * @since v26.1.0 + * @default false + */ + randomize?: boolean | undefined; + /** + * Seed used when randomizing execution order. If this + * option is set, runs can replay the same randomized order deterministically, + * and setting this option also enables randomization. The value must be an + * integer between `0` and `4294967295`. + */ + randomSeed?: number | undefined; + /** + * A file path where the test runner will + * store the state of the tests to allow rerunning only the failed tests on a next run. + * @since v24.7.0 + * @default undefined + */ + rerunFailuresFilePath?: string | undefined; + /** + * enable [code coverage](https://nodejs.org/docs/latest-v26.x/api/test.html#collecting-code-coverage) collection. + * @since v22.10.0 + * @default false + */ + coverage?: boolean | undefined; + /** + * Excludes specific files from code coverage + * using a glob pattern, which can match both absolute and relative file paths. + * This property is only applicable when `coverage` was set to `true`. + * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, + * files must meet **both** criteria to be included in the coverage report. + * @since v22.10.0 + * @default undefined + */ + coverageExcludeGlobs?: string | readonly string[] | undefined; + /** + * Includes specific files in code coverage + * using a glob pattern, which can match both absolute and relative file paths. + * This property is only applicable when `coverage` was set to `true`. + * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, + * files must meet **both** criteria to be included in the coverage report. + * @since v22.10.0 + * @default undefined + */ + coverageIncludeGlobs?: string | readonly string[] | undefined; + /** + * Require a minimum percent of covered lines. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + lineCoverage?: number | undefined; + /** + * Require a minimum percent of covered branches. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + branchCoverage?: number | undefined; + /** + * Require a minimum percent of covered functions. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + functionCoverage?: number | undefined; + /** + * Specify environment variables to be passed along to the test process. + * This option is not compatible with `isolation='none'`. These variables will override + * those from the main process, and are not merged with `process.env`. + * @since v25.6.0 + * @default process.env + */ + env?: NodeJS.ProcessEnv | undefined; + } + interface TestsStreamEventMap extends ReadableEventMap { + "data": [data: TestEvent]; + "test:coverage": [data: EventData.TestCoverage]; + "test:complete": [data: EventData.TestComplete]; + "test:dequeue": [data: EventData.TestDequeue]; + "test:diagnostic": [data: EventData.TestDiagnostic]; + "test:enqueue": [data: EventData.TestEnqueue]; + "test:fail": [data: EventData.TestFail]; + "test:interrupted": [data: EventData.TestInterrupted]; + "test:log": [data: EventData.TestLog]; + "test:pass": [data: EventData.TestPass]; + "test:plan": [data: EventData.TestPlan]; + "test:start": [data: EventData.TestStart]; + "test:stderr": [data: EventData.TestStderr]; + "test:stdout": [data: EventData.TestStdout]; + "test:summary": [data: EventData.TestSummary]; + "test:watch:drained": []; + "test:watch:restarted": []; + } + /** + * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. + * + * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. + * @since v18.9.0, v16.19.0 + */ + interface TestsStream extends Readable { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: TestsStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: TestsStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: TestsStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + namespace EventData { + interface Error extends globalThis.Error { + cause: unknown; + } + interface LocationInfo { + /** + * The column number where the test is defined, or + * `undefined` if the test was run through the REPL. + */ + column?: number; + /** + * The path of the test file that was + * executed as the entry point of the child process that emitted this event. + * Only present when tests run with process isolation. May differ from + * `file` when the test is defined in a module imported by the entry file. + */ + entryFile?: string; + /** + * The path of the test file, `undefined` if test was run through the REPL. + */ + file?: string; + /** + * The line number where the test is defined, or `undefined` if the test was run through the REPL. + */ + line?: number; + } + interface TestDiagnostic extends LocationInfo { + /** + * The diagnostic message. + */ + message: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The severity level of the diagnostic message. + * Possible values are: + * * `'info'`: Informational messages. + * * `'warn'`: Warnings. + * * `'error'`: Errors. + */ + level: "info" | "warn" | "error"; + } + interface TestCoverage { + /** + * An object containing the coverage report. + */ + summary: { + /** + * An array of coverage reports for individual files. + */ + files: Array<{ + /** + * The absolute path of the file. + */ + path: string; + /** + * The total number of lines. + */ + totalLineCount: number; + /** + * The total number of branches. + */ + totalBranchCount: number; + /** + * The total number of functions. + */ + totalFunctionCount: number; + /** + * The number of covered lines. + */ + coveredLineCount: number; + /** + * The number of covered branches. + */ + coveredBranchCount: number; + /** + * The number of covered functions. + */ + coveredFunctionCount: number; + /** + * The percentage of lines covered. + */ + coveredLinePercent: number; + /** + * The percentage of branches covered. + */ + coveredBranchPercent: number; + /** + * The percentage of functions covered. + */ + coveredFunctionPercent: number; + /** + * An array of functions representing function coverage. + */ + functions: Array<{ + /** + * The name of the function. + */ + name: string; + /** + * The line number where the function is defined. + */ + line: number; + /** + * The number of times the function was called. + */ + count: number; + }>; + /** + * An array of branches representing branch coverage. + */ + branches: Array<{ + /** + * The line number where the branch is defined. + */ + line: number; + /** + * The number of times the branch was taken. + */ + count: number; + }>; + /** + * An array of lines representing line numbers and the number of times they were covered. + */ + lines: Array<{ + /** + * The line number. + */ + line: number; + /** + * The number of times the line was covered. + */ + count: number; + }>; + }>; + /** + * An object containing whether or not the coverage for + * each coverage type. + * @since v22.9.0 + */ + thresholds: { + /** + * The function coverage threshold. + */ + function: number; + /** + * The branch coverage threshold. + */ + branch: number; + /** + * The line coverage threshold. + */ + line: number; + }; + /** + * An object containing a summary of coverage for all files. + */ + totals: { + /** + * The total number of lines. + */ + totalLineCount: number; + /** + * The total number of branches. + */ + totalBranchCount: number; + /** + * The total number of functions. + */ + totalFunctionCount: number; + /** + * The number of covered lines. + */ + coveredLineCount: number; + /** + * The number of covered branches. + */ + coveredBranchCount: number; + /** + * The number of covered functions. + */ + coveredFunctionCount: number; + /** + * The percentage of lines covered. + */ + coveredLinePercent: number; + /** + * The percentage of branches covered. + */ + coveredBranchPercent: number; + /** + * The percentage of functions covered. + */ + coveredFunctionPercent: number; + }; + /** + * The working directory when code coverage began. This + * is useful for displaying relative path names in case + * the tests changed the working directory of the Node.js process. + */ + workingDirectory: string; + }; + /** + * The nesting level of the test. + */ + nesting: number; + } + interface TestComplete extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * Whether the test passed or not. + */ + passed: boolean; + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * An error wrapping the error thrown by the test if it did not pass. + */ + error?: Error; + /** + * The type of the test, used to denote whether this is a suite. + */ + type?: "suite" | "test"; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestDequeue extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The test type. Either `'suite'` or `'test'`. + * @since v22.15.0 + */ + type: "suite" | "test"; + } + interface TestEnqueue extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The test type. Either `'suite'` or `'test'`. + * @since v22.15.0 + */ + type: "suite" | "test"; + } + interface TestFail extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * An error wrapping the error thrown by the test. + */ + error: Error; + /** + * The type of the test, used to denote whether this is a suite. + * @since v20.0.0, v19.9.0, v18.17.0 + */ + type?: "suite" | "test"; + /** + * The attempt number of the test run, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + attempt?: number; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestInterrupted { + /** + * An array of objects containing information about the + * interrupted tests. + */ + tests: TestStart[]; + } + interface TestLog extends LocationInfo { + /** + * The structured payload passed to `context.log`, or + * `undefined` if none was provided. The test runner does not interpret this + * value. + */ + data: unknown; + /** + * The log message. + */ + message: string; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. + */ + parentId: number | undefined; + /** + * A numeric identifier for the test instance that emitted + * the log message. + */ + testId: number; + } + interface TestPass extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * The type of the test, used to denote whether this is a suite. + * @since 20.0.0, 19.9.0, 18.17.0 + */ + type?: "suite" | "test"; + /** + * The attempt number of the test run, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + attempt?: number; + /** + * The attempt number the test passed on, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + passed_on_attempt?: number; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestPlan extends LocationInfo { + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The number of subtests that have ran. + */ + count: number; + } + interface TestStart extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + } + interface TestStderr { + /** + * The path of the test file. + */ + file: string; + /** + * The message written to `stderr`. + */ + message: string; + } + interface TestStdout { + /** + * The path of the test file. + */ + file: string; + /** + * The message written to `stdout`. + */ + message: string; + } + interface TestSummary { + /** + * An object containing the counts of various test results. + */ + counts: { + /** + * The total number of cancelled tests. + */ + cancelled: number; + /** + * The total number of passed tests. + */ + passed: number; + /** + * The total number of skipped tests. + */ + skipped: number; + /** + * The total number of suites run. + */ + suites: number; + /** + * The total number of tests run, excluding suites. + */ + tests: number; + /** + * The total number of TODO tests. + */ + todo: number; + /** + * The total number of top level tests and suites. + */ + topLevel: number; + }; + /** + * The duration of the test run in milliseconds. + */ + duration_ms: number; + /** + * The path of the test file that generated the + * summary. If the summary corresponds to multiple files, this value is + * `undefined`. + */ + file: string | undefined; + /** + * Indicates whether or not the test run is considered + * successful or not. If any error condition occurs, such as a failing test or + * unmet coverage threshold, this value will be set to `false`. + */ + success: boolean; + } + } + /** + * Returns the {@link TestContext} or {@link SuiteContext} object associated with the + * currently executing test or suite, or `undefined` if called outside of a test or + * suite. This function can be used to access context information from within the + * test or suite function or any async operations within them. + + * ```js + * import { getTestContext } from 'node:test'; + * + * test('example test', async () => { + * const ctx = getTestContext(); + * console.log(`Running test: ${ctx.name}`); + * }); + * + * describe('example suite', () => { + * const ctx = getTestContext(); + * console.log(`Running suite: ${ctx.name}`); + * }); + * ``` + * + * When called from a test, returns a `TestContext`. + * When called from a suite, returns a `SuiteContext`. + * + * If called from outside a test or suite (e.g., at the top level of a module or in + * a setTimeout callback after execution has completed), this function returns + * `undefined`. + * + * When called from within a hook (before, beforeEach, after, afterEach), this + * function returns the context of the test or suite that the hook is associated + * with. + * @since v26.1.0 + */ + function getTestContext(): TestContext | SuiteContext | undefined; + /** + * An instance of `TestContext` is passed to each test function in order to + * interact with the test runner. However, the `TestContext` constructor is not + * exposed as part of the API. + * @since v18.0.0, v16.17.0 + */ + interface TestContext { + /** + * An object containing assertion methods bound to the test context. + * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. + * + * **Note:** Some of the functions from `node:assert` contain type assertions. If these are called via the + * TestContext `assert` object, then the context parameter in the test's function signature **must be explicitly typed** + * (ie. the parameter must have a type annotation), otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.deepStrictEqual(actual, expected); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. + * }); + * ``` + * @since v22.2.0, v20.15.0 + */ + readonly assert: TestContextAssert; + /** + * This function is used to create a hook running before subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v20.1.0, v18.17.0 + */ + before(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running before each subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook that runs after the current test finishes. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.13.0 + */ + after(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + afterEach(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to write diagnostics to the output. Any diagnostic + * information is included at the end of the test's results. This function does + * not return a value. + * + * ```js + * test('top level test', (t) => { + * t.diagnostic('A diagnostic message'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Message to be reported. + */ + diagnostic(message: string): void; + /** + * This function is used to write a log message to the output. Unlike + * `context.diagnostic`, the resulting `'test:log'` event is emitted + * immediately, in the order that the tests execute, rather than being buffered + * until the test reports its results. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * t.log('fetched user', { userId: 42 }); + * t.log('retrying flaky endpoint', { attempt: 3 }); + * }); + * ``` + * @since v26.6.0 + * @param message Message to be reported. + * @param data Optional structured payload attached to the message. The test + * runner passes it through untouched. When tests run with process isolation, + * this value must be compatible with the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). + */ + log(message: string, data?: unknown): void; + /** + * The absolute path of the test file that created the current test. If a test file imports + * additional modules that generate tests, the imported tests will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; + /** + * The name of the test and each of its ancestors, separated by `>`. + * @since v22.3.0 + */ + readonly fullName: string; + /** + * The name of the test. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Indicated whether the test succeeded. + * @since v21.7.0, v20.12.0 + */ + readonly passed: boolean; + /** + * The failure reason for the test/case; wrapped and available via `context.error.cause`. + * @since v21.7.0, v20.12.0 + */ + readonly error: EventData.Error | null; + /** + * The attempt number of the test. This value is zero-based, so the first attempt is `0`, + * the second attempt is `1`, and so on. This property is useful in conjunction with the + * `--test-rerun-failures` option to determine which attempt the test is currently running. + * @since v21.7.0, v20.12.0 + */ + readonly attempt: number; + /** + * A frozen array of the test's flattened lowercased tags, in declaration + * order, including any tags inherited from ancestor suites. Empty when the + * test has no tags. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @since v26.2.0 + */ + readonly tags: readonly string[]; + /** + * The unique identifier of the worker running the current test file. This value is + * derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests + * with `--test-isolation=process` (the default), each test file runs in a separate + * child process and is assigned a worker ID from 1 to N, where N is the number of + * concurrent workers. When running with `--test-isolation=none`, all tests run in + * the same process and the worker ID is always 1. This value is `undefined` when + * not running in a test context. + * + * This property is useful for splitting resources (like database connections or + * server ports) across concurrent test files: + * + * ```js + * import { test } from 'node:test'; + * import { process } from 'node:process'; + * + * test('database operations', async (t) => { + * // Worker ID is available via context + * console.log(`Running in worker ${t.workerId}`); + * + * // Or via environment variable (available at import time) + * const workerId = process.env.NODE_TEST_WORKER_ID; + * // Use workerId to allocate separate resources per worker + * }); + * ``` + * @since v25.8.0 + */ + readonly workerId: number | undefined; + /** + * This function is used to set the number of assertions and subtests that are expected to run + * within the test. If the number of assertions and subtests that run does not match the + * expected count, the test will fail. + * + * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly. + * + * ```js + * test('top level test', (t) => { + * t.plan(2); + * t.assert.ok('some relevant assertion here'); + * t.test('subtest', () => {}); + * }); + * ``` + * + * When working with asynchronous code, the `plan` function can be used to ensure that the + * correct number of assertions are run: + * + * ```js + * test('planning with streams', (t, done) => { + * function* generate() { + * yield 'a'; + * yield 'b'; + * yield 'c'; + * } + * const expected = ['a', 'b', 'c']; + * t.plan(expected.length); + * const stream = Readable.from(generate()); + * stream.on('data', (chunk) => { + * t.assert.strictEqual(chunk, expected.shift()); + * }); + * + * stream.on('end', () => { + * done(); + * }); + * }); + * ``` + * + * When using the `wait` option, you can control how long the test will wait for the expected assertions. + * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions + * to complete within the specified timeframe: + * + * ```js + * test('plan with wait: 2000 waits for async assertions', (t) => { + * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete. + * + * const asyncActivity = () => { + * setTimeout(() => { + * * t.assert.ok(true, 'Async assertion completed within the wait time'); + * }, 1000); // Completes after 1 second, within the 2-second wait time. + * }; + * + * asyncActivity(); // The test will pass because the assertion is completed in time. + * }); + * ``` + * + * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing. + * @since v22.2.0 + */ + plan(count: number, options?: TestContextPlanOptions): void; + /** + * If `shouldRunOnlyTests` is truthy, the test context will only run tests that + * have the `only` option set. Otherwise, all tests are run. If Node.js was not + * started with the `--test-only` command-line option, this function is a + * no-op. + * + * ```js + * test('top level test', (t) => { + * // The test context can be set to run subtests with the 'only' option. + * t.runOnly(true); + * return Promise.all([ + * t.test('this subtest is now skipped'), + * t.test('this subtest is run', { only: true }), + * ]); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param shouldRunOnlyTests Whether or not to run `only` tests. + */ + runOnly(shouldRunOnlyTests: boolean): void; + /** + * ```js + * test('top level test', async (t) => { + * await fetch('some/uri', { signal: t.signal }); + * }); + * ``` + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does + * not terminate execution of the test function. This function does not return a + * value. + * + * ```js + * test('top level test', (t) => { + * // Make sure to return here as well if the test contains additional logic. + * t.skip('this is skipped'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional skip message. + */ + skip(message?: string): void; + /** + * This function adds a `TODO` directive to the test's output. If `message` is + * provided, it is included in the output. Calling `todo()` does not terminate + * execution of the test function. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * // This test is marked as `TODO` + * t.todo('this is a todo'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional `TODO` message. + */ + todo(message?: string): void; + /** + * This function is used to create subtests under the current test. This function behaves in + * the same fashion as the top level {@link test} function. + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the test. + * @param fn The function under test. This first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + test: typeof test; + /** + * This method polls a `condition` function until that function either returns + * successfully or the operation times out. + * @since v22.14.0 + * @param condition An assertion function that is invoked + * periodically until it completes successfully or the defined polling timeout + * elapses. Successful completion is defined as not throwing or rejecting. This + * function does not accept any arguments, and is allowed to return any value. + * @param options An optional configuration object for the polling operation. + * @returns Fulfilled with the value returned by `condition`. + */ + waitFor(condition: () => T, options?: TestContextWaitForOptions): Promise>; + /** + * Each test provides its own MockTracker instance. + */ + readonly mock: MockTracker; + } + interface TestContextAssert extends Pick { + /** + * This function serializes `value` and writes it to the file specified by `path`. + * + * ```js + * test('snapshot test with default serialization', (t) => { + * t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json'); + * }); + * ``` + * + * This function differs from `context.assert.snapshot()` in the following ways: + * + * * The snapshot file path is explicitly provided by the user. + * * Each snapshot file is limited to a single snapshot value. + * * No additional escaping is performed by the test runner. + * + * These differences allow snapshot files to better support features such as syntax + * highlighting. + * @since v22.14.0 + * @param value A value to serialize to a string. If Node.js was started with + * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--test-update-snapshots) + * flag, the serialized value is written to + * `path`. Otherwise, the serialized value is compared to the contents of the + * existing snapshot file. + * @param path The file where the serialized `value` is written. + * @param options Optional configuration options. + */ + fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void; + /** + * This function implements assertions for snapshot testing. + * ```js + * test('snapshot test with default serialization', (t) => { + * t.assert.snapshot({ value1: 1, value2: 2 }); + * }); + * + * test('snapshot test with custom serialization', (t) => { + * t.assert.snapshot({ value3: 3, value4: 4 }, { + * serializers: [(value) => JSON.stringify(value)] + * }); + * }); + * ``` + * @since v22.3.0 + * @param value A value to serialize to a string. If Node.js was started with + * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--test-update-snapshots) + * flag, the serialized value is written to + * the snapshot file. Otherwise, the serialized value is compared to the + * corresponding value in the existing snapshot file. + */ + snapshot(value: any, options?: AssertSnapshotOptions): void; + /** + * A custom assertion function registered with `assert.register()`. + */ + [name: string]: (...args: any[]) => void; + } + interface AssertSnapshotOptions { + /** + * An array of synchronous functions used to serialize `value` into a string. + * `value` is passed as the only argument to the first serializer function. + * The return value of each serializer is passed as input to the next serializer. + * Once all serializers have run, the resulting value is coerced to a string. + * + * If no serializers are provided, the test runner's default serializers are used. + */ + serializers?: ReadonlyArray<(value: any) => any> | undefined; + } + interface TestContextPlanOptions { + /** + * The wait time for the plan: + * * If `true`, the plan waits indefinitely for all assertions and subtests to run. + * * If `false`, the plan performs an immediate check after the test function completes, + * without waiting for any pending assertions or subtests. + * Any assertions or subtests that complete after this check will not be counted towards the plan. + * * If a number, it specifies the maximum wait time in milliseconds + * before timing out while waiting for expected assertions and subtests to be matched. + * If the timeout is reached, the test will fail. + * @default false + */ + wait?: boolean | number | undefined; + } + interface TestContextWaitForOptions { + /** + * The number of milliseconds to wait after an unsuccessful + * invocation of `condition` before trying again. + * @default 50 + */ + interval?: number | undefined; + /** + * The poll timeout in milliseconds. If `condition` has not + * succeeded by the time this elapses, an error occurs. + * @default 1000 + */ + timeout?: number | undefined; + } + /** + * An instance of `SuiteContext` is passed to each suite function in order to + * interact with the test runner. However, the `SuiteContext` constructor is not + * exposed as part of the API. + * @since v18.7.0, v16.17.0 + */ + interface SuiteContext { + /** + * The absolute path of the test file that created the current suite. If a test file imports + * additional modules that generate suites, the imported suites will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; + /** + * The name of the suite and each of its ancestors, separated by `>`. + * @since v22.3.0, v20.16.0 + */ + readonly fullName: string; + /** + * The name of the suite. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Can be used to abort test subtasks when the test has been aborted. + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * Indicates whether the suite and all of its subtests have passed. + * @since v26.1.0 + */ + readonly passed: boolean; + /** + * The attempt number of the suite. This value is zero-based, so the first attempt is `0`, + * the second attempt is `1`, and so on. This property is useful in conjunction with the + * `--test-rerun-failures` option to determine the attempt number of the current run. + * @since v26.1.0 + */ + readonly attempt: number; + /** + * Output a diagnostic message. This is typically used for logging information + * about the current suite or its tests. + * + * ```js + * test.describe('my suite', (suite) => { + * suite.diagnostic('Suite diagnostic message'); + * }); + * ``` + * @since v26.1.0 + * @param message A diagnostic message to output. + */ + diagnostic(message: string): void; + /** + * Write a log message to the output. The resulting `'test:log'` event is + * emitted immediately, in the order that the tests execute. + * + * ```js + * test.describe('my suite', (suite) => { + * suite.log('Suite log message'); + * }); + * ``` + * @since v26.6.0 + * @param message Message to be reported. + * @param data Optional structured payload attached to the message. The test + * runner passes it through untouched. + */ + log(message: string, data?: unknown): void; + } + interface TestOptions { + /** + * If a number is provided, then that many tests would run in parallel. + * If truthy, it would run (number of cpu cores - 1) tests in parallel. + * For subtests, it will be `Infinity` tests in parallel. + * If falsy, it would only run one test at a time. + * If unspecified, subtests inherit this value from their parent. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed + * in the test results as the reason why the test is expected to fail. If a + * `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes + * only if the thrown error matches, following the behavior of + * `assert.throws`. To provide both a reason and validation, pass an object + * with `label` (string) and `match` (RegExp, Function, Object, or Error). + * @since v25.5.0 + * @default false + */ + expectFailure?: boolean | string | AssertPredicate | undefined; + /** + * If truthy, and the test context is configured to run `only` tests, then this test will be + * run. Otherwise, the test is skipped. + * @default false + */ + only?: boolean | undefined; + /** + * Allows aborting an in-progress test. + * @since v18.8.0 + */ + signal?: AbortSignal | undefined; + /** + * If truthy, the test is skipped. If a string is provided, that string is displayed in the + * test results as the reason for skipping the test. + * @default false + */ + skip?: boolean | string | undefined; + /** + * An array of string labels associated with the test. + * Used together with `--experimental-test-tag-filter` to filter which + * tests run. Tags inherit from suites to nested tests by union. See + * [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @default [] + * @since v26.2.0 + */ + tags?: readonly string[] | undefined; + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + * @since v18.7.0 + */ + timeout?: number | undefined; + /** + * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in + * the test results as the reason why the test is `TODO`. + * @default false + */ + todo?: boolean | string | undefined; + /** + * The number of assertions and subtests expected to be run in the test. + * If the number of assertions run in the test does not match the number + * specified in the plan, the test will fail. + * @default undefined + * @since v22.2.0 + */ + plan?: number | undefined; + } + /** + * This function creates a hook that runs before executing a suite. + * + * ```js + * describe('tests', async () => { + * before(() => console.log('about to run some test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function before(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs after executing a suite. + * + * ```js + * describe('tests', async () => { + * after(() => console.log('finished running tests')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function after(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs before each test in the current suite. + * + * ```js + * describe('tests', async () => { + * beforeEach(() => console.log('about to run a test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function beforeEach(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs after each test in the current suite. + * The `afterEach()` hook is run even if the test fails. + * + * ```js + * describe('tests', async () => { + * afterEach(() => console.log('finished running a test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function afterEach(fn?: HookFn, options?: HookOptions): void; + /** + * The hook function. The first argument is the context in which the hook is called. + * If the hook uses callbacks, the callback function is passed as the second argument. + */ + type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; + /** + * The hook function. The first argument is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + */ + type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; + /** + * Configuration options for hooks. + * @since v18.8.0 + */ + interface HookOptions { + /** + * Allows aborting an in-progress hook. + */ + signal?: AbortSignal | undefined; + /** + * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + } + interface MockFunctionOptions { + /** + * The number of times that the mock will use the behavior of `implementation`. + * Once the mock function has been called `times` times, + * it will automatically restore the behavior of `original`. + * This value must be an integer greater than zero. + * @default Infinity + */ + times?: number | undefined; + } + interface MockMethodOptions extends MockFunctionOptions { + /** + * If `true`, `object[methodName]` is treated as a getter. + * This option cannot be used with the `setter` option. + */ + getter?: boolean | undefined; + /** + * If `true`, `object[methodName]` is treated as a setter. + * This option cannot be used with the `getter` option. + */ + setter?: boolean | undefined; + } + type Mock = F & { + mock: MockFunctionContext; + }; + interface MockModuleOptions { + /** + * If false, each call to `require()` or `import()` generates a new mock module. + * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. + * @default false + */ + cache?: boolean | undefined; + /** + * Optional mocked exports. The `default` property, if + * provided, is used as the mocked module's default export. All other own + * enumerable properties are used as named exports. + * **This option cannot be used with `defaultExport` or `namedExports`.** + * * If the mock is a CommonJS or builtin module, `exports.default` is used as + * the value of `module.exports`. + * * If `exports.default` is not provided for a CommonJS or builtin mock, + * `module.exports` defaults to an empty object. + * * If named exports are provided with a non-object default export, the mock + * throws an exception when used as a CommonJS or builtin module. + */ + exports?: object | undefined; + /** + * An optional value used as the mocked module's default + * export. If this value is not provided, ESM mocks do not include a default + * export. If the mock is a CommonJS or builtin module, this setting is used as + * the value of `module.exports`. If this value is not provided, CJS and builtin + * mocks use an empty object as the value of `module.exports`. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports.default`. + * @deprecated + */ + defaultExport?: any; + /** + * An optional object whose keys and values are used to + * create the named exports of the mock module. If the mock is a CommonJS or + * builtin module, these values are copied onto `module.exports`. Therefore, if a + * mock is created with both named exports and a non-object default export, the + * mock will throw an exception when used as a CJS or builtin module. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports`. + * @deprecated + */ + namedExports?: object | undefined; + } + /** + * The `MockTracker` class is used to manage mocking functionality. The test runner + * module provides a top level `mock` export which is a `MockTracker` instance. + * Each test also provides its own `MockTracker` instance via the test context's `mock` property. + * @since v19.1.0, v18.13.0 + */ + interface MockTracker { + /** + * This function is used to create a mock function. + * + * The following example creates a mock function that increments a counter by one + * on each invocation. The `times` option is used to modify the mock behavior such + * that the first two invocations add two to the counter instead of one. + * + * ```js + * test('mocks a counting function', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); + * + * assert.strictEqual(fn(), 2); + * assert.strictEqual(fn(), 4); + * assert.strictEqual(fn(), 5); + * assert.strictEqual(fn(), 6); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param original An optional function to create a mock on. + * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and + * then restore the behavior of `original`. + * @param options Optional configuration options for the mock function. + * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked function. + */ + fn undefined>( + original?: F, + options?: MockFunctionOptions, + ): Mock; + fn undefined, Implementation extends Function = F>( + original?: F, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock; + /** + * This function is used to create a mock on an existing object method. The + * following example demonstrates how a mock is created on an existing object + * method. + * + * ```js + * test('spies on an object method', (t) => { + * const number = { + * value: 5, + * subtract(a) { + * return this.value - a; + * }, + * }; + * + * t.mock.method(number, 'subtract'); + * assert.strictEqual(number.subtract.mock.calls.length, 0); + * assert.strictEqual(number.subtract(3), 2); + * assert.strictEqual(number.subtract.mock.calls.length, 1); + * + * const call = number.subtract.mock.calls[0]; + * + * assert.deepStrictEqual(call.arguments, [3]); + * assert.strictEqual(call.result, 2); + * assert.strictEqual(call.error, undefined); + * assert.strictEqual(call.target, undefined); + * assert.strictEqual(call.this, number); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param object The object whose method is being mocked. + * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. + * @param implementation An optional function used as the mock implementation for `object[methodName]`. + * @param options Optional configuration options for the mock method. + * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked method. + */ + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation: Implementation, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method( + object: MockedObject, + methodName: keyof MockedObject, + options: MockMethodOptions, + ): Mock; + method( + object: MockedObject, + methodName: keyof MockedObject, + implementation: Function, + options: MockMethodOptions, + ): Mock; + /** + * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<() => MockedObject[MethodName]>; + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<(() => MockedObject[MethodName]) | Implementation>; + /** + * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<(value: MockedObject[MethodName]) => void>; + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; + /** + * This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and + * Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In + * order to enable module mocking, Node.js must be started with the + * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-module-mocks) + * command-line flag. + * + * **Note**: [module customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) registered via the **synchronous** API effect resolution of + * the `specifier` provided to `mock.module`. Customization hooks registered via the **asynchronous** + * API are currently ignored (because the test runner's loader is synchronous, and node does not + * support multi-chain / cross-chain loading). + * + * The following example demonstrates how a mock is created for a module. + * + * ```js + * test('mocks a builtin module in both module systems', async (t) => { + * // Create a mock of 'node:readline' with a named export named 'foo', which + * // does not exist in the original 'node:readline' module. + * const mock = t.mock.module('node:readline', { + * exports: { foo: () => 42 }, + * }); + * + * let esmImpl = await import('node:readline'); + * let cjsImpl = require('node:readline'); + * + * // cursorTo() is an export of the original 'node:readline' module. + * assert.strictEqual(esmImpl.cursorTo, undefined); + * assert.strictEqual(cjsImpl.cursorTo, undefined); + * assert.strictEqual(esmImpl.fn(), 42); + * assert.strictEqual(cjsImpl.fn(), 42); + * + * mock.restore(); + * + * // The mock is restored, so the original builtin module is returned. + * esmImpl = await import('node:readline'); + * cjsImpl = require('node:readline'); + * + * assert.strictEqual(typeof esmImpl.cursorTo, 'function'); + * assert.strictEqual(typeof cjsImpl.cursorTo, 'function'); + * assert.strictEqual(esmImpl.fn, undefined); + * assert.strictEqual(cjsImpl.fn, undefined); + * }); + * ``` + * @since v22.3.0 + * @experimental + * @param specifier A string identifying the module to mock. + * @param options Optional configuration options for the mock module. + */ + module(specifier: string | URL, options?: MockModuleOptions): MockModuleContext; + /** + * Creates a mock for a property value on an object. This allows you to track and control access to a specific property, + * including how many times it is read (getter) or written (setter), and to restore the original value after mocking. + * + * ```js + * test('mocks a property value', (t) => { + * const obj = { foo: 42 }; + * const prop = t.mock.property(obj, 'foo', 100); + * + * assert.strictEqual(obj.foo, 100); + * assert.strictEqual(prop.mock.accessCount(), 1); + * assert.strictEqual(prop.mock.accesses[0].type, 'get'); + * assert.strictEqual(prop.mock.accesses[0].value, 100); + * + * obj.foo = 200; + * assert.strictEqual(prop.mock.accessCount(), 2); + * assert.strictEqual(prop.mock.accesses[1].type, 'set'); + * assert.strictEqual(prop.mock.accesses[1].value, 200); + * + * prop.mock.restore(); + * assert.strictEqual(obj.foo, 42); + * }); + * ``` + * @since v24.3.0 + * @param object The object whose value is being mocked. + * @param propertyName The identifier of the property on `object` to mock. + * @param value An optional value used as the mock value + * for `object[propertyName]`. **Default:** The original property value. + * @returns A proxy to the mocked object. The mocked object contains a + * special `mock` property, which is an instance of [`MockPropertyContext`][], and + * can be used for inspecting and changing the behavior of the mocked property. + */ + property< + MockedObject extends object, + PropertyName extends keyof MockedObject, + >( + object: MockedObject, + property: PropertyName, + value?: MockedObject[PropertyName], + ): MockedObject & { mock: MockPropertyContext }; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be + * used to reset their behavior or + * otherwise interact with them. + * + * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this + * function manually is recommended. + * @since v19.1.0, v18.13.0 + */ + reset(): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does + * not disassociate the mocks from the `MockTracker` instance. + * @since v19.1.0, v18.13.0 + */ + restoreAll(): void; + readonly timers: MockTimers; + } + const mock: MockTracker; + interface MockFunctionCall< + F extends Function, + ReturnType = F extends (...args: any) => infer T ? T + : F extends abstract new(...args: any) => infer T ? T + : unknown, + Args = F extends (...args: infer Y) => any ? Y + : F extends abstract new(...args: infer Y) => any ? Y + : unknown[], + > { + /** + * An array of the arguments passed to the mock function. + */ + arguments: Args; + /** + * If the mocked function threw then this property contains the thrown value. + */ + error: unknown | undefined; + /** + * The value returned by the mocked function. + * + * If the mocked function threw, it will be `undefined`. + */ + result: ReturnType | undefined; + /** + * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. + */ + stack: Error; + /** + * If the mocked function is a constructor, this field contains the class being constructed. + * Otherwise this will be `undefined`. + */ + target: F extends abstract new(...args: any) => any ? F : undefined; + /** + * The mocked function's `this` value. + */ + this: unknown; + } + /** + * The `MockFunctionContext` class is used to inspect or manipulate the behavior of + * mocks created via the `MockTracker` APIs. + * @since v19.1.0, v18.13.0 + */ + interface MockFunctionContext { + /** + * A getter that returns a copy of the internal array used to track calls to the + * mock. Each entry in the array is an object with the following properties. + * @since v19.1.0, v18.13.0 + */ + readonly calls: MockFunctionCall[]; + /** + * This function returns the number of times that this mock has been invoked. This + * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. + * @since v19.1.0, v18.13.0 + * @return The number of times that this mock has been invoked. + */ + callCount(): number; + /** + * This function is used to change the behavior of an existing mock. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, and then changes the mock implementation to a different function. + * + * ```js + * test('changes a mock behavior', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementation(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 5); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's new implementation. + */ + mockImplementation(implementation: F): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onCall` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, changes the mock implementation to a different function for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementationOnce(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 4); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. + * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. + */ + mockImplementationOnce(implementation: F, onCall?: number): void; + /** + * Resets the call history of the mock function. + * @since v19.3.0, v18.13.0 + */ + resetCalls(): void; + /** + * Resets the implementation of the mock function to its original behavior. The + * mock can still be used after calling this function. + * @since v19.1.0, v18.13.0 + */ + restore(): void; + } + /** + * @since v22.3.0 + * @experimental + */ + interface MockModuleContext { + /** + * Resets the implementation of the mock module. + * @since v22.3.0 + */ + restore(): void; + } + /** + * @since v24.3.0 + */ + class MockPropertyContext { + /** + * A getter that returns a copy of the internal array used to track accesses (get/set) to + * the mocked property. Each entry in the array is an object with the following properties: + */ + readonly accesses: Array<{ + type: "get" | "set"; + value: PropertyType; + stack: Error; + }>; + /** + * This function returns the number of times that the property was accessed. + * This function is more efficient than checking `ctx.accesses.length` because + * `ctx.accesses` is a getter that creates a copy of the internal access tracking array. + * @returns The number of times that the property was accessed (read or written). + */ + accessCount(): number; + /** + * This function is used to change the value returned by the mocked property getter. + * @param value The new value to be set as the mocked property value. + */ + mockImplementation(value: PropertyType): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onAccess` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.property()`, calls the + * mock property, changes the mock implementation to a different value for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * const obj = { foo: 1 }; + * + * const prop = t.mock.property(obj, 'foo', 5); + * + * assert.strictEqual(obj.foo, 5); + * prop.mock.mockImplementationOnce(25); + * assert.strictEqual(obj.foo, 25); + * assert.strictEqual(obj.foo, 5); + * }); + * ``` + * @param value The value to be used as the mock's + * implementation for the invocation number specified by `onAccess`. + * @param onAccess The invocation number that will use `value`. If + * the specified invocation has already occurred then an exception is thrown. + * **Default:** The number of the next invocation. + */ + mockImplementationOnce(value: PropertyType, onAccess?: number): void; + /** + * Resets the access history of the mocked property. + */ + resetAccesses(): void; + /** + * Resets the implementation of the mock property to its original behavior. The + * mock can still be used after calling this function. + */ + restore(): void; + } + interface MockTimersOptions { + apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">; + now?: number | Date | undefined; + } + /** + * Mocking timers is a technique commonly used in software testing to simulate and + * control the behavior of timers, such as `setInterval` and `setTimeout`, + * without actually waiting for the specified time intervals. + * + * The MockTimers API also allows for mocking of the `Date` constructor and + * `setImmediate`/`clearImmediate` functions. + * + * The `MockTracker` provides a top-level `timers` export + * which is a `MockTimers` instance. + * @since v20.4.0 + */ + interface MockTimers { + /** + * Enables timer mocking for the specified timers. + * + * **Note:** When you enable mocking for a specific timer, its associated + * clear function will also be implicitly mocked. + * + * **Note:** Mocking `Date` will affect the behavior of the mocked timers + * as they use the same internal clock. + * + * Example usage without setting initial time: + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); + * ``` + * + * The above example enables mocking for the `Date` constructor, `setInterval` timer and + * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, + * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. + * + * Example usage with initial time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: 1000 }); + * ``` + * + * Example usage with initial Date object as time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: new Date() }); + * ``` + * + * Alternatively, if you call `mock.timers.enable()` without any parameters: + * + * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) + * will be mocked. + * + * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, + * and `globalThis` will be mocked. + * The `Date` constructor from `globalThis` will be mocked. + * + * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can + * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date + * object. It can either be a positive integer, or another Date object. + * @since v20.4.0 + */ + enable(options?: MockTimersOptions): void; + /** + * Sets the current Unix timestamp that will be used as reference for any mocked + * `Date` objects. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * const now = Date.now(); + * const setTime = 1000; + * // Date.now is not mocked + * assert.deepStrictEqual(Date.now(), now); + * + * context.mock.timers.enable({ apis: ['Date'] }); + * context.mock.timers.setTime(setTime); + * // Date.now is now 1000 + * assert.strictEqual(Date.now(), setTime); + * }); + * ``` + * @since v21.2.0, v20.11.0 + */ + setTime(milliseconds: number): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTimers` instance and disassociates the mocks + * from the `MockTracker` instance. + * + * **Note:** After each test completes, this function is called on + * the test context's `MockTracker`. + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.reset(); + * ``` + * @since v20.4.0 + */ + reset(): void; + /** + * Advances time for all mocked timers. + * + * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts + * only positive numbers. In Node.js, `setTimeout` with negative numbers is + * only supported for web compatibility reasons. + * + * The following example mocks a `setTimeout` function and + * by using `.tick` advances in + * time triggering all pending timers. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Alternativelly, the `.tick` function can be called many times + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * const nineSecs = 9000; + * setTimeout(fn, nineSecs); + * + * const twoSeconds = 3000; + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Advancing time using `.tick` will also advance the time for any `Date` object + * created after the mock was enabled (if `Date` was also set to be mocked). + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * assert.strictEqual(Date.now(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * assert.strictEqual(fn.mock.callCount(), 1); + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * @since v20.4.0 + */ + tick(milliseconds: number): void; + /** + * Triggers all pending mocked timers immediately. If the `Date` object is also + * mocked, it will also advance the `Date` object to the furthest timer's time. + * + * The example below triggers all pending timers immediately, + * causing them to execute without any delay. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * const results = []; + * setTimeout(() => results.push(1), 9999); + * + * // Notice that if both timers have the same timeout, + * // the order of execution is guaranteed + * setTimeout(() => results.push(3), 8888); + * setTimeout(() => results.push(2), 8888); + * + * assert.deepStrictEqual(results, []); + * + * context.mock.timers.runAll(); + * assert.deepStrictEqual(results, [3, 2, 1]); + * // The Date object is also advanced to the furthest timer's time + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * + * **Note:** The `runAll()` function is specifically designed for + * triggering timers in the context of timer mocking. + * It does not have any effect on real-time system + * clocks or actual timers outside of the mocking environment. + * @since v20.4.0 + */ + runAll(): void; + /** + * Calls {@link MockTimers.reset()}. + */ + [Symbol.dispose](): void; + } + /** + * An object whose methods are used to configure available assertions on the + * `TestContext` objects in the current process. The methods from `node:assert` + * and snapshot testing functions are available by default. + * + * It is possible to apply the same configuration to all files by placing common + * configuration code in a module + * preloaded with `--require` or `--import`. + * @since v22.14.0 + */ + namespace assert { + /** + * Defines a new assertion function with the provided name and function. If an + * assertion already exists with the same name, it is overwritten. + * @since v22.14.0 + */ + function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void; + } + /** + * @since v22.3.0 + */ + namespace snapshot { + /** + * This function is used to customize the default serialization mechanism used by the test runner. + * + * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. + * `JSON.stringify()` does have limitations regarding circular structures and supported data types. + * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. + * + * Serializers are called in order, with the output of the previous serializer passed as input to the next. + * The final result must be a string value. + * @since v22.3.0 + * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. + */ + function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; + /** + * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. + * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. + * @since v22.3.0 + * @param fn A function used to compute the location of the snapshot file. + * The function receives the path of the test file as its only argument. If the + * test is not associated with a file (for example in the REPL), the input is + * undefined. `fn()` must return a string specifying the location of the snapshot file. + */ + function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; + } + } + type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; + }[keyof T]; + export = test; +} diff --git a/node_modules/@types/node/test/reporters.d.ts b/node_modules/@types/node/test/reporters.d.ts new file mode 100644 index 000000000..36ca28fc8 --- /dev/null +++ b/node_modules/@types/node/test/reporters.d.ts @@ -0,0 +1,60 @@ +declare module "node:test/reporters" { + import { Transform, TransformOptions } from "node:stream"; + import { EventData } from "node:test"; + type TestEvent = + | { type: "test:coverage"; data: EventData.TestCoverage } + | { type: "test:complete"; data: EventData.TestComplete } + | { type: "test:dequeue"; data: EventData.TestDequeue } + | { type: "test:diagnostic"; data: EventData.TestDiagnostic } + | { type: "test:enqueue"; data: EventData.TestEnqueue } + | { type: "test:fail"; data: EventData.TestFail } + | { type: "test:interrupted"; data: EventData.TestInterrupted } + | { type: "test:log"; data: EventData.TestLog } + | { type: "test:pass"; data: EventData.TestPass } + | { type: "test:plan"; data: EventData.TestPlan } + | { type: "test:start"; data: EventData.TestStart } + | { type: "test:stderr"; data: EventData.TestStderr } + | { type: "test:stdout"; data: EventData.TestStdout } + | { type: "test:summary"; data: EventData.TestSummary } + | { type: "test:watch:drained"; data: undefined } + | { type: "test:watch:restarted"; data: undefined }; + interface ReporterConstructorWrapper Transform> { + new(...args: ConstructorParameters): InstanceType; + (...args: ConstructorParameters): InstanceType; + } + /** + * The `dot` reporter outputs the test results in a compact format, + * where each passing test is represented by a `.`, + * and each failing test is represented by a `X`. + * @since v20.0.0 + */ + function dot(source: AsyncIterable): NodeJS.AsyncIterator; + /** + * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. + * @since v20.0.0 + */ + function tap(source: AsyncIterable): NodeJS.AsyncIterator; + class SpecReporter extends Transform { + constructor(); + } + /** + * The `spec` reporter outputs the test results in a human-readable format. + * @since v20.0.0 + */ + const spec: ReporterConstructorWrapper; + /** + * The `junit` reporter outputs test results in a jUnit XML format. + * @since v21.0.0 + */ + function junit(source: AsyncIterable): NodeJS.AsyncIterator; + class LcovReporter extends Transform { + constructor(options?: Omit); + } + /** + * The `lcov` reporter outputs test coverage when used with the + * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-coverage) flag. + * @since v22.0.0 + */ + const lcov: ReporterConstructorWrapper; + export { dot, junit, lcov, spec, tap, TestEvent }; +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 000000000..5b74b894f --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,149 @@ +declare module "node:timers" { + import { Abortable } from "node:events"; + import * as promises from "node:timers/promises"; + export interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; + } + global { + namespace NodeJS { + /** + * This object is created internally and is returned from `setImmediate()`. It + * can be passed to `clearImmediate()` in order to cancel the scheduled + * actions. + * + * By default, when an immediate is scheduled, the Node.js event loop will continue + * running as long as the immediate is active. The `Immediate` object returned by + * `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` + * functions that can be used to control this default behavior. + */ + interface Immediate extends RefCounted, Disposable { + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the + * `Immediate` is active. Calling `immediate.ref()` multiple times will have no + * effect. + * + * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary + * to call `immediate.ref()` unless `immediate.unref()` had been called previously. + * @since v9.7.0 + * @returns a reference to `immediate` + */ + ref(): this; + /** + * When called, the active `Immediate` object will not require the Node.js event + * loop to remain active. If there is no other activity keeping the event loop + * running, the process may exit before the `Immediate` object's callback is + * invoked. Calling `immediate.unref()` multiple times will have no effect. + * @since v9.7.0 + * @returns a reference to `immediate` + */ + unref(): this; + /** + * Cancels the immediate. This is similar to calling `clearImmediate()`. + * @since v20.5.0, v18.18.0 + */ + [Symbol.dispose](): void; + _onImmediate(...args: any[]): void; + } + // Legacy interface used in Node.js v9 and prior + // TODO: remove in a future major version bump + /** @deprecated Use `NodeJS.Timeout` instead. */ + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + /** + * This object is created internally and is returned from `setTimeout()` and + * `setInterval()`. It can be passed to either `clearTimeout()` or + * `clearInterval()` in order to cancel the scheduled actions. + * + * By default, when a timer is scheduled using either `setTimeout()` or + * `setInterval()`, the Node.js event loop will continue running as long as the + * timer is active. Each of the `Timeout` objects returned by these functions + * export both `timeout.ref()` and `timeout.unref()` functions that can be used to + * control this default behavior. + */ + interface Timeout extends RefCounted, Disposable, Timer { + /** + * Cancels the timeout. + * @since v0.9.1 + * @legacy Use `clearTimeout()` instead. + * @returns a reference to `timeout` + */ + close(): this; + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the + * `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. + * + * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary + * to call `timeout.ref()` unless `timeout.unref()` had been called previously. + * @since v0.9.1 + * @returns a reference to `timeout` + */ + ref(): this; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @returns a reference to `timeout` + */ + refresh(): this; + /** + * When called, the active `Timeout` object will not require the Node.js event loop + * to remain active. If there is no other activity keeping the event loop running, + * the process may exit before the `Timeout` object's callback is invoked. Calling + * `timeout.unref()` multiple times will have no effect. + * @since v0.9.1 + * @returns a reference to `timeout` + */ + unref(): this; + /** + * Coerce a `Timeout` to a primitive. The primitive can be used to + * clear the `Timeout`. The primitive can only be used in the + * same thread where the timeout was created. Therefore, to use it + * across `worker_threads` it must first be passed to the correct + * thread. This allows enhanced compatibility with browser + * `setTimeout()` and `setInterval()` implementations. + * @since v14.9.0, v12.19.0 + */ + [Symbol.toPrimitive](): number; + /** + * Cancels the timeout. + * @since v20.5.0, v18.18.0 + */ + [Symbol.dispose](): void; + _onTimeout(...args: any[]): void; + } + } + } + import clearImmediate = globalThis.clearImmediate; + import clearInterval = globalThis.clearInterval; + import clearTimeout = globalThis.clearTimeout; + import setImmediate = globalThis.setImmediate; + import setInterval = globalThis.setInterval; + import setTimeout = globalThis.setTimeout; + export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout }; +} +declare module "timers" { + export * from "node:timers"; +} diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts new file mode 100644 index 000000000..8e178eafe --- /dev/null +++ b/node_modules/@types/node/timers/promises.d.ts @@ -0,0 +1,93 @@ +declare module "node:timers/promises" { + import { TimerOptions } from "node:timers"; + /** + * ```js + * import { + * setTimeout, + * } from 'node:timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param delay The number of milliseconds to wait before fulfilling the + * promise. **Default:** `1`. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'node:timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * If `ref` is `true`, you need to call `next()` of async iterator explicitly + * or implicitly to keep the event loop alive. + * + * ```js + * import { + * setInterval, + * } from 'node:timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + * @param delay The number of milliseconds to wait between iterations. + * **Default:** `1`. + * @param value A value with which the iterator returns. + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator; + interface Scheduler { + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification + * being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent + * to calling `timersPromises.setTimeout(delay, undefined, options)` except that + * the `ref` option is not supported. + * + * ```js + * import { scheduler } from 'node:timers/promises'; + * + * await scheduler.wait(1000); // Wait one second before continuing + * ``` + * @since v17.3.0, v16.14.0 + * @experimental + * @param delay The number of milliseconds to wait before resolving the + * promise. + */ + wait(delay: number, options?: { signal?: AbortSignal }): Promise; + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification + * being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.yield()` is equivalent to calling + * `timersPromises.setImmediate()` with no arguments. + * @since v17.3.0, v16.14.0 + * @experimental + */ + yield(): Promise; + } + const scheduler: Scheduler; +} +declare module "timers/promises" { + export * from "node:timers/promises"; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 000000000..773a69f03 --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,1232 @@ +declare module "node:tls" { + import { NonSharedBuffer } from "node:buffer"; + import { X509Certificate } from "node:crypto"; + import * as net from "node:net"; + import * as stream from "stream"; + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + interface Certificate extends NodeJS.Dict { + /** + * Country code. + */ + C?: string | string[]; + /** + * Street. + */ + ST?: string | string[]; + /** + * Locality. + */ + L?: string | string[]; + /** + * Organization. + */ + O?: string | string[]; + /** + * Organizational unit. + */ + OU?: string | string[]; + /** + * Common name. + */ + CN?: string | string[]; + } + interface PeerCertificate { + /** + * `true` if a Certificate Authority (CA), `false` otherwise. + * @since v18.13.0 + */ + ca: boolean; + /** + * The DER encoded X.509 certificate data. + */ + raw: NonSharedBuffer; + /** + * The certificate subject. + */ + subject: Certificate; + /** + * The certificate issuer, described in the same terms as the `subject`. + */ + issuer: Certificate; + /** + * The date-time the certificate is valid from. + */ + valid_from: string; + /** + * The date-time the certificate is valid to. + */ + valid_to: string; + /** + * The certificate serial number, as a hex string. + */ + serialNumber: string; + /** + * The SHA-1 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint: string; + /** + * The SHA-256 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint256: string; + /** + * The SHA-512 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint512: string; + /** + * The extended key usage, a set of OIDs. + */ + ext_key_usage?: string[]; + /** + * A string containing concatenated names for the subject, + * an alternative to the `subject` names. + */ + subjectaltname?: string; + /** + * An array describing the AuthorityInfoAccess, used with OCSP. + */ + infoAccess?: NodeJS.Dict; + /** + * For RSA keys: The RSA bit size. + * + * For EC keys: The key size in bits. + */ + bits?: number; + /** + * The RSA exponent, as a string in hexadecimal number notation. + */ + exponent?: string; + /** + * The RSA modulus, as a hexadecimal string. + */ + modulus?: string; + /** + * The public key. + */ + pubkey?: NonSharedBuffer; + /** + * The ASN.1 name of the OID of the elliptic curve. + * Well-known curves are identified by an OID. + * While it is unusual, it is possible that the curve + * is identified by its mathematical properties, + * in which case it will not have an OID. + */ + asn1Curve?: string; + /** + * The NIST name for the elliptic curve, if it has one + * (not all well-known curves have been assigned names by NIST). + */ + nistCurve?: string; + } + interface DetailedPeerCertificate extends PeerCertificate { + /** + * The issuer certificate object. + * For self-signed certificates, this may be a circular reference. + */ + issuerCertificate: DetailedPeerCertificate; + } + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + /** + * IETF name for the cipher suite. + */ + standardName: string; + } + interface EphemeralKeyInfo { + /** + * The supported types are 'DH' and 'ECDH'. + */ + type: string; + /** + * The name property is available only when type is 'ECDH'. + */ + name?: string | undefined; + /** + * The size of parameter of an ephemeral key exchange. + */ + size: number; + } + interface KeyObject { + /** + * Private keys in PEM format. + */ + pem: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface PxfObject { + /** + * PFX or PKCS12 encoded private key and certificate chain. + */ + buf: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean | undefined; + /** + * An optional net.Server instance. + */ + server?: net.Server | undefined; + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer | undefined; + } + interface TLSSocketEventMap extends net.SocketEventMap { + "keylog": [line: NonSharedBuffer]; + "OCSPResponse": [response: NonSharedBuffer]; + "secure": []; + "secureConnect": []; + "session": [session: NonSharedBuffer]; + } + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the + * connection is open. + * @since v0.11.4 + */ + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); + /** + * This property is `true` if the peer certificate was signed by one of the CAs + * specified when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 + */ + authorized: boolean; + /** + * The negotiated ALPN protocol. This is `null` before the handshake completes. + * Once the handshake completes, it settles as either the negotiated protocol + * name, or `false` if the peers did not negotiate an ALPN protocol. + * @since v6.0.0 + */ + alpnProtocol: string | false | null; + /** + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 + */ + authorizationError: Error; + /** + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 + */ + encrypted: true; + /** + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. + * + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. + * + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 + */ + getCertificate(): PeerCertificate | object | null; + /** + * Returns an object containing information on the negotiated cipher suite. + * + * For example, a TLSv1.2 protocol with AES256-SHA cipher: + * + * ```json + * { + * "name": "AES256-SHA", + * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", + * "version": "SSLv3" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object describing ephemeral key agreement in [perfect forward + * secrecy](https://nodejs.org/docs/latest-v26.x/api/tls.html#perfect-forward-secrecy) on a client connection. It returns an empty object when the key + * agreement is not ephemeral. As this is only supported on a client socket; + * `null` is returned if called on a server socket. The supported types are `'DH'`, + * `'ECDH'`, and `'TLSGroup'`. For `'DH'` and `'ECDH'`, the object describes peer + * temporary key parameters. For `'TLSGroup'`, the object identifies the negotiated + * TLS Supported Group used for key agreement when a peer temporary key object is + * not available. + * + * The `name` property is available only when type is `'ECDH'` or `'TLSGroup'`. The + * `size` property is not available when type is `'TLSGroup'`. For `'TLSGroup'`, + * `name` is the negotiated TLS Supported Group name. Standardized TLS group names + * and code points are listed in the [IANA TLS Supported Groups registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8). + * + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 + */ + getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. + */ + getFinished(): NonSharedBuffer | undefined; + /** + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. + */ + getPeerFinished(): NonSharedBuffer | undefined; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 + */ + getProtocol(): string | null; + /** + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 + */ + getSession(): NonSharedBuffer | undefined; + /** + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. + */ + getSharedSigalgs(): string[]; + /** + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 + */ + getTLSTicket(): NonSharedBuffer | undefined; + /** + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. + */ + isSessionReused(): boolean; + /** + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. + * + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void, + ): undefined | boolean; + /** + * The SNI (Server Name Indication) host name associated with the socket. This is + * `null` before the handshake completes. Once the handshake completes it settles + * as either the host name string, or `false` if SNI was not used. + * @since v0.11.3 + */ + servername: string | false | null; + /** + * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket. + * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`. + * @since v22.5.0, v20.17.0 + * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`, + * or a TLS context object created with {@link createSecureContext()} itself. + */ + setKeyCert(context: SecureContextOptions | SecureContext): void; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. + */ + setMaxSendFragment(size: number): boolean; + /** + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 + */ + disableRenegotiation(): void; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by + * OpenSSL's `SSL_trace()` function, the format is undocumented, can change + * without notice, and should not be relied on. + * @since v12.2.0 + */ + enableTrace(): void; + /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * /* + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 + * @param length number of bytes to retrieve from keying material + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material + */ + exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: TLSSocketEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: TLSSocketEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext | undefined; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean | undefined; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean | undefined; + /** + * An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported + * ALPN protocols. Buffers should have the format `[len][name][len][name]...` + * e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the + * next protocol name. Passing an array is usually much simpler, e.g. + * `['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher + * preference than those later. + */ + ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean | undefined; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication. + */ + requestOCSP?: boolean | undefined; + } + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { + /** + * Abort the connection if the SSL/TLS handshake does not finish in the + * specified number of milliseconds. A 'tlsClientError' is emitted on + * the tls.Server object whenever a handshake times out. Default: + * 120000 (120 seconds). + */ + handshakeTimeout?: number | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer | undefined; + /** + * @param socket + * @param identity identity parameter sent from the client. + * @return pre-shared key that must either be + * a buffer or `null` to stop the negotiation process. Returned PSK must be + * compatible with the selected cipher's digest. + * + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with the identity provided by the client. + * If the return value is `null` the negotiation process will stop and an + * "unknown_psk_identity" alert message will be sent to the other party. + * If the server wishes to hide the fact that the PSK identity was not known, + * the callback must provide some random data as `psk` to make the connection + * fail with "decrypt_error" before negotiation is finished. + * PSK ciphers are disabled by default, and using TLS-PSK thus + * requires explicitly specifying a cipher suite with the `ciphers` option. + * More information can be found in the RFC 4279. + */ + pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined; + /** + * hint to send to a client to help + * with selecting the identity during TLS-PSK negotiation. Will be ignored + * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be + * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. + */ + pskIdentityHint?: string | undefined; + } + interface PSKCallbackNegotation { + psk: NodeJS.ArrayBufferView; + identity: string; + } + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; + /** + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with optional identity `hint` provided by the server or `null` + * in case of TLS 1.3 where `hint` was removed. + * It will be necessary to provide a custom `tls.checkServerIdentity()` + * for the connection as the default one will try to check hostname/IP + * of the server against the certificate but that's not applicable for PSK + * because there won't be a certificate present. + * More information can be found in the RFC 4279. + * + * @param hint message sent from the server to help client + * decide which identity to use during negotiation. + * Always `null` if TLS 1.3 is used. + * @returns Return `null` to stop the negotiation process. `psk` must be + * compatible with the selected cipher's digest. + * `identity` must use UTF-8 encoding. + */ + pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined; + } + interface ServerEventMap extends net.ServerEventMap { + "connection": [socket: net.Socket]; + "keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket]; + "newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void]; + "OCSPRequest": [ + certificate: NonSharedBuffer, + issuer: NonSharedBuffer, + callback: (err: Error | null, resp: Buffer | null) => void, + ]; + "resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void]; + "secureConnection": [tlsSocket: TLSSocket]; + "tlsClientError": [exception: Error, tlsSocket: TLSSocket]; + } + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ + class Server extends net.Server { + constructor(secureConnectionListener?: (socket: TLSSocket) => void); + constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); + /** + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created + * with {@link createSecureContext} itself. + */ + addContext(hostname: string, context: SecureContextOptions | SecureContext): void; + /** + * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. + */ + getTicketKeys(): NonSharedBuffer; + /** + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + setSecureContext(options: SecureContextOptions): void; + /** + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. + */ + setTicketKeys(keys: Buffer): void; + // #region InternalEventEmitter + addListener(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; + type CertificateCompressionAlgorithm = "zlib" | "brotli" | "zstd"; + interface SecureContextOptions { + /** + * If set, this will be called when a client opens a connection using the ALPN extension. + * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, + * respectively containing the server name from the SNI extension (if any) and an array of + * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, + * which will be returned to the client as the selected ALPN protocol, or `undefined`, + * to reject the connection with a fatal alert. If a string is returned that does not match one of + * the client's ALPN protocols, an error will be thrown. + * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. + */ + ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; + /** + * Treat intermediate (non-self-signed) + * certificates in the trust CA certificate list as trusted. + * @since v22.9.0, v20.18.0 + */ + allowPartialTrustChain?: boolean | undefined; + /** + * Optionally override the trusted CA certificates. Default is to trust + * the well-known CAs curated by Mozilla. Mozilla's CAs are completely + * replaced when CAs are explicitly specified using this option. + */ + ca?: string | Buffer | Array | undefined; + /** + * Cert chains in PEM format. One cert chain should be provided per + * private key. Each cert chain should consist of the PEM formatted + * certificate for a provided private key, followed by the PEM + * formatted intermediate certificates (if any), in order, and not + * including the root CA (the root CA must be pre-known to the peer, + * see ca). When providing multiple cert chains, they do not have to + * be in the same order as their private keys in key. If the + * intermediate certificates are not provided, the peer will not be + * able to validate the certificate, and the handshake will fail. + */ + cert?: string | Buffer | Array | undefined; + /** + * An array of supported certificate + * compression algorithm names, in preference order. Supported values are + * `'zlib'`, `'brotli'`, and `'zstd'`. When set, enables TLS certificate + * compression ([RFC 8879](https://tools.ietf.org/html/rfc8879)) which compresses certificates during the TLS + * handshake, reducing handshake size. Only effective with TLSv1.3. + * **Default:** `[]` (disabled). + */ + certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined; + /** + * Colon-separated list of supported signature algorithms. The list + * can contain digest algorithms (SHA256, MD5 etc.), public key + * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g + * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). + */ + sigalgs?: string | undefined; + /** + * Cipher suite specification, replacing the default. For more + * information, see modifying the default cipher suite. Permitted + * ciphers can be obtained via tls.getCiphers(). Cipher names must be + * uppercased in order for OpenSSL to accept them. + */ + ciphers?: string | undefined; + /** + * Name of an OpenSSL engine which can provide the client certificate. + * @deprecated + */ + clientCertEngine?: string | undefined; + /** + * PEM formatted CRLs (Certificate Revocation Lists). + */ + crl?: string | Buffer | Array | undefined; + /** + * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. + * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. + * ECDHE-based perfect forward secrecy will still be available. + */ + dhparam?: string | Buffer | undefined; + /** + * A string describing a named curve, TLS group, or + * colon-separated list of named curves or TLS groups to use for key agreement, + * for example `P-521:P-384:P-256`, `X25519`, or `X25519MLKEM768`. The + * historical name of this option refers to ECDH key agreement in TLSv1.2 and + * below. In TLSv1.3, this option configures the TLS Supported Groups and + * key share groups offered or accepted by the TLS stack. Set to `auto` to + * select the group automatically. Use `crypto.getCurves()` to obtain a + * list of available elliptic curve names. For TLS group names, use + * `openssl list -tls-groups` or consult the [IANA TLS Supported Groups + * registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8). + */ + ecdhCurve?: string | undefined; + /** + * Attempt to use the server's cipher suite preferences instead of the + * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be + * set in secureOptions + */ + honorCipherOrder?: boolean | undefined; + /** + * Private keys in PEM format. PEM allows the option of private keys + * being encrypted. Encrypted keys will be decrypted with + * options.passphrase. Multiple keys using different algorithms can be + * provided either as an array of unencrypted key strings or buffers, + * or an array of objects in the form {pem: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted keys will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + key?: string | Buffer | Array | undefined; + /** + * Name of an OpenSSL engine to get private key from. Should be used + * together with privateKeyIdentifier. + * @deprecated + */ + privateKeyEngine?: string | undefined; + /** + * Identifier of a private key managed by an OpenSSL engine. Should be + * used together with privateKeyEngine. Should not be set together with + * key, because both options define a private key in different ways. + * @deprecated + */ + privateKeyIdentifier?: string | undefined; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion | undefined; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion | undefined; + /** + * Shared passphrase used for a single private key and/or a PFX. + */ + passphrase?: string | undefined; + /** + * PFX or PKCS12 encoded private key and certificate chain. pfx is an + * alternative to providing key and cert individually. PFX is usually + * encrypted, if it is, passphrase will be used to decrypt it. Multiple + * PFX can be provided either as an array of unencrypted PFX buffers, + * or an array of objects in the form {buf: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted PFX will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + pfx?: string | Buffer | Array | undefined; + /** + * Optionally affect the OpenSSL protocol behavior, which is not + * usually necessary. This should be used carefully if at all! Value is + * a numeric bitmask of the SSL_OP_* options from OpenSSL Options + */ + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options + /** + * Legacy mechanism to select the TLS protocol version to use, it does + * not support independent control of the minimum and maximum version, + * and does not support limiting the protocol to TLSv1.3. Use + * minVersion and maxVersion instead. The possible values are listed as + * SSL_METHODS, use the function names as strings. For example, use + * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow + * any TLS protocol version up to TLSv1.3. It is not recommended to use + * TLS versions less than 1.2, but it may be required for + * interoperability. Default: none, see minVersion. + */ + secureProtocol?: string | undefined; + /** + * Opaque identifier used by servers to ensure session state is not + * shared between applications. Unused by clients. + */ + sessionIdContext?: string | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + * See Session Resumption for more information. + */ + ticketKeys?: Buffer | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + } + interface SecureContext { + context: any; + } + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as + * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. + * + * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * + * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name + * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use + * a custom `options.checkServerIdentity` function that implements the desired behavior. + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `node:cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * import tls from 'node:tls'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ], + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 + */ + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * import tls from 'node:tls'; + * import fs from 'node:fs'; + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect( + port: number, + host?: string, + options?: ConnectionOptions, + secureConnectListener?: () => void, + ): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * `{@link createServer}` sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as `server.addContext()`, + * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. + * + * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * + * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength + * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can + * be used to create custom parameters. The key length must be greater than or + * equal to 1024 bits or else an error will be thrown. Although 1024 bits is + * permissible, use 2048 bits or larger for stronger security. + * @since v0.11.13 + */ + function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array containing the CA certificates from various sources, depending on `type`: + * + * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. + * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled, + * this would include CA certificates from the bundled Mozilla CA store. + * * When `--use-system-ca` is enabled, this would also include certificates from the system's + * trusted store. + * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified + * file. + * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according + * to rules set by `--use-system-ca`. This can be used to get the certificates from the system + * when `--use-system-ca` is not enabled. + * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same + * as `tls.rootCertificates`. + * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if + * `NODE_EXTRA_CA_CERTS` is not set. + * @since v22.15.0 + * @param type The type of CA certificates that will be returned. Valid values + * are `"default"`, `"system"`, `"bundled"` and `"extra"`. + * **Default:** `"default"`. + * @returns An array of PEM-encoded certificates. The array may contain duplicates + * if the same certificate is repeatedly stored in multiple sources. + */ + function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[]; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of `{@link createSecureContext}`. + * + * Not all supported ciphers are enabled by default. See + * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v26.x/api/tls.html#modifying-the-default-tls-cipher-suite). + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ + function getCiphers(): string[]; + /** + * Returns an array with the names of the RFC 8879 certificate compression + * algorithms supported by the current OpenSSL build, suitable for use in the + * `certificateCompression` option of `tls.createSecureContext()`. Possible + * values include `'zlib'`, `'brotli'`, and `'zstd'`. + * + * The array is empty when certificate compression is unavailable. + * + * ```js + * console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'zstd'] + * ``` + * @since v26.4.0 + */ + function getCertificateCompressionAlgorithms(): CertificateCompressionAlgorithm[]; + /** + * Sets the default CA certificates used by Node.js TLS clients. If the provided + * certificates are parsed successfully, they will become the default CA + * certificate list returned by {@link getCACertificates} and used + * by subsequent TLS connections that don't specify their own CA certificates. + * The certificates will be deduplicated before being set as the default. + * + * This function only affects the current Node.js thread. Previous + * sessions cached by the HTTPS agent won't be affected by this change, so + * this method should be called before any unwanted cachable TLS connections are + * made. + * + * To use system CA certificates as the default: + * + * ```js + * import tls from 'node:tls'; + * tls.setDefaultCACertificates(tls.getCACertificates('system')); + * ``` + * + * This function completely replaces the default CA certificate list. To add additional + * certificates to the existing defaults, get the current certificates and append to them: + * + * ```js + * import tls from 'node:tls'; + * const currentCerts = tls.getCACertificates('default'); + * const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...']; + * tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]); + * ``` + * @since v24.5.0 + * @param certs An array of CA certificates in PEM format. + */ + function setDefaultCACertificates(certs: ReadonlyArray): void; + /** + * The default named curve or TLS group list to use for key agreement in a TLS + * server. The default value is `'auto'`. See `tls.createSecureContext()` for + * further information. + * @since v0.11.13 + */ + let DEFAULT_ECDH_CURVE: string; + /** + * The default value of the `maxVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless + * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using + * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the highest maximum is used. + * @since v11.4.0 + */ + let DEFAULT_MAX_VERSION: SecureVersion; + /** + * The default value of the `minVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless + * changed using CLI options. Using `--tls-min-v1.0` sets the default to + * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using + * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the lowest minimum is used. + * @since v11.4.0 + */ + let DEFAULT_MIN_VERSION: SecureVersion; + /** + * The default value of the `ciphers` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported OpenSSL ciphers. + * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless + * changed using CLI options using `--tls-default-ciphers`. + * @since v19.8.0 + */ + let DEFAULT_CIPHERS: string; + /** + * An immutable array of strings representing the root certificates (in PEM format) + * from the bundled Mozilla CA store as supplied by the current Node.js version. + * + * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store + * that is fixed at release time. It is identical on all supported platforms. + * @since v12.3.0 + */ + const rootCertificates: readonly string[]; +} +declare module "tls" { + export * from "node:tls"; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 000000000..5fa7a3957 --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,103 @@ +declare module "node:trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + * @since v10.0.0 + */ + readonly categories: string; + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + * + * ```js + * import trace_events from 'node:trace_events'; + * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); + * t1.enable(); + * t2.enable(); + * + * // Prints 'node,node.perf,v8' + * console.log(trace_events.getEnabledCategories()); + * + * t2.disable(); // Will only disable emission of the 'node.perf' category + * + * // Prints 'node,v8' + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + disable(): void; + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + * @since v10.0.0 + */ + enable(): void; + /** + * `true` only if the `Tracing` object has been enabled. + * @since v10.0.0 + */ + readonly enabled: boolean; + } + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + /** + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * import trace_events from 'node:trace_events'; + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + */ + function createTracing(options: CreateTracingOptions): Tracing; + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. + * + * ```js + * import trace_events from 'node:trace_events'; + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + function getEnabledCategories(): string | undefined; +} +declare module "trace_events" { + export * from "node:trace_events"; +} diff --git a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts new file mode 100644 index 000000000..626ec28c1 --- /dev/null +++ b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts @@ -0,0 +1,467 @@ +declare module "node:buffer" { + global { + interface BufferConstructor { + // see ../buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: ArrayLike): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: ArrayBufferLike): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an + * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use + * `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal + * `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(array: WithImplicitCoercion>): Buffer; + /** + * This creates a view of the `ArrayBuffer` without copying the underlying + * memory. For example, when passed a reference to the `.buffer` property of a + * `TypedArray` instance, the newly created `Buffer` will share the same + * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arr = new Uint16Array(2); + * + * arr[0] = 5000; + * arr[1] = 4000; + * + * // Shares memory with `arr`. + * const buf = Buffer.from(arr.buffer); + * + * console.log(buf); + * // Prints: + * + * // Changing the original Uint16Array changes the Buffer also. + * arr[1] = 6000; + * + * console.log(buf); + * // Prints: + * ``` + * + * The optional `byteOffset` and `length` arguments specify a memory range within + * the `arrayBuffer` that will be shared by the `Buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const ab = new ArrayBuffer(10); + * const buf = Buffer.from(ab, 0, 2); + * + * console.log(buf.length); + * // Prints: 2 + * ``` + * + * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a + * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` + * variants. + * + * It is important to remember that a backing `ArrayBuffer` can cover a range + * of memory that extends beyond the bounds of a `TypedArray` view. A new + * `Buffer` created using the `buffer` property of a `TypedArray` may extend + * beyond the range of the `TypedArray`: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements + * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements + * console.log(arrA.buffer === arrB.buffer); // true + * + * const buf = Buffer.from(arrB.buffer); + * console.log(buf); + * // Prints: + * ``` + * @since v5.10.0 + * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the + * `.buffer` property of a `TypedArray`. + * @param byteOffset Index of first byte to expose. **Default:** `0`. + * @param length Number of bytes to expose. **Default:** + * `arrayBuffer.byteLength - byteOffset`. + */ + from( + arrayBuffer: WithImplicitCoercion, + byteOffset?: number, + length?: number, + ): Buffer; + /** + * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies + * the character encoding to be used when converting `string` into bytes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('this is a tést'); + * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); + * + * console.log(buf1.toString()); + * // Prints: this is a tést + * console.log(buf2.toString()); + * // Prints: this is a tést + * console.log(buf1.toString('latin1')); + * // Prints: this is a tést + * ``` + * + * A `TypeError` will be thrown if `string` is not a string or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(string)` may also use the internal `Buffer` pool like + * `Buffer.allocUnsafe()` does. + * @since v5.10.0 + * @param string A string to encode. + * @param encoding The encoding of `string`. **Default:** `'utf8'`. + */ + from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; + from(arrayOrString: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it must be an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + } + interface Buffer extends Uint8Array { + // see ../buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBuffer = Buffer; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type AllowSharedBuffer = Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type BufferView = Buffer; +} diff --git a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts new file mode 100644 index 000000000..f148cc4f8 --- /dev/null +++ b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts @@ -0,0 +1,71 @@ +// Interface declaration for Float16Array, required in @types/node v24+. +// These definitions are specific to TS <=5.6. + +// This needs all of the "common" properties/methods of the TypedArrays, +// otherwise the type unions `TypedArray` and `ArrayBufferView` will be +// empty objects. +interface Float16Array extends Pick { + readonly BYTES_PER_ELEMENT: number; + readonly buffer: ArrayBufferLike; + readonly byteLength: number; + readonly byteOffset: number; + readonly length: number; + readonly [Symbol.toStringTag]: "Float16Array"; + at(index: number): number | undefined; + copyWithin(target: number, start: number, end?: number): this; + every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; + fill(value: number, start?: number, end?: number): this; + filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array; + find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number; + findLast( + predicate: (value: number, index: number, array: Float16Array) => value is S, + thisArg?: any, + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Float16Array) => unknown, + thisArg?: any, + ): number | undefined; + findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void; + includes(searchElement: number, fromIndex?: number): boolean; + indexOf(searchElement: number, fromIndex?: number): number; + join(separator?: string): string; + lastIndexOf(searchElement: number, fromIndex?: number): number; + map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + ): number; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + initialValue: number, + ): number; + reduce( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, + initialValue: U, + ): U; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + ): number; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + initialValue: number, + ): number; + reduceRight( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, + initialValue: U, + ): U; + reverse(): Float16Array; + set(array: ArrayLike, offset?: number): void; + slice(start?: number, end?: number): Float16Array; + some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; + sort(compareFn?: (a: number, b: number) => number): this; + subarray(begin?: number, end?: number): Float16Array; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toReversed(): Float16Array; + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + toString(): string; + valueOf(): Float16Array; + with(index: number, value: number): Float16Array; + [index: number]: number; +} diff --git a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts new file mode 100644 index 000000000..57a1ab4f2 --- /dev/null +++ b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts @@ -0,0 +1,36 @@ +export {}; // Make this a module + +declare global { + namespace NodeJS { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float16Array + | Float32Array + | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + type NonSharedUint8Array = Uint8Array; + type NonSharedUint8ClampedArray = Uint8ClampedArray; + type NonSharedUint16Array = Uint16Array; + type NonSharedUint32Array = Uint32Array; + type NonSharedInt8Array = Int8Array; + type NonSharedInt16Array = Int16Array; + type NonSharedInt32Array = Int32Array; + type NonSharedBigUint64Array = BigUint64Array; + type NonSharedBigInt64Array = BigInt64Array; + type NonSharedFloat16Array = Float16Array; + type NonSharedFloat32Array = Float32Array; + type NonSharedFloat64Array = Float64Array; + type NonSharedDataView = DataView; + type NonSharedTypedArray = TypedArray; + type NonSharedArrayBufferView = ArrayBufferView; + } +} diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts new file mode 100644 index 000000000..6d093bd31 --- /dev/null +++ b/node_modules/@types/node/ts5.6/index.d.ts @@ -0,0 +1,118 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. 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. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.6. + +// Reference required TypeScript libraries: +/// +/// + +// TypeScript library polyfills required for TypeScript <=5.6: +/// + +// Definitions for Node.js modules specific to TypeScript <=5.6: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts new file mode 100644 index 000000000..110b1ebb1 --- /dev/null +++ b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts @@ -0,0 +1,72 @@ +// Interface declaration for Float16Array, required in @types/node v24+. +// These definitions are specific to TS 5.7. + +// This needs all of the "common" properties/methods of the TypedArrays, +// otherwise the type unions `TypedArray` and `ArrayBufferView` will be +// empty objects. +interface Float16Array { + readonly BYTES_PER_ELEMENT: number; + readonly buffer: TArrayBuffer; + readonly byteLength: number; + readonly byteOffset: number; + readonly length: number; + readonly [Symbol.toStringTag]: "Float16Array"; + at(index: number): number | undefined; + copyWithin(target: number, start: number, end?: number): this; + entries(): ArrayIterator<[number, number]>; + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + fill(value: number, start?: number, end?: number): this; + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + findLast( + predicate: (value: number, index: number, array: this) => value is S, + thisArg?: any, + ): S | undefined; + findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined; + findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + includes(searchElement: number, fromIndex?: number): boolean; + indexOf(searchElement: number, fromIndex?: number): number; + join(separator?: string): string; + keys(): ArrayIterator; + lastIndexOf(searchElement: number, fromIndex?: number): number; + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + ): number; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + initialValue: number, + ): number; + reduce( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, + initialValue: U, + ): U; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + ): number; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + initialValue: number, + ): number; + reduceRight( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, + initialValue: U, + ): U; + reverse(): this; + set(array: ArrayLike, offset?: number): void; + slice(start?: number, end?: number): Float16Array; + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + sort(compareFn?: (a: number, b: number) => number): this; + subarray(begin?: number, end?: number): Float16Array; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toReversed(): Float16Array; + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + toString(): string; + valueOf(): this; + values(): ArrayIterator; + with(index: number, value: number): Float16Array; + [Symbol.iterator](): ArrayIterator; + [index: number]: number; +} diff --git a/node_modules/@types/node/ts5.7/index.d.ts b/node_modules/@types/node/ts5.7/index.d.ts new file mode 100644 index 000000000..a9ee9e95a --- /dev/null +++ b/node_modules/@types/node/ts5.7/index.d.ts @@ -0,0 +1,118 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. 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. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.7. + +// Reference required TypeScript libraries: +/// +/// + +// TypeScript library polyfills required for TypeScript 5.7: +/// + +// Definitions for Node.js modules specific to TypeScript 5.7+: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 000000000..0569bef5b --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,226 @@ +declare module "node:tty" { + import * as net from "node:net"; + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + function isatty(fd: number): boolean; + /** + * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js + * process and there should be no reason to create additional instances. + * @since v0.5.8 + */ + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + /** + * A `boolean` that is `true` if the TTY is currently configured to operate as a + * raw device. + * + * This flag is always `false` when a process starts, even if the terminal is + * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. + * @since v0.7.7 + */ + isRaw: boolean; + /** + * Allows configuration of `tty.ReadStream` so that it operates as a raw device. + * + * When in raw mode, input is always available character-by-character, not + * including modifiers. Additionally, all special processing of input characters + * by the terminal is disabled, including echoing input + * characters. Ctrl+C will no longer cause a `SIGINT` when + * in this mode. This mode does not affect terminal output processing, such as + * newline translation on Unix terminals. + * @since v0.7.7 + * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` + * property will be set to the resulting mode. + * @return The read stream instance. + */ + setRawMode(mode: boolean): this; + /** + * A `boolean` that is always `true` for `tty.ReadStream` instances. + * @since v0.5.8 + */ + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + interface WriteStreamEventMap extends net.SocketEventMap { + "resize": []; + } + /** + * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there + * should be no reason to create additional instances. + * @since v0.5.8 + */ + class WriteStream extends net.Socket { + constructor(fd: number); + /** + * `writeStream.clearLine()` clears the current line of this `WriteStream` in a + * direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * `writeStream.clearScreenDown()` clears this `WriteStream` from the current + * cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified + * position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its + * current position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * Returns: + * + * * `1` for 2, + * * `4` for 16, + * * `8` for 256, + * * `24` for 16,777,216 colors supported. + * + * Use this to determine what colors the terminal supports. Due to the nature of + * colors in terminals it is possible to either have false positives or false + * negatives. It depends on process information and the environment variables that + * may lie about what terminal is used. + * It is possible to pass in an `env` object to simulate the usage of a specific + * terminal. This can be useful to check how specific environment settings behave. + * + * To enforce a specific color support, use one of the below environment settings. + * + * * 2 colors: `FORCE_COLOR = 0` (Disables colors) + * * 16 colors: `FORCE_COLOR = 1` + * * 256 colors: `FORCE_COLOR = 2` + * * 16,777,216 colors: `FORCE_COLOR = 3` + * + * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. + * @since v9.9.0 + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + getColorDepth(env?: object): number; + /** + * Returns `true` if the `writeStream` supports at least as many colors as provided + * in `count`. Minimum support is 2 (black and white). + * + * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. + * + * ```js + * process.stdout.hasColors(); + * // Returns true or false depending on if `stdout` supports at least 16 colors. + * process.stdout.hasColors(256); + * // Returns true or false depending on if `stdout` supports at least 256 colors. + * process.stdout.hasColors({ TMUX: '1' }); + * // Returns true. + * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); + * // Returns false (the environment setting pretends to support 2 ** 8 colors). + * ``` + * @since v11.13.0, v10.16.0 + * @param [count=16] The number of colors that are requested (minimum 2). + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; + /** + * `writeStream.getWindowSize()` returns the size of the TTY + * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number + * of columns and rows in the corresponding TTY. + * @since v0.7.7 + */ + getWindowSize(): [number, number]; + /** + * A `number` specifying the number of columns the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + columns: number; + /** + * A `number` specifying the number of rows the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + rows: number; + /** + * A `boolean` that is always `true`. + * @since v0.5.8 + */ + isTTY: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WriteStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } +} +declare module "tty" { + export * from "node:tty"; +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 000000000..d6ea8c59e --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,556 @@ +declare module "node:url" { + import { Blob, NonSharedBuffer } from "node:buffer"; + import { ClientRequestArgs } from "node:http"; + import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; + // Input to `url.format` + interface UrlObject { + auth?: string | null | undefined; + hash?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + href?: string | null | undefined; + pathname?: string | null | undefined; + protocol?: string | null | undefined; + search?: string | null | undefined; + slashes?: boolean | null | undefined; + port?: string | number | null | undefined; + query?: string | null | ParsedUrlQueryInput | undefined; + } + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + interface UrlWithStringQuery extends Url { + query: string | null; + } + interface FileUrlToPathOptions { + /** + * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. + * @default undefined + * @since v22.1.0 + */ + windows?: boolean | undefined; + } + interface PathToFileUrlOptions { + /** + * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. + * @default undefined + * @since v22.1.0 + */ + windows?: boolean | undefined; + } + /** + * The `url.parse()` method takes a URL string, parses it, and returns a URL + * object. + * + * A `TypeError` is thrown if `urlString` is not a string. + * + * A `URIError` is thrown if the `auth` property is present but cannot be decoded. + * + * `url.parse()` uses a lenient, non-standard algorithm for parsing URL + * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) + * and incorrect handling of usernames and passwords. Do not use with untrusted + * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the + * [WHATWG URL](https://nodejs.org/docs/latest-v26.x/api/url.html#the-whatwg-url-api) API instead, for example: + * + * ```js + * function getURL(req) { + * const proto = req.headers['x-forwarded-proto'] || 'https'; + * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com'; + * return new URL(req.url || '/', `${proto}://${host}`); + * } + * ``` + * + * The example above assumes well-formed headers are forwarded from a reverse + * proxy to your Node.js server. If you are not using a reverse proxy, you should + * use the example below: + * + * ```js + * function getURL(req) { + * return new URL(req.url || '/', 'https://example.com'); + * } + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString The URL string to parse. + * @param parseQueryString If `true`, the `query` property will always + * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v26.x/api/querystring.html) module's `parse()` + * method. If `false`, the `query` property on the returned URL object will be an + * unparsed, undecoded string. **Default:** `false`. + * @param slashesDenoteHost If `true`, the first token after the literal + * string `//` and preceding the next `/` will be interpreted as the `host`. + * For instance, given `//foo/bar`, the result would be + * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. + * **Default:** `false`. + */ + function parse( + urlString: string, + parseQueryString?: false, + slashesDenoteHost?: boolean, + ): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * import url from 'node:url'; + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: URL, options?: URLFormatOptions): string; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * import url from 'node:url'; + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). + */ + function format(urlObject: UrlObject): string; + /** + * `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. + * + * Because it invokes the deprecated `url.parse()` internally, passing a string argument + * to `url.format()` is itself deprecated. + * + * Canonicalizing a URL string can be performed using the WHATWG URL API, by + * constructing a new URL object and calling `url.toString()`. + * + * ```js + * import { URL } from 'node:url'; + * + * const unformatted = 'http://[fe80:0:0:0:0:0:0:1]:/a/b?a=b#abc'; + * const formatted = new URL(unformatted).toString(); + * + * console.log(formatted); // Prints: http://[fe80::1]/a/b?a=b#abc + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString A string that will be passed to `url.parse()` and then formatted. + */ + function format(urlString: string): string; + /** + * The `url.resolve()` method resolves a target URL relative to a base URL in a + * manner similar to that of a web browser resolving an anchor tag. + * + * ```js + * import url from 'node:url'; + * url.resolve('/one/two/three', 'four'); // '/one/two/four' + * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' + * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * + * Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated. + * + * To achieve the same result using the WHATWG URL API: + * + * ```js + * function resolve(from, to) { + * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); + * if (resolvedUrl.protocol === 'resolve:') { + * // `from` is a relative URL. + * const { pathname, search, hash } = resolvedUrl; + * return pathname + search + hash; + * } + * return resolvedUrl.toString(); + * } + * + * resolve('/one/two/three', 'four'); // '/one/two/four' + * resolve('http://example.com/', '/one'); // 'http://example.com/one' + * resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param from The base URL to use if `to` is a relative URL. + * @param to The target URL to resolve. + */ + function resolve(from: string, to: string): string; + /** + * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an + * invalid domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToUnicode}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToASCII('español.com')); + * // Prints xn--espaol-zwa.com + * console.log(url.domainToASCII('中文.com')); + * // Prints xn--fiq228c.com + * console.log(url.domainToASCII('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToASCII(domain: string): string; + /** + * Returns the Unicode serialization of the `domain`. If `domain` is an invalid + * domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToASCII}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToUnicode('xn--espaol-zwa.com')); + * // Prints español.com + * console.log(url.domainToUnicode('xn--fiq228c.com')); + * // Prints 中文.com + * console.log(url.domainToUnicode('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToUnicode(domain: string): string; + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * + * ```js + * import { fileURLToPath } from 'node:url'; + * + * const __filename = fileURLToPath(import.meta.url); + * + * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ + * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) + * + * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt + * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) + * + * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt + * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) + * + * new URL('file:///hello world').pathname; // Incorrect: /hello%20world + * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) + * ``` + * + * **Security Considerations:** + * + * This function decodes percent-encoded characters, including encoded dot-segments + * (`%2e` as `.` and `%2e%2e` as `..`), and then normalizes the resulting path. + * This means that encoded directory traversal sequences (such as `%2e%2e`) are + * decoded and processed as actual path traversal, even though encoded slashes + * (`%2F`, `%5C`) are correctly rejected. + * + * **Applications must not rely on `fileURLToPath()` alone to prevent directory + * traversal attacks.** Always perform explicit path validation and security checks + * on the returned path value to ensure it remains within expected boundaries + * before using it for file system operations. + * @since v10.12.0 + * @param url The file URL string or URL object to convert to a path. + * @return The fully-resolved platform-specific Node.js file path. + */ + function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; + /** + * Like `url.fileURLToPath(...)` except that instead of returning a string + * representation of the path, a `Buffer` is returned. This conversion is + * helpful when the input URL contains percent-encoded segments that are + * not valid UTF-8 / Unicode sequences. + * + * **Security Considerations:** + * + * This function has the same security considerations as `url.fileURLToPath()`. + * It decodes percent-encoded characters, including encoded dot-segments + * (`%2e` as `.` and `%2e%2e` as `..`), and normalizes the path. **Applications + * must not rely on this function alone to prevent directory traversal attacks.** + * Always perform explicit path validation on the returned buffer value before + * using it for file system operations. + * @since v24.3.0 + * @param url The file URL string or URL object to convert to a path. + * @returns The fully-resolved platform-specific Node.js file path + * as a `Buffer`. + */ + function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer; + /** + * This function ensures that `path` is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * + * ```js + * import { pathToFileURL } from 'node:url'; + * + * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 + * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) + * + * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c + * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) + * ``` + * @since v10.12.0 + * @param path The path to convert to a File URL. + * @return The file URL object. + */ + function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; + /** + * This utility function converts a URL object into an ordinary options object as + * expected by the `http.request()` and `https.request()` APIs. + * + * ```js + * import { urlToHttpOptions } from 'node:url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(urlToHttpOptions(myURL)); + * /* + * { + * protocol: 'https:', + * hostname: 'xn--g6w251d', + * hash: '#foo', + * search: '?abc', + * pathname: '/', + * path: '/?abc', + * href: 'https://a:b@xn--g6w251d/?abc#foo', + * auth: 'a:b' + * } + * + * ``` + * @since v15.7.0, v14.18.0 + * @param url The `WHATWG URL` object to convert to an options object. + * @return Options object + */ + function urlToHttpOptions(url: URL): ClientRequestArgs; + interface URLFormatOptions { + /** + * `true` if the serialized URL string should include the username and password, `false` otherwise. + * @default true + */ + auth?: boolean | undefined; + /** + * `true` if the serialized URL string should include the fragment, `false` otherwise. + * @default true + */ + fragment?: boolean | undefined; + /** + * `true` if the serialized URL string should include the search query, `false` otherwise. + * @default true + */ + search?: boolean | undefined; + /** + * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to + * being Punycode encoded. + * @default false + */ + unicode?: boolean | undefined; + } + // #region web types + type URLPatternInput = string | URLPatternInit; + interface URLPatternComponentResult { + input: string; + groups: Record; + } + interface URLPatternInit { + protocol?: string; + username?: string; + password?: string; + hostname?: string; + port?: string; + pathname?: string; + search?: string; + hash?: string; + baseURL?: string; + } + interface URLPatternOptions { + ignoreCase?: boolean; + } + interface URLPatternResult { + inputs: URLPatternInput[]; + protocol: URLPatternComponentResult; + username: URLPatternComponentResult; + password: URLPatternComponentResult; + hostname: URLPatternComponentResult; + port: URLPatternComponentResult; + pathname: URLPatternComponentResult; + search: URLPatternComponentResult; + hash: URLPatternComponentResult; + } + interface URL { + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toJSON(): string; + } + var URL: { + prototype: URL; + new(url: string | URL, base?: string | URL): URL; + canParse(input: string | URL, base?: string | URL): boolean; + createObjectURL(blob: Blob): string; + parse(input: string | URL, base?: string | URL): URL | null; + revokeObjectURL(id: string): void; + }; + interface URLPattern { + readonly hasRegExpGroups: boolean; + readonly hash: string; + readonly hostname: string; + readonly password: string; + readonly pathname: string; + readonly port: string; + readonly protocol: string; + readonly search: string; + readonly username: string; + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + test(input?: URLPatternInput, baseURL?: string | URL): boolean; + } + var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; + }; + interface URLSearchParams { + readonly size: number; + append(name: string, value: string): void; + delete(name: string, value?: string): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string, value?: string): boolean; + set(name: string, value: string): void; + sort(): void; + forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + entries(): URLSearchParamsIterator<[string, string]>; + keys(): URLSearchParamsIterator; + values(): URLSearchParamsIterator; + } + var URLSearchParams: { + prototype: URLSearchParams; + new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + }; + interface URLSearchParamsIterator extends NodeJS.Iterator { + [Symbol.iterator](): URLSearchParamsIterator; + } + // #endregion +} +declare module "url" { + export * from "node:url"; +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 000000000..d756206d9 --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,1680 @@ +declare module "node:util" { + export * as types from "node:util/types"; + export type InspectStyle = + | "special" + | "number" + | "bigint" + | "boolean" + | "undefined" + | "null" + | "string" + | "symbol" + | "date" + | "name" + | "regexp" + | "module"; + export interface InspectStyles extends Record string)> { + regexp: { + (value: string): string; + colors: InspectColor[]; + }; + } + export type InspectColorModifier = + | "reset" + | "bold" + | "dim" + | "italic" + | "underline" + | "blink" + | "inverse" + | "hidden" + | "strikethrough" + | "doubleunderline"; + export type InspectColorForeground = + | "black" + | "red" + | "green" + | "yellow" + | "blue" + | "magenta" + | "cyan" + | "white" + | "gray" + | "redBright" + | "greenBright" + | "yellowBright" + | "blueBright" + | "magentaBright" + | "cyanBright" + | "whiteBright"; + export type InspectColorBackground = `bg${Capitalize}`; + export type InspectColor = InspectColorModifier | InspectColorForeground | InspectColorBackground; + export interface InspectColors extends Record {} + export interface InspectOptions { + /** + * If `true`, object's non-enumerable symbols and properties are included in the formatted result. + * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). + * @default false + */ + showHidden?: boolean | undefined; + /** + * Specifies the number of times to recurse while formatting object. + * This is useful for inspecting large objects. + * To recurse up to the maximum call stack size pass `Infinity` or `null`. + * @default 2 + */ + depth?: number | null | undefined; + /** + * If `true`, the output is styled with ANSI color codes. Colors are customizable. + */ + colors?: boolean | undefined; + /** + * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. + * @default true + */ + customInspect?: boolean | undefined; + /** + * If `true`, `Proxy` inspection includes the target and handler objects. + * @default false + */ + showProxy?: boolean | undefined; + /** + * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements + * to include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no elements. + * @default 100 + */ + maxArrayLength?: number | null | undefined; + /** + * Specifies the maximum number of characters to + * include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no characters. + * @default 10000 + */ + maxStringLength?: number | null | undefined; + /** + * The length at which input values are split across multiple lines. + * Set to `Infinity` to format the input as a single line + * (in combination with `compact` set to `true` or any number >= `1`). + * @default 80 + */ + breakLength?: number | undefined; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default true + */ + compact?: boolean | number | undefined; + /** + * If set to `true` or a function, all properties of an object, and `Set` and `Map` + * entries are sorted in the resulting string. + * If set to `true` the default sort is used. + * If set to a function, it is used as a compare function. + */ + sorted?: boolean | ((a: string, b: string) => number) | undefined; + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default false + */ + getters?: "get" | "set" | boolean | undefined; + /** + * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. + * @default false + */ + numericSeparator?: boolean | undefined; + } + export interface InspectContext extends Required { + stylize(text: string, styleType: InspectStyle): string; + } + import _inspect = inspect; + export interface Inspectable { + [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any; + } + export interface CallSiteObject { + /** + * Returns the name of the function associated with this call site. + */ + functionName: string; + /** + * Returns the name of the resource that contains the script for the + * function for this call site. + */ + scriptName: string; + /** + * Returns the unique id of the script, as in Chrome DevTools protocol + * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId). + * @since v22.14.0 + */ + scriptId: string; + /** + * Returns the number, 1-based, of the line for the associate function call. + */ + lineNumber: number; + /** + * Returns the 1-based column offset on the line for the associated function call. + */ + columnNumber: number; + } + export type DiffEntry = [operation: -1 | 0 | 1, value: string]; + /** + * `util.diff()` compares two string or array values and returns an array of difference entries. + * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm + * used internally by assertion error messages. + * + * If the values are equal, an empty array is returned. + * + * ```js + * const { diff } = require('node:util'); + * + * // Comparing strings + * const actualString = '12345678'; + * const expectedString = '12!!5!7!'; + * console.log(diff(actualString, expectedString)); + * // [ + * // [0, '1'], + * // [0, '2'], + * // [1, '3'], + * // [1, '4'], + * // [-1, '!'], + * // [-1, '!'], + * // [0, '5'], + * // [1, '6'], + * // [-1, '!'], + * // [0, '7'], + * // [1, '8'], + * // [-1, '!'], + * // ] + * // Comparing arrays + * const actualArray = ['1', '2', '3']; + * const expectedArray = ['1', '3', '4']; + * console.log(diff(actualArray, expectedArray)); + * // [ + * // [0, '1'], + * // [1, '2'], + * // [0, '3'], + * // [-1, '4'], + * // ] + * // Equal values return empty array + * console.log(diff('same', 'same')); + * // [] + * ``` + * @since v22.15.0 + * @experimental + * @param actual The first value to compare + * @param expected The second value to compare + * @returns An array of difference entries. Each entry is an array with two elements: + * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert + * * Index 1: `string` The value associated with the operation + */ + export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[]; + /** + * The `util.format()` method returns a formatted string using the first argument + * as a `printf`-like format string which can contain zero or more format + * specifiers. Each specifier is replaced with the converted value from the + * corresponding argument. Supported specifiers are: + * + * If a specifier does not have a corresponding argument, it is not replaced: + * + * ```js + * util.format('%s:%s', 'foo'); + * // Returns: 'foo:%s' + * ``` + * + * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. + * + * If there are more arguments passed to the `util.format()` method than the + * number of specifiers, the extra arguments are concatenated to the returned + * string, separated by spaces: + * + * ```js + * util.format('%s:%s', 'foo', 'bar', 'baz'); + * // Returns: 'foo:bar baz' + * ``` + * + * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: + * + * ```js + * util.format(1, 2, 3); + * // Returns: '1 2 3' + * ``` + * + * If only one argument is passed to `util.format()`, it is returned as it is + * without any formatting: + * + * ```js + * util.format('%% %s'); + * // Returns: '%% %s' + * ``` + * + * `util.format()` is a synchronous method that is intended as a debugging tool. + * Some input values can have a significant performance overhead that can block the + * event loop. Use this function with care and never in a hot code path. + * @since v0.5.3 + * @param format A `printf`-like format string. + */ + export function format(format?: any, ...param: any[]): string; + /** + * This function is identical to {@link format}, except in that it takes + * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. + * + * ```js + * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); + * // Returns 'See object { foo: 42 }', where `42` is colored as a number + * // when printed to a terminal. + * ``` + * @since v10.0.0 + */ + export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; + export interface GetCallSitesOptions { + /** + * Reconstruct the original location in the stacktrace from the source-map. + * Enabled by default with the flag `--enable-source-maps`. + */ + sourceMap?: boolean | undefined; + } + /** + * Returns an array of call site objects containing the stack of + * the caller function. + * + * Unlike accessing an `error.stack`, the result returned from this API is not + * interfered with `Error.prepareStackTrace`. + * + * ```js + * import { getCallSites } from 'node:util'; + * + * function exampleFunction() { + * const callSites = getCallSites(); + * + * console.log('Call Sites:'); + * callSites.forEach((callSite, index) => { + * console.log(`CallSite ${index + 1}:`); + * console.log(`Function Name: ${callSite.functionName}`); + * console.log(`Script Name: ${callSite.scriptName}`); + * console.log(`Line Number: ${callSite.lineNumber}`); + * console.log(`Column Number: ${callSite.columnNumber}`); + * }); + * // CallSite 1: + * // Function Name: exampleFunction + * // Script Name: /home/example.js + * // Line Number: 5 + * // Column Number: 26 + * + * // CallSite 2: + * // Function Name: anotherFunction + * // Script Name: /home/example.js + * // Line Number: 22 + * // Column Number: 3 + * + * // ... + * } + * + * // A function to simulate another stack layer + * function anotherFunction() { + * exampleFunction(); + * } + * + * anotherFunction(); + * ``` + * + * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`. + * If the source map is not available, the original location will be the same as the current location. + * When the `--enable-source-maps` flag is enabled, `sourceMap` will be true by default. + * + * ```ts + * import { getCallSites } from 'node:util'; + * + * interface Foo { + * foo: string; + * } + * + * const callSites = getCallSites({ sourceMap: true }); + * + * // With sourceMap: + * // Function Name: '' + * // Script Name: example.js + * // Line Number: 7 + * // Column Number: 26 + * + * // Without sourceMap: + * // Function Name: '' + * // Script Name: example.js + * // Line Number: 2 + * // Column Number: 26 + * ``` + * @param frameCount Number of frames to capture as call site objects. + * **Default:** `10`. Allowable range is between 1 and 200. + * @return An array of call site objects + * @since v22.9.0 + */ + export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[]; + export function getCallSites(options: GetCallSitesOptions): CallSiteObject[]; + /** + * Returns the string name for a numeric error code that comes from a Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const name = util.getSystemErrorName(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v9.7.0 + */ + export function getSystemErrorName(err: number): string; + /** + * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread. + * @since 24.6.0 + */ + export function setTraceSigInt(enable: boolean): void; + /** + * Returns a Map of all system error codes available from the Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const errorMap = util.getSystemErrorMap(); + * const name = errorMap.get(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v16.0.0, v14.17.0 + */ + export function getSystemErrorMap(): Map; + /** + * Returns the string message for a numeric error code that comes from a Node.js + * API. + * The mapping between error codes and string messages is platform-dependent. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const message = util.getSystemErrorMessage(err.errno); + * console.error(message); // no such file or directory + * }); + * ``` + * @since v22.12.0 + */ + export function getSystemErrorMessage(err: number): string; + /** + * Returns the `string` after replacing any surrogate code points + * (or equivalently, any unpaired surrogate code units) with the + * Unicode "replacement character" U+FFFD. + * @since v16.8.0, v14.18.0 + */ + export function toUSVString(string: string): string; + /** + * Creates and returns an `AbortController` instance whose `AbortSignal` is marked + * as transferable and can be used with `structuredClone()` or `postMessage()`. + * @since v18.11.0 + * @returns A transferable AbortController + */ + export function transferableAbortController(): AbortController; + /** + * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. + * + * ```js + * const signal = transferableAbortSignal(AbortSignal.timeout(100)); + * const channel = new MessageChannel(); + * channel.port2.postMessage(signal, [signal]); + * ``` + * @since v18.11.0 + * @param signal The AbortSignal + * @returns The same AbortSignal + */ + export function transferableAbortSignal(signal: AbortSignal): AbortSignal; + /** + * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted. + * If `resource` is provided, it weakly references the operation's associated object, + * so if `resource` is garbage collected before the `signal` aborts, + * then returned promise shall remain pending. + * This prevents memory leaks in long-running or non-cancelable operations. + * + * ```js + * import { aborted } from 'node:util'; + * + * // Obtain an object with an abortable signal, like a custom resource or operation. + * const dependent = obtainSomethingAbortable(); + * + * // Pass `dependent` as the resource, indicating the promise should only resolve + * // if `dependent` is still in memory when the signal is aborted. + * aborted(dependent.signal, dependent).then(() => { + * // This code runs when `dependent` is aborted. + * console.log('Dependent resource was aborted.'); + * }); + * + * // Simulate an event that triggers the abort. + * dependent.on('event', () => { + * dependent.abort(); // This will cause the `aborted` promise to resolve. + * }); + * ``` + * @since v19.7.0 + * @param resource Any non-null object tied to the abortable operation and held weakly. + * If `resource` is garbage collected before the `signal` aborts, the promise remains pending, + * allowing Node.js to stop tracking it. + * This helps prevent memory leaks in long-running or non-cancelable operations. + */ + export function aborted(signal: AbortSignal, resource: any): Promise; + /** + * The `util.inspect()` method returns a string representation of `object` that is + * intended for debugging. The output of `util.inspect` may change at any time + * and should not be depended upon programmatically. Additional `options` may be + * passed that alter the result. + * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag` + * property to make an identifiable tag for an inspected value. + * + * ```js + * class Foo { + * get [Symbol.toStringTag]() { + * return 'bar'; + * } + * } + * + * class Bar {} + * + * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); + * + * util.inspect(new Foo()); // 'Foo [bar] {}' + * util.inspect(new Bar()); // 'Bar {}' + * util.inspect(baz); // '[foo] {}' + * ``` + * + * Circular references point to their anchor by using a reference index: + * + * ```js + * import { inspect } from 'node:util'; + * + * const obj = {}; + * obj.a = [obj]; + * obj.b = {}; + * obj.b.inner = obj.b; + * obj.b.obj = obj; + * + * console.log(inspect(obj)); + * // { + * // a: [ [Circular *1] ], + * // b: { inner: [Circular *2], obj: [Circular *1] } + * // } + * ``` + * + * The following example inspects all properties of the `util` object: + * + * ```js + * import util from 'node:util'; + * + * console.log(util.inspect(util, { showHidden: true, depth: null })); + * ``` + * + * The following example highlights the effect of the `compact` option: + * + * ```js + * import { inspect } from 'node:util'; + * + * const o = { + * a: [1, 2, [[ + * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + + * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', + * 'test', + * 'foo']], 4], + * b: new Map([['za', 1], ['zb', 'test']]), + * }; + * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * + * // { a: + * // [ 1, + * // 2, + * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line + * // 'test', + * // 'foo' ] ], + * // 4 ], + * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } + * + * // Setting `compact` to false or an integer creates more reader friendly output. + * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * + * // { + * // a: [ + * // 1, + * // 2, + * // [ + * // [ + * // 'Lorem ipsum dolor sit amet,\n' + + * // 'consectetur adipiscing elit, sed do eiusmod \n' + + * // 'tempor incididunt ut labore et dolore magna aliqua.', + * // 'test', + * // 'foo' + * // ] + * // ], + * // 4 + * // ], + * // b: Map(2) { + * // 'za' => 1, + * // 'zb' => 'test' + * // } + * // } + * + * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a + * // single line. + * ``` + * + * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be + * inspected. If there are more entries than `maxArrayLength`, there is no + * guarantee which entries are displayed. That means retrieving the same + * `WeakSet` entries twice may result in different output. Furthermore, entries + * with no remaining strong references may be garbage collected at any time. + * + * ```js + * import { inspect } from 'node:util'; + * + * const obj = { a: 1 }; + * const obj2 = { b: 2 }; + * const weakSet = new WeakSet([obj, obj2]); + * + * console.log(inspect(weakSet, { showHidden: true })); + * // WeakSet { { a: 1 }, { b: 2 } } + * ``` + * + * The `sorted` option ensures that an object's property insertion order does not + * impact the result of `util.inspect()`. + * + * ```js + * import { inspect } from 'node:util'; + * import assert from 'node:assert'; + * + * const o1 = { + * b: [2, 3, 1], + * a: '`a` comes before `b`', + * c: new Set([2, 3, 1]), + * }; + * console.log(inspect(o1, { sorted: true })); + * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } + * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); + * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } + * + * const o2 = { + * c: new Set([2, 1, 3]), + * a: '`a` comes before `b`', + * b: [2, 3, 1], + * }; + * assert.strict.equal( + * inspect(o1, { sorted: true }), + * inspect(o2, { sorted: true }), + * ); + * ``` + * + * The `numericSeparator` option adds an underscore every three digits to all + * numbers. + * + * ```js + * import { inspect } from 'node:util'; + * + * const thousand = 1000; + * const million = 1000000; + * const bigNumber = 123456789n; + * const bigDecimal = 1234.12345; + * + * console.log(inspect(thousand, { numericSeparator: true })); + * // 1_000 + * console.log(inspect(million, { numericSeparator: true })); + * // 1_000_000 + * console.log(inspect(bigNumber, { numericSeparator: true })); + * // 123_456_789n + * console.log(inspect(bigDecimal, { numericSeparator: true })); + * // 1_234.123_45 + * ``` + * + * `util.inspect()` is a synchronous method intended for debugging. Its maximum + * output length is approximately 128 MiB. Inputs that result in longer output will + * be truncated. + * @since v0.3.0 + * @param object Any JavaScript primitive or `Object`. + * @return The representation of `object`. + */ + export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + export function inspect(object: any, options?: InspectOptions): string; + export namespace inspect { + const custom: unique symbol; + let colors: InspectColors; + let styles: InspectStyles; + let defaultOptions: InspectOptions; + let replDefaults: InspectOptions; + } + /** + * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). + * + * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isArray([]); + * // Returns: true + * util.isArray(new Array()); + * // Returns: true + * util.isArray({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use `isArray` instead. + */ + export function isArray(object: unknown): object is unknown[]; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and + * `extends` keywords to get language level inheritance support. Also note + * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). + * + * Inherit the prototype methods from one + * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from + * `superConstructor`. + * + * This mainly adds some input validation on top of + * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * As an additional convenience, `superConstructor` will be accessible + * through the `constructor.super_` property. + * + * ```js + * const util = require('node:util'); + * const EventEmitter = require('node:events'); + * + * function MyStream() { + * EventEmitter.call(this); + * } + * + * util.inherits(MyStream, EventEmitter); + * + * MyStream.prototype.write = function(data) { + * this.emit('data', data); + * }; + * + * const stream = new MyStream(); + * + * console.log(stream instanceof EventEmitter); // true + * console.log(MyStream.super_ === EventEmitter); // true + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('It works!'); // Received data: "It works!" + * ``` + * + * ES6 example using `class` and `extends`: + * + * ```js + * import EventEmitter from 'node:events'; + * + * class MyStream extends EventEmitter { + * write(data) { + * this.emit('data', data); + * } + * } + * + * const stream = new MyStream(); + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('With ES6'); + * ``` + * @since v0.3.0 + * @legacy Use ES2015 class syntax and `extends` keyword instead. + */ + export function inherits(constructor: unknown, superConstructor: unknown): void; + /** + * The `util.convertProcessSignalToExitCode()` method converts a signal name to its + * corresponding POSIX exit code. Following the POSIX standard, the exit code + * for a process terminated by a signal is calculated as `128 + signal number`. + * + * If `signal` is not a valid signal name, then an error will be thrown. See + * [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for a list of valid signals. + * + * ```js + * import { convertProcessSignalToExitCode } from 'node:util'; + * + * console.log(convertProcessSignalToExitCode('SIGTERM')); // 143 (128 + 15) + * console.log(convertProcessSignalToExitCode('SIGKILL')); // 137 (128 + 9) + * ``` + * + * This is particularly useful when working with processes to determine + * the exit code based on the signal that terminated the process. + * @since v25.4.0 + * @param signal A signal name (e.g. `'SIGTERM'`) + * @returns The exit code corresponding to `signal` + */ + export function convertProcessSignalToExitCode(signal: NodeJS.Signals): number; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + /** + * The `util.debuglog().enabled` getter is used to create a test that can be used + * in conditionals based on the existence of the `NODE_DEBUG` environment variable. + * If the `section` name appears within the value of that environment variable, + * then the returned value will be `true`. If not, then the returned value will be + * `false`. + * + * ```js + * import { debuglog } from 'node:util'; + * const enabled = debuglog('foo').enabled; + * if (enabled) { + * console.log('hello from foo [%d]', 123); + * } + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then it will + * output something like: + * + * ```console + * hello from foo [123] + * ``` + */ + enabled: boolean; + } + /** + * The `util.debuglog()` method is used to create a function that conditionally + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` + * environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to + * `console.error()`. If not, then the returned function is a no-op. + * + * ```js + * import { debuglog } from 'node:util'; + * const log = debuglog('foo'); + * + * log('hello from foo [%d]', 123); + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then + * it will output something like: + * + * ```console + * FOO 3245: hello from foo [123] + * ``` + * + * where `3245` is the process id. If it is not run with that + * environment variable set, then it will not print anything. + * + * The `section` supports wildcard also: + * + * ```js + * import { debuglog } from 'node:util'; + * const log = debuglog('foo-bar'); + * + * log('hi there, it\'s foo-bar [%d]', 2333); + * ``` + * + * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output + * something like: + * + * ```console + * FOO-BAR 3257: hi there, it's foo-bar [2333] + * ``` + * + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG` + * environment variable: `NODE_DEBUG=fs,net,tls`. + * + * The optional `callback` argument can be used to replace the logging function + * with a different function that doesn't have any initialization or + * unnecessary wrapping. + * + * ```js + * import { debuglog } from 'node:util'; + * let log = debuglog('internals', (debug) => { + * // Replace with a logging function that optimizes out + * // testing if the section is enabled + * log = debug; + * }); + * ``` + * @since v0.11.3 + * @param section A string identifying the portion of the application for which the `debuglog` function is being created. + * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. + * @return The logging function + */ + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; + export { debuglog as debug }; + export interface DeprecateOptions { + /** + * When false do not change the prototype of object + * while emitting the deprecation warning. + * @since v25.2.0 + * @default true + */ + modifyPrototype?: boolean | undefined; + } + /** + * The `util.deprecate()` method wraps `fn` (which may be a function or class) in + * such a way that it is marked as deprecated. + * + * ```js + * import { deprecate } from 'node:util'; + * + * export const obsoleteFunction = deprecate(() => { + * // Do something here. + * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); + * ``` + * + * When called, `util.deprecate()` will return a function that will emit a + * `DeprecationWarning` using the `'warning'` event. The warning will + * be emitted and printed to `stderr` the first time the returned function is + * called. After the warning is emitted, the wrapped function is called without + * emitting a warning. + * + * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, + * the warning will be emitted only once for that `code`. + * + * ```js + * import { deprecate } from 'node:util'; + * + * const fn1 = deprecate( + * () => 'a value', + * 'deprecation message', + * 'DEP0001', + * ); + * const fn2 = deprecate( + * () => 'a different value', + * 'other dep message', + * 'DEP0001', + * ); + * fn1(); // Emits a deprecation warning with code DEP0001 + * fn2(); // Does not emit a deprecation warning because it has the same code + * ``` + * + * If either the `--no-deprecation` or `--no-warnings` command-line flags are + * used, or if the `process.noDeprecation` property is set to `true` _prior_ to + * the first deprecation warning, the `util.deprecate()` method does nothing. + * + * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, + * or the `process.traceDeprecation` property is set to `true`, a warning and a + * stack trace are printed to `stderr` the first time the deprecated function is + * called. + * + * If the `--throw-deprecation` command-line flag is set, or the + * `process.throwDeprecation` property is set to `true`, then an exception will be + * thrown when the deprecated function is called. + * + * The `--throw-deprecation` command-line flag and `process.throwDeprecation` + * property take precedence over `--trace-deprecation` and + * `process.traceDeprecation`. + * @since v0.8.0 + * @param fn The function that is being deprecated. + * @param msg A warning message to display when the deprecated function is invoked. + * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. + * @return The deprecated function wrapped to emit a warning. + */ + export function deprecate(fn: T, msg: string, code?: string, options?: DeprecateOptions): T; + export interface IsDeepStrictEqualOptions { + /** + * If `true`, prototype and constructor + * comparison is skipped during deep strict equality check. + * @since v24.9.0 + * @default false + */ + skipPrototype?: boolean | undefined; + } + /** + * Returns `true` if there is deep strict equality between `val1` and `val2`. + * Otherwise, returns `false`. + * + * See `assert.deepStrictEqual()` for more information about deep strict + * equality. + * @since v9.0.0 + */ + export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean; + /** + * Returns `str` with any ANSI escape codes removed. + * + * ```js + * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); + * // Prints "value" + * ``` + * @since v16.11.0 + */ + export function stripVTControlCharacters(str: string): string; + /** + * Takes an `async` function (or a function that returns a `Promise`) and returns a + * function following the error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument. In the callback, the + * first argument will be the rejection reason (or `null` if the `Promise` + * resolved), and the second argument will be the resolved value. + * + * ```js + * import { callbackify } from 'node:util'; + * + * async function fn() { + * return 'hello world'; + * } + * const callbackFunction = callbackify(fn); + * + * callbackFunction((err, ret) => { + * if (err) throw err; + * console.log(ret); + * }); + * ``` + * + * Will print: + * + * ```text + * hello world + * ``` + * + * The callback is executed asynchronously, and will have a limited stack trace. + * If the callback throws, the process will emit an `'uncaughtException'` + * event, and if not handled will exit. + * + * Since `null` has a special meaning as the first argument to a callback, if a + * wrapped function rejects a `Promise` with a falsy value as a reason, the value + * is wrapped in an `Error` with the original value stored in a field named + * `reason`. + * + * ```js + * import util from 'node:util'; + * + * function fn() { + * return Promise.reject(null); + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * // When the Promise was rejected with `null` it is wrapped with an Error and + * // the original value is stored in `reason`. + * err && Object.hasOwn(err, 'reason') && err.reason === null; // true + * }); + * ``` + * @since v8.2.0 + * @param fn An `async` function + * @return a callback style function + */ + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: () => Promise, + ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export interface CustomPromisifyLegacy extends Function { + __promisify__: TCustom; + } + export interface CustomPromisifySymbol extends Function { + [promisify.custom]: TCustom; + } + export type CustomPromisify = + | CustomPromisifySymbol + | CustomPromisifyLegacy; + /** + * Takes a function following the common error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument, and returns a version + * that returns promises. + * + * ```js + * import { promisify } from 'node:util'; + * import { stat } from 'node:fs'; + * + * const promisifiedStat = promisify(stat); + * promisifiedStat('.').then((stats) => { + * // Do something with `stats` + * }).catch((error) => { + * // Handle the error. + * }); + * ``` + * + * Or, equivalently using `async function`s: + * + * ```js + * import { promisify } from 'node:util'; + * import { stat } from 'node:fs'; + * + * const promisifiedStat = promisify(stat); + * + * async function callStat() { + * const stats = await promisifiedStat('.'); + * console.log(`This directory is owned by ${stats.uid}`); + * } + * + * callStat(); + * ``` + * + * If there is an `original[util.promisify.custom]` property present, `promisify` + * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v26.x/api/util.html#custom-promisified-functions). + * + * `promisify()` assumes that `original` is a function taking a callback as its + * final argument in all cases. If `original` is not a function, `promisify()` + * will throw an error. If `original` is a function but its last argument is not + * an error-first callback, it will still be passed an error-first + * callback as its last argument. + * + * Using `promisify()` on class methods or other methods that use `this` may not + * work as expected unless handled specially: + * + * ```js + * import { promisify } from 'node:util'; + * + * class Foo { + * constructor() { + * this.a = 42; + * } + * + * bar(callback) { + * callback(null, this.a); + * } + * } + * + * const foo = new Foo(); + * + * const naiveBar = promisify(foo.bar); + * // TypeError: Cannot read properties of undefined (reading 'a') + * // naiveBar().then(a => console.log(a)); + * + * naiveBar.call(foo).then((a) => console.log(a)); // '42' + * + * const bindBar = naiveBar.bind(foo); + * bindBar().then((a) => console.log(a)); // '42' + * ``` + * @since v8.0.0 + */ + export function promisify(fn: CustomPromisify): TCustom; + export function promisify( + fn: (callback: (err: any, result: TResult) => void) => void, + ): () => Promise; + export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + export function promisify( + fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + /** + * That can be used to declare custom promisified variants of functions. + */ + const custom: unique symbol; + } + /** + * Stability: 1.1 - Active development + * Given an example `.env` file: + * + * ```js + * import { parseEnv } from 'node:util'; + * + * parseEnv('HELLO=world\nHELLO=oh my\n'); + * // Returns: { HELLO: 'oh my' } + * ``` + * @param content The raw contents of a `.env` file. + * @since v20.12.0 + */ + export function parseEnv(content: string): NodeJS.Dict; + export interface StyleTextOptions { + /** + * When true, `stream` is checked to see if it can handle colors. + * @default true + */ + validateStream?: boolean | undefined; + /** + * A stream that will be validated if it can be colored. + * @default process.stdout + */ + stream?: NodeJS.WritableStream | undefined; + } + /** + * This function returns a formatted text considering the `format` passed + * for printing in a terminal. It is aware of the terminal's capabilities + * and acts according to the configuration set via `NO_COLOR`, + * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables. + * + * ```js + * import { styleText } from 'node:util'; + * import { stderr } from 'node:process'; + * + * const successMessage = styleText('green', 'Success!'); + * console.log(successMessage); + * + * const errorMessage = styleText( + * 'red', + * 'Error! Error!', + * // Validate if process.stderr has TTY + * { stream: stderr }, + * ); + * console.error(errorMessage); + * ``` + * + * `util.inspect.colors` also provides text formats such as `italic`, and + * `underline` and you can combine both: + * + * ```js + * console.log( + * util.styleText(['underline', 'italic'], 'My italic underlined message'), + * ); + * ``` + * + * When passing an array of formats, the order of the format applied + * is left to right so the following style might overwrite the previous one. + * + * ```js + * console.log( + * util.styleText(['red', 'green'], 'text'), // green + * ); + * ``` + * + * The special format value `none` applies no additional styling to the text. + * + * In addition to predefined color names, `util.styleText()` supports hex color + * strings using ANSI TrueColor (24-bit) escape sequences. Hex colors can be + * specified in either 3-digit (`#RGB`) or 6-digit (`#RRGGBB`) format: + * + * ```js + * import { styleText } from 'node:util'; + * + * // 6-digit hex color + * console.log(styleText('#ff5733', 'Orange text')); + * + * // 3-digit hex color (shorthand) + * console.log(styleText('#f00', 'Red text')); + * + * // Hex color combined with other modifiers + * console.log(styleText(['#00f', 'bold'], 'Bold blue text')); + * ``` + * + * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v26.x/api/util.html#modifiers). + * @param format A text format defined in `util.inspect.colors`, a hex color in `#RGB` or `#RRGGBB` form, + * or an Array of text formats and/or hex colors. + * @param text The text to to be formatted. + * @since v20.12.0 + */ + export function styleText( + format: InspectColor | `#${string}` | readonly (InspectColor | `#${string}`)[], + text: string, + options?: StyleTextOptions, + ): string; + //// parseArgs + /** + * Provides a higher level API for command-line argument parsing than interacting + * with `process.argv` directly. Takes a specification for the expected arguments + * and returns a structured object with the parsed options and positionals. + * + * ```js + * import { parseArgs } from 'node:util'; + * const args = ['-f', '--bar', 'b']; + * const options = { + * foo: { + * type: 'boolean', + * short: 'f', + * }, + * bar: { + * type: 'string', + * }, + * }; + * const { + * values, + * positionals, + * } = parseArgs({ args, options }); + * console.log(values, positionals); + * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] + * ``` + * @since v18.3.0, v16.17.0 + * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: + * @return The parsed command line arguments: + */ + export function parseArgs(config?: T): ParsedResults; + /** + * Type of argument used in {@link parseArgs}. + */ + export type ParseArgsOptionsType = "boolean" | "string"; + export interface ParseArgsOptionDescriptor { + /** + * Type of argument. + */ + type: ParseArgsOptionsType; + /** + * Whether this option can be provided multiple times. + * If `true`, all values will be collected in an array. + * If `false`, values for the option are last-wins. + * @default false. + */ + multiple?: boolean | undefined; + /** + * A single character alias for the option. + */ + short?: string | undefined; + /** + * The value to assign to + * the option if it does not appear in the arguments to be parsed. The value + * must match the type specified by the `type` property. If `multiple` is + * `true`, it must be an array. No default value is applied when the option + * does appear in the arguments to be parsed, even if the provided value + * is falsy. + * @since v18.11.0 + */ + default?: string | boolean | string[] | boolean[] | undefined; + } + export interface ParseArgsOptionsConfig { + [longOption: string]: ParseArgsOptionDescriptor; + } + export interface ParseArgsConfig { + /** + * Array of argument strings. + */ + args?: readonly string[] | undefined; + /** + * Used to describe arguments known to the parser. + */ + options?: ParseArgsOptionsConfig | undefined; + /** + * Should an error be thrown when unknown arguments are encountered, + * or when arguments are passed that do not match the `type` configured in `options`. + * @default true + */ + strict?: boolean | undefined; + /** + * Whether this command accepts positional arguments. + */ + allowPositionals?: boolean | undefined; + /** + * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. + * @default false + * @since v22.4.0 + */ + allowNegative?: boolean | undefined; + /** + * Return the parsed tokens. This is useful for extending the built-in behavior, + * from adding additional checks through to reprocessing the tokens in different ways. + * @default false + */ + tokens?: boolean | undefined; + } + /* + IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. + TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 + This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". + But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. + So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. + This is technically incorrect but is a much nicer UX for the common case. + The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. + */ + type IfDefaultsTrue = T extends true ? IfTrue + : T extends false ? IfFalse + : IfTrue; + // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` + type IfDefaultsFalse = T extends false ? IfFalse + : T extends true ? IfTrue + : IfFalse; + type ExtractOptionValue = IfDefaultsTrue< + T["strict"], + O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, + string | boolean + >; + type ApplyOptionalModifiers> = ( + & { -readonly [LongOption in keyof O]?: V[LongOption] } + & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } + ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object + type ParsedValues = + & IfDefaultsTrue + & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< + T["options"], + { + [LongOption in keyof T["options"]]: IfDefaultsFalse< + T["options"][LongOption]["multiple"], + Array>, + ExtractOptionValue + >; + } + > + : {}); + type ParsedPositionals = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + type PreciseTokenForOptions< + K extends string, + O extends ParseArgsOptionDescriptor, + > = O["type"] extends "string" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: string; + inlineValue: boolean; + } + : O["type"] extends "boolean" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: undefined; + inlineValue: undefined; + } + : OptionToken & { name: K }; + type TokenForOptions< + T extends ParseArgsConfig, + K extends keyof T["options"] = keyof T["options"], + > = K extends unknown + ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions + : OptionToken + : never; + type ParsedOptionToken = IfDefaultsTrue, OptionToken>; + type ParsedPositionalToken = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + type ParsedTokens = Array< + ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } + >; + type PreciseParsedResults = IfDefaultsFalse< + T["tokens"], + { + values: ParsedValues; + positionals: ParsedPositionals; + tokens: ParsedTokens; + }, + { + values: ParsedValues; + positionals: ParsedPositionals; + } + >; + type OptionToken = + | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } + | { + kind: "option"; + index: number; + name: string; + rawName: string; + value: undefined; + inlineValue: undefined; + }; + type Token = + | OptionToken + | { kind: "positional"; index: number; value: string } + | { kind: "option-terminator"; index: number }; + // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. + // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. + type ParsedResults = ParseArgsConfig extends T ? { + values: { + [longOption: string]: undefined | string | boolean | Array; + }; + positionals: string[]; + tokens?: Token[]; + } + : PreciseParsedResults; + /** + * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). + * + * In accordance with browser conventions, all properties of `MIMEType` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. + * + * A MIME string is a structured string containing multiple meaningful + * components. When parsed, a `MIMEType` object is returned containing + * properties for each of these components. + * @since v19.1.0, v18.13.0 + */ + export class MIMEType { + /** + * Creates a new MIMEType object by parsing the input. + * + * A `TypeError` will be thrown if the `input` is not a valid MIME. + * Note that an effort will be made to coerce the given values into strings. + * @param input The input MIME to parse. + */ + constructor(input: string | { toString: () => string }); + /** + * Gets and sets the type portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript'); + * console.log(myMIME.type); + * // Prints: text + * myMIME.type = 'application'; + * console.log(myMIME.type); + * // Prints: application + * console.log(String(myMIME)); + * // Prints: application/javascript + * ``` + */ + type: string; + /** + * Gets and sets the subtype portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/ecmascript'); + * console.log(myMIME.subtype); + * // Prints: ecmascript + * myMIME.subtype = 'javascript'; + * console.log(myMIME.subtype); + * // Prints: javascript + * console.log(String(myMIME)); + * // Prints: text/javascript + * ``` + */ + subtype: string; + /** + * Gets the essence of the MIME. This property is read only. + * Use `mime.type` or `mime.subtype` to alter the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript;key=value'); + * console.log(myMIME.essence); + * // Prints: text/javascript + * myMIME.type = 'application'; + * console.log(myMIME.essence); + * // Prints: application/javascript + * console.log(String(myMIME)); + * // Prints: application/javascript;key=value + * ``` + */ + readonly essence: string; + /** + * Gets the `MIMEParams` object representing the + * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. + */ + readonly params: MIMEParams; + /** + * The `toString()` method on the `MIMEType` object returns the serialized MIME. + * + * Because of the need for standard compliance, this method does not allow users + * to customize the serialization process of the MIME. + */ + toString(): string; + } + /** + * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. + * @since v19.1.0, v18.13.0 + */ + export class MIMEParams { + /** + * Remove all name-value pairs whose name is `name`. + */ + delete(name: string): void; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + * Each item of the iterator is a JavaScript `Array`. The first item of the array + * is the `name`, the second item of the array is the `value`. + */ + entries(): NodeJS.Iterator<[name: string, value: string]>; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns `true` if there is at least one name-value pair whose name is `name`. + */ + has(name: string): boolean; + /** + * Returns an iterator over the names of each name-value pair. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // bar + * ``` + */ + keys(): NodeJS.Iterator; + /** + * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value`. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * params.set('foo', 'def'); + * params.set('baz', 'xyz'); + * console.log(params.toString()); + * // Prints: foo=def;bar=1;baz=xyz + * ``` + */ + set(name: string, value: string): void; + /** + * Returns an iterator over the values of each name-value pair. + */ + values(): NodeJS.Iterator; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + */ + [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; + } + // #region web types + export interface TextDecodeOptions { + stream?: boolean; + } + export interface TextDecoderCommon { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + } + export interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + export interface TextEncoderCommon { + readonly encoding: string; + } + export interface TextEncoderEncodeIntoResult { + read: number; + written: number; + } + export interface TextDecoder extends TextDecoderCommon { + decode(input?: NodeJS.AllowSharedBufferSource, options?: TextDecodeOptions): string; + } + export var TextDecoder: { + prototype: TextDecoder; + new(label?: string, options?: TextDecoderOptions): TextDecoder; + }; + export interface TextEncoder extends TextEncoderCommon { + encode(input?: string): NodeJS.NonSharedUint8Array; + encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; + } + export var TextEncoder: { + prototype: TextEncoder; + new(): TextEncoder; + }; + // #endregion +} +declare module "util" { + export * from "node:util"; +} diff --git a/node_modules/@types/node/util/types.d.ts b/node_modules/@types/node/util/types.d.ts new file mode 100644 index 000000000..174c0fa0e --- /dev/null +++ b/node_modules/@types/node/util/types.d.ts @@ -0,0 +1,558 @@ +declare module "node:util/types" { + import { KeyObject, webcrypto } from "node:crypto"; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or + * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * + * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. + * + * ```js + * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; + /** + * Returns `true` if the value is an `arguments` object. + * + * ```js + * function foo() { + * util.types.isArgumentsObject(arguments); // Returns true + * } + * ``` + * @since v10.0.0 + */ + function isArgumentsObject(object: unknown): object is IArguments; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. + * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false + * ``` + * @since v10.0.0 + */ + function isArrayBuffer(object: unknown): object is ArrayBuffer; + /** + * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed + * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to + * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * + * ```js + * util.types.isArrayBufferView(new Int8Array()); // true + * util.types.isArrayBufferView(Buffer.from('hello world')); // true + * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true + * util.types.isArrayBufferView(new ArrayBuffer()); // false + * ``` + * @since v10.0.0 + */ + function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; + /** + * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isAsyncFunction(function foo() {}); // Returns false + * util.types.isAsyncFunction(async function foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isAsyncFunction(object: unknown): boolean; + /** + * Returns `true` if the value is a `BigInt64Array` instance. + * + * ```js + * util.types.isBigInt64Array(new BigInt64Array()); // Returns true + * util.types.isBigInt64Array(new BigUint64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isBigInt64Array(value: unknown): value is BigInt64Array; + /** + * Returns `true` if the value is a BigInt object, e.g. created + * by `Object(BigInt(123))`. + * + * ```js + * util.types.isBigIntObject(Object(BigInt(123))); // Returns true + * util.types.isBigIntObject(BigInt(123)); // Returns false + * util.types.isBigIntObject(123); // Returns false + * ``` + * @since v10.4.0 + */ + function isBigIntObject(object: unknown): object is BigInt; + /** + * Returns `true` if the value is a `BigUint64Array` instance. + * + * ```js + * util.types.isBigUint64Array(new BigInt64Array()); // Returns false + * util.types.isBigUint64Array(new BigUint64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isBigUint64Array(value: unknown): value is BigUint64Array; + /** + * Returns `true` if the value is a boolean object, e.g. created + * by `new Boolean()`. + * + * ```js + * util.types.isBooleanObject(false); // Returns false + * util.types.isBooleanObject(true); // Returns false + * util.types.isBooleanObject(new Boolean(false)); // Returns true + * util.types.isBooleanObject(new Boolean(true)); // Returns true + * util.types.isBooleanObject(Boolean(false)); // Returns false + * util.types.isBooleanObject(Boolean(true)); // Returns false + * ``` + * @since v10.0.0 + */ + function isBooleanObject(object: unknown): object is Boolean; + /** + * Returns `true` if the value is any boxed primitive object, e.g. created + * by `new Boolean()`, `new String()` or `Object(Symbol())`. + * + * For example: + * + * ```js + * util.types.isBoxedPrimitive(false); // Returns false + * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true + * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false + * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true + * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true + * ``` + * @since v10.11.0 + */ + function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; + /** + * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. + * + * ```js + * const ab = new ArrayBuffer(20); + * util.types.isDataView(new DataView(ab)); // Returns true + * util.types.isDataView(new Float64Array()); // Returns false + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isDataView(object: unknown): object is DataView; + /** + * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. + * + * ```js + * util.types.isDate(new Date()); // Returns true + * ``` + * @since v10.0.0 + */ + function isDate(object: unknown): object is Date; + /** + * Returns `true` if the value is a native `External` value. + * + * A native `External` value is a special type of object that contains a + * raw C++ pointer (`void*`) for access from native code, and has no other + * properties. Such objects are created either by Node.js internals or native + * addons. In JavaScript, they are + * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a + * `null` prototype. + * + * ```c + * #include + * #include + * napi_value result; + * static napi_value MyNapi(napi_env env, napi_callback_info info) { + * int* raw = (int*) malloc(1024); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * if (status != napi_ok) { + * napi_throw_error(env, NULL, "napi_create_external failed"); + * return NULL; + * } + * return result; + * } + * ... + * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) + * ... + * ``` + * + * ```js + * import native from 'napi_addon.node'; + * import { types } from 'node:util'; + * + * const data = native.myNapi(); + * types.isExternal(data); // returns true + * types.isExternal(0); // returns false + * types.isExternal(new String('foo')); // returns false + * ``` + * + * For further information on `napi_create_external`, refer to + * [`napi_create_external()`](https://nodejs.org/docs/latest-v26.x/api/n-api.html#napi_create_external). + * @since v10.0.0 + */ + function isExternal(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance. + * + * ```js + * util.types.isFloat16Array(new ArrayBuffer()); // Returns false + * util.types.isFloat16Array(new Float16Array()); // Returns true + * util.types.isFloat16Array(new Float32Array()); // Returns false + * ``` + * @since v24.0.0 + */ + function isFloat16Array(object: unknown): object is Float16Array; + /** + * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. + * + * ```js + * util.types.isFloat32Array(new ArrayBuffer()); // Returns false + * util.types.isFloat32Array(new Float32Array()); // Returns true + * util.types.isFloat32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isFloat32Array(object: unknown): object is Float32Array; + /** + * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. + * + * ```js + * util.types.isFloat64Array(new ArrayBuffer()); // Returns false + * util.types.isFloat64Array(new Uint8Array()); // Returns false + * util.types.isFloat64Array(new Float64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isFloat64Array(object: unknown): object is Float64Array; + /** + * Returns `true` if the value is a generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isGeneratorFunction(function foo() {}); // Returns false + * util.types.isGeneratorFunction(function* foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorFunction(object: unknown): object is GeneratorFunction; + /** + * Returns `true` if the value is a generator object as returned from a + * built-in generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * function* foo() {} + * const generator = foo(); + * util.types.isGeneratorObject(generator); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorObject(object: unknown): object is Generator; + /** + * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. + * + * ```js + * util.types.isInt8Array(new ArrayBuffer()); // Returns false + * util.types.isInt8Array(new Int8Array()); // Returns true + * util.types.isInt8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt8Array(object: unknown): object is Int8Array; + /** + * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. + * + * ```js + * util.types.isInt16Array(new ArrayBuffer()); // Returns false + * util.types.isInt16Array(new Int16Array()); // Returns true + * util.types.isInt16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt16Array(object: unknown): object is Int16Array; + /** + * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. + * + * ```js + * util.types.isInt32Array(new ArrayBuffer()); // Returns false + * util.types.isInt32Array(new Int32Array()); // Returns true + * util.types.isInt32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt32Array(object: unknown): object is Int32Array; + /** + * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * util.types.isMap(new Map()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMap( + object: T | {}, + ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) + : Map; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * const map = new Map(); + * util.types.isMapIterator(map.keys()); // Returns true + * util.types.isMapIterator(map.values()); // Returns true + * util.types.isMapIterator(map.entries()); // Returns true + * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMapIterator(object: unknown): boolean; + /** + * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). + * + * ```js + * import * as ns from './a.js'; + * + * util.types.isModuleNamespaceObject(ns); // Returns true + * ``` + * @since v10.0.0 + */ + function isModuleNamespaceObject(value: unknown): boolean; + /** + * Returns `true` if the value was returned by the constructor of a + * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). + * + * ```js + * console.log(util.types.isNativeError(new Error())); // true + * console.log(util.types.isNativeError(new TypeError())); // true + * console.log(util.types.isNativeError(new RangeError())); // true + * ``` + * + * Subclasses of the native error types are also native errors: + * + * ```js + * class MyError extends Error {} + * console.log(util.types.isNativeError(new MyError())); // true + * ``` + * + * A value being `instanceof` a native error class is not equivalent to `isNativeError()` + * returning `true` for that value. `isNativeError()` returns `true` for errors + * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` + * for these errors: + * + * ```js + * import { createContext, runInContext } from 'node:vm'; + * import { types } from 'node:util'; + * + * const context = createContext({}); + * const myError = runInContext('new Error()', context); + * console.log(types.isNativeError(myError)); // true + * console.log(myError instanceof Error); // false + * ``` + * + * Conversely, `isNativeError()` returns `false` for all objects which were not + * returned by the constructor of a native error. That includes values + * which are `instanceof` native errors: + * + * ```js + * const myError = { __proto__: Error.prototype }; + * console.log(util.types.isNativeError(myError)); // false + * console.log(myError instanceof Error); // true + * ``` + * @since v10.0.0 + * @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead. + */ + function isNativeError(object: unknown): object is Error; + /** + * Returns `true` if the value is a number object, e.g. created + * by `new Number()`. + * + * ```js + * util.types.isNumberObject(0); // Returns false + * util.types.isNumberObject(new Number(0)); // Returns true + * ``` + * @since v10.0.0 + */ + function isNumberObject(object: unknown): object is Number; + /** + * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * ```js + * util.types.isPromise(Promise.resolve(42)); // Returns true + * ``` + * @since v10.0.0 + */ + function isPromise(object: unknown): object is Promise; + /** + * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. + * + * ```js + * const target = {}; + * const proxy = new Proxy(target, {}); + * util.types.isProxy(target); // Returns false + * util.types.isProxy(proxy); // Returns true + * ``` + * @since v10.0.0 + */ + function isProxy(object: unknown): boolean; + /** + * Returns `true` if the value is a regular expression object. + * + * ```js + * util.types.isRegExp(/abc/); // Returns true + * util.types.isRegExp(new RegExp('abc')); // Returns true + * ``` + * @since v10.0.0 + */ + function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * util.types.isSet(new Set()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSet( + object: T | {}, + ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * const set = new Set(); + * util.types.isSetIterator(set.keys()); // Returns true + * util.types.isSetIterator(set.values()); // Returns true + * util.types.isSetIterator(set.entries()); // Returns true + * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSetIterator(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false + * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; + /** + * Returns `true` if the value is a string object, e.g. created + * by `new String()`. + * + * ```js + * util.types.isStringObject('foo'); // Returns false + * util.types.isStringObject(new String('foo')); // Returns true + * ``` + * @since v10.0.0 + */ + function isStringObject(object: unknown): object is String; + /** + * Returns `true` if the value is a symbol object, created + * by calling `Object()` on a `Symbol` primitive. + * + * ```js + * const symbol = Symbol('foo'); + * util.types.isSymbolObject(symbol); // Returns false + * util.types.isSymbolObject(Object(symbol)); // Returns true + * ``` + * @since v10.0.0 + */ + function isSymbolObject(object: unknown): object is Symbol; + /** + * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. + * + * ```js + * util.types.isTypedArray(new ArrayBuffer()); // Returns false + * util.types.isTypedArray(new Uint8Array()); // Returns true + * util.types.isTypedArray(new Float64Array()); // Returns true + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isTypedArray(object: unknown): object is NodeJS.TypedArray; + /** + * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. + * + * ```js + * util.types.isUint8Array(new ArrayBuffer()); // Returns false + * util.types.isUint8Array(new Uint8Array()); // Returns true + * util.types.isUint8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8Array(object: unknown): object is Uint8Array; + /** + * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. + * + * ```js + * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false + * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true + * util.types.isUint8ClampedArray(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; + /** + * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. + * + * ```js + * util.types.isUint16Array(new ArrayBuffer()); // Returns false + * util.types.isUint16Array(new Uint16Array()); // Returns true + * util.types.isUint16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint16Array(object: unknown): object is Uint16Array; + /** + * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. + * + * ```js + * util.types.isUint32Array(new ArrayBuffer()); // Returns false + * util.types.isUint32Array(new Uint32Array()); // Returns true + * util.types.isUint32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint32Array(object: unknown): object is Uint32Array; + /** + * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. + * + * ```js + * util.types.isWeakMap(new WeakMap()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakMap(object: unknown): object is WeakMap; + /** + * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. + * + * ```js + * util.types.isWeakSet(new WeakSet()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakSet(object: unknown): object is WeakSet; + /** + * Returns `true` if `value` is a `KeyObject`, `false` otherwise. + * @since v16.2.0 + */ + function isKeyObject(object: unknown): object is KeyObject; + /** + * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. + * @since v16.2.0 + */ + function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; +} +declare module "util/types" { + export * from "node:util/types"; +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 000000000..ed5c7b18e --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,1059 @@ +declare module "node:v8" { + import { NonSharedBuffer } from "node:buffer"; + import { Readable } from "node:stream"; + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + total_global_handles_size: number; + used_global_handles_size: number; + external_memory: number; + total_allocated_bytes: number; + } + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + interface HeapSnapshotOptions { + /** + * If true, expose internals in the heap snapshot. + * @default false + */ + exposeInternals?: boolean | undefined; + /** + * If true, expose numeric values in artificial fields. + * @default false + */ + exposeNumericValues?: boolean | undefined; + } + /** + * Returns an integer representing a version tag derived from the V8 version, + * command-line flags, and detected CPU features. This is useful for determining + * whether a `vm.Script` `cachedData` buffer is compatible with this instance + * of V8. + * + * ```js + * console.log(v8.cachedDataVersionTag()); // 3947234607 + * // The value returned by v8.cachedDataVersionTag() is derived from the V8 + * // version, command-line flags, and detected CPU features. Test that the value + * // does indeed update when flags are toggled. + * v8.setFlagsFromString('--allow_natives_syntax'); + * console.log(v8.cachedDataVersionTag()); // 183726201 + * ``` + * @since v8.0.0 + */ + function cachedDataVersionTag(): number; + /** + * Returns an object with the following properties: + * + * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap + * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger + * because it continuously touches all heap pages and that makes them less likely + * to get swapped out by the operating system. + * + * `number_of_native_contexts` The value of native\_context is the number of the + * top-level contexts currently active. Increase of this number over time indicates + * a memory leak. + * + * `number_of_detached_contexts` The value of detached\_context is the number + * of contexts that were detached and not yet garbage collected. This number + * being non-zero indicates a potential memory leak. + * + * `total_global_handles_size` The value of total\_global\_handles\_size is the + * total memory size of V8 global handles. + * + * `used_global_handles_size` The value of used\_global\_handles\_size is the + * used memory size of V8 global handles. + * + * `external_memory` The value of external\_memory is the memory size of array + * buffers and external strings. + * + * `total_allocated_bytes` The value of total allocated bytes since the Isolate + * creation. + * + * ```json + * { + * "total_heap_size": 7326976, + * "total_heap_size_executable": 4194304, + * "total_physical_size": 7326976, + * "total_available_size": 1152656, + * "used_heap_size": 3476208, + * "heap_size_limit": 1535115264, + * "malloced_memory": 16384, + * "peak_malloced_memory": 1127496, + * "does_zap_garbage": 0, + * "number_of_native_contexts": 1, + * "number_of_detached_contexts": 0, + * "total_global_handles_size": 8192, + * "used_global_handles_size": 3296, + * "external_memory": 318824 + * } + * ``` + * @since v1.0.0 + */ + function getHeapStatistics(): HeapInfo; + /** + * It returns an object with a structure similar to the + * [`cppgc::HeapStatistics`](https://v8docs.nodesource.com/node-22.4/d7/d51/heap-statistics_8h_source.html) + * object. See the [V8 documentation](https://v8docs.nodesource.com/node-22.4/df/d2f/structcppgc_1_1_heap_statistics.html) + * for more information about the properties of the object. + * + * ```js + * // Detailed + * ({ + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 152, + * space_statistics: [ + * { + * name: 'NormalPageSpace0', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace1', + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 152, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace2', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace3', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'LargePageSpace', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * ], + * type_names: [], + * detail_level: 'detailed', + * }); + * ``` + * + * ```js + * // Brief + * ({ + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 128864, + * space_statistics: [], + * type_names: [], + * detail_level: 'brief', + * }); + * ``` + * @since v22.15.0 + * @param detailLevel **Default:** `'detailed'`. Specifies the level of detail in the returned statistics. + * Accepted values are: + * * `'brief'`: Brief statistics contain only the top-level + * allocated and used + * memory statistics for the entire heap. + * * `'detailed'`: Detailed statistics also contain a break + * down per space and page, as well as freelist statistics + * and object type histograms. + */ + function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object; + /** + * Returns statistics about the V8 heap spaces, i.e. the segments which make up + * the V8 heap. Neither the ordering of heap spaces, nor the availability of a + * heap space can be guaranteed as the statistics are provided via the + * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the + * next. + * + * The value returned is an array of objects containing the following properties: + * + * ```json + * [ + * { + * "space_name": "new_space", + * "space_size": 2063872, + * "space_used_size": 951112, + * "space_available_size": 80824, + * "physical_space_size": 2063872 + * }, + * { + * "space_name": "old_space", + * "space_size": 3090560, + * "space_used_size": 2493792, + * "space_available_size": 0, + * "physical_space_size": 3090560 + * }, + * { + * "space_name": "code_space", + * "space_size": 1260160, + * "space_used_size": 644256, + * "space_available_size": 960, + * "physical_space_size": 1260160 + * }, + * { + * "space_name": "map_space", + * "space_size": 1094160, + * "space_used_size": 201608, + * "space_available_size": 0, + * "physical_space_size": 1094160 + * }, + * { + * "space_name": "large_object_space", + * "space_size": 0, + * "space_used_size": 0, + * "space_available_size": 1490980608, + * "physical_space_size": 0 + * } + * ] + * ``` + * @since v6.0.0 + */ + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + /** + * The `v8.setFlagsFromString()` method can be used to programmatically set + * V8 command-line flags. This method should be used with care. Changing settings + * after the VM has started may result in unpredictable behavior, including + * crashes and data loss; or it may simply do nothing. + * + * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. + * + * Usage: + * + * ```js + * // Print GC events to stdout for one minute. + * import v8 from 'node:v8'; + * v8.setFlagsFromString('--trace_gc'); + * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); + * ``` + * @since v1.0.0 + */ + function setFlagsFromString(flags: string): void; + /** + * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) + * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain + * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should + * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the + * application. + * + * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects + * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided + * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the + * target objects during the search. + * + * Only objects created in the current execution context are included in the results. + * + * ```js + * import { queryObjects } from 'node:v8'; + * class A { foo = 'bar'; } + * console.log(queryObjects(A)); // 0 + * const a = new A(); + * console.log(queryObjects(A)); // 1 + * // [ "A { foo: 'bar' }" ] + * console.log(queryObjects(A, { format: 'summary' })); + * + * class B extends A { bar = 'qux'; } + * const b = new B(); + * console.log(queryObjects(B)); // 1 + * // [ "B { foo: 'bar', bar: 'qux' }" ] + * console.log(queryObjects(B, { format: 'summary' })); + * + * // Note that, when there are child classes inheriting from a constructor, + * // the constructor also shows up in the prototype chain of the child + * // classes's prototoype, so the child classes's prototoype would also be + * // included in the result. + * console.log(queryObjects(A)); // 3 + * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] + * console.log(queryObjects(A, { format: 'summary' })); + * ``` + * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. + * @since v20.13.0 + */ + function queryObjects(ctor: Function): number | string[]; + function queryObjects(ctor: Function, options: { format: "count" }): number; + function queryObjects(ctor: Function, options: { format: "summary" }): string[]; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine. Therefore, the schema may change from one version of V8 to the next. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * // Print heap snapshot to the console + * import v8 from 'node:v8'; + * const stream = v8.getHeapSnapshot(); + * stream.pipe(process.stdout); + * ``` + * @since v11.13.0 + * @return A Readable containing the V8 heap snapshot. + */ + function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; + /** + * Generates a snapshot of the current V8 heap and writes it to a JSON + * file. This file is intended to be used with tools such as Chrome + * DevTools. The JSON schema is undocumented and specific to the V8 + * engine, and may change from one version of V8 to the next. + * + * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will + * not contain any information about the workers, and vice versa. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * import { writeHeapSnapshot } from 'node:v8'; + * import { + * Worker, + * isMainThread, + * parentPort, + * } from 'node:worker_threads'; + * + * if (isMainThread) { + * const worker = new Worker(__filename); + * + * worker.once('message', (filename) => { + * console.log(`worker heapdump: ${filename}`); + * // Now get a heapdump for the main thread. + * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); + * }); + * + * // Tell the worker to create a heapdump. + * worker.postMessage('heapdump'); + * } else { + * parentPort.once('message', (message) => { + * if (message === 'heapdump') { + * // Generate a heapdump for the worker + * // and return the filename to the parent. + * parentPort.postMessage(writeHeapSnapshot()); + * } + * }); + * } + * ``` + * @since v11.13.0 + * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a + * worker thread. + * @return The filename where the snapshot was saved. + */ + function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; + /** + * Get statistics about code and its metadata in the heap, see + * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the + * following properties: + * + * ```json + * { + * "code_and_metadata_size": 212208, + * "bytecode_and_metadata_size": 161368, + * "external_script_source_size": 1410794, + * "cpu_profiler_metadata_size": 0 + * } + * ``` + * @since v12.8.0 + */ + function getHeapCodeStatistics(): HeapCodeStatistics; + /** + * @since v25.0.0 + */ + interface SyncCPUProfileHandle { + /** + * Stopping collecting the profile and return the profile data. + * @since v25.0.0 + */ + stop(): string; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v25.0.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v26.1.0 + */ + interface SyncHeapProfileHandle { + /** + * Stopping collecting the profile and return the profile data. + * @since v26.1.0 + */ + stop(): string; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v26.1.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v24.8.0 + */ + interface CPUProfileHandle { + /** + * Stopping collecting the profile, then return a Promise that fulfills with an error or the + * profile data. + * @since v24.8.0 + */ + stop(): Promise; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v24.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + /** + * @since v24.9.0 + */ + interface HeapProfileHandle { + /** + * Stopping collecting the profile, then return a Promise that fulfills with an error or the + * profile data. + * @since v24.9.0 + */ + stop(): Promise; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v24.9.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface CPUProfileOptions { + /** + * Requested sampling interval in milliseconds. **Default:** `0`. + */ + sampleInterval?: number | undefined; + /** + * Maximum number of samples to keep before older + * entries are discarded. **Default:** `4294967295`. + */ + maxBufferSize?: number | undefined; + } + /** + * Starting a CPU profile then return a `SyncCPUProfileHandle` object. + * This API supports `using` syntax. + * + * ```js + * const handle = v8.startCpuProfile({ sampleInterval: 1, maxBufferSize: 10_000 }); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * @since v25.0.0 + */ + function startCpuProfile(options?: CPUProfileOptions): SyncCPUProfileHandle; + interface HeapProfileOptions { + /** + * The average sampling interval in bytes. + * **Default:** `524288` (512 KiB). + */ + sampleInterval?: number | undefined; + /** + * The maximum stack depth for samples. + * **Default:** `16`. + */ + stackDepth?: number | undefined; + /** + * Force garbage collection before taking the profile. + * **Default:** `false`. + */ + forceGC?: boolean | undefined; + /** + * Include objects collected + * by major GC. **Default:** `false`. + */ + includeObjectsCollectedByMajorGC?: boolean | undefined; + /** + * Include objects collected + * by minor GC. **Default:** `false`. + */ + includeObjectsCollectedByMinorGC?: boolean | undefined; + } + /** + * Starting a heap profile then return a `SyncHeapProfileHandle` object. + * This API supports `using` syntax. + * + * ```js + * import v8 from 'node:v8'; + * + * const handle = v8.startHeapProfile(); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * + * With custom parameters: + * + * ```js + * import v8 from 'node:v8'; + * + * const handle = v8.startHeapProfile({ + * sampleInterval: 1024, + * stackDepth: 8, + * forceGC: true, + * includeObjectsCollectedByMajorGC: true, + * }); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * @since v26.1.0 + */ + function startHeapProfile(options?: HeapProfileOptions): SyncHeapProfileHandle; + /** + * V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string. + * If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true; + * otherwise, it returns false. + * + * If this method returns false, that does not mean that the string contains some characters not in `Latin-1/ISO-8859-1`. + * Sometimes a `Latin-1` string may also be represented as `UTF16`. + * + * ```js + * const { isStringOneByteRepresentation } = require('node:v8'); + * + * const Encoding = { + * latin1: 1, + * utf16le: 2, + * }; + * const buffer = Buffer.alloc(100); + * function writeString(input) { + * if (isStringOneByteRepresentation(input)) { + * buffer.writeUint8(Encoding.latin1); + * buffer.writeUint32LE(input.length, 1); + * buffer.write(input, 5, 'latin1'); + * } else { + * buffer.writeUint8(Encoding.utf16le); + * buffer.writeUint32LE(input.length * 2, 1); + * buffer.write(input, 5, 'utf16le'); + * } + * } + * writeString('hello'); + * writeString('你好'); + * ``` + * @since v23.10.0, v22.15.0 + */ + function isStringOneByteRepresentation(content: string): boolean; + /** + * @since v8.0.0 + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + /** + * Serializes a JavaScript value and adds the serialized representation to the + * internal buffer. + * + * This throws an error if `value` cannot be serialized. + */ + writeValue(val: any): boolean; + /** + * Returns the stored internal buffer. This serializer should not be used once + * the buffer is released. Calling this method results in undefined behavior + * if a previous write has failed. + */ + releaseBuffer(): NonSharedBuffer; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Write a raw 32-bit unsigned integer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint32(value: number): void; + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint64(hi: number, lo: number): void; + /** + * Write a JS `number` value. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeDouble(value: number): void; + /** + * Write raw bytes into the serializer's internal buffer. The deserializer + * will require a way to compute the length of the buffer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeRawBytes(buffer: NodeJS.ArrayBufferView): void; + } + /** + * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only + * stores the part of their underlying `ArrayBuffer`s that they are referring to. + * @since v8.0.0 + */ + class DefaultSerializer extends Serializer {} + /** + * @since v8.0.0 + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. In that case, + * an `Error` is thrown. + */ + readHeader(): boolean; + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of + * `SharedArrayBuffer`s). + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. May not be called before `.readHeader()`. + */ + getWireFormatVersion(): number; + /** + * Read a raw 32-bit unsigned integer and return it. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint32(): number; + /** + * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint64(): [number, number]; + /** + * Read a JS `number` value. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readDouble(): number; + /** + * Read raw bytes from the deserializer's internal buffer. The `length` parameter + * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readRawBytes(length: number): Buffer; + } + /** + * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. + * @since v8.0.0 + */ + class DefaultDeserializer extends Deserializer {} + /** + * Uses a `DefaultSerializer` to serialize `value` into a buffer. + * + * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to + * serialize a huge object which requires buffer + * larger than `buffer.constants.MAX_LENGTH`. + * @since v8.0.0 + */ + function serialize(value: any): NonSharedBuffer; + /** + * Uses a `DefaultDeserializer` with default options to read a JS value + * from a buffer. + * @since v8.0.0 + * @param buffer A buffer returned by {@link serialize}. + */ + function deserialize(buffer: NodeJS.ArrayBufferView): any; + /** + * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple + * times during the lifetime of the process. Each time the execution counter will + * be reset and a new coverage report will be written to the directory specified + * by `NODE_V8_COVERAGE`. + * + * When the process is about to exit, one last coverage will still be written to + * disk unless {@link stopCoverage} is invoked before the process exits. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function takeCoverage(): void; + /** + * The `v8.stopCoverage()` method allows the user to stop the coverage collection + * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count + * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function stopCoverage(): void; + /** + * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. + * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. + * @since v18.10.0, v16.18.0 + */ + function setHeapSnapshotNearHeapLimit(limit: number): void; + /** + * This API collects GC data in current thread. + * @since v19.6.0, v18.15.0 + */ + class GCProfiler { + /** + * Start collecting GC data. + * @since v19.6.0, v18.15.0 + */ + start(): void; + /** + * Stop collecting GC data and return an object. The content of object + * is as follows. + * + * ```json + * { + * "version": 1, + * "startTime": 1674059033862, + * "statistics": [ + * { + * "gcType": "Scavenge", + * "beforeGC": { + * "heapStatistics": { + * "totalHeapSize": 5005312, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5226496, + * "totalAvailableSize": 4341325216, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4883840, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * }, + * "cost": 1574.14, + * "afterGC": { + * "heapStatistics": { + * "totalHeapSize": 6053888, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5500928, + * "totalAvailableSize": 4341101384, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4059096, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * } + * } + * ], + * "endTime": 1674059036865 + * } + * ``` + * + * Here's an example. + * + * ```js + * import { GCProfiler } from 'node:v8'; + * const profiler = new GCProfiler(); + * profiler.start(); + * setTimeout(() => { + * console.log(profiler.stop()); + * }, 1000); + * ``` + * @since v19.6.0, v18.15.0 + */ + stop(): GCProfilerResult; + /** + * Stop collecting GC data, and discard the profile. + * @since v25.5.0 + */ + [Symbol.dispose](): void; + } + interface GCProfilerResult { + version: number; + startTime: number; + endTime: number; + statistics: Array<{ + gcType: string; + cost: number; + beforeGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + afterGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + }>; + } + interface HeapStatistics { + totalHeapSize: number; + totalHeapSizeExecutable: number; + totalPhysicalSize: number; + totalAvailableSize: number; + totalGlobalHandlesSize: number; + usedGlobalHandlesSize: number; + usedHeapSize: number; + heapSizeLimit: number; + mallocedMemory: number; + externalMemory: number; + peakMallocedMemory: number; + } + interface HeapSpaceStatistics { + spaceName: string; + spaceSize: number; + spaceUsedSize: number; + spaceAvailableSize: number; + physicalSpaceSize: number; + } + /** + * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will + * happen if a promise is created without ever getting a continuation. + * @since v17.1.0, v16.14.0 + * @param promise The promise being created. + * @param parent The promise continued from, if applicable. + */ + interface Init { + (promise: Promise, parent: Promise): void; + } + /** + * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. + * + * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. + * The before callback may be called many times in the case where many continuations have been made from the same promise. + * @since v17.1.0, v16.14.0 + */ + interface Before { + (promise: Promise): void; + } + /** + * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. + * @since v17.1.0, v16.14.0 + */ + interface After { + (promise: Promise): void; + } + /** + * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or + * {@link Promise.reject()}. + * @since v17.1.0, v16.14.0 + */ + interface Settled { + (promise: Promise): void; + } + /** + * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or + * around an await, and when the promise resolves or rejects. + * + * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and + * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. + * @since v17.1.0, v16.14.0 + */ + interface HookCallbacks { + init?: Init; + before?: Before; + after?: After; + settled?: Settled; + } + interface PromiseHooks { + /** + * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param init The {@link Init | `init` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onInit: (init: Init) => Function; + /** + * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param settled The {@link Settled | `settled` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onSettled: (settled: Settled) => Function; + /** + * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param before The {@link Before | `before` callback} to call before a promise continuation executes. + * @return Call to stop the hook. + */ + onBefore: (before: Before) => Function; + /** + * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param after The {@link After | `after` callback} to call after a promise continuation executes. + * @return Call to stop the hook. + */ + onAfter: (after: After) => Function; + /** + * Registers functions to be called for different lifetime events of each promise. + * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. + * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. + * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register + * @return Used for disabling hooks + */ + createHook: (callbacks: HookCallbacks) => Function; + } + /** + * The `promiseHooks` interface can be used to track promise lifecycle events. + * @since v17.1.0, v16.14.0 + */ + const promiseHooks: PromiseHooks; + type StartupSnapshotCallbackFn = (args: any) => any; + /** + * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. + * + * ```bash + * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js + * # This launches a process with the snapshot + * $ node --snapshot-blob snapshot.blob + * ``` + * + * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects + * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. + * For example, if the `entry.js` contains the following script: + * + * ```js + * import fs from 'node:fs'; + * import zlib from 'node:zlib'; + * import path from 'node:path'; + * import assert from 'node:assert'; + * + * import v8 from 'node:v8'; + * + * class BookShelf { + * storage = new Map(); + * + * // Reading a series of files from directory and store them into storage. + * constructor(directory, books) { + * for (const book of books) { + * this.storage.set(book, fs.readFileSync(path.join(directory, book))); + * } + * } + * + * static compressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gzipSync(content)); + * } + * } + * + * static decompressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gunzipSync(content)); + * } + * } + * } + * + * // __dirname here is where the snapshot script is placed + * // during snapshot building time. + * const shelf = new BookShelf(__dirname, [ + * 'book1.en_US.txt', + * 'book1.es_ES.txt', + * 'book2.zh_CN.txt', + * ]); + * + * assert(v8.startupSnapshot.isBuildingSnapshot()); + * // On snapshot serialization, compress the books to reduce size. + * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); + * // On snapshot deserialization, decompress the books. + * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); + * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { + * // process.env and process.argv are refreshed during snapshot + * // deserialization. + * const lang = process.env.BOOK_LANG || 'en_US'; + * const book = process.argv[1]; + * const name = `${book}.${lang}.txt`; + * console.log(shelf.storage.get(name)); + * }, shelf); + * ``` + * + * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: + * + * ```bash + * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 + * # Prints content of book1.es_ES.txt deserialized from the snapshot. + * ``` + * + * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. + * + * @since v18.6.0, v16.17.0 + */ + namespace startupSnapshot { + /** + * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. + * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. + * @since v18.6.0, v16.17.0 + */ + function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. + * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or + * to re-acquire resources that the application needs when the application is restarted from the snapshot. + * @since v18.6.0, v16.17.0 + */ + function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. + * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized + * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. + * @since v18.6.0, v16.17.0 + */ + function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Returns true if the Node.js instance is run to build a snapshot. + * @since v18.6.0, v16.17.0 + */ + function isBuildingSnapshot(): boolean; + } +} +declare module "v8" { + export * from "node:v8"; +} diff --git a/node_modules/@types/node/vfs.d.ts b/node_modules/@types/node/vfs.d.ts new file mode 100644 index 000000000..1bcae3300 --- /dev/null +++ b/node_modules/@types/node/vfs.d.ts @@ -0,0 +1,211 @@ +declare module "node:vfs" { + /** + * Convenience factory equivalent to `new VirtualFileSystem(provider, options)`. + * + * ```js + * const vfs = require('node:vfs'); + * + * // Default in-memory provider + * const memoryVfs = vfs.create(); + * + * // Explicit provider + * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/sandbox')); + * ``` + * @since v26.4.0 + * @param provider The provider to use. **Default:** `new MemoryProvider()`. + */ + function create(provider?: VirtualProvider, options?: VirtualFileSystemOptions): VirtualFileSystem; + function create(options: VirtualFileSystemOptions): VirtualFileSystem; + interface VirtualFileSystemOptions { + /** + * Whether to emit the experimental warning. **Default:** `true`. + */ + emitExperimentalWarning?: boolean | undefined; + } + /** + * A `VirtualFileSystem` wraps a {@link VirtualProvider} and exposes a + * `node:fs`-like API. Each instance maintains its own file tree. + * @since v26.4.0 + */ + class VirtualFileSystem { + /** + * @param provider The provider to use. **Default:** `new MemoryProvider()`. + */ + constructor(provider?: VirtualProvider, options?: VirtualFileSystemOptions); + constructor(options: VirtualFileSystemOptions); + /** + * The provider backing this VFS instance. + * @since v26.4.0 + */ + readonly provider: VirtualProvider; + /** + * `true` when the underlying provider is read-only. + * @since v26.4.0 + */ + readonly readonly: boolean; + } + interface VirtualFileSystem extends + // Synchronous API + Pick< + typeof import("node:fs"), + | "existsSync" + | "statSync" + | "lstatSync" + | "readFileSync" + | "writeFileSync" + | "appendFileSync" + | "readdirSync" + | "mkdirSync" + | "rmdirSync" + | "unlinkSync" + | "renameSync" + | "copyFileSync" + | "realpathSync" + | "readlinkSync" + | "symlinkSync" + | "accessSync" + | "rmSync" + | "truncateSync" + | "ftruncateSync" + | "linkSync" + | "chmodSync" + | "chownSync" + | "utimesSync" + | "lutimesSync" + | "mkdtempSync" + | "opendirSync" + | "openAsBlob" + | "openSync" + | "closeSync" + | "readSync" + | "writeSync" + | "fstatSync" + | "createReadStream" + | "createWriteStream" + | "watch" + | "watchFile" + | "unwatchFile" + >, + // Callback API + Pick< + typeof import("node:fs"), + | "readFile" + | "writeFile" + | "stat" + | "lstat" + | "readdir" + | "realpath" + | "readlink" + | "access" + | "open" + | "close" + | "read" + | "write" + | "rm" + | "fstat" + | "truncate" + | "ftruncate" + | "link" + | "mkdtemp" + | "opendir" + > + { + // Promise API + readonly promises: Pick< + typeof import("node:fs/promises"), + | "readFile" + | "writeFile" + | "appendFile" + | "stat" + | "lstat" + | "readdir" + | "mkdir" + | "rmdir" + | "unlink" + | "rename" + | "copyFile" + | "realpath" + | "readlink" + | "symlink" + | "access" + | "rm" + | "truncate" + | "link" + | "mkdtemp" + | "chmod" + | "chown" + | "lchown" + | "utimes" + | "lutimes" + | "open" + | "lchmod" + | "watch" + >; + } + /** + * The base class for all VFS providers. Subclasses implement the essential + * primitives (such as `open`, `stat`, `readdir`, `mkdir`, `rmdir`, `unlink`, + * `rename`, etc.) and inherit default implementations of the derived + * methods (such as `readFile`, `writeFile`, `exists`, `copyFile`, `access`, etc.). + * @since v26.4.0 + */ + abstract class VirtualProvider { + get readonly(): boolean; + get supportsSymlinks(): boolean; + get supportsWatch(): boolean; + } + /** + * The default in-memory provider. Stores files, directories, and symbolic + * links in a `Map`-backed tree, supports symlinks (`supportsSymlinks === + * true`), and supports watching (`supportsWatch === true`). + * @since v26.4.0 + */ + class MemoryProvider extends VirtualProvider { + /** + * Locks the provider into read-only mode. Subsequent writes through any + * `VirtualFileSystem` using this provider throw `EROFS`. There is no + * way to revert the provider to writable. + * + * ```js + * const vfs = require('node:vfs'); + * + * const provider = new vfs.MemoryProvider(); + * const myVfs = vfs.create(provider); + * myVfs.writeFileSync('/seed.txt', 'initial'); + * + * provider.setReadOnly(); + * + * myVfs.writeFileSync('/x.txt', 'fail'); // throws EROFS + * ``` + * @since v26.4.0 + */ + setReadOnly(): void; + } + /** + * A provider that wraps a directory (i.e. one on the actual file system) and + * exposes its contents through the VFS API. All VFS paths are resolved relative to + * the root and verified to stay inside it; symbolic links resolving outside the + * root are rejected. This path mapping is not a sandbox or access-control + * mechanism. + * @since v26.4.0 + */ + class RealFSProvider extends VirtualProvider { + /** + * ```js + * const vfs = require('node:vfs'); + * + * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/vfs-root')); + * realVfs.writeFileSync('/file.txt', 'hello'); // writes /tmp/vfs-root/file.txt + * ``` + * @since v26.4.0 + * @param rootPath The absolute file-system path to use as the root. + * Must be a non-empty string. + */ + constructor(rootPath: string); + /** + * The resolved absolute path used as the root. + * @since v26.4.0 + */ + readonly rootPath: string; + } +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 000000000..526c31160 --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,1137 @@ +declare module "node:vm" { + import { NonSharedBuffer } from "node:buffer"; + import { ImportAttributes, ImportPhase } from "node:module"; + interface Context extends NodeJS.Dict {} + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * @default '' + */ + filename?: string | undefined; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + lineOffset?: number | undefined; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + columnOffset?: number | undefined; + } + type DynamicModuleLoader = ( + specifier: string, + referrer: T, + importAttributes: ImportAttributes, + phase: ImportPhase, + ) => Module | Promise; + interface ScriptOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: NodeJS.ArrayBufferView | undefined; + /** @deprecated in favor of `script.createCachedData()` */ + produceCachedData?: boolean | undefined; + /** + * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is + * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see + * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). + * @experimental + */ + importModuleDynamically?: + | DynamicModuleLoader + +``` + +## API + +### parser(args, opts={}) + +Parses command line arguments returning a simple mapping of keys and values. + +**expects:** + +* `args`: a string or array of strings representing the options to parse. +* `opts`: provide a set of hints indicating how `args` should be parsed: + * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
+ Indicate that keys should be parsed as an array and coerced to booleans / numbers:
+ `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. + * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. + * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided + (or throws an error). For arrays the function is called only once for the entire array:
+ `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
+ `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). + * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. + * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. + * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. + * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. + * `opts.normalize`: `path.normalize()` will be applied to values set to this key. + * `opts.number`: keys should be treated as numbers. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). + +**returns:** + +* `obj`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. + +### require('yargs-parser').detailed(args, opts={}) + +Parses a command line string, returning detailed information required by the +yargs engine. + +**expects:** + +* `args`: a string or array of strings representing options to parse. +* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. + +**returns:** + +* `argv`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. +* `error`: populated with an error object if an exception occurred during parsing. +* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. +* `newAliases`: any new aliases added via camel-case expansion: + * `boolean`: `{ fooBar: true }` +* `defaulted`: any new argument created by `opts.default`, no aliases included. + * `boolean`: `{ foo: true }` +* `configuration`: given by default settings and `opts.configuration`. + + + +### Configuration + +The yargs-parser applies several automated transformations on the keys provided +in `args`. These features can be turned on and off using the `configuration` field +of `opts`. + +```js +var parsed = parser(['--no-dice'], { + configuration: { + 'boolean-negation': false + } +}) +``` + +### short option groups + +* default: `true`. +* key: `short-option-groups`. + +Should a group of short-options be treated as boolean flags? + +```console +$ node example.js -abc +{ _: [], a: true, b: true, c: true } +``` + +_if disabled:_ + +```console +$ node example.js -abc +{ _: [], abc: true } +``` + +### camel-case expansion + +* default: `true`. +* key: `camel-case-expansion`. + +Should hyphenated arguments be expanded into camel-case aliases? + +```console +$ node example.js --foo-bar +{ _: [], 'foo-bar': true, fooBar: true } +``` + +_if disabled:_ + +```console +$ node example.js --foo-bar +{ _: [], 'foo-bar': true } +``` + +### dot-notation + +* default: `true` +* key: `dot-notation` + +Should keys that contain `.` be treated as objects? + +```console +$ node example.js --foo.bar +{ _: [], foo: { bar: true } } +``` + +_if disabled:_ + +```console +$ node example.js --foo.bar +{ _: [], "foo.bar": true } +``` + +### parse numbers + +* default: `true` +* key: `parse-numbers` + +Should keys that look like numbers be treated as such? + +```console +$ node example.js --foo=99.3 +{ _: [], foo: 99.3 } +``` + +_if disabled:_ + +```console +$ node example.js --foo=99.3 +{ _: [], foo: "99.3" } +``` + +### parse positional numbers + +* default: `true` +* key: `parse-positional-numbers` + +Should positional keys that look like numbers be treated as such. + +```console +$ node example.js 99.3 +{ _: [99.3] } +``` + +_if disabled:_ + +```console +$ node example.js 99.3 +{ _: ['99.3'] } +``` + +### boolean negation + +* default: `true` +* key: `boolean-negation` + +Should variables prefixed with `--no` be treated as negations? + +```console +$ node example.js --no-foo +{ _: [], foo: false } +``` + +_if disabled:_ + +```console +$ node example.js --no-foo +{ _: [], "no-foo": true } +``` + +### combine arrays + +* default: `false` +* key: `combine-arrays` + +Should arrays be combined when provided by both command line arguments and +a configuration file. + +### duplicate arguments array + +* default: `true` +* key: `duplicate-arguments-array` + +Should arguments be coerced into an array when duplicated: + +```console +$ node example.js -x 1 -x 2 +{ _: [], x: [1, 2] } +``` + +_if disabled:_ + +```console +$ node example.js -x 1 -x 2 +{ _: [], x: 2 } +``` + +### flatten duplicate arrays + +* default: `true` +* key: `flatten-duplicate-arrays` + +Should array arguments be coerced into a single array when duplicated: + +```console +$ node example.js -x 1 2 -x 3 4 +{ _: [], x: [1, 2, 3, 4] } +``` + +_if disabled:_ + +```console +$ node example.js -x 1 2 -x 3 4 +{ _: [], x: [[1, 2], [3, 4]] } +``` + +### greedy arrays + +* default: `true` +* key: `greedy-arrays` + +Should arrays consume more than one positional argument following their flag. + +```console +$ node example --arr 1 2 +{ _: [], arr: [1, 2] } +``` + +_if disabled:_ + +```console +$ node example --arr 1 2 +{ _: [2], arr: [1] } +``` + +**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** + +### nargs eats options + +* default: `false` +* key: `nargs-eats-options` + +Should nargs consume dash options as well as positional arguments. + +### negation prefix + +* default: `no-` +* key: `negation-prefix` + +The prefix to use for negated boolean variables. + +```console +$ node example.js --no-foo +{ _: [], foo: false } +``` + +_if set to `quux`:_ + +```console +$ node example.js --quuxfoo +{ _: [], foo: false } +``` + +### populate -- + +* default: `false`. +* key: `populate--` + +Should unparsed flags be stored in `--` or `_`. + +_If disabled:_ + +```console +$ node example.js a -b -- x y +{ _: [ 'a', 'x', 'y' ], b: true } +``` + +_If enabled:_ + +```console +$ node example.js a -b -- x y +{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } +``` + +### set placeholder key + +* default: `false`. +* key: `set-placeholder-key`. + +Should a placeholder be added for keys not set via the corresponding CLI argument? + +_If disabled:_ + +```console +$ node example.js -a 1 -c 2 +{ _: [], a: 1, c: 2 } +``` + +_If enabled:_ + +```console +$ node example.js -a 1 -c 2 +{ _: [], a: 1, b: undefined, c: 2 } +``` + +### halt at non-option + +* default: `false`. +* key: `halt-at-non-option`. + +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. + +_If disabled:_ + +```console +$ node example.js -a run b -x y +{ _: [ 'b' ], a: 'run', x: 'y' } +``` + +_If enabled:_ + +```console +$ node example.js -a run b -x y +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-expansion` is disabled. + +_If disabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], testField: 1 } +``` + +### unknown options as args + +* default: `false` +* key: `unknown-options-as-args` + +Should unknown options be treated like regular arguments? An unknown option is one that is not +configured in `opts`. + +_If disabled_ + +```console +$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } +``` + +_If enabled_ + +```console +$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } +``` + +## Supported Node.js Versions + +Libraries in this ecosystem make a best effort to track +[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a +post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). + +## Special Thanks + +The yargs project evolves from optimist and minimist. It owes its +existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ + +## License + +ISC diff --git a/node_modules/concurrently/node_modules/yargs-parser/browser.js b/node_modules/concurrently/node_modules/yargs-parser/browser.js new file mode 100644 index 000000000..241202c7e --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/browser.js @@ -0,0 +1,29 @@ +// Main entrypoint for ESM web browser environments. Avoids using Node.js +// specific libraries, such as "path". +// +// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc. +import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js' +import { YargsParser } from './build/lib/yargs-parser.js' +const parser = new YargsParser({ + cwd: () => { return '' }, + format: (str, arg) => { return str.replace('%s', arg) }, + normalize: (str) => { return str }, + resolve: (str) => { return str }, + require: () => { + throw Error('loading config from files not currently supported in browser') + }, + env: () => {} +}) + +const yargsParser = function Parser (args, opts) { + const result = parser.parse(args.slice(), opts) + return result.argv +} +yargsParser.detailed = function (args, opts) { + return parser.parse(args.slice(), opts) +} +yargsParser.camelCase = camelCase +yargsParser.decamelize = decamelize +yargsParser.looksLikeNumber = looksLikeNumber + +export default yargsParser diff --git a/node_modules/concurrently/node_modules/yargs-parser/build/index.cjs b/node_modules/concurrently/node_modules/yargs-parser/build/index.cjs new file mode 100644 index 000000000..cf6f50f66 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/build/index.cjs @@ -0,0 +1,1050 @@ +'use strict'; + +var util = require('util'); +var path = require('path'); +var fs = require('fs'); + +function camelCase(str) { + const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); + if (!isCamelCase) { + str = str.toLowerCase(); + } + if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { + return str; + } + else { + let camelcase = ''; + let nextChrUpper = false; + const leadingHyphens = str.match(/^-+/); + for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { + let chr = str.charAt(i); + if (nextChrUpper) { + nextChrUpper = false; + chr = chr.toUpperCase(); + } + if (i !== 0 && (chr === '-' || chr === '_')) { + nextChrUpper = true; + } + else if (chr !== '-' && chr !== '_') { + camelcase += chr; + } + } + return camelcase; + } +} +function decamelize(str, joinString) { + const lowercase = str.toLowerCase(); + joinString = joinString || '-'; + let notCamelcase = ''; + for (let i = 0; i < str.length; i++) { + const chrLower = lowercase.charAt(i); + const chrString = str.charAt(i); + if (chrLower !== chrString && i > 0) { + notCamelcase += `${joinString}${lowercase.charAt(i)}`; + } + else { + notCamelcase += chrString; + } + } + return notCamelcase; +} +function looksLikeNumber(x) { + if (x === null || x === undefined) + return false; + if (typeof x === 'number') + return true; + if (/^0x[0-9a-f]+$/i.test(x)) + return true; + if (/^0[^.]/.test(x)) + return false; + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function tokenizeArgString(argString) { + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e); + } + argString = argString.trim(); + let i = 0; + let prevC = null; + let c = null; + let opening = null; + const args = []; + for (let ii = 0; ii < argString.length; ii++) { + prevC = c; + c = argString.charAt(ii); + if (c === ' ' && !opening) { + if (!(prevC === ' ')) { + i++; + } + continue; + } + if (c === opening) { + opening = null; + } + else if ((c === "'" || c === '"') && !opening) { + opening = c; + } + if (!args[i]) + args[i] = ''; + args[i] += c; + } + return args; +} + +var DefaultValuesForTypeKey; +(function (DefaultValuesForTypeKey) { + DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; + DefaultValuesForTypeKey["STRING"] = "string"; + DefaultValuesForTypeKey["NUMBER"] = "number"; + DefaultValuesForTypeKey["ARRAY"] = "array"; +})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); + +let mixin; +class YargsParser { + constructor(_mixin) { + mixin = _mixin; + } + parse(argsInput, options) { + const opts = Object.assign({ + alias: undefined, + array: undefined, + boolean: undefined, + config: undefined, + configObjects: undefined, + configuration: undefined, + coerce: undefined, + count: undefined, + default: undefined, + envPrefix: undefined, + narg: undefined, + normalize: undefined, + string: undefined, + number: undefined, + __: undefined, + key: undefined + }, options); + const args = tokenizeArgString(argsInput); + const inputIsString = typeof argsInput === 'string'; + const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); + const configuration = Object.assign({ + 'boolean-negation': true, + 'camel-case-expansion': true, + 'combine-arrays': false, + 'dot-notation': true, + 'duplicate-arguments-array': true, + 'flatten-duplicate-arrays': true, + 'greedy-arrays': true, + 'halt-at-non-option': false, + 'nargs-eats-options': false, + 'negation-prefix': 'no-', + 'parse-numbers': true, + 'parse-positional-numbers': true, + 'populate--': false, + 'set-placeholder-key': false, + 'short-option-groups': true, + 'strip-aliased': false, + 'strip-dashed': false, + 'unknown-options-as-args': false + }, opts.configuration); + const defaults = Object.assign(Object.create(null), opts.default); + const configObjects = opts.configObjects || []; + const envPrefix = opts.envPrefix; + const notFlagsOption = configuration['populate--']; + const notFlagsArgv = notFlagsOption ? '--' : '_'; + const newAliases = Object.create(null); + const defaulted = Object.create(null); + const __ = opts.__ || mixin.format; + const flags = { + aliases: Object.create(null), + arrays: Object.create(null), + bools: Object.create(null), + strings: Object.create(null), + numbers: Object.create(null), + counts: Object.create(null), + normalize: Object.create(null), + configs: Object.create(null), + nargs: Object.create(null), + coercions: Object.create(null), + keys: [] + }; + const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; + const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); + [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { + const key = typeof opt === 'object' ? opt.key : opt; + const assignment = Object.keys(opt).map(function (key) { + const arrayFlagKeys = { + boolean: 'bools', + string: 'strings', + number: 'numbers' + }; + return arrayFlagKeys[key]; + }).filter(Boolean).pop(); + if (assignment) { + flags[assignment][key] = true; + } + flags.arrays[key] = true; + flags.keys.push(key); + }); + [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + flags.keys.push(key); + }); + [].concat(opts.string || []).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + flags.keys.push(key); + }); + [].concat(opts.number || []).filter(Boolean).forEach(function (key) { + flags.numbers[key] = true; + flags.keys.push(key); + }); + [].concat(opts.count || []).filter(Boolean).forEach(function (key) { + flags.counts[key] = true; + flags.keys.push(key); + }); + [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true; + flags.keys.push(key); + }); + if (typeof opts.narg === 'object') { + Object.entries(opts.narg).forEach(([key, value]) => { + if (typeof value === 'number') { + flags.nargs[key] = value; + flags.keys.push(key); + } + }); + } + if (typeof opts.coerce === 'object') { + Object.entries(opts.coerce).forEach(([key, value]) => { + if (typeof value === 'function') { + flags.coercions[key] = value; + flags.keys.push(key); + } + }); + } + if (typeof opts.config !== 'undefined') { + if (Array.isArray(opts.config) || typeof opts.config === 'string') { + [].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true; + }); + } + else if (typeof opts.config === 'object') { + Object.entries(opts.config).forEach(([key, value]) => { + if (typeof value === 'boolean' || typeof value === 'function') { + flags.configs[key] = value; + } + }); + } + } + extendAliases(opts.key, aliases, opts.default, flags.arrays); + Object.keys(defaults).forEach(function (key) { + (flags.aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key]; + }); + }); + let error = null; + checkConfiguration(); + let notFlags = []; + const argv = Object.assign(Object.create(null), { _: [] }); + const argvReturn = {}; + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + const truncatedArg = arg.replace(/^-{3,}/, '---'); + let broken; + let key; + let letters; + let m; + let next; + let value; + if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { + pushPositional(arg); + } + else if (truncatedArg.match(/^---+(=|$)/)) { + pushPositional(arg); + continue; + } + else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { + m = arg.match(/^--?([^=]+)=([\s\S]*)$/); + if (m !== null && Array.isArray(m) && m.length >= 3) { + if (checkAllAliases(m[1], flags.arrays)) { + i = eatArray(i, m[1], args, m[2]); + } + else if (checkAllAliases(m[1], flags.nargs) !== false) { + i = eatNargs(i, m[1], args, m[2]); + } + else { + setArg(m[1], m[2], true); + } + } + } + else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { + m = arg.match(negatedBoolean); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); + } + } + else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { + m = arg.match(/^--?(.+)/); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + if (checkAllAliases(key, flags.arrays)) { + i = eatArray(i, key, args); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + i = eatNargs(i, key, args); + } + else { + next = args[i + 1]; + if (next !== undefined && (!next.match(/^-/) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + } + else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/); + if (m !== null && Array.isArray(m) && m.length >= 3) { + setArg(m[1], m[2]); + } + } + else if (arg.match(/^-.\..+/) && !arg.match(negative)) { + next = args[i + 1]; + m = arg.match(/^-(.\..+)/); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + if (next !== undefined && !next.match(/^-/) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { + letters = arg.slice(1, -1).split(''); + broken = false; + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3); + key = letters[j]; + if (checkAllAliases(key, flags.arrays)) { + i = eatArray(i, key, args, value); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + i = eatNargs(i, key, args, value); + } + else { + setArg(key, value); + } + broken = true; + break; + } + if (next === '-') { + setArg(letters[j], next); + continue; + } + if (/[A-Za-z]/.test(letters[j]) && + /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && + checkAllAliases(next, flags.bools) === false) { + setArg(letters[j], next); + broken = true; + break; + } + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], next); + broken = true; + break; + } + else { + setArg(letters[j], defaultValue(letters[j])); + } + } + key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (checkAllAliases(key, flags.arrays)) { + i = eatArray(i, key, args); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + i = eatNargs(i, key, args); + } + else { + next = args[i + 1]; + if (next !== undefined && (!/^(-|--)[^-]/.test(next) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + } + else if (arg.match(/^-[0-9]$/) && + arg.match(negative) && + checkAllAliases(arg.slice(1), flags.bools)) { + key = arg.slice(1); + setArg(key, defaultValue(key)); + } + else if (arg === '--') { + notFlags = args.slice(i + 1); + break; + } + else if (configuration['halt-at-non-option']) { + notFlags = args.slice(i); + break; + } + else { + pushPositional(arg); + } + } + applyEnvVars(argv, true); + applyEnvVars(argv, false); + setConfig(argv); + setConfigObjects(); + applyDefaultsAndAliases(argv, flags.aliases, defaults, true); + applyCoercions(argv); + if (configuration['set-placeholder-key']) + setPlaceholderKeys(argv); + Object.keys(flags.counts).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) + setArg(key, 0); + }); + if (notFlagsOption && notFlags.length) + argv[notFlagsArgv] = []; + notFlags.forEach(function (key) { + argv[notFlagsArgv].push(key); + }); + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key]; + }); + } + if (configuration['strip-aliased']) { + [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion'] && alias.includes('-')) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; + } + delete argv[alias]; + }); + } + function pushPositional(arg) { + const maybeCoercedNumber = maybeCoerceNumber('_', arg); + if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { + argv._.push(maybeCoercedNumber); + } + } + function eatNargs(i, key, args, argAfterEqualSign) { + let ii; + let toEat = checkAllAliases(key, flags.nargs); + toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; + if (toEat === 0) { + if (!isUndefined(argAfterEqualSign)) { + error = Error(__('Argument unexpected for: %s', key)); + } + setArg(key, defaultValue(key)); + return i; + } + let available = isUndefined(argAfterEqualSign) ? 0 : 1; + if (configuration['nargs-eats-options']) { + if (args.length - (i + 1) + available < toEat) { + error = Error(__('Not enough arguments following: %s', key)); + } + available = toEat; + } + else { + for (ii = i + 1; ii < args.length; ii++) { + if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) + available++; + else + break; + } + if (available < toEat) + error = Error(__('Not enough arguments following: %s', key)); + } + let consumed = Math.min(available, toEat); + if (!isUndefined(argAfterEqualSign) && consumed > 0) { + setArg(key, argAfterEqualSign); + consumed--; + } + for (ii = i + 1; ii < (consumed + i + 1); ii++) { + setArg(key, args[ii]); + } + return (i + consumed); + } + function eatArray(i, key, args, argAfterEqualSign) { + let argsToSet = []; + let next = argAfterEqualSign || args[i + 1]; + const nargsCount = checkAllAliases(key, flags.nargs); + if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { + argsToSet.push(true); + } + else if (isUndefined(next) || + (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { + if (defaults[key] !== undefined) { + const defVal = defaults[key]; + argsToSet = Array.isArray(defVal) ? defVal : [defVal]; + } + } + else { + if (!isUndefined(argAfterEqualSign)) { + argsToSet.push(processValue(key, argAfterEqualSign, true)); + } + for (let ii = i + 1; ii < args.length; ii++) { + if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || + (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) + break; + next = args[ii]; + if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) + break; + i = ii; + argsToSet.push(processValue(key, next, inputIsString)); + } + } + if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || + (isNaN(nargsCount) && argsToSet.length === 0))) { + error = Error(__('Not enough arguments following: %s', key)); + } + setArg(key, argsToSet); + return i; + } + function setArg(key, val, shouldStripQuotes = inputIsString) { + if (/-/.test(key) && configuration['camel-case-expansion']) { + const alias = key.split('.').map(function (prop) { + return camelCase(prop); + }).join('.'); + addNewAlias(key, alias); + } + const value = processValue(key, val, shouldStripQuotes); + const splitKey = key.split('.'); + setKey(argv, splitKey, value); + if (flags.aliases[key]) { + flags.aliases[key].forEach(function (x) { + const keyProperties = x.split('.'); + setKey(argv, keyProperties, value); + }); + } + if (splitKey.length > 1 && configuration['dot-notation']) { + (flags.aliases[splitKey[0]] || []).forEach(function (x) { + let keyProperties = x.split('.'); + const a = [].concat(splitKey); + a.shift(); + keyProperties = keyProperties.concat(a); + if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { + setKey(argv, keyProperties, value); + } + }); + } + if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { + const keys = [key].concat(flags.aliases[key] || []); + keys.forEach(function (key) { + Object.defineProperty(argvReturn, key, { + enumerable: true, + get() { + return val; + }, + set(value) { + val = typeof value === 'string' ? mixin.normalize(value) : value; + } + }); + }); + } + } + function addNewAlias(key, alias) { + if (!(flags.aliases[key] && flags.aliases[key].length)) { + flags.aliases[key] = [alias]; + newAliases[alias] = true; + } + if (!(flags.aliases[alias] && flags.aliases[alias].length)) { + addNewAlias(alias, key); + } + } + function processValue(key, val, shouldStripQuotes) { + if (shouldStripQuotes) { + val = stripQuotes(val); + } + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') + val = val === 'true'; + } + let value = Array.isArray(val) + ? val.map(function (v) { return maybeCoerceNumber(key, v); }) + : maybeCoerceNumber(key, val); + if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { + value = increment(); + } + if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { + if (Array.isArray(val)) + value = val.map((val) => { return mixin.normalize(val); }); + else + value = mixin.normalize(val); + } + return value; + } + function maybeCoerceNumber(key, value) { + if (!configuration['parse-positional-numbers'] && key === '_') + return value; + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { + const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); + if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { + value = Number(value); + } + } + return value; + } + function setConfig(argv) { + const configLookup = Object.create(null); + applyDefaultsAndAliases(configLookup, flags.aliases, defaults); + Object.keys(flags.configs).forEach(function (configKey) { + const configPath = argv[configKey] || configLookup[configKey]; + if (configPath) { + try { + let config = null; + const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); + const resolveConfig = flags.configs[configKey]; + if (typeof resolveConfig === 'function') { + try { + config = resolveConfig(resolvedConfigPath); + } + catch (e) { + config = e; + } + if (config instanceof Error) { + error = config; + return; + } + } + else { + config = mixin.require(resolvedConfigPath); + } + setConfigObject(config); + } + catch (ex) { + if (ex.name === 'PermissionDenied') + error = ex; + else if (argv[configKey]) + error = Error(__('Invalid JSON config file: %s', configPath)); + } + } + }); + } + function setConfigObject(config, prev) { + Object.keys(config).forEach(function (key) { + const value = config[key]; + const fullKey = prev ? prev + '.' + key : key; + if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { + setConfigObject(value, fullKey); + } + else { + if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { + setArg(fullKey, value); + } + } + }); + } + function setConfigObjects() { + if (typeof configObjects !== 'undefined') { + configObjects.forEach(function (configObject) { + setConfigObject(configObject); + }); + } + } + function applyEnvVars(argv, configOnly) { + if (typeof envPrefix === 'undefined') + return; + const prefix = typeof envPrefix === 'string' ? envPrefix : ''; + const env = mixin.env(); + Object.keys(env).forEach(function (envVar) { + if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { + const keys = envVar.split('__').map(function (key, i) { + if (i === 0) { + key = key.substring(prefix.length); + } + return camelCase(key); + }); + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { + setArg(keys.join('.'), env[envVar]); + } + } + }); + } + function applyCoercions(argv) { + let coerce; + const applied = new Set(); + Object.keys(argv).forEach(function (key) { + if (!applied.has(key)) { + coerce = checkAllAliases(key, flags.coercions); + if (typeof coerce === 'function') { + try { + const value = maybeCoerceNumber(key, coerce(argv[key])); + ([].concat(flags.aliases[key] || [], key)).forEach(ali => { + applied.add(ali); + argv[ali] = value; + }); + } + catch (err) { + error = err; + } + } + } + }); + } + function setPlaceholderKeys(argv) { + flags.keys.forEach((key) => { + if (~key.indexOf('.')) + return; + if (typeof argv[key] === 'undefined') + argv[key] = undefined; + }); + return argv; + } + function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]); + if (canLog) + defaulted[key] = true; + (aliases[key] || []).forEach(function (x) { + if (hasKey(obj, x.split('.'))) + return; + setKey(obj, x.split('.'), defaults[key]); + }); + } + }); + } + function hasKey(obj, keys) { + let o = obj; + if (!configuration['dot-notation']) + keys = [keys.join('.')]; + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}); + }); + const key = keys[keys.length - 1]; + if (typeof o !== 'object') + return false; + else + return key in o; + } + function setKey(obj, keys, value) { + let o = obj; + if (!configuration['dot-notation']) + keys = [keys.join('.')]; + keys.slice(0, -1).forEach(function (key) { + key = sanitizeKey(key); + if (typeof o === 'object' && o[key] === undefined) { + o[key] = {}; + } + if (typeof o[key] !== 'object' || Array.isArray(o[key])) { + if (Array.isArray(o[key])) { + o[key].push({}); + } + else { + o[key] = [o[key], {}]; + } + o = o[key][o[key].length - 1]; + } + else { + o = o[key]; + } + }); + const key = sanitizeKey(keys[keys.length - 1]); + const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); + const isValueArray = Array.isArray(value); + let duplicate = configuration['duplicate-arguments-array']; + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true; + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined; + } + } + if (value === increment()) { + o[key] = increment(o[key]); + } + else if (Array.isArray(o[key])) { + if (duplicate && isTypeArray && isValueArray) { + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); + } + else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { + o[key] = value; + } + else { + o[key] = o[key].concat([value]); + } + } + else if (o[key] === undefined && isTypeArray) { + o[key] = isValueArray ? value : [value]; + } + else if (duplicate && !(o[key] === undefined || + checkAllAliases(key, flags.counts) || + checkAllAliases(key, flags.bools))) { + o[key] = [o[key], value]; + } + else { + o[key] = value; + } + } + function extendAliases(...args) { + args.forEach(function (obj) { + Object.keys(obj || {}).forEach(function (key) { + if (flags.aliases[key]) + return; + flags.aliases[key] = [].concat(aliases[key] || []); + flags.aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x) && configuration['camel-case-expansion']) { + const c = camelCase(x); + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c); + newAliases[c] = true; + } + } + }); + flags.aliases[key].concat(key).forEach(function (x) { + if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { + const c = decamelize(x, '-'); + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c); + newAliases[c] = true; + } + } + }); + flags.aliases[key].forEach(function (x) { + flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + }); + } + function checkAllAliases(key, flag) { + const toCheck = [].concat(flags.aliases[key] || [], key); + const keys = Object.keys(flag); + const setAlias = toCheck.find(key => keys.includes(key)); + return setAlias ? flag[setAlias] : false; + } + function hasAnyFlag(key) { + const flagsKeys = Object.keys(flags); + const toCheck = [].concat(flagsKeys.map(k => flags[k])); + return toCheck.some(function (flag) { + return Array.isArray(flag) ? flag.includes(key) : flag[key]; + }); + } + function hasFlagsMatching(arg, ...patterns) { + const toCheck = [].concat(...patterns); + return toCheck.some(function (pattern) { + const match = arg.match(pattern); + return match && hasAnyFlag(match[1]); + }); + } + function hasAllShortFlags(arg) { + if (arg.match(negative) || !arg.match(/^-[^-]+/)) { + return false; + } + let hasAllFlags = true; + let next; + const letters = arg.slice(1).split(''); + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (!hasAnyFlag(letters[j])) { + hasAllFlags = false; + break; + } + if ((letters[j + 1] && letters[j + 1] === '=') || + next === '-' || + (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || + (letters[j + 1] && letters[j + 1].match(/\W/))) { + break; + } + } + return hasAllFlags; + } + function isUnknownOptionAsArg(arg) { + return configuration['unknown-options-as-args'] && isUnknownOption(arg); + } + function isUnknownOption(arg) { + arg = arg.replace(/^-{3,}/, '--'); + if (arg.match(negative)) { + return false; + } + if (hasAllShortFlags(arg)) { + return false; + } + const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; + const normalFlag = /^-+([^=]+?)$/; + const flagEndingInHyphen = /^-+([^=]+?)-$/; + const flagEndingInDigits = /^-+([^=]+?\d+)$/; + const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; + return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); + } + function defaultValue(key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key]; + } + else { + return defaultForType(guessType(key)); + } + } + function defaultForType(type) { + const def = { + [DefaultValuesForTypeKey.BOOLEAN]: true, + [DefaultValuesForTypeKey.STRING]: '', + [DefaultValuesForTypeKey.NUMBER]: undefined, + [DefaultValuesForTypeKey.ARRAY]: [] + }; + return def[type]; + } + function guessType(key) { + let type = DefaultValuesForTypeKey.BOOLEAN; + if (checkAllAliases(key, flags.strings)) + type = DefaultValuesForTypeKey.STRING; + else if (checkAllAliases(key, flags.numbers)) + type = DefaultValuesForTypeKey.NUMBER; + else if (checkAllAliases(key, flags.bools)) + type = DefaultValuesForTypeKey.BOOLEAN; + else if (checkAllAliases(key, flags.arrays)) + type = DefaultValuesForTypeKey.ARRAY; + return type; + } + function isUndefined(num) { + return num === undefined; + } + function checkConfiguration() { + Object.keys(flags.counts).find(key => { + if (checkAllAliases(key, flags.arrays)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); + return true; + } + else if (checkAllAliases(key, flags.nargs)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); + return true; + } + return false; + }); + } + return { + aliases: Object.assign({}, flags.aliases), + argv: Object.assign(argvReturn, argv), + configuration: configuration, + defaulted: Object.assign({}, defaulted), + error: error, + newAliases: Object.assign({}, newAliases) + }; + } +} +function combineAliases(aliases) { + const aliasArrays = []; + const combined = Object.create(null); + let change = true; + Object.keys(aliases).forEach(function (key) { + aliasArrays.push([].concat(aliases[key], key)); + }); + while (change) { + change = false; + for (let i = 0; i < aliasArrays.length; i++) { + for (let ii = i + 1; ii < aliasArrays.length; ii++) { + const intersect = aliasArrays[i].filter(function (v) { + return aliasArrays[ii].indexOf(v) !== -1; + }); + if (intersect.length) { + aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); + aliasArrays.splice(ii, 1); + change = true; + break; + } + } + } + } + aliasArrays.forEach(function (aliasArray) { + aliasArray = aliasArray.filter(function (v, i, self) { + return self.indexOf(v) === i; + }); + const lastAlias = aliasArray.pop(); + if (lastAlias !== undefined && typeof lastAlias === 'string') { + combined[lastAlias] = aliasArray; + } + }); + return combined; +} +function increment(orig) { + return orig !== undefined ? orig + 1 : 1; +} +function sanitizeKey(key) { + if (key === '__proto__') + return '___proto___'; + return key; +} +function stripQuotes(val) { + return (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0]) + ? val.substring(1, val.length - 1) + : val; +} + +var _a, _b, _c; +const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) + ? Number(process.env.YARGS_MIN_NODE_VERSION) + : 12; +const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); +if (nodeVersion) { + const major = Number(nodeVersion.match(/^([^.]+)/)[1]); + if (major < minNodeVersion) { + throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); + } +} +const env = process ? process.env : {}; +const parser = new YargsParser({ + cwd: process.cwd, + env: () => { + return env; + }, + format: util.format, + normalize: path.normalize, + resolve: path.resolve, + require: (path) => { + if (typeof require !== 'undefined') { + return require(path); + } + else if (path.match(/\.json$/)) { + return JSON.parse(fs.readFileSync(path, 'utf8')); + } + else { + throw Error('only .json config files are supported in ESM'); + } + } +}); +const yargsParser = function Parser(args, opts) { + const result = parser.parse(args.slice(), opts); + return result.argv; +}; +yargsParser.detailed = function (args, opts) { + return parser.parse(args.slice(), opts); +}; +yargsParser.camelCase = camelCase; +yargsParser.decamelize = decamelize; +yargsParser.looksLikeNumber = looksLikeNumber; + +module.exports = yargsParser; diff --git a/node_modules/concurrently/node_modules/yargs-parser/build/lib/index.js b/node_modules/concurrently/node_modules/yargs-parser/build/lib/index.js new file mode 100644 index 000000000..43ef485ab --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/build/lib/index.js @@ -0,0 +1,62 @@ +/** + * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js + * CJS and ESM environments. + * + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +var _a, _b, _c; +import { format } from 'util'; +import { normalize, resolve } from 'path'; +import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; +import { YargsParser } from './yargs-parser.js'; +import { readFileSync } from 'fs'; +// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our +// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only. +const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) + ? Number(process.env.YARGS_MIN_NODE_VERSION) + : 12; +const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); +if (nodeVersion) { + const major = Number(nodeVersion.match(/^([^.]+)/)[1]); + if (major < minNodeVersion) { + throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); + } +} +// Creates a yargs-parser instance using Node.js standard libraries: +const env = process ? process.env : {}; +const parser = new YargsParser({ + cwd: process.cwd, + env: () => { + return env; + }, + format, + normalize, + resolve, + // TODO: figure out a way to combine ESM and CJS coverage, such that + // we can exercise all the lines below: + require: (path) => { + if (typeof require !== 'undefined') { + return require(path); + } + else if (path.match(/\.json$/)) { + // Addresses: https://github.com/yargs/yargs/issues/2040 + return JSON.parse(readFileSync(path, 'utf8')); + } + else { + throw Error('only .json config files are supported in ESM'); + } + } +}); +const yargsParser = function Parser(args, opts) { + const result = parser.parse(args.slice(), opts); + return result.argv; +}; +yargsParser.detailed = function (args, opts) { + return parser.parse(args.slice(), opts); +}; +yargsParser.camelCase = camelCase; +yargsParser.decamelize = decamelize; +yargsParser.looksLikeNumber = looksLikeNumber; +export default yargsParser; diff --git a/node_modules/concurrently/node_modules/yargs-parser/build/lib/string-utils.js b/node_modules/concurrently/node_modules/yargs-parser/build/lib/string-utils.js new file mode 100644 index 000000000..4e8bd996e --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/build/lib/string-utils.js @@ -0,0 +1,65 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +export function camelCase(str) { + // Handle the case where an argument is provided as camel case, e.g., fooBar. + // by ensuring that the string isn't already mixed case: + const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); + if (!isCamelCase) { + str = str.toLowerCase(); + } + if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { + return str; + } + else { + let camelcase = ''; + let nextChrUpper = false; + const leadingHyphens = str.match(/^-+/); + for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { + let chr = str.charAt(i); + if (nextChrUpper) { + nextChrUpper = false; + chr = chr.toUpperCase(); + } + if (i !== 0 && (chr === '-' || chr === '_')) { + nextChrUpper = true; + } + else if (chr !== '-' && chr !== '_') { + camelcase += chr; + } + } + return camelcase; + } +} +export function decamelize(str, joinString) { + const lowercase = str.toLowerCase(); + joinString = joinString || '-'; + let notCamelcase = ''; + for (let i = 0; i < str.length; i++) { + const chrLower = lowercase.charAt(i); + const chrString = str.charAt(i); + if (chrLower !== chrString && i > 0) { + notCamelcase += `${joinString}${lowercase.charAt(i)}`; + } + else { + notCamelcase += chrString; + } + } + return notCamelcase; +} +export function looksLikeNumber(x) { + if (x === null || x === undefined) + return false; + // if loaded from config, may already be a number. + if (typeof x === 'number') + return true; + // hexadecimal. + if (/^0x[0-9a-f]+$/i.test(x)) + return true; + // don't treat 0123 as a number; as it drops the leading '0'. + if (/^0[^.]/.test(x)) + return false; + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} diff --git a/node_modules/concurrently/node_modules/yargs-parser/build/lib/tokenize-arg-string.js b/node_modules/concurrently/node_modules/yargs-parser/build/lib/tokenize-arg-string.js new file mode 100644 index 000000000..5e732efe0 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/build/lib/tokenize-arg-string.js @@ -0,0 +1,40 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +// take an un-split argv string and tokenize it. +export function tokenizeArgString(argString) { + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e); + } + argString = argString.trim(); + let i = 0; + let prevC = null; + let c = null; + let opening = null; + const args = []; + for (let ii = 0; ii < argString.length; ii++) { + prevC = c; + c = argString.charAt(ii); + // split on spaces unless we're in quotes. + if (c === ' ' && !opening) { + if (!(prevC === ' ')) { + i++; + } + continue; + } + // don't split the string if we're in matching + // opening or closing single and double quotes. + if (c === opening) { + opening = null; + } + else if ((c === "'" || c === '"') && !opening) { + opening = c; + } + if (!args[i]) + args[i] = ''; + args[i] += c; + } + return args; +} diff --git a/node_modules/concurrently/node_modules/yargs-parser/build/lib/yargs-parser-types.js b/node_modules/concurrently/node_modules/yargs-parser/build/lib/yargs-parser-types.js new file mode 100644 index 000000000..63b7c313a --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/build/lib/yargs-parser-types.js @@ -0,0 +1,12 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +export var DefaultValuesForTypeKey; +(function (DefaultValuesForTypeKey) { + DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; + DefaultValuesForTypeKey["STRING"] = "string"; + DefaultValuesForTypeKey["NUMBER"] = "number"; + DefaultValuesForTypeKey["ARRAY"] = "array"; +})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); diff --git a/node_modules/concurrently/node_modules/yargs-parser/build/lib/yargs-parser.js b/node_modules/concurrently/node_modules/yargs-parser/build/lib/yargs-parser.js new file mode 100644 index 000000000..415d4bc8c --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/build/lib/yargs-parser.js @@ -0,0 +1,1045 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +import { tokenizeArgString } from './tokenize-arg-string.js'; +import { DefaultValuesForTypeKey } from './yargs-parser-types.js'; +import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; +let mixin; +export class YargsParser { + constructor(_mixin) { + mixin = _mixin; + } + parse(argsInput, options) { + const opts = Object.assign({ + alias: undefined, + array: undefined, + boolean: undefined, + config: undefined, + configObjects: undefined, + configuration: undefined, + coerce: undefined, + count: undefined, + default: undefined, + envPrefix: undefined, + narg: undefined, + normalize: undefined, + string: undefined, + number: undefined, + __: undefined, + key: undefined + }, options); + // allow a string argument to be passed in rather + // than an argv array. + const args = tokenizeArgString(argsInput); + // tokenizeArgString adds extra quotes to args if argsInput is a string + // only strip those extra quotes in processValue if argsInput is a string + const inputIsString = typeof argsInput === 'string'; + // aliases might have transitive relationships, normalize this. + const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); + const configuration = Object.assign({ + 'boolean-negation': true, + 'camel-case-expansion': true, + 'combine-arrays': false, + 'dot-notation': true, + 'duplicate-arguments-array': true, + 'flatten-duplicate-arrays': true, + 'greedy-arrays': true, + 'halt-at-non-option': false, + 'nargs-eats-options': false, + 'negation-prefix': 'no-', + 'parse-numbers': true, + 'parse-positional-numbers': true, + 'populate--': false, + 'set-placeholder-key': false, + 'short-option-groups': true, + 'strip-aliased': false, + 'strip-dashed': false, + 'unknown-options-as-args': false + }, opts.configuration); + const defaults = Object.assign(Object.create(null), opts.default); + const configObjects = opts.configObjects || []; + const envPrefix = opts.envPrefix; + const notFlagsOption = configuration['populate--']; + const notFlagsArgv = notFlagsOption ? '--' : '_'; + const newAliases = Object.create(null); + const defaulted = Object.create(null); + // allow a i18n handler to be passed in, default to a fake one (util.format). + const __ = opts.__ || mixin.format; + const flags = { + aliases: Object.create(null), + arrays: Object.create(null), + bools: Object.create(null), + strings: Object.create(null), + numbers: Object.create(null), + counts: Object.create(null), + normalize: Object.create(null), + configs: Object.create(null), + nargs: Object.create(null), + coercions: Object.create(null), + keys: [] + }; + const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; + const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); + [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { + const key = typeof opt === 'object' ? opt.key : opt; + // assign to flags[bools|strings|numbers] + const assignment = Object.keys(opt).map(function (key) { + const arrayFlagKeys = { + boolean: 'bools', + string: 'strings', + number: 'numbers' + }; + return arrayFlagKeys[key]; + }).filter(Boolean).pop(); + // assign key to be coerced + if (assignment) { + flags[assignment][key] = true; + } + flags.arrays[key] = true; + flags.keys.push(key); + }); + [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + flags.keys.push(key); + }); + [].concat(opts.string || []).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + flags.keys.push(key); + }); + [].concat(opts.number || []).filter(Boolean).forEach(function (key) { + flags.numbers[key] = true; + flags.keys.push(key); + }); + [].concat(opts.count || []).filter(Boolean).forEach(function (key) { + flags.counts[key] = true; + flags.keys.push(key); + }); + [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true; + flags.keys.push(key); + }); + if (typeof opts.narg === 'object') { + Object.entries(opts.narg).forEach(([key, value]) => { + if (typeof value === 'number') { + flags.nargs[key] = value; + flags.keys.push(key); + } + }); + } + if (typeof opts.coerce === 'object') { + Object.entries(opts.coerce).forEach(([key, value]) => { + if (typeof value === 'function') { + flags.coercions[key] = value; + flags.keys.push(key); + } + }); + } + if (typeof opts.config !== 'undefined') { + if (Array.isArray(opts.config) || typeof opts.config === 'string') { + ; + [].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true; + }); + } + else if (typeof opts.config === 'object') { + Object.entries(opts.config).forEach(([key, value]) => { + if (typeof value === 'boolean' || typeof value === 'function') { + flags.configs[key] = value; + } + }); + } + } + // create a lookup table that takes into account all + // combinations of aliases: {f: ['foo'], foo: ['f']} + extendAliases(opts.key, aliases, opts.default, flags.arrays); + // apply default values to all aliases. + Object.keys(defaults).forEach(function (key) { + (flags.aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key]; + }); + }); + let error = null; + checkConfiguration(); + let notFlags = []; + const argv = Object.assign(Object.create(null), { _: [] }); + // TODO(bcoe): for the first pass at removing object prototype we didn't + // remove all prototypes from objects returned by this API, we might want + // to gradually move towards doing so. + const argvReturn = {}; + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + const truncatedArg = arg.replace(/^-{3,}/, '---'); + let broken; + let key; + let letters; + let m; + let next; + let value; + // any unknown option (except for end-of-options, "--") + if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { + pushPositional(arg); + // ---, ---=, ----, etc, + } + else if (truncatedArg.match(/^---+(=|$)/)) { + // options without key name are invalid. + pushPositional(arg); + continue; + // -- separated by = + } + else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--?([^=]+)=([\s\S]*)$/); + // arrays format = '--f=a b c' + if (m !== null && Array.isArray(m) && m.length >= 3) { + if (checkAllAliases(m[1], flags.arrays)) { + i = eatArray(i, m[1], args, m[2]); + } + else if (checkAllAliases(m[1], flags.nargs) !== false) { + // nargs format = '--f=monkey washing cat' + i = eatNargs(i, m[1], args, m[2]); + } + else { + setArg(m[1], m[2], true); + } + } + } + else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { + m = arg.match(negatedBoolean); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); + } + // -- separated by space. + } + else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { + m = arg.match(/^--?(.+)/); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + if (checkAllAliases(key, flags.arrays)) { + // array format = '--foo a b c' + i = eatArray(i, key, args); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '--foo a b c' + // should be truthy even if: flags.nargs[key] === 0 + i = eatNargs(i, key, args); + } + else { + next = args[i + 1]; + if (next !== undefined && (!next.match(/^-/) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + // dot-notation flag separated by '='. + } + else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/); + if (m !== null && Array.isArray(m) && m.length >= 3) { + setArg(m[1], m[2]); + } + // dot-notation flag separated by space. + } + else if (arg.match(/^-.\..+/) && !arg.match(negative)) { + next = args[i + 1]; + m = arg.match(/^-(.\..+)/); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + if (next !== undefined && !next.match(/^-/) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { + letters = arg.slice(1, -1).split(''); + broken = false; + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3); + key = letters[j]; + if (checkAllAliases(key, flags.arrays)) { + // array format = '-f=a b c' + i = eatArray(i, key, args, value); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '-f=monkey washing cat' + i = eatNargs(i, key, args, value); + } + else { + setArg(key, value); + } + broken = true; + break; + } + if (next === '-') { + setArg(letters[j], next); + continue; + } + // current letter is an alphabetic character and next value is a number + if (/[A-Za-z]/.test(letters[j]) && + /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && + checkAllAliases(next, flags.bools) === false) { + setArg(letters[j], next); + broken = true; + break; + } + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], next); + broken = true; + break; + } + else { + setArg(letters[j], defaultValue(letters[j])); + } + } + key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (checkAllAliases(key, flags.arrays)) { + // array format = '-f a b c' + i = eatArray(i, key, args); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '-f a b c' + // should be truthy even if: flags.nargs[key] === 0 + i = eatNargs(i, key, args); + } + else { + next = args[i + 1]; + if (next !== undefined && (!/^(-|--)[^-]/.test(next) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + } + else if (arg.match(/^-[0-9]$/) && + arg.match(negative) && + checkAllAliases(arg.slice(1), flags.bools)) { + // single-digit boolean alias, e.g: xargs -0 + key = arg.slice(1); + setArg(key, defaultValue(key)); + } + else if (arg === '--') { + notFlags = args.slice(i + 1); + break; + } + else if (configuration['halt-at-non-option']) { + notFlags = args.slice(i); + break; + } + else { + pushPositional(arg); + } + } + // order of precedence: + // 1. command line arg + // 2. value from env var + // 3. value from config file + // 4. value from config objects + // 5. configured default value + applyEnvVars(argv, true); // special case: check env vars that point to config file + applyEnvVars(argv, false); + setConfig(argv); + setConfigObjects(); + applyDefaultsAndAliases(argv, flags.aliases, defaults, true); + applyCoercions(argv); + if (configuration['set-placeholder-key']) + setPlaceholderKeys(argv); + // for any counts either not in args or without an explicit default, set to 0 + Object.keys(flags.counts).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) + setArg(key, 0); + }); + // '--' defaults to undefined. + if (notFlagsOption && notFlags.length) + argv[notFlagsArgv] = []; + notFlags.forEach(function (key) { + argv[notFlagsArgv].push(key); + }); + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key]; + }); + } + if (configuration['strip-aliased']) { + ; + [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion'] && alias.includes('-')) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; + } + delete argv[alias]; + }); + } + // Push argument into positional array, applying numeric coercion: + function pushPositional(arg) { + const maybeCoercedNumber = maybeCoerceNumber('_', arg); + if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { + argv._.push(maybeCoercedNumber); + } + } + // how many arguments should we consume, based + // on the nargs option? + function eatNargs(i, key, args, argAfterEqualSign) { + let ii; + let toEat = checkAllAliases(key, flags.nargs); + // NaN has a special meaning for the array type, indicating that one or + // more values are expected. + toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; + if (toEat === 0) { + if (!isUndefined(argAfterEqualSign)) { + error = Error(__('Argument unexpected for: %s', key)); + } + setArg(key, defaultValue(key)); + return i; + } + let available = isUndefined(argAfterEqualSign) ? 0 : 1; + if (configuration['nargs-eats-options']) { + // classic behavior, yargs eats positional and dash arguments. + if (args.length - (i + 1) + available < toEat) { + error = Error(__('Not enough arguments following: %s', key)); + } + available = toEat; + } + else { + // nargs will not consume flag arguments, e.g., -abc, --foo, + // and terminates when one is observed. + for (ii = i + 1; ii < args.length; ii++) { + if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) + available++; + else + break; + } + if (available < toEat) + error = Error(__('Not enough arguments following: %s', key)); + } + let consumed = Math.min(available, toEat); + if (!isUndefined(argAfterEqualSign) && consumed > 0) { + setArg(key, argAfterEqualSign); + consumed--; + } + for (ii = i + 1; ii < (consumed + i + 1); ii++) { + setArg(key, args[ii]); + } + return (i + consumed); + } + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray(i, key, args, argAfterEqualSign) { + let argsToSet = []; + let next = argAfterEqualSign || args[i + 1]; + // If both array and nargs are configured, enforce the nargs count: + const nargsCount = checkAllAliases(key, flags.nargs); + if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { + argsToSet.push(true); + } + else if (isUndefined(next) || + (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { + // for keys without value ==> argsToSet remains an empty [] + // set user default value, if available + if (defaults[key] !== undefined) { + const defVal = defaults[key]; + argsToSet = Array.isArray(defVal) ? defVal : [defVal]; + } + } + else { + // value in --option=value is eaten as is + if (!isUndefined(argAfterEqualSign)) { + argsToSet.push(processValue(key, argAfterEqualSign, true)); + } + for (let ii = i + 1; ii < args.length; ii++) { + if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || + (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) + break; + next = args[ii]; + if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) + break; + i = ii; + argsToSet.push(processValue(key, next, inputIsString)); + } + } + // If both array and nargs are configured, create an error if less than + // nargs positionals were found. NaN has special meaning, indicating + // that at least one value is required (more are okay). + if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || + (isNaN(nargsCount) && argsToSet.length === 0))) { + error = Error(__('Not enough arguments following: %s', key)); + } + setArg(key, argsToSet); + return i; + } + function setArg(key, val, shouldStripQuotes = inputIsString) { + if (/-/.test(key) && configuration['camel-case-expansion']) { + const alias = key.split('.').map(function (prop) { + return camelCase(prop); + }).join('.'); + addNewAlias(key, alias); + } + const value = processValue(key, val, shouldStripQuotes); + const splitKey = key.split('.'); + setKey(argv, splitKey, value); + // handle populating aliases of the full key + if (flags.aliases[key]) { + flags.aliases[key].forEach(function (x) { + const keyProperties = x.split('.'); + setKey(argv, keyProperties, value); + }); + } + // handle populating aliases of the first element of the dot-notation key + if (splitKey.length > 1 && configuration['dot-notation']) { + ; + (flags.aliases[splitKey[0]] || []).forEach(function (x) { + let keyProperties = x.split('.'); + // expand alias with nested objects in key + const a = [].concat(splitKey); + a.shift(); // nuke the old key. + keyProperties = keyProperties.concat(a); + // populate alias only if is not already an alias of the full key + // (already populated above) + if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { + setKey(argv, keyProperties, value); + } + }); + } + // Set normalize getter and setter when key is in 'normalize' but isn't an array + if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { + const keys = [key].concat(flags.aliases[key] || []); + keys.forEach(function (key) { + Object.defineProperty(argvReturn, key, { + enumerable: true, + get() { + return val; + }, + set(value) { + val = typeof value === 'string' ? mixin.normalize(value) : value; + } + }); + }); + } + } + function addNewAlias(key, alias) { + if (!(flags.aliases[key] && flags.aliases[key].length)) { + flags.aliases[key] = [alias]; + newAliases[alias] = true; + } + if (!(flags.aliases[alias] && flags.aliases[alias].length)) { + addNewAlias(alias, key); + } + } + function processValue(key, val, shouldStripQuotes) { + // strings may be quoted, clean this up as we assign values. + if (shouldStripQuotes) { + val = stripQuotes(val); + } + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') + val = val === 'true'; + } + let value = Array.isArray(val) + ? val.map(function (v) { return maybeCoerceNumber(key, v); }) + : maybeCoerceNumber(key, val); + // increment a count given as arg (either no value or value parsed as boolean) + if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { + value = increment(); + } + // Set normalized value when key is in 'normalize' and in 'arrays' + if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { + if (Array.isArray(val)) + value = val.map((val) => { return mixin.normalize(val); }); + else + value = mixin.normalize(val); + } + return value; + } + function maybeCoerceNumber(key, value) { + if (!configuration['parse-positional-numbers'] && key === '_') + return value; + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { + const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); + if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { + value = Number(value); + } + } + return value; + } + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig(argv) { + const configLookup = Object.create(null); + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, flags.aliases, defaults); + Object.keys(flags.configs).forEach(function (configKey) { + const configPath = argv[configKey] || configLookup[configKey]; + if (configPath) { + try { + let config = null; + const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); + const resolveConfig = flags.configs[configKey]; + if (typeof resolveConfig === 'function') { + try { + config = resolveConfig(resolvedConfigPath); + } + catch (e) { + config = e; + } + if (config instanceof Error) { + error = config; + return; + } + } + else { + config = mixin.require(resolvedConfigPath); + } + setConfigObject(config); + } + catch (ex) { + // Deno will receive a PermissionDenied error if an attempt is + // made to load config without the --allow-read flag: + if (ex.name === 'PermissionDenied') + error = ex; + else if (argv[configKey]) + error = Error(__('Invalid JSON config file: %s', configPath)); + } + } + }); + } + // set args from config object. + // it recursively checks nested objects. + function setConfigObject(config, prev) { + Object.keys(config).forEach(function (key) { + const value = config[key]; + const fullKey = prev ? prev + '.' + key : key; + // if the value is an inner object and we have dot-notation + // enabled, treat inner objects in config the same as + // heavily nested dot notations (foo.bar.apple). + if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { + // if the value is an object but not an array, check nested object + setConfigObject(value, fullKey); + } + else { + // setting arguments via CLI takes precedence over + // values within the config file. + if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { + setArg(fullKey, value); + } + } + }); + } + // set all config objects passed in opts + function setConfigObjects() { + if (typeof configObjects !== 'undefined') { + configObjects.forEach(function (configObject) { + setConfigObject(configObject); + }); + } + } + function applyEnvVars(argv, configOnly) { + if (typeof envPrefix === 'undefined') + return; + const prefix = typeof envPrefix === 'string' ? envPrefix : ''; + const env = mixin.env(); + Object.keys(env).forEach(function (envVar) { + if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { + // get array of nested keys and convert them to camel case + const keys = envVar.split('__').map(function (key, i) { + if (i === 0) { + key = key.substring(prefix.length); + } + return camelCase(key); + }); + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { + setArg(keys.join('.'), env[envVar]); + } + } + }); + } + function applyCoercions(argv) { + let coerce; + const applied = new Set(); + Object.keys(argv).forEach(function (key) { + if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases + coerce = checkAllAliases(key, flags.coercions); + if (typeof coerce === 'function') { + try { + const value = maybeCoerceNumber(key, coerce(argv[key])); + ([].concat(flags.aliases[key] || [], key)).forEach(ali => { + applied.add(ali); + argv[ali] = value; + }); + } + catch (err) { + error = err; + } + } + } + }); + } + function setPlaceholderKeys(argv) { + flags.keys.forEach((key) => { + // don't set placeholder keys for dot notation options 'foo.bar'. + if (~key.indexOf('.')) + return; + if (typeof argv[key] === 'undefined') + argv[key] = undefined; + }); + return argv; + } + function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]); + if (canLog) + defaulted[key] = true; + (aliases[key] || []).forEach(function (x) { + if (hasKey(obj, x.split('.'))) + return; + setKey(obj, x.split('.'), defaults[key]); + }); + } + }); + } + function hasKey(obj, keys) { + let o = obj; + if (!configuration['dot-notation']) + keys = [keys.join('.')]; + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}); + }); + const key = keys[keys.length - 1]; + if (typeof o !== 'object') + return false; + else + return key in o; + } + function setKey(obj, keys, value) { + let o = obj; + if (!configuration['dot-notation']) + keys = [keys.join('.')]; + keys.slice(0, -1).forEach(function (key) { + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + key = sanitizeKey(key); + if (typeof o === 'object' && o[key] === undefined) { + o[key] = {}; + } + if (typeof o[key] !== 'object' || Array.isArray(o[key])) { + // ensure that o[key] is an array, and that the last item is an empty object. + if (Array.isArray(o[key])) { + o[key].push({}); + } + else { + o[key] = [o[key], {}]; + } + // we want to update the empty object at the end of the o[key] array, so set o to that object + o = o[key][o[key].length - 1]; + } + else { + o = o[key]; + } + }); + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + const key = sanitizeKey(keys[keys.length - 1]); + const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); + const isValueArray = Array.isArray(value); + let duplicate = configuration['duplicate-arguments-array']; + // nargs has higher priority than duplicate + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true; + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined; + } + } + if (value === increment()) { + o[key] = increment(o[key]); + } + else if (Array.isArray(o[key])) { + if (duplicate && isTypeArray && isValueArray) { + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); + } + else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { + o[key] = value; + } + else { + o[key] = o[key].concat([value]); + } + } + else if (o[key] === undefined && isTypeArray) { + o[key] = isValueArray ? value : [value]; + } + else if (duplicate && !(o[key] === undefined || + checkAllAliases(key, flags.counts) || + checkAllAliases(key, flags.bools))) { + o[key] = [o[key], value]; + } + else { + o[key] = value; + } + } + // extend the aliases list with inferred aliases. + function extendAliases(...args) { + args.forEach(function (obj) { + Object.keys(obj || {}).forEach(function (key) { + // short-circuit if we've already added a key + // to the aliases array, for example it might + // exist in both 'opts.default' and 'opts.key'. + if (flags.aliases[key]) + return; + flags.aliases[key] = [].concat(aliases[key] || []); + // For "--option-name", also set argv.optionName + flags.aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x) && configuration['camel-case-expansion']) { + const c = camelCase(x); + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c); + newAliases[c] = true; + } + } + }); + // For "--optionName", also set argv['option-name'] + flags.aliases[key].concat(key).forEach(function (x) { + if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { + const c = decamelize(x, '-'); + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c); + newAliases[c] = true; + } + } + }); + flags.aliases[key].forEach(function (x) { + flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + }); + } + function checkAllAliases(key, flag) { + const toCheck = [].concat(flags.aliases[key] || [], key); + const keys = Object.keys(flag); + const setAlias = toCheck.find(key => keys.includes(key)); + return setAlias ? flag[setAlias] : false; + } + function hasAnyFlag(key) { + const flagsKeys = Object.keys(flags); + const toCheck = [].concat(flagsKeys.map(k => flags[k])); + return toCheck.some(function (flag) { + return Array.isArray(flag) ? flag.includes(key) : flag[key]; + }); + } + function hasFlagsMatching(arg, ...patterns) { + const toCheck = [].concat(...patterns); + return toCheck.some(function (pattern) { + const match = arg.match(pattern); + return match && hasAnyFlag(match[1]); + }); + } + // based on a simplified version of the short flag group parsing logic + function hasAllShortFlags(arg) { + // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group + if (arg.match(negative) || !arg.match(/^-[^-]+/)) { + return false; + } + let hasAllFlags = true; + let next; + const letters = arg.slice(1).split(''); + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (!hasAnyFlag(letters[j])) { + hasAllFlags = false; + break; + } + if ((letters[j + 1] && letters[j + 1] === '=') || + next === '-' || + (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || + (letters[j + 1] && letters[j + 1].match(/\W/))) { + break; + } + } + return hasAllFlags; + } + function isUnknownOptionAsArg(arg) { + return configuration['unknown-options-as-args'] && isUnknownOption(arg); + } + function isUnknownOption(arg) { + arg = arg.replace(/^-{3,}/, '--'); + // ignore negative numbers + if (arg.match(negative)) { + return false; + } + // if this is a short option group and all of them are configured, it isn't unknown + if (hasAllShortFlags(arg)) { + return false; + } + // e.g. '--count=2' + const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; + // e.g. '-a' or '--arg' + const normalFlag = /^-+([^=]+?)$/; + // e.g. '-a-' + const flagEndingInHyphen = /^-+([^=]+?)-$/; + // e.g. '-abc123' + const flagEndingInDigits = /^-+([^=]+?\d+)$/; + // e.g. '-a/usr/local' + const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; + // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method + return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); + } + // make a best effort to pick a default value + // for an option based on name and type. + function defaultValue(key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key]; + } + else { + return defaultForType(guessType(key)); + } + } + // return a default value, given the type of a flag., + function defaultForType(type) { + const def = { + [DefaultValuesForTypeKey.BOOLEAN]: true, + [DefaultValuesForTypeKey.STRING]: '', + [DefaultValuesForTypeKey.NUMBER]: undefined, + [DefaultValuesForTypeKey.ARRAY]: [] + }; + return def[type]; + } + // given a flag, enforce a default type. + function guessType(key) { + let type = DefaultValuesForTypeKey.BOOLEAN; + if (checkAllAliases(key, flags.strings)) + type = DefaultValuesForTypeKey.STRING; + else if (checkAllAliases(key, flags.numbers)) + type = DefaultValuesForTypeKey.NUMBER; + else if (checkAllAliases(key, flags.bools)) + type = DefaultValuesForTypeKey.BOOLEAN; + else if (checkAllAliases(key, flags.arrays)) + type = DefaultValuesForTypeKey.ARRAY; + return type; + } + function isUndefined(num) { + return num === undefined; + } + // check user configuration settings for inconsistencies + function checkConfiguration() { + // count keys should not be set as array/narg + Object.keys(flags.counts).find(key => { + if (checkAllAliases(key, flags.arrays)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); + return true; + } + else if (checkAllAliases(key, flags.nargs)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); + return true; + } + return false; + }); + } + return { + aliases: Object.assign({}, flags.aliases), + argv: Object.assign(argvReturn, argv), + configuration: configuration, + defaulted: Object.assign({}, defaulted), + error: error, + newAliases: Object.assign({}, newAliases) + }; + } +} +// if any aliases reference each other, we should +// merge them together. +function combineAliases(aliases) { + const aliasArrays = []; + const combined = Object.create(null); + let change = true; + // turn alias lookup hash {key: ['alias1', 'alias2']} into + // a simple array ['key', 'alias1', 'alias2'] + Object.keys(aliases).forEach(function (key) { + aliasArrays.push([].concat(aliases[key], key)); + }); + // combine arrays until zero changes are + // made in an iteration. + while (change) { + change = false; + for (let i = 0; i < aliasArrays.length; i++) { + for (let ii = i + 1; ii < aliasArrays.length; ii++) { + const intersect = aliasArrays[i].filter(function (v) { + return aliasArrays[ii].indexOf(v) !== -1; + }); + if (intersect.length) { + aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); + aliasArrays.splice(ii, 1); + change = true; + break; + } + } + } + } + // map arrays back to the hash-lookup (de-dupe while + // we're at it). + aliasArrays.forEach(function (aliasArray) { + aliasArray = aliasArray.filter(function (v, i, self) { + return self.indexOf(v) === i; + }); + const lastAlias = aliasArray.pop(); + if (lastAlias !== undefined && typeof lastAlias === 'string') { + combined[lastAlias] = aliasArray; + } + }); + return combined; +} +// this function should only be called when a count is given as an arg +// it is NOT called to set a default value +// thus we can start the count at 1 instead of 0 +function increment(orig) { + return orig !== undefined ? orig + 1 : 1; +} +// TODO(bcoe): in the next major version of yargs, switch to +// Object.create(null) for dot notation: +function sanitizeKey(key) { + if (key === '__proto__') + return '___proto___'; + return key; +} +function stripQuotes(val) { + return (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0]) + ? val.substring(1, val.length - 1) + : val; +} diff --git a/node_modules/concurrently/node_modules/yargs-parser/package.json b/node_modules/concurrently/node_modules/yargs-parser/package.json new file mode 100644 index 000000000..decd0c3fe --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs-parser/package.json @@ -0,0 +1,92 @@ +{ + "name": "yargs-parser", + "version": "21.1.1", + "description": "the mighty option parser used by yargs", + "main": "build/index.cjs", + "exports": { + ".": [ + { + "import": "./build/lib/index.js", + "require": "./build/index.cjs" + }, + "./build/index.cjs" + ], + "./browser": [ + "./browser.js" + ] + }, + "type": "module", + "module": "./build/lib/index.js", + "scripts": { + "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", + "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", + "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", + "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", + "test:esm": "c8 --reporter=text --reporter=html mocha test/*.mjs", + "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'", + "pretest:typescript": "npm run pretest", + "test:typescript": "c8 mocha ./build/test/typescript/*.js", + "coverage": "c8 report --check-coverage", + "precompile": "rimraf build", + "compile": "tsc", + "postcompile": "npm run build:cjs", + "build:cjs": "rollup -c", + "prepare": "npm run compile" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs-parser.git" + }, + "keywords": [ + "argument", + "parser", + "yargs", + "command", + "cli", + "parsing", + "option", + "args", + "argument" + ], + "author": "Ben Coe ", + "license": "ISC", + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/mocha": "^9.0.0", + "@types/node": "^16.11.4", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/parser": "^3.10.1", + "c8": "^7.3.0", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "eslint": "^7.0.0", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-node": "^11.0.0", + "gts": "^3.0.0", + "mocha": "^10.0.0", + "puppeteer": "^16.0.0", + "rimraf": "^3.0.2", + "rollup": "^2.22.1", + "rollup-plugin-cleanup": "^3.1.1", + "rollup-plugin-ts": "^3.0.2", + "serve": "^14.0.0", + "standardx": "^7.0.0", + "start-server-and-test": "^1.11.2", + "ts-transform-default-export": "^1.0.2", + "typescript": "^4.0.0" + }, + "files": [ + "browser.js", + "build", + "!*.d.ts", + "!*.d.cts" + ], + "engines": { + "node": ">=12" + }, + "standardx": { + "ignore": [ + "build" + ] + } +} diff --git a/node_modules/concurrently/node_modules/yargs/LICENSE b/node_modules/concurrently/node_modules/yargs/LICENSE new file mode 100644 index 000000000..b0145ca0b --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +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. diff --git a/node_modules/concurrently/node_modules/yargs/README.md b/node_modules/concurrently/node_modules/yargs/README.md new file mode 100644 index 000000000..51f5b225d --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/README.md @@ -0,0 +1,204 @@ +

+ +

+

Yargs

+

+ Yargs be a node.js library fer hearties tryin' ter parse optstrings +

+ +
+ +![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg) +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Coverage][coverage-image]][coverage-url] +[![Conventional Commits][conventional-commits-image]][conventional-commits-url] +[![Slack][slack-image]][slack-url] + +## Description +Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. + +It gives you: + +* commands and (grouped) options (`my-program.js serve --port=5000`). +* a dynamically generated help menu based on your arguments: + +``` +mocha [spec..] + +Run tests with Mocha + +Commands + mocha inspect [spec..] Run tests with Mocha [default] + mocha init create a client-side Mocha setup at + +Rules & Behavior + --allow-uncaught Allow uncaught errors to propagate [boolean] + --async-only, -A Require all tests to use a callback (async) or + return a Promise [boolean] +``` + +* bash-completion shortcuts for commands and options. +* and [tons more](/docs/api.md). + +## Installation + +Stable version: +```bash +npm i yargs +``` + +Bleeding edge version with the most recent features: +```bash +npm i yargs@next +``` + +## Usage + +### Simple Example + +```javascript +#!/usr/bin/env node +const yargs = require('yargs/yargs') +const { hideBin } = require('yargs/helpers') +const argv = yargs(hideBin(process.argv)).argv + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!') +} else { + console.log('Retreat from the xupptumblers!') +} +``` + +```bash +$ ./plunder.js --ships=4 --distance=22 +Plunder more riffiwobbles! + +$ ./plunder.js --ships 12 --distance 98.7 +Retreat from the xupptumblers! +``` + +> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690). + +### Complex Example + +```javascript +#!/usr/bin/env node +const yargs = require('yargs/yargs') +const { hideBin } = require('yargs/helpers') + +yargs(hideBin(process.argv)) + .command('serve [port]', 'start the server', (yargs) => { + return yargs + .positional('port', { + describe: 'port to bind on', + default: 5000 + }) + }, (argv) => { + if (argv.verbose) console.info(`start server on :${argv.port}`) + serve(argv.port) + }) + .option('verbose', { + alias: 'v', + type: 'boolean', + description: 'Run with verbose logging' + }) + .parse() +``` + +Run the example above with `--help` to see the help for the application. + +## Supported Platforms + +### TypeScript + +yargs has type definitions at [@types/yargs][type-definitions]. + +``` +npm i @types/yargs --save-dev +``` + +See usage examples in [docs](/docs/typescript.md). + +### Deno + +As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno): + +```typescript +import yargs from 'https://deno.land/x/yargs/deno.ts' +import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts' + +yargs(Deno.args) + .command('download ', 'download a list of files', (yargs: any) => { + return yargs.positional('files', { + describe: 'a list of files to do something with' + }) + }, (argv: Arguments) => { + console.info(argv) + }) + .strictCommands() + .demandCommand(1) + .parse() +``` + +### ESM + +As of `v16`,`yargs` supports ESM imports: + +```js +import yargs from 'yargs' +import { hideBin } from 'yargs/helpers' + +yargs(hideBin(process.argv)) + .command('curl ', 'fetch the contents of the URL', () => {}, (argv) => { + console.info(argv) + }) + .demandCommand(1) + .parse() +``` + +### Usage in Browser + +See examples of using yargs in the browser in [docs](/docs/browser.md). + +## Community + +Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). + +## Documentation + +### Table of Contents + +* [Yargs' API](/docs/api.md) +* [Examples](/docs/examples.md) +* [Parsing Tricks](/docs/tricks.md) + * [Stop the Parser](/docs/tricks.md#stop) + * [Negating Boolean Arguments](/docs/tricks.md#negate) + * [Numbers](/docs/tricks.md#numbers) + * [Arrays](/docs/tricks.md#arrays) + * [Objects](/docs/tricks.md#objects) + * [Quotes](/docs/tricks.md#quotes) +* [Advanced Topics](/docs/advanced.md) + * [Composing Your App Using Commands](/docs/advanced.md#commands) + * [Building Configurable CLI Apps](/docs/advanced.md#configuration) + * [Customizing Yargs' Parser](/docs/advanced.md#customizing) + * [Bundling yargs](/docs/bundling.md) +* [Contributing](/contributing.md) + +## Supported Node.js Versions + +Libraries in this ecosystem make a best effort to track +[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a +post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). + +[npm-url]: https://www.npmjs.com/package/yargs +[npm-image]: https://img.shields.io/npm/v/yargs.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: http://standardjs.com/ +[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg +[conventional-commits-url]: https://conventionalcommits.org/ +[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg +[slack-url]: http://devtoolscommunity.herokuapp.com +[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs +[coverage-image]: https://img.shields.io/nycrc/yargs/yargs +[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc diff --git a/node_modules/concurrently/node_modules/yargs/browser.d.ts b/node_modules/concurrently/node_modules/yargs/browser.d.ts new file mode 100644 index 000000000..21f3fc691 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/browser.d.ts @@ -0,0 +1,5 @@ +import {YargsFactory} from './build/lib/yargs-factory'; + +declare const Yargs: ReturnType; + +export default Yargs; diff --git a/node_modules/concurrently/node_modules/yargs/browser.mjs b/node_modules/concurrently/node_modules/yargs/browser.mjs new file mode 100644 index 000000000..2d0d6e9e5 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/browser.mjs @@ -0,0 +1,7 @@ +// Bootstrap yargs for browser: +import browserPlatformShim from './lib/platform-shims/browser.mjs'; +import {YargsFactory} from './build/lib/yargs-factory.js'; + +const Yargs = YargsFactory(browserPlatformShim); + +export default Yargs; diff --git a/node_modules/concurrently/node_modules/yargs/build/index.cjs b/node_modules/concurrently/node_modules/yargs/build/index.cjs new file mode 100644 index 000000000..e9cf0137e --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/index.cjs @@ -0,0 +1 @@ +"use strict";var t=require("assert");class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let s,i=[];function n(t,o,a,h){s=h;let l={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return l;const r=/\.json|\..*rc$/.test(t.extends);let h=null;if(r)h=function(t,e){return s.path.resolve(t,e)}(o,t.extends);else try{h=require.resolve(t.extends)}catch(e){return t}!function(t){if(i.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(h),i.push(h),l=r?JSON.parse(s.readFileSync(h,"utf8")):require(t.extends),delete t.extends,l=n(l,s.path.dirname(h),a,s)}return i=[],a?r(l,t):Object.assign({},l,t)}function r(t,e){const s={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(s,t);for(const n of Object.keys(e))i(e[n])&&i(s[n])?s[n]=r(t[n],e[n]):s[n]=e[n];return s}function o(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),s=/\.*[\][<>]/g,i=e.shift();if(!i)throw new Error(`No command found in: ${t}`);const n={cmd:i.replace(s,""),demanded:[],optional:[]};return e.forEach(((t,i)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&i===e.length-1&&(r=!0),/^\[/.test(t)?n.optional.push({cmd:t.replace(s,"").split("|"),variadic:r}):n.demanded.push({cmd:t.replace(s,"").split("|"),variadic:r})})),n}const a=["first","second","third","fourth","fifth","sixth"];function h(t,s,i){try{let n=0;const[r,a,h]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,i],f=[].slice.call(a);for(;f.length&&void 0===f[f.length-1];)f.pop();const d=h||f.length;if(du)throw new e(`Too many arguments provided. Expected max ${u} but received ${d}.`);r.demanded.forEach((t=>{const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1})),r.optional.forEach((t=>{if(0===f.length)return;const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,i){throw new e(`Invalid ${a[i]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,e,s,i){s.assert.notStrictEqual(t,e,i)}function u(t,e){e.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},e=(()=>!0)){const s={};return p(t).forEach((i=>{e(i,t[i])&&(s[i]=t[i])})),s}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var b=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function O(t,e,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,s):n?n.value=s:e.set(t,s),s}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,s=!0,i=!1){if(h(" [boolean] [boolean] [boolean]",[t,e,s],arguments.length),Array.isArray(t)){for(let i=0;i{const i=[...s[e]||[],e];return!t.option||!i.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,e,s,i){return s.reduce(((t,s)=>{if(s.applyBeforeValidation!==i)return t;if(s.mutates){if(s.applied)return t;s.applied=!0}if(f(t))return t.then((t=>Promise.all([t,s(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const i=s(t,e);return f(i)?i.then((e=>Object.assign(t,e))):Object.assign(t,i)}}),t)}function j(t,e,s=(t=>{throw t})){try{const s="function"==typeof t?t():t;return f(s)?s.then((t=>e(t))):e(s)}catch(t){return s(t)}}const M=/(^\*)|(^\$0)/;class _{constructor(t,e,s,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=s,this.validation=e}addDirectory(t,e,s,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:t=>t;i.visit=(t,e,s)=>{const i=n(t,e,s);if(i){if(this.requireCache.has(e))return i;this.requireCache.add(e),this.addHandler(i)}return i},this.shim.requireDirectory({require:e,filename:s},t,i)}addHandler(t,e,s,i,n,r){let a=[];const h=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(n);if(i=i||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...a]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(s))return void this.addHandler([t].concat(a),e,s.builder,s.handler,s.middlewares,s.deprecated)}if("string"==typeof t){const n=o(t);a=a.map((t=>o(t).cmd));let l=!1;const c=[n.cmd].concat(a).filter((t=>!M.test(t)||(l=!0,!1)));0===c.length&&l&&c.push("$0"),l&&(n.cmd=c[0],a=c.slice(1),t=t.replace(M,n.cmd)),a.forEach((t=>{this.aliasMap[t]=n.cmd})),!1!==e&&this.usage.command(t,e,l,a,r),this.handlers[n.cmd]={original:t,description:e,handler:i,builder:s||{},middlewares:h,deprecated:r,demanded:n.demanded,optional:n.optional},l&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,s,i,n,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),h=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,e,s.aliases,h,i,n,r);return f(c)?c.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,n,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,n,c.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,s,i,n,r,o,a){const h=e.builder;let l=s;if(x(h)){s.getInternalMethods().getUsageInstance().freeze();const c=h(s.getInternalMethods().reset(i),a);if(f(c))return c.then((i=>{var a;return l=(a=i)&&"function"==typeof a.getInternalMethods?i:s,this.parseAndUpdateUsage(t,e,l,n,r,o)}))}else(function(t){return"object"==typeof t})(h)&&(s.getInternalMethods().getUsageInstance().freeze(),l=s.getInternalMethods().reset(i),Object.keys(e.builder).forEach((t=>{l.option(t,h[t])})));return this.parseAndUpdateUsage(t,e,l,n,r,o)}parseAndUpdateUsage(t,e,s,i,n,r){t&&s.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(s)&&s.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,e),e.description);const o=s.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,r);return f(o)?o.then((t=>({aliases:s.parsed.aliases,innerArgv:t}))):{aliases:s.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const s=M.test(e.original)?e.original.replace(M,"").trim():e.original,i=t.filter((t=>!M.test(t)));return i.push(s),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,e,s,i,n,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(n,a,r.parsed.error,t);s=j(s,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const i=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(s,i,!1,!1),s=j(s=C(s,r,o,!1),(t=>{const s=e.handler(t);return f(s)?s.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(s)&&!r.getInternalMethods().hasParseCallback()&&s.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(i.commands.pop(),i.fullCommands.pop()),s}applyMiddlewareAndGetResult(t,e,s,i,n,r,o){let a={};if(n)return s;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,s,i,o));const h=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=C(s,o,h,!0);return f(l)?l.then((s=>this.handleValidationAndGetResult(t,e,s,i,r,o,h,a))):this.handleValidationAndGetResult(t,e,l,i,r,o,h,a)}populatePositionals(t,e,s,i){e._=e._.slice(s.commands.length);const n=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(n.length,e._.length);n.length;){const t=n.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=s.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),i),o}populatePositional(t,e,s){const i=t.cmd[0];t.variadic?s[i]=e._.splice(0).map(String):e._.length&&(s[i]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},s=o(t);return s.demanded.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i,e.demand[s]=!0})),s.optional.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i})),e}postProcessPositionals(t,e,s,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(s.default,n.default);for(const t of Object.keys(s.alias))n.alias[t]=(n.alias[t]||[]).concat(s.alias[t]);n.array=n.array.concat(s.array),n.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{n.configuration["unknown-options-as-args"]&&(n.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const s=Object.keys(e);Object.keys(e).forEach((t=>{s.push(...a.aliases[t])})),Object.keys(a.argv).forEach((n=>{s.includes(n)&&(e[n]||(e[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(t,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(t[n])||Array.isArray(a.argv[n]))?t[n]=[].concat(t[n],a.argv[n]):t[n]=a.argv[n])}))}}isDefaulted(t,e){const{default:s}=t.getOptions();return Object.prototype.hasOwnProperty.call(s,e)||Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:s}=t.getOptions();return s.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||s.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=M.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(x(e))return e(t,!0);k(e)||Object.keys(e).forEach((s=>{t.option(s,e[s])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,s=0,i=Object.keys(require.cache);s{const s=e;s._handle&&s.isTTY&&"function"==typeof s._handle.setBlocking&&s._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const i=s.y18n.__,n={},r=[];n.failFn=function(t){r.push(t)};let o=null,a=null,h=!0;n.showHelpOnFail=function(e=!0,s){const[i,r]="string"==typeof e?[!0,e]:[e,s];return t.getInternalMethods().isGlobalContext()&&(a=r),o=r,h=i,n};let l=!1;n.fail=function(s,i){const c=t.getInternalMethods().getLoggerInstance();if(!r.length){if(t.getExitProcess()&&E(!0),!l){l=!0,h&&(t.showHelp("error"),c.error()),(s||i)&&c.error(s||i);const e=o||a;e&&((s||i)&&c.error(""),c.error(e))}if(i=i||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,i);throw i}for(let t=r.length-1;t>=0;--t){const e=r[t];if(A(e)){if(i)throw i;if(s)throw Error(s)}else e(s,i,n)}};let c=[],f=!1;n.usage=(t,e)=>null===t?(f=!0,c=[],n):(f=!1,c.push([t,e||""]),n),n.getUsage=()=>c,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>i("Positionals:");let d=[];n.example=(t,e)=>{d.push([t,e||""])};let u=[];n.command=function(t,e,s,i,n=!1){s&&(u=u.map((t=>(t[2]=!1,t)))),u.push([t,e||"",s,i,n])},n.getCommands=()=>u;let p={};n.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{n.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{n.describe(e,t[e])})):p[t]=e},n.getDescriptions=()=>p;let m=[];n.epilog=t=>{m.push(t)};let y,b=!1;n.wrap=t=>{b=!0,y=t},n.getWrap=()=>s.getEnv("YARGS_DISABLE_WRAP")?null:(b||(y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),b=!0),y);const v="__yargsString__:";function O(t,e,i){let n=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{n=Math.max(s.stringWidth(i?`${i} ${I(t[0])}`:I(t[0]))+$(t[0]),n)})),e&&(n=Math.min(n,parseInt((.5*e).toString(),10))),n}let w;function C(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function j(t,e){let s=`[${i("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}n.deferY18nLookup=t=>v+t,n.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),s=t.getOptions();(Object.keys(s.alias)||[]).forEach((i=>{s.alias[i].forEach((r=>{p[r]&&n.describe(i,p[r]),r in e&&t.demandOption(i,e[r]),s.boolean.includes(r)&&t.boolean(i),s.count.includes(r)&&t.count(i),s.string.includes(r)&&t.string(i),s.normalize.includes(r)&&t.normalize(i),s.array.includes(r)&&t.array(i),s.number.includes(r)&&t.number(i)}))}))}();const e=t.customScriptName?t.$0:s.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),h=t.getGroups(),l=t.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(l.default)),g=g.filter(C),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const y=n.getWrap(),b=s.cliui({width:y,wrap:!!y});if(!f)if(c.length)c.forEach((t=>{b.div({text:`${t[0].replace(/\$0/g,e)}`}),t[1]&&b.div({text:`${t[1]}`,padding:[1,0,0,0]})})),b.div();else if(u.length){let t=null;t=o._?`${e} <${i("command")}>\n`:`${e} [${i("command")}]\n`,b.div(`${t}`)}if(u.length>1||1===u.length&&!u[0][2]){b.div(i("Commands:"));const s=t.getInternalMethods().getContext(),n=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(u=u.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=e?`${e} `:"";u.forEach((t=>{const s=`${r}${n}${t[0].replace(/^\$0 ?/,"")}`;b.span({text:s,padding:[0,2,0,2],width:O(u,y,`${e}${n}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${i("default")}]`),t[3]&&t[3].length&&o.push(`[${i("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${i("deprecated: %s",t[4])}]`):o.push(`[${i("deprecated")}]`)),o.length?b.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):b.div()})),b.div()}const M=(Object.keys(l.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&M.every((t=>-1===(l.alias[t]||[]).indexOf(e)))));const _=i("Options:");h[_]||(h[_]=[]),function(t,e,s,i){let n=[],r=null;Object.keys(s).forEach((t=>{n=n.concat(s[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==n.indexOf(t)))||s[i].push(t)}))}(g,l.alias,h,_);const k=t=>/^--/.test(I(t)),x=Object.keys(h).filter((t=>h[t].length>0)).map((t=>({groupName:t,normalizedKeys:h[t].filter(C).map((t=>{if(M.includes(t))return t;for(let e,s=0;void 0!==(e=M[s]);s++)if((l.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const s=e.reduce(((e,s)=>(e[s]=[s].concat(l.alias[s]||[]).map((e=>t===n.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?l.boolean.includes(s)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>k(t)===k(e)?0:k(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:s}}));if(x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>k(e[t])))))&&x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var s,i;k(e[t])&&(e[t]=(s=e[t],i=4,S(s)?{text:s.text,indentation:s.indentation+i}:{text:s,indentation:i}))}))})),x.forEach((({groupName:e,normalizedKeys:s,switches:o})=>{b.div(e),s.forEach((e=>{const s=o[e];let h=p[e]||"",c=null;h.includes(v)&&(h=i(h.substring(16))),l.boolean.includes(e)&&(c=`[${i("boolean")}]`),l.count.includes(e)&&(c=`[${i("count")}]`),l.string.includes(e)&&(c=`[${i("string")}]`),l.normalize.includes(e)&&(c=`[${i("string")}]`),l.array.includes(e)&&(c=`[${i("array")}]`),l.number.includes(e)&&(c=`[${i("number")}]`);const f=[e in a?(d=a[e],"string"==typeof d?`[${i("deprecated: %s",d)}]`:`[${i("deprecated")}]`):null,c,e in r?`[${i("required")}]`:null,l.choices&&l.choices[e]?`[${i("choices:")} ${n.stringifiedValues(l.choices[e])}]`:null,j(l.default[e],l.defaultDescription[e])].filter(Boolean).join(" ");var d;b.span({text:I(s),padding:[0,2,0,2+$(s)],width:O(o,y)+4},h);const u=!0===t.getInternalMethods().getUsageConfiguration()["hide-types"];f&&!u?b.div({text:f,padding:[0,0,0,2],align:"right"}):b.div()})),b.div()})),d.length&&(b.div(i("Examples:")),d.forEach((t=>{t[0]=t[0].replace(/\$0/g,e)})),d.forEach((t=>{""===t[1]?b.div({text:t[0],padding:[0,2,0,2]}):b.div({text:t[0],padding:[0,2,0,2],width:O(d,y)+4},{text:t[1]})})),b.div()),m.length>0){const t=m.map((t=>t.replace(/\$0/g,e))).join("\n");b.div(`${t}\n`)}return b.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w},n.showHelp=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(n.help())},n.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):i("generated-value"),")"].join(""),n.stringifiedValues=function(t,e){let s="";const i=e||", ",n=[].concat(t);return t&&n.length?(n.forEach((t=>{s.length&&(s+=i),s+=JSON.stringify(t)})),s):s};let M=null;n.version=t=>{M=t},n.showVersion=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(M)},n.reset=function(t){return o=null,l=!1,c=[],f=!1,m=[],d=[],u=[],p=g(p,(e=>!t[e])),n};const _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p})},n.unfreeze=function(t=!1){const e=_.pop();e&&(t?(p={...e.descriptions,...p},u=[...e.commands,...u],c=[...e.usages,...c],d=[...e.examples,...d],m=[...e.epilogs,...m]):({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p}=e))},n}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,e,s,i){var n,r,o;this.yargs=t,this.usage=e,this.command=s,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,s,i){const n=this.command.getCommandHandlers();for(let e=0,s=t.length;e{const i=o(s[0]).cmd;if(-1===e.indexOf(i))if(this.zshShell){const e=s[1]||"";t.push(i.replace(/:/g,"\\:")+":"+e)}else t.push(i)}))}optionCompletions(t,e,s,i){if((i.match(/^-/)||""===i&&0===t.length)&&!this.previousArgHasChoices(e)){const s=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach((r=>{const o=!!s.configuration["boolean-negation"]&&s.boolean.includes(r);n.includes(r)||s.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||this.completeOptionKey(r,t,i,o&&!!s.default[r])}))}}choicesFromOptionsCompletions(t,e,s,i){if(this.previousArgHasChoices(e)){const s=this.getPreviousArgChoices(e);s&&s.length>0&&t.push(...s.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,s,i){if(""===i&&t.length>0&&this.previousArgHasChoices(e))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[s._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(i)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],s="";if(!e.startsWith("-")&&t.length>1&&(s=e,e=t[t.length-2]),!e.startsWith("-"))return;const i=e.replace(/^-+/,""),n=this.yargs.getOptions(),r=[i,...this.yargs.getAliases()[i]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(n.key,t)&&Array.isArray(n.choices[t])){o=n.choices[t];break}return o?o.filter((t=>!s||t.startsWith(s))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,s){const i=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(i(e))return!0;if(s&&i(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(i(t))return!0;return!1}completeOptionKey(t,e,s,i){var n,r,o,a;let h=t;if(this.zshShell){const e=this.usage.getDescriptions(),s=null===(r=null===(n=null==this?void 0:this.aliases)||void 0===n?void 0:n[t])||void 0===r?void 0:r.find((t=>{const s=e[t];return"string"==typeof s&&s.length>0})),i=s?e[s]:void 0,l=null!==(a=null!==(o=e[t])&&void 0!==o?o:i)&&void 0!==a?a:"";h=`${t.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const l=!/^--/.test(s)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";e.push(l+h),i&&e.push(l+"no-"+h)}customCompletion(t,e,s,i){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(s,e);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{i(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{i(t,void 0)}))})):i(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(s,e,((n=i)=>this.defaultCompletion(t,e,s,n)),(t=>{i(null,t)})):this.customCompletionFunction(s,e,(t=>{i(null,t)}))}getCompletion(t,e){const s=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),n=this.customCompletionFunction?i=>this.customCompletion(t,i,s,e):i=>this.defaultCompletion(t,i,s,e);return f(i)?i.then(n):n(i)}generateCompletionScript(t,e){let s=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),s=s.replace(/{{app_name}}/g,i),s=s.replace(/{{completion_command}}/g,e),s.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const s=[];let i,n;for(i=0;i<=e.length;i++)s[i]=[i];for(n=0;n<=t.length;n++)s[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?s[i][n]=s[i-1][n-1]:i>1&&n>1&&e.charAt(i-2)===t.charAt(n-1)&&e.charAt(i-1)===t.charAt(n-2)?s[i][n]=s[i-2][n-2]+1:s[i][n]=Math.min(s[i-1][n-1]+1,Math.min(s[i][n-1]+1,s[i-1][n]+1));return s[e.length][t.length]}const H=["$0","--","_"];var z,W,q,U,F,L,V,G,R,T,B,Y,K,J,Z,X,Q,tt,et,st,it,nt,rt,ot,at,ht,lt,ct,ft,dt,ut,pt,gt,mt,yt;const bt=Symbol("copyDoubleDash"),vt=Symbol("copyDoubleDash"),Ot=Symbol("deleteFromParserHintObject"),wt=Symbol("emitWarning"),Ct=Symbol("freeze"),jt=Symbol("getDollarZero"),Mt=Symbol("getParserConfiguration"),_t=Symbol("getUsageConfiguration"),kt=Symbol("guessLocale"),xt=Symbol("guessVersion"),Et=Symbol("parsePositionalNumbers"),At=Symbol("pkgUp"),Pt=Symbol("populateParserHintArray"),St=Symbol("populateParserHintSingleValueDictionary"),$t=Symbol("populateParserHintArrayDictionary"),It=Symbol("populateParserHintDictionary"),Dt=Symbol("sanitizeKey"),Nt=Symbol("setKey"),Ht=Symbol("unfreeze"),zt=Symbol("validateAsync"),Wt=Symbol("getCommandInstance"),qt=Symbol("getContext"),Ut=Symbol("getHasOutput"),Ft=Symbol("getLoggerInstance"),Lt=Symbol("getParseContext"),Vt=Symbol("getUsageInstance"),Gt=Symbol("getValidationInstance"),Rt=Symbol("hasParseCallback"),Tt=Symbol("isGlobalContext"),Bt=Symbol("postProcess"),Yt=Symbol("rebase"),Kt=Symbol("reset"),Jt=Symbol("runYargsParserAndExecuteCommands"),Zt=Symbol("runValidation"),Xt=Symbol("setHasOutput"),Qt=Symbol("kTrackManuallySetKeys");class te{constructor(t=[],e,s,i){this.customScriptName=!1,this.parsed=!1,z.set(this,void 0),W.set(this,void 0),q.set(this,{commands:[],fullCommands:[]}),U.set(this,null),F.set(this,null),L.set(this,"show-hidden"),V.set(this,null),G.set(this,!0),R.set(this,{}),T.set(this,!0),B.set(this,[]),Y.set(this,void 0),K.set(this,{}),J.set(this,!1),Z.set(this,null),X.set(this,!0),Q.set(this,void 0),tt.set(this,""),et.set(this,void 0),st.set(this,void 0),it.set(this,{}),nt.set(this,null),rt.set(this,null),ot.set(this,{}),at.set(this,{}),ht.set(this,void 0),lt.set(this,!1),ct.set(this,void 0),ft.set(this,!1),dt.set(this,!1),ut.set(this,!1),pt.set(this,void 0),gt.set(this,{}),mt.set(this,null),yt.set(this,void 0),O(this,ct,i,"f"),O(this,ht,t,"f"),O(this,W,e,"f"),O(this,st,s,"f"),O(this,Y,new w(this),"f"),this.$0=this[jt](),this[Kt](),O(this,z,v(this,z,"f"),"f"),O(this,pt,v(this,pt,"f"),"f"),O(this,yt,v(this,yt,"f"),"f"),O(this,et,v(this,et,"f"),"f"),v(this,et,"f").showHiddenOpt=v(this,L,"f"),O(this,Q,this[vt](),"f")}addHelpOpt(t,e){return h("[string|boolean] [string]",[t,e],arguments.length),v(this,Z,"f")&&(this[Ot](v(this,Z,"f")),O(this,Z,null,"f")),!1===t&&void 0===e||(O(this,Z,"string"==typeof t?t:"help","f"),this.boolean(v(this,Z,"f")),this.describe(v(this,Z,"f"),e||v(this,pt,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(h("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const s="string"==typeof t?t:v(this,L,"f");return this.boolean(s),this.describe(s,e||v(this,pt,"f").deferY18nLookup("Show hidden options")),v(this,et,"f").showHiddenOpt=s,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return h(" [string|array]",[t,e],arguments.length),this[$t](this.alias.bind(this),"alias",t,e),this}array(t){return h("",[t],arguments.length),this[Pt]("array",t),this[Qt](t),this}boolean(t){return h("",[t],arguments.length),this[Pt]("boolean",t),this[Qt](t),this}check(t,e){return h(" [boolean]",[t,e],arguments.length),this.middleware(((e,s)=>j((()=>t(e,s.getOptions())),(s=>(s?("string"==typeof s||s instanceof Error)&&v(this,pt,"f").fail(s.toString(),s):v(this,pt,"f").fail(v(this,ct,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(v(this,pt,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return h(" [string|array]",[t,e],arguments.length),this[$t](this.choices.bind(this),"choices",t,e),this}coerce(t,s){if(h(" [function]",[t,s],arguments.length),Array.isArray(t)){if(!s)throw new e("coerce callback must be provided");for(const e of t)this.coerce(e,s);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!s)throw new e("coerce callback must be provided");return v(this,et,"f").key[t]=!0,v(this,Y,"f").addCoerceMiddleware(((i,n)=>{let r;return Object.prototype.hasOwnProperty.call(i,t)?j((()=>(r=n.getAliases(),s(i[t]))),(e=>{i[t]=e;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(r[t]&&!0!==s)for(const s of r[t])i[s]=e;return i}),(t=>{throw new e(t.message)})):i}),t),this}conflicts(t,e){return h(" [string|array]",[t,e],arguments.length),v(this,yt,"f").conflicts(t,e),this}config(t="config",e,s){return h("[object|string] [string|function] [function]",[t,e,s],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(s=e,e=void 0),this.describe(t,e||v(this,pt,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{v(this,et,"f").config[t]=s||!0})),this):(t=n(t,v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(t),this)}completion(t,e,s){return h("[string] [string|boolean|function] [function]",[t,e,s],arguments.length),"function"==typeof e&&(s=e,e=void 0),O(this,F,t||v(this,F,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(v(this,F,"f"),e),s&&v(this,U,"f").registerFunction(s),this}command(t,e,s,i,n,r){return h(" [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,s,i,n,r],arguments.length),v(this,z,"f").addHandler(t,e,s,i,n,r),this}commands(t,e,s,i,n,r){return this.command(t,e,s,i,n,r)}commandDir(t,e){h(" [object]",[t,e],arguments.length);const s=v(this,st,"f")||v(this,ct,"f").require;return v(this,z,"f").addDirectory(t,s,v(this,ct,"f").getCallerFile(),e),this}count(t){return h("",[t],arguments.length),this[Pt]("count",t),this[Qt](t),this}default(t,e,s){return h(" [*] [string]",[t,e,s],arguments.length),s&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]=s),"function"==typeof e&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]||(v(this,et,"f").defaultDescription[t]=v(this,pt,"f").functionDescription(e)),e=e.call()),this[St](this.default.bind(this),"default",t,e),this}defaults(t,e,s){return this.default(t,e,s)}demandCommand(t=1,e,s,i){return h("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,s,i],arguments.length),"number"!=typeof e&&(s=e,e=1/0),this.global("_",!1),v(this,et,"f").demandedCommands._={min:t,max:e,minMsg:s,maxMsg:i},this}demand(t,e,s){return Array.isArray(e)?(e.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})),e=1/0):"number"!=typeof e&&(s=e,e=1/0),"number"==typeof t?(d(s,!0,v(this,ct,"f")),this.demandCommand(t,e,s,s)):Array.isArray(t)?t.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})):"string"==typeof s?this.demandOption(t,s):!0!==s&&void 0!==s||this.demandOption(t),this}demandOption(t,e){return h(" [string]",[t,e],arguments.length),this[St](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return h(" [string|boolean]",[t,e],arguments.length),v(this,et,"f").deprecatedOptions[t]=e,this}describe(t,e){return h(" [string]",[t,e],arguments.length),this[Nt](t,!0),v(this,pt,"f").describe(t,e),this}detectLocale(t){return h("",[t],arguments.length),O(this,G,t,"f"),this}env(t){return h("[string|boolean]",[t],arguments.length),!1===t?delete v(this,et,"f").envPrefix:v(this,et,"f").envPrefix=t||"",this}epilogue(t){return h("",[t],arguments.length),v(this,pt,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return h(" [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):v(this,pt,"f").example(t,e),this}exit(t,e){O(this,J,!0,"f"),O(this,V,e,"f"),v(this,T,"f")&&v(this,ct,"f").process.exit(t)}exitProcess(t=!0){return h("[boolean]",[t],arguments.length),O(this,T,t,"f"),this}fail(t){if(h("",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new e("Invalid first argument. Expected function or boolean 'false'");return v(this,pt,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return h(" [function]",[t,e],arguments.length),e?v(this,U,"f").getCompletion(t,e):new Promise(((e,s)=>{v(this,U,"f").getCompletion(t,((t,i)=>{t?s(t):e(i)}))}))}getDemandedOptions(){return h([],0),v(this,et,"f").demandedOptions}getDemandedCommands(){return h([],0),v(this,et,"f").demandedCommands}getDeprecatedOptions(){return h([],0),v(this,et,"f").deprecatedOptions}getDetectLocale(){return v(this,G,"f")}getExitProcess(){return v(this,T,"f")}getGroups(){return Object.assign({},v(this,K,"f"),v(this,at,"f"))}getHelp(){if(O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(t))return t.then((()=>v(this,pt,"f").help()))}const t=v(this,z,"f").runDefaultBuilderOn(this);if(f(t))return t.then((()=>v(this,pt,"f").help()))}return Promise.resolve(v(this,pt,"f").help())}getOptions(){return v(this,et,"f")}getStrict(){return v(this,ft,"f")}getStrictCommands(){return v(this,dt,"f")}getStrictOptions(){return v(this,ut,"f")}global(t,e){return h(" [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?v(this,et,"f").local=v(this,et,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{v(this,et,"f").local.includes(t)||v(this,et,"f").local.push(t)})),this}group(t,e){h(" ",[t,e],arguments.length);const s=v(this,at,"f")[e]||v(this,K,"f")[e];v(this,at,"f")[e]&&delete v(this,at,"f")[e];const i={};return v(this,K,"f")[e]=(s||[]).concat(t).filter((t=>!i[t]&&(i[t]=!0))),this}hide(t){return h("",[t],arguments.length),v(this,et,"f").hiddenOptions.push(t),this}implies(t,e){return h(" [number|string|array]",[t,e],arguments.length),v(this,yt,"f").implies(t,e),this}locale(t){return h("[string]",[t],arguments.length),void 0===t?(this[kt](),v(this,ct,"f").y18n.getLocale()):(O(this,G,!1,"f"),v(this,ct,"f").y18n.setLocale(t),this)}middleware(t,e,s){return v(this,Y,"f").addMiddleware(t,!!e,s)}nargs(t,e){return h(" [number]",[t,e],arguments.length),this[St](this.nargs.bind(this),"narg",t,e),this}normalize(t){return h("",[t],arguments.length),this[Pt]("normalize",t),this}number(t){return h("",[t],arguments.length),this[Pt]("number",t),this[Qt](t),this}option(t,e){if(h(" [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Qt](t),!v(this,mt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[wt](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),v(this,et,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const s=e.deprecate||e.deprecated;s&&this.deprecateOption(t,s);const i=e.demand||e.required||e.require;i&&this.demand(t,i),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(v(this,et,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const n=e.describe||e.description||e.desc,r=v(this,pt,"f").getDescriptions();Object.prototype.hasOwnProperty.call(r,t)&&"string"!=typeof n||this.describe(t,n),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,s){h("[string|array] [function|boolean|object] [function]",[t,e,s],arguments.length),this[Ct](),void 0===t&&(t=v(this,ht,"f")),"object"==typeof e&&(O(this,rt,e,"f"),e=s),"function"==typeof e&&(O(this,nt,e,"f"),e=!1),e||O(this,ht,t,"f"),v(this,nt,"f")&&O(this,T,!1,"f");const i=this[Jt](t,!!e),n=this.parsed;return v(this,U,"f").setParsed(this.parsed),f(i)?i.then((t=>(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),t,v(this,tt,"f")),t))).catch((t=>{throw v(this,nt,"f")&&v(this,nt,"f")(t,this.parsed.argv,v(this,tt,"f")),t})).finally((()=>{this[Ht](),this.parsed=n})):(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),i,v(this,tt,"f")),this[Ht](),this.parsed=n,i)}parseAsync(t,e,s){const i=this.parse(t,e,s);return f(i)?i:Promise.resolve(i)}parseSync(t,s,i){const n=this.parse(t,s,i);if(f(n))throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return h("",[t],arguments.length),O(this,it,t,"f"),this}pkgConf(t,e){h(" [string]",[t,e],arguments.length);let s=null;const i=this[At](e||v(this,W,"f"));return i[t]&&"object"==typeof i[t]&&(s=n(i[t],e||v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(s)),this}positional(t,e){h(" ",[t,e],arguments.length);const s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=g(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&s.includes(t)));const i=v(this,q,"f").fullCommands[v(this,q,"f").fullCommands.length-1],n=i?v(this,z,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return p(n).forEach((s=>{const i=n[s];Array.isArray(i)?-1!==i.indexOf(t)&&(e[s]=!0):i[t]&&!(s in e)&&(e[s]=i[t])})),this.group(t,v(this,pt,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return h("[boolean]",[t],arguments.length),O(this,lt,t,"f"),this}required(t,e,s){return this.demand(t,e,s)}require(t,e,s){return this.demand(t,e,s)}requiresArg(t){return h(" [number]",[t],arguments.length),"string"==typeof t&&v(this,et,"f").narg[t]||this[St](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return h("[string] [string]",[t,e],arguments.length),t=t||this.$0,v(this,Q,"f").log(v(this,U,"f").generateCompletionScript(t,e||v(this,F,"f")||"completion")),this}showHelp(t){if(h("[string|function]",[t],arguments.length),O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}const e=v(this,z,"f").runDefaultBuilderOn(this);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}return v(this,pt,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return h("[boolean|string] [string]",[t,e],arguments.length),v(this,pt,"f").showHelpOnFail(t,e),this}showVersion(t){return h("[string|function]",[t],arguments.length),v(this,pt,"f").showVersion(t),this}skipValidation(t){return h("",[t],arguments.length),this[Pt]("skipValidation",t),this}strict(t){return h("[boolean]",[t],arguments.length),O(this,ft,!1!==t,"f"),this}strictCommands(t){return h("[boolean]",[t],arguments.length),O(this,dt,!1!==t,"f"),this}strictOptions(t){return h("[boolean]",[t],arguments.length),O(this,ut,!1!==t,"f"),this}string(t){return h("",[t],arguments.length),this[Pt]("string",t),this[Qt](t),this}terminalWidth(){return h([],0),v(this,ct,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return h("",[t],arguments.length),O(this,G,!1,"f"),v(this,ct,"f").y18n.updateLocale(t),this}usage(t,s,i,n){if(h(" [string|boolean] [function|object] [function]",[t,s,i,n],arguments.length),void 0!==s){if(d(t,null,v(this,ct,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,s,i,n);throw new e(".usage() description must start with $0 if being used as alias for .command()")}return v(this,pt,"f").usage(t),this}usageConfiguration(t){return h("",[t],arguments.length),O(this,gt,t,"f"),this}version(t,e,s){const i="version";if(h("[boolean|string] [string] [string]",[t,e,s],arguments.length),v(this,mt,"f")&&(this[Ot](v(this,mt,"f")),v(this,pt,"f").version(void 0),O(this,mt,null,"f")),0===arguments.length)s=this[xt](),t=i;else if(1===arguments.length){if(!1===t)return this;s=t,t=i}else 2===arguments.length&&(s=e,e=void 0);return O(this,mt,"string"==typeof t?t:i,"f"),e=e||v(this,pt,"f").deferY18nLookup("Show version number"),v(this,pt,"f").version(s||void 0),this.boolean(v(this,mt,"f")),this.describe(v(this,mt,"f"),e),this}wrap(t){return h("",[t],arguments.length),v(this,pt,"f").wrap(t),this}[(z=new WeakMap,W=new WeakMap,q=new WeakMap,U=new WeakMap,F=new WeakMap,L=new WeakMap,V=new WeakMap,G=new WeakMap,R=new WeakMap,T=new WeakMap,B=new WeakMap,Y=new WeakMap,K=new WeakMap,J=new WeakMap,Z=new WeakMap,X=new WeakMap,Q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,ht=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=new WeakMap,bt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[vt](){return{log:(...t)=>{this[Rt]()||console.log(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")},error:(...t)=>{this[Rt]()||console.error(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")}}}[Ot](t){p(v(this,et,"f")).forEach((e=>{if("configObjects"===e)return;const s=v(this,et,"f")[e];Array.isArray(s)?s.includes(t)&&s.splice(s.indexOf(t),1):"object"==typeof s&&delete s[t]})),delete v(this,pt,"f").getDescriptions()[t]}[wt](t,e,s){v(this,R,"f")[s]||(v(this,ct,"f").process.emitWarning(t,e),v(this,R,"f")[s]=!0)}[Ct](){v(this,B,"f").push({options:v(this,et,"f"),configObjects:v(this,et,"f").configObjects.slice(0),exitProcess:v(this,T,"f"),groups:v(this,K,"f"),strict:v(this,ft,"f"),strictCommands:v(this,dt,"f"),strictOptions:v(this,ut,"f"),completionCommand:v(this,F,"f"),output:v(this,tt,"f"),exitError:v(this,V,"f"),hasOutput:v(this,J,"f"),parsed:this.parsed,parseFn:v(this,nt,"f"),parseContext:v(this,rt,"f")}),v(this,pt,"f").freeze(),v(this,yt,"f").freeze(),v(this,z,"f").freeze(),v(this,Y,"f").freeze()}[jt](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(v(this,ct,"f").process.argv()[0])?v(this,ct,"f").process.argv().slice(1,2):v(this,ct,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[Yt](v(this,W,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.lengthe.includes("package.json")?"package.json":void 0));d(i,void 0,v(this,ct,"f")),s=JSON.parse(v(this,ct,"f").readFileSync(i,"utf8"))}catch(t){}return v(this,ot,"f")[e]=s||{},v(this,ot,"f")[e]}[Pt](t,e){(e=[].concat(e)).forEach((e=>{e=this[Dt](e),v(this,et,"f")[t].push(e)}))}[St](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=s}))}[$t](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=(v(this,et,"f")[t][e]||[]).concat(s)}))}[It](t,e,s,i,n){if(Array.isArray(s))s.forEach((e=>{t(e,i)}));else if((t=>"object"==typeof t)(s))for(const e of p(s))t(e,s[e]);else n(e,this[Dt](s),i)}[Dt](t){return"__proto__"===t?"___proto___":t}[Nt](t,e){return this[St](this[Nt].bind(this),"key",t,e),this}[Ht](){var t,e,s,i,n,r,o,a,h,l,c,f;const u=v(this,B,"f").pop();let p;d(u,void 0,v(this,ct,"f")),t=this,e=this,s=this,i=this,n=this,r=this,o=this,a=this,h=this,l=this,c=this,f=this,({options:{set value(e){O(t,et,e,"f")}}.value,configObjects:p,exitProcess:{set value(t){O(e,T,t,"f")}}.value,groups:{set value(t){O(s,K,t,"f")}}.value,output:{set value(t){O(i,tt,t,"f")}}.value,exitError:{set value(t){O(n,V,t,"f")}}.value,hasOutput:{set value(t){O(r,J,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){O(o,ft,t,"f")}}.value,strictCommands:{set value(t){O(a,dt,t,"f")}}.value,strictOptions:{set value(t){O(h,ut,t,"f")}}.value,completionCommand:{set value(t){O(l,F,t,"f")}}.value,parseFn:{set value(t){O(c,nt,t,"f")}}.value,parseContext:{set value(t){O(f,rt,t,"f")}}.value}=u),v(this,et,"f").configObjects=p,v(this,pt,"f").unfreeze(),v(this,yt,"f").unfreeze(),v(this,z,"f").unfreeze(),v(this,Y,"f").unfreeze()}[zt](t,e){return j(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[Wt].bind(this),getContext:this[qt].bind(this),getHasOutput:this[Ut].bind(this),getLoggerInstance:this[Ft].bind(this),getParseContext:this[Lt].bind(this),getParserConfiguration:this[Mt].bind(this),getUsageConfiguration:this[_t].bind(this),getUsageInstance:this[Vt].bind(this),getValidationInstance:this[Gt].bind(this),hasParseCallback:this[Rt].bind(this),isGlobalContext:this[Tt].bind(this),postProcess:this[Bt].bind(this),reset:this[Kt].bind(this),runValidation:this[Zt].bind(this),runYargsParserAndExecuteCommands:this[Jt].bind(this),setHasOutput:this[Xt].bind(this)}}[Wt](){return v(this,z,"f")}[qt](){return v(this,q,"f")}[Ut](){return v(this,J,"f")}[Ft](){return v(this,Q,"f")}[Lt](){return v(this,rt,"f")||{}}[Vt](){return v(this,pt,"f")}[Gt](){return v(this,yt,"f")}[Rt](){return!!v(this,nt,"f")}[Tt](){return v(this,X,"f")}[Bt](t,e,s,i){if(s)return t;if(f(t))return t;e||(t=this[bt](t));return(this[Mt]()["parse-positional-numbers"]||void 0===this[Mt]()["parse-positional-numbers"])&&(t=this[Et](t)),i&&(t=C(t,this,v(this,Y,"f").getMiddleware(),!1)),t}[Kt](t={}){O(this,et,v(this,et,"f")||{},"f");const e={};e.local=v(this,et,"f").local||[],e.configObjects=v(this,et,"f").configObjects||[];const s={};e.local.forEach((e=>{s[e]=!0,(t[e]||[]).forEach((t=>{s[t]=!0}))})),Object.assign(v(this,at,"f"),Object.keys(v(this,K,"f")).reduce(((t,e)=>{const i=v(this,K,"f")[e].filter((t=>!(t in s)));return i.length>0&&(t[e]=i),t}),{})),O(this,K,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(v(this,et,"f")[t]||[]).filter((t=>!s[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=g(v(this,et,"f")[t],(t=>!s[t]))})),e.envPrefix=v(this,et,"f").envPrefix,O(this,et,e,"f"),O(this,pt,v(this,pt,"f")?v(this,pt,"f").reset(s):P(this,v(this,ct,"f")),"f"),O(this,yt,v(this,yt,"f")?v(this,yt,"f").reset(s):function(t,e,s){const i=s.y18n.__,n=s.y18n.__n,r={nonOptionCount:function(s){const i=t.getDemandedCommands(),r=s._.length+(s["--"]?s["--"].length:0)-t.getInternalMethods().getContext().commands.length;i._&&(ri._.max)&&(ri._.max&&(void 0!==i._.maxMsg?e.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.max.toString()):null):e.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),i._.max.toString()))))},positionalCount:function(t,s){s{H.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,i)||f.push(e)})),h&&(d.commands.length>0||c.length>0||a)&&s._.slice(d.commands.length).forEach((t=>{c.includes(""+t)||f.push(""+t)})),h){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,i=d.commands.length+e;i{t=String(t),d.commands.includes(t)||f.includes(t)||f.push(t)}))}f.length&&e.fail(n("Unknown argument: %s","Unknown arguments: %s",f.length,f.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(s){const i=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&s._.slice(o.commands.length).forEach((t=>{i.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(n("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,s){if(!Object.prototype.hasOwnProperty.call(s,e))return!1;const i=t.parsed.newAliases;return[e,...s[e]].some((t=>!Object.prototype.hasOwnProperty.call(i,t)||!i[e]))},limitedChoices:function(s){const n=t.getOptions(),r={};if(!Object.keys(n.choices).length)return;Object.keys(s).forEach((t=>{-1===H.indexOf(t)&&Object.prototype.hasOwnProperty.call(n.choices,t)&&[].concat(s[t]).forEach((e=>{-1===n.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=i("Invalid values:");o.forEach((t=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(n.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const s=Number(e);return"number"==typeof(e=isNaN(s)?e:s)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,i){h(" [array|number|string]",[e,i],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(i)?i.forEach((t=>r.implies(e,t))):(d(i,void 0,s),o[e].push(i)))},r.getImplied=function(){return o},r.implications=function(t){const s=[];if(Object.keys(o).forEach((e=>{const i=e;(o[e]||[]).forEach((e=>{let n=i;const r=e;n=a(t,n),e=a(t,e),n&&!e&&s.push(` ${i} -> ${r}`)}))})),s.length){let t=`${i("Implications failed:")}\n`;s.forEach((e=>{t+=e})),e.fail(t)}};let l={};r.conflicts=function(e,s){h(" [array|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),l[e]||(l[e]=[]),Array.isArray(s)?s.forEach((t=>r.conflicts(e,t))):l[e].push(s))},r.getConflicting=()=>l,r.conflicting=function(n){Object.keys(n).forEach((t=>{l[t]&&l[t].forEach((s=>{s&&void 0!==n[t]&&void 0!==n[s]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,s))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach((t=>{l[t].forEach((r=>{r&&void 0!==n[s.Parser.camelCase(t)]&&void 0!==n[s.Parser.camelCase(r)]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,s){s=s.sort(((t,e)=>e.length-t.length));let n=null,r=1/0;for(let e,i=0;void 0!==(e=s[i]);i++){const s=N(t,e);s<=3&&s!t[e])),l=g(l,(e=>!t[e])),r};const c=[];return r.freeze=function(){c.push({implied:o,conflicting:l})},r.unfreeze=function(){const t=c.pop();d(t,void 0,s),({implied:o,conflicting:l}=t)},r}(this,v(this,pt,"f"),v(this,ct,"f")),"f"),O(this,z,v(this,z,"f")?v(this,z,"f").reset():function(t,e,s,i){return new _(t,e,s,i)}(v(this,pt,"f"),v(this,yt,"f"),v(this,Y,"f"),v(this,ct,"f")),"f"),v(this,U,"f")||O(this,U,function(t,e,s,i){return new D(t,e,s,i)}(this,v(this,pt,"f"),v(this,z,"f"),v(this,ct,"f")),"f"),v(this,Y,"f").reset(),O(this,F,null,"f"),O(this,tt,"","f"),O(this,V,null,"f"),O(this,J,!1,"f"),this.parsed=!1,this}[Yt](t,e){return v(this,ct,"f").path.relative(t,e)}[Jt](t,s,i,n=0,r=!1){let o=!!i||r;t=t||v(this,ht,"f"),v(this,et,"f").__=v(this,ct,"f").y18n.__,v(this,et,"f").configuration=this[Mt]();const a=!!v(this,et,"f").configuration["populate--"],h=Object.assign({},v(this,et,"f").configuration,{"populate--":!0}),l=v(this,ct,"f").Parser.detailed(t,Object.assign({},v(this,et,"f"),{configuration:{"parse-positional-numbers":!1,...h}})),c=Object.assign(l.argv,v(this,rt,"f"));let d;const u=l.aliases;let p=!1,g=!1;Object.keys(c).forEach((t=>{t===v(this,Z,"f")&&c[t]?p=!0:t===v(this,mt,"f")&&c[t]&&(g=!0)})),c.$0=this.$0,this.parsed=l,0===n&&v(this,pt,"f").clearCachedHelpMessage();try{if(this[kt](),s)return this[Bt](c,a,!!i,!1);if(v(this,Z,"f")){[v(this,Z,"f")].concat(u[v(this,Z,"f")]||[]).filter((t=>t.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),p=!0)}O(this,X,!1,"f");const h=v(this,z,"f").getCommands(),m=v(this,U,"f").completionKey in c,y=p||m||r;if(c._.length){if(h.length){let t;for(let e,s=n||0;void 0!==c._[s];s++){if(e=String(c._[s]),h.includes(e)&&e!==v(this,F,"f")){const t=v(this,z,"f").runCommand(e,this,l,s+1,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(!t&&e!==v(this,F,"f")){t=e;break}}!v(this,z,"f").hasDefaultCommand()&&v(this,lt,"f")&&t&&!y&&v(this,yt,"f").recommendCommands(t,h)}v(this,F,"f")&&c._.includes(v(this,F,"f"))&&!m&&(v(this,T,"f")&&E(!0),this.showCompletionScript(),this.exit(0))}if(v(this,z,"f").hasDefaultCommand()&&!y){const t=v(this,z,"f").runCommand(null,this,l,0,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(m){v(this,T,"f")&&E(!0);const s=(t=[].concat(t)).slice(t.indexOf(`--${v(this,U,"f").completionKey}`)+1);return v(this,U,"f").getCompletion(s,((t,s)=>{if(t)throw new e(t.message);(s||[]).forEach((t=>{v(this,Q,"f").log(t)})),this.exit(0)})),this[Bt](c,!a,!!i,!1)}if(v(this,J,"f")||(p?(v(this,T,"f")&&E(!0),o=!0,this.showHelp("log"),this.exit(0)):g&&(v(this,T,"f")&&E(!0),o=!0,v(this,pt,"f").showVersion("log"),this.exit(0))),!o&&v(this,et,"f").skipValidation.length>0&&(o=Object.keys(c).some((t=>v(this,et,"f").skipValidation.indexOf(t)>=0&&!0===c[t]))),!o){if(l.error)throw new e(l.error.message);if(!m){const t=this[Zt](u,{},l.error);i||(d=C(c,this,v(this,Y,"f").getMiddleware(),!0)),d=this[zt](t,null!=d?d:c),f(d)&&!i&&(d=d.then((()=>C(c,this,v(this,Y,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof e))throw t;v(this,pt,"f").fail(t.message,t)}return this[Bt](null!=d?d:c,a,!!i,!0)}[Zt](t,s,i,n){const r={...this.getDemandedOptions()};return o=>{if(i)throw new e(i.message);v(this,yt,"f").nonOptionCount(o),v(this,yt,"f").requiredArguments(o,r);let a=!1;v(this,dt,"f")&&(a=v(this,yt,"f").unknownCommands(o)),v(this,ft,"f")&&!a?v(this,yt,"f").unknownArguments(o,t,s,!!n):v(this,ut,"f")&&v(this,yt,"f").unknownArguments(o,t,{},!1,!1),v(this,yt,"f").limitedChoices(o),v(this,yt,"f").implications(o),v(this,yt,"f").conflicting(o)}}[Xt](){O(this,J,!0,"f")}[Qt](t){if("string"==typeof t)v(this,et,"f").key[t]=!0;else for(const e of t)v(this,et,"f").key[e]=!0}}var ee,se;const{readFileSync:ie}=require("fs"),{inspect:ne}=require("util"),{resolve:re}=require("path"),oe=require("y18n"),ae=require("yargs-parser");var he,le={assert:{notStrictEqual:t.notStrictEqual,strictEqual:t.strictEqual},cliui:require("cliui"),findUp:require("escalade/sync"),getEnv:t=>process.env[t],getCallerFile:require("get-caller-file"),getProcessArgvBin:y,inspect:ne,mainFilename:null!==(se=null===(ee=null===require||void 0===require?void 0:require.main)||void 0===ee?void 0:ee.filename)&&void 0!==se?se:process.cwd(),Parser:ae,path:require("path"),process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:t=>{process.exit(t)},nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:ie,require:require,requireDirectory:require("require-directory"),stringWidth:require("string-width"),y18n:oe({directory:re(__dirname,"../locales"),updateFiles:!1})};const ce=(null===(he=null===process||void 0===process?void 0:process.env)||void 0===he?void 0:he.YARGS_MIN_NODE_VERSION)?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1]){const i=new te(t,e,s,de);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}),argsert:h,isPromise:f,objFilter:g,parseCommand:o,Parser:fe,processArgv:b,YError:e};module.exports=ue; diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/argsert.js b/node_modules/concurrently/node_modules/yargs/build/lib/argsert.js new file mode 100644 index 000000000..be5b3aa69 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/argsert.js @@ -0,0 +1,62 @@ +import { YError } from './yerror.js'; +import { parseCommand } from './parse-command.js'; +const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; +export function argsert(arg1, arg2, arg3) { + function parseArgs() { + return typeof arg1 === 'object' + ? [{ demanded: [], optional: [] }, arg1, arg2] + : [ + parseCommand(`cmd ${arg1}`), + arg2, + arg3, + ]; + } + try { + let position = 0; + const [parsed, callerArguments, _length] = parseArgs(); + const args = [].slice.call(callerArguments); + while (args.length && args[args.length - 1] === undefined) + args.pop(); + const length = _length || args.length; + if (length < parsed.demanded.length) { + throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); + } + const totalCommands = parsed.demanded.length + parsed.optional.length; + if (length > totalCommands) { + throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); + } + parsed.demanded.forEach(demanded => { + const arg = args.shift(); + const observedType = guessType(arg); + const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); + if (matchingTypes.length === 0) + argumentTypeError(observedType, demanded.cmd, position); + position += 1; + }); + parsed.optional.forEach(optional => { + if (args.length === 0) + return; + const arg = args.shift(); + const observedType = guessType(arg); + const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); + if (matchingTypes.length === 0) + argumentTypeError(observedType, optional.cmd, position); + position += 1; + }); + } + catch (err) { + console.warn(err.stack); + } +} +function guessType(arg) { + if (Array.isArray(arg)) { + return 'array'; + } + else if (arg === null) { + return 'null'; + } + return typeof arg; +} +function argumentTypeError(observedType, allowedTypes, position) { + throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/command.js b/node_modules/concurrently/node_modules/yargs/build/lib/command.js new file mode 100644 index 000000000..47c1ed635 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/command.js @@ -0,0 +1,449 @@ +import { assertNotStrictEqual, } from './typings/common-types.js'; +import { isPromise } from './utils/is-promise.js'; +import { applyMiddleware, commandMiddlewareFactory, } from './middleware.js'; +import { parseCommand } from './parse-command.js'; +import { isYargsInstance, } from './yargs-factory.js'; +import { maybeAsyncResult } from './utils/maybe-async-result.js'; +import whichModule from './utils/which-module.js'; +const DEFAULT_MARKER = /(^\*)|(^\$0)/; +export class CommandInstance { + constructor(usage, validation, globalMiddleware, shim) { + this.requireCache = new Set(); + this.handlers = {}; + this.aliasMap = {}; + this.frozens = []; + this.shim = shim; + this.usage = usage; + this.globalMiddleware = globalMiddleware; + this.validation = validation; + } + addDirectory(dir, req, callerFile, opts) { + opts = opts || {}; + if (typeof opts.recurse !== 'boolean') + opts.recurse = false; + if (!Array.isArray(opts.extensions)) + opts.extensions = ['js']; + const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o; + opts.visit = (obj, joined, filename) => { + const visited = parentVisit(obj, joined, filename); + if (visited) { + if (this.requireCache.has(joined)) + return visited; + else + this.requireCache.add(joined); + this.addHandler(visited); + } + return visited; + }; + this.shim.requireDirectory({ require: req, filename: callerFile }, dir, opts); + } + addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { + let aliases = []; + const middlewares = commandMiddlewareFactory(commandMiddleware); + handler = handler || (() => { }); + if (Array.isArray(cmd)) { + if (isCommandAndAliases(cmd)) { + [cmd, ...aliases] = cmd; + } + else { + for (const command of cmd) { + this.addHandler(command); + } + } + } + else if (isCommandHandlerDefinition(cmd)) { + let command = Array.isArray(cmd.command) || typeof cmd.command === 'string' + ? cmd.command + : this.moduleName(cmd); + if (cmd.aliases) + command = [].concat(command).concat(cmd.aliases); + this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); + return; + } + else if (isCommandBuilderDefinition(builder)) { + this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); + return; + } + if (typeof cmd === 'string') { + const parsedCommand = parseCommand(cmd); + aliases = aliases.map(alias => parseCommand(alias).cmd); + let isDefault = false; + const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => { + if (DEFAULT_MARKER.test(c)) { + isDefault = true; + return false; + } + return true; + }); + if (parsedAliases.length === 0 && isDefault) + parsedAliases.push('$0'); + if (isDefault) { + parsedCommand.cmd = parsedAliases[0]; + aliases = parsedAliases.slice(1); + cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); + } + aliases.forEach(alias => { + this.aliasMap[alias] = parsedCommand.cmd; + }); + if (description !== false) { + this.usage.command(cmd, description, isDefault, aliases, deprecated); + } + this.handlers[parsedCommand.cmd] = { + original: cmd, + description, + handler, + builder: builder || {}, + middlewares, + deprecated, + demanded: parsedCommand.demanded, + optional: parsedCommand.optional, + }; + if (isDefault) + this.defaultCommand = this.handlers[parsedCommand.cmd]; + } + } + getCommandHandlers() { + return this.handlers; + } + getCommands() { + return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); + } + hasDefaultCommand() { + return !!this.defaultCommand; + } + runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) { + const commandHandler = this.handlers[command] || + this.handlers[this.aliasMap[command]] || + this.defaultCommand; + const currentContext = yargs.getInternalMethods().getContext(); + const parentCommands = currentContext.commands.slice(); + const isDefaultCommand = !command; + if (command) { + currentContext.commands.push(command); + currentContext.fullCommands.push(commandHandler.original); + } + const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet); + return isPromise(builderResult) + ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs)) + : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs); + } + applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) { + const builder = commandHandler.builder; + let innerYargs = yargs; + if (isCommandBuilderCallback(builder)) { + yargs.getInternalMethods().getUsageInstance().freeze(); + const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet); + if (isPromise(builderOutput)) { + return builderOutput.then(output => { + innerYargs = isYargsInstance(output) ? output : yargs; + return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); + }); + } + } + else if (isCommandBuilderOptionDefinitions(builder)) { + yargs.getInternalMethods().getUsageInstance().freeze(); + innerYargs = yargs.getInternalMethods().reset(aliases); + Object.keys(commandHandler.builder).forEach(key => { + innerYargs.option(key, builder[key]); + }); + } + return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); + } + parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) { + if (isDefaultCommand) + innerYargs.getInternalMethods().getUsageInstance().unfreeze(true); + if (this.shouldUpdateUsage(innerYargs)) { + innerYargs + .getInternalMethods() + .getUsageInstance() + .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); + } + const innerArgv = innerYargs + .getInternalMethods() + .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly); + return isPromise(innerArgv) + ? innerArgv.then(argv => ({ + aliases: innerYargs.parsed.aliases, + innerArgv: argv, + })) + : { + aliases: innerYargs.parsed.aliases, + innerArgv: innerArgv, + }; + } + shouldUpdateUsage(yargs) { + return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() && + yargs.getInternalMethods().getUsageInstance().getUsage().length === 0); + } + usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { + const c = DEFAULT_MARKER.test(commandHandler.original) + ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() + : commandHandler.original; + const pc = parentCommands.filter(c => { + return !DEFAULT_MARKER.test(c); + }); + pc.push(c); + return `$0 ${pc.join(' ')}`; + } + handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) { + if (!yargs.getInternalMethods().getHasOutput()) { + const validation = yargs + .getInternalMethods() + .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand); + innerArgv = maybeAsyncResult(innerArgv, result => { + validation(result); + return result; + }); + } + if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) { + yargs.getInternalMethods().setHasOutput(); + const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; + yargs + .getInternalMethods() + .postProcess(innerArgv, populateDoubleDash, false, false); + innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false); + innerArgv = maybeAsyncResult(innerArgv, result => { + const handlerResult = commandHandler.handler(result); + return isPromise(handlerResult) + ? handlerResult.then(() => result) + : result; + }); + if (!isDefaultCommand) { + yargs.getInternalMethods().getUsageInstance().cacheHelpMessage(); + } + if (isPromise(innerArgv) && + !yargs.getInternalMethods().hasParseCallback()) { + innerArgv.catch(error => { + try { + yargs.getInternalMethods().getUsageInstance().fail(null, error); + } + catch (_err) { + } + }); + } + } + if (!isDefaultCommand) { + currentContext.commands.pop(); + currentContext.fullCommands.pop(); + } + return innerArgv; + } + applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) { + let positionalMap = {}; + if (helpOnly) + return innerArgv; + if (!yargs.getInternalMethods().getHasOutput()) { + positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs); + } + const middlewares = this.globalMiddleware + .getMiddleware() + .slice(0) + .concat(commandHandler.middlewares); + const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true); + return isPromise(maybePromiseArgv) + ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap)) + : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap); + } + populatePositionals(commandHandler, argv, context, yargs) { + argv._ = argv._.slice(context.commands.length); + const demanded = commandHandler.demanded.slice(0); + const optional = commandHandler.optional.slice(0); + const positionalMap = {}; + this.validation.positionalCount(demanded.length, argv._.length); + while (demanded.length) { + const demand = demanded.shift(); + this.populatePositional(demand, argv, positionalMap); + } + while (optional.length) { + const maybe = optional.shift(); + this.populatePositional(maybe, argv, positionalMap); + } + argv._ = context.commands.concat(argv._.map(a => '' + a)); + this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs); + return positionalMap; + } + populatePositional(positional, argv, positionalMap) { + const cmd = positional.cmd[0]; + if (positional.variadic) { + positionalMap[cmd] = argv._.splice(0).map(String); + } + else { + if (argv._.length) + positionalMap[cmd] = [String(argv._.shift())]; + } + } + cmdToParseOptions(cmdString) { + const parseOptions = { + array: [], + default: {}, + alias: {}, + demand: {}, + }; + const parsed = parseCommand(cmdString); + parsed.demanded.forEach(d => { + const [cmd, ...aliases] = d.cmd; + if (d.variadic) { + parseOptions.array.push(cmd); + parseOptions.default[cmd] = []; + } + parseOptions.alias[cmd] = aliases; + parseOptions.demand[cmd] = true; + }); + parsed.optional.forEach(o => { + const [cmd, ...aliases] = o.cmd; + if (o.variadic) { + parseOptions.array.push(cmd); + parseOptions.default[cmd] = []; + } + parseOptions.alias[cmd] = aliases; + }); + return parseOptions; + } + postProcessPositionals(argv, positionalMap, parseOptions, yargs) { + const options = Object.assign({}, yargs.getOptions()); + options.default = Object.assign(parseOptions.default, options.default); + for (const key of Object.keys(parseOptions.alias)) { + options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); + } + options.array = options.array.concat(parseOptions.array); + options.config = {}; + const unparsed = []; + Object.keys(positionalMap).forEach(key => { + positionalMap[key].map(value => { + if (options.configuration['unknown-options-as-args']) + options.key[key] = true; + unparsed.push(`--${key}`); + unparsed.push(value); + }); + }); + if (!unparsed.length) + return; + const config = Object.assign({}, options.configuration, { + 'populate--': false, + }); + const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { + configuration: config, + })); + if (parsed.error) { + yargs + .getInternalMethods() + .getUsageInstance() + .fail(parsed.error.message, parsed.error); + } + else { + const positionalKeys = Object.keys(positionalMap); + Object.keys(positionalMap).forEach(key => { + positionalKeys.push(...parsed.aliases[key]); + }); + Object.keys(parsed.argv).forEach(key => { + if (positionalKeys.includes(key)) { + if (!positionalMap[key]) + positionalMap[key] = parsed.argv[key]; + if (!this.isInConfigs(yargs, key) && + !this.isDefaulted(yargs, key) && + Object.prototype.hasOwnProperty.call(argv, key) && + Object.prototype.hasOwnProperty.call(parsed.argv, key) && + (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) { + argv[key] = [].concat(argv[key], parsed.argv[key]); + } + else { + argv[key] = parsed.argv[key]; + } + } + }); + } + } + isDefaulted(yargs, key) { + const { default: defaults } = yargs.getOptions(); + return (Object.prototype.hasOwnProperty.call(defaults, key) || + Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key))); + } + isInConfigs(yargs, key) { + const { configObjects } = yargs.getOptions(); + return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) || + configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key)))); + } + runDefaultBuilderOn(yargs) { + if (!this.defaultCommand) + return; + if (this.shouldUpdateUsage(yargs)) { + const commandString = DEFAULT_MARKER.test(this.defaultCommand.original) + ? this.defaultCommand.original + : this.defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); + yargs + .getInternalMethods() + .getUsageInstance() + .usage(commandString, this.defaultCommand.description); + } + const builder = this.defaultCommand.builder; + if (isCommandBuilderCallback(builder)) { + return builder(yargs, true); + } + else if (!isCommandBuilderDefinition(builder)) { + Object.keys(builder).forEach(key => { + yargs.option(key, builder[key]); + }); + } + return undefined; + } + moduleName(obj) { + const mod = whichModule(obj); + if (!mod) + throw new Error(`No command name given for module: ${this.shim.inspect(obj)}`); + return this.commandFromFilename(mod.filename); + } + commandFromFilename(filename) { + return this.shim.path.basename(filename, this.shim.path.extname(filename)); + } + extractDesc({ describe, description, desc }) { + for (const test of [describe, description, desc]) { + if (typeof test === 'string' || test === false) + return test; + assertNotStrictEqual(test, true, this.shim); + } + return false; + } + freeze() { + this.frozens.push({ + handlers: this.handlers, + aliasMap: this.aliasMap, + defaultCommand: this.defaultCommand, + }); + } + unfreeze() { + const frozen = this.frozens.pop(); + assertNotStrictEqual(frozen, undefined, this.shim); + ({ + handlers: this.handlers, + aliasMap: this.aliasMap, + defaultCommand: this.defaultCommand, + } = frozen); + } + reset() { + this.handlers = {}; + this.aliasMap = {}; + this.defaultCommand = undefined; + this.requireCache = new Set(); + return this; + } +} +export function command(usage, validation, globalMiddleware, shim) { + return new CommandInstance(usage, validation, globalMiddleware, shim); +} +export function isCommandBuilderDefinition(builder) { + return (typeof builder === 'object' && + !!builder.builder && + typeof builder.handler === 'function'); +} +function isCommandAndAliases(cmd) { + return cmd.every(c => typeof c === 'string'); +} +export function isCommandBuilderCallback(builder) { + return typeof builder === 'function'; +} +function isCommandBuilderOptionDefinitions(builder) { + return typeof builder === 'object'; +} +export function isCommandHandlerDefinition(cmd) { + return typeof cmd === 'object' && !Array.isArray(cmd); +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/completion-templates.js b/node_modules/concurrently/node_modules/yargs/build/lib/completion-templates.js new file mode 100644 index 000000000..2c4dcb580 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/completion-templates.js @@ -0,0 +1,48 @@ +export const completionShTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc +# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local cur_word args type_list + + cur_word="\${COMP_WORDS[COMP_CWORD]}" + args=("\${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") + + COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) + + # if no match was found, fall back to filename completion + if [ \${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=() + fi + + return 0 +} +complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +`; +export const completionZshTemplate = `#compdef {{app_name}} +###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc +# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local reply + local si=$IFS + IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) + IFS=$si + _describe 'values' reply +} +compdef _{{app_name}}_yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +`; diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/completion.js b/node_modules/concurrently/node_modules/yargs/build/lib/completion.js new file mode 100644 index 000000000..cef2bbe08 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/completion.js @@ -0,0 +1,243 @@ +import { isCommandBuilderCallback } from './command.js'; +import { assertNotStrictEqual } from './typings/common-types.js'; +import * as templates from './completion-templates.js'; +import { isPromise } from './utils/is-promise.js'; +import { parseCommand } from './parse-command.js'; +export class Completion { + constructor(yargs, usage, command, shim) { + var _a, _b, _c; + this.yargs = yargs; + this.usage = usage; + this.command = command; + this.shim = shim; + this.completionKey = 'get-yargs-completions'; + this.aliases = null; + this.customCompletionFunction = null; + this.indexAfterLastReset = 0; + this.zshShell = + (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) || + ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false; + } + defaultCompletion(args, argv, current, done) { + const handlers = this.command.getCommandHandlers(); + for (let i = 0, ii = args.length; i < ii; ++i) { + if (handlers[args[i]] && handlers[args[i]].builder) { + const builder = handlers[args[i]].builder; + if (isCommandBuilderCallback(builder)) { + this.indexAfterLastReset = i + 1; + const y = this.yargs.getInternalMethods().reset(); + builder(y, true); + return y.argv; + } + } + } + const completions = []; + this.commandCompletions(completions, args, current); + this.optionCompletions(completions, args, argv, current); + this.choicesFromOptionsCompletions(completions, args, argv, current); + this.choicesFromPositionalsCompletions(completions, args, argv, current); + done(null, completions); + } + commandCompletions(completions, args, current) { + const parentCommands = this.yargs + .getInternalMethods() + .getContext().commands; + if (!current.match(/^-/) && + parentCommands[parentCommands.length - 1] !== current && + !this.previousArgHasChoices(args)) { + this.usage.getCommands().forEach(usageCommand => { + const commandName = parseCommand(usageCommand[0]).cmd; + if (args.indexOf(commandName) === -1) { + if (!this.zshShell) { + completions.push(commandName); + } + else { + const desc = usageCommand[1] || ''; + completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); + } + } + }); + } + } + optionCompletions(completions, args, argv, current) { + if ((current.match(/^-/) || (current === '' && completions.length === 0)) && + !this.previousArgHasChoices(args)) { + const options = this.yargs.getOptions(); + const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; + Object.keys(options.key).forEach(key => { + const negable = !!options.configuration['boolean-negation'] && + options.boolean.includes(key); + const isPositionalKey = positionalKeys.includes(key); + if (!isPositionalKey && + !options.hiddenOptions.includes(key) && + !this.argsContainKey(args, key, negable)) { + this.completeOptionKey(key, completions, current, negable && !!options.default[key]); + } + }); + } + } + choicesFromOptionsCompletions(completions, args, argv, current) { + if (this.previousArgHasChoices(args)) { + const choices = this.getPreviousArgChoices(args); + if (choices && choices.length > 0) { + completions.push(...choices.map(c => c.replace(/:/g, '\\:'))); + } + } + } + choicesFromPositionalsCompletions(completions, args, argv, current) { + if (current === '' && + completions.length > 0 && + this.previousArgHasChoices(args)) { + return; + } + const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; + const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + + 1); + const positionalKey = positionalKeys[argv._.length - offset - 1]; + if (!positionalKey) { + return; + } + const choices = this.yargs.getOptions().choices[positionalKey] || []; + for (const choice of choices) { + if (choice.startsWith(current)) { + completions.push(choice.replace(/:/g, '\\:')); + } + } + } + getPreviousArgChoices(args) { + if (args.length < 1) + return; + let previousArg = args[args.length - 1]; + let filter = ''; + if (!previousArg.startsWith('-') && args.length > 1) { + filter = previousArg; + previousArg = args[args.length - 2]; + } + if (!previousArg.startsWith('-')) + return; + const previousArgKey = previousArg.replace(/^-+/, ''); + const options = this.yargs.getOptions(); + const possibleAliases = [ + previousArgKey, + ...(this.yargs.getAliases()[previousArgKey] || []), + ]; + let choices; + for (const possibleAlias of possibleAliases) { + if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) && + Array.isArray(options.choices[possibleAlias])) { + choices = options.choices[possibleAlias]; + break; + } + } + if (choices) { + return choices.filter(choice => !filter || choice.startsWith(filter)); + } + } + previousArgHasChoices(args) { + const choices = this.getPreviousArgChoices(args); + return choices !== undefined && choices.length > 0; + } + argsContainKey(args, key, negable) { + const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1; + if (argsContains(key)) + return true; + if (negable && argsContains(`no-${key}`)) + return true; + if (this.aliases) { + for (const alias of this.aliases[key]) { + if (argsContains(alias)) + return true; + } + } + return false; + } + completeOptionKey(key, completions, current, negable) { + var _a, _b, _c, _d; + let keyWithDesc = key; + if (this.zshShell) { + const descs = this.usage.getDescriptions(); + const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => { + const desc = descs[alias]; + return typeof desc === 'string' && desc.length > 0; + }); + const descFromAlias = aliasKey ? descs[aliasKey] : undefined; + const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : ''; + keyWithDesc = `${key.replace(/:/g, '\\:')}:${desc + .replace('__yargsString__:', '') + .replace(/(\r\n|\n|\r)/gm, ' ')}`; + } + const startsByTwoDashes = (s) => /^--/.test(s); + const isShortOption = (s) => /^[^0-9]$/.test(s); + const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; + completions.push(dashes + keyWithDesc); + if (negable) { + completions.push(dashes + 'no-' + keyWithDesc); + } + } + customCompletion(args, argv, current, done) { + assertNotStrictEqual(this.customCompletionFunction, null, this.shim); + if (isSyncCompletionFunction(this.customCompletionFunction)) { + const result = this.customCompletionFunction(current, argv); + if (isPromise(result)) { + return result + .then(list => { + this.shim.process.nextTick(() => { + done(null, list); + }); + }) + .catch(err => { + this.shim.process.nextTick(() => { + done(err, undefined); + }); + }); + } + return done(null, result); + } + else if (isFallbackCompletionFunction(this.customCompletionFunction)) { + return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => { + done(null, completions); + }); + } + else { + return this.customCompletionFunction(current, argv, completions => { + done(null, completions); + }); + } + } + getCompletion(args, done) { + const current = args.length ? args[args.length - 1] : ''; + const argv = this.yargs.parse(args, true); + const completionFunction = this.customCompletionFunction + ? (argv) => this.customCompletion(args, argv, current, done) + : (argv) => this.defaultCompletion(args, argv, current, done); + return isPromise(argv) + ? argv.then(completionFunction) + : completionFunction(argv); + } + generateCompletionScript($0, cmd) { + let script = this.zshShell + ? templates.completionZshTemplate + : templates.completionShTemplate; + const name = this.shim.path.basename($0); + if ($0.match(/\.js$/)) + $0 = `./${$0}`; + script = script.replace(/{{app_name}}/g, name); + script = script.replace(/{{completion_command}}/g, cmd); + return script.replace(/{{app_path}}/g, $0); + } + registerFunction(fn) { + this.customCompletionFunction = fn; + } + setParsed(parsed) { + this.aliases = parsed.aliases; + } +} +export function completion(yargs, usage, command, shim) { + return new Completion(yargs, usage, command, shim); +} +function isSyncCompletionFunction(completionFunction) { + return completionFunction.length < 3; +} +function isFallbackCompletionFunction(completionFunction) { + return completionFunction.length > 3; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/middleware.js b/node_modules/concurrently/node_modules/yargs/build/lib/middleware.js new file mode 100644 index 000000000..4e561a79f --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/middleware.js @@ -0,0 +1,88 @@ +import { argsert } from './argsert.js'; +import { isPromise } from './utils/is-promise.js'; +export class GlobalMiddleware { + constructor(yargs) { + this.globalMiddleware = []; + this.frozens = []; + this.yargs = yargs; + } + addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) { + argsert(' [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length); + if (Array.isArray(callback)) { + for (let i = 0; i < callback.length; i++) { + if (typeof callback[i] !== 'function') { + throw Error('middleware must be a function'); + } + const m = callback[i]; + m.applyBeforeValidation = applyBeforeValidation; + m.global = global; + } + Array.prototype.push.apply(this.globalMiddleware, callback); + } + else if (typeof callback === 'function') { + const m = callback; + m.applyBeforeValidation = applyBeforeValidation; + m.global = global; + m.mutates = mutates; + this.globalMiddleware.push(callback); + } + return this.yargs; + } + addCoerceMiddleware(callback, option) { + const aliases = this.yargs.getAliases(); + this.globalMiddleware = this.globalMiddleware.filter(m => { + const toCheck = [...(aliases[option] || []), option]; + if (!m.option) + return true; + else + return !toCheck.includes(m.option); + }); + callback.option = option; + return this.addMiddleware(callback, true, true, true); + } + getMiddleware() { + return this.globalMiddleware; + } + freeze() { + this.frozens.push([...this.globalMiddleware]); + } + unfreeze() { + const frozen = this.frozens.pop(); + if (frozen !== undefined) + this.globalMiddleware = frozen; + } + reset() { + this.globalMiddleware = this.globalMiddleware.filter(m => m.global); + } +} +export function commandMiddlewareFactory(commandMiddleware) { + if (!commandMiddleware) + return []; + return commandMiddleware.map(middleware => { + middleware.applyBeforeValidation = false; + return middleware; + }); +} +export function applyMiddleware(argv, yargs, middlewares, beforeValidation) { + return middlewares.reduce((acc, middleware) => { + if (middleware.applyBeforeValidation !== beforeValidation) { + return acc; + } + if (middleware.mutates) { + if (middleware.applied) + return acc; + middleware.applied = true; + } + if (isPromise(acc)) { + return acc + .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) + .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); + } + else { + const result = middleware(acc, yargs); + return isPromise(result) + ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) + : Object.assign(acc, result); + } + }, argv); +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/parse-command.js b/node_modules/concurrently/node_modules/yargs/build/lib/parse-command.js new file mode 100644 index 000000000..4989f5310 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/parse-command.js @@ -0,0 +1,32 @@ +export function parseCommand(cmd) { + const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); + const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); + const bregex = /\.*[\][<>]/g; + const firstCommand = splitCommand.shift(); + if (!firstCommand) + throw new Error(`No command found in: ${cmd}`); + const parsedCommand = { + cmd: firstCommand.replace(bregex, ''), + demanded: [], + optional: [], + }; + splitCommand.forEach((cmd, i) => { + let variadic = false; + cmd = cmd.replace(/\s/g, ''); + if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) + variadic = true; + if (/^\[/.test(cmd)) { + parsedCommand.optional.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic, + }); + } + else { + parsedCommand.demanded.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic, + }); + } + }); + return parsedCommand; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/typings/common-types.js b/node_modules/concurrently/node_modules/yargs/build/lib/typings/common-types.js new file mode 100644 index 000000000..73e1773a2 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/typings/common-types.js @@ -0,0 +1,9 @@ +export function assertNotStrictEqual(actual, expected, shim, message) { + shim.assert.notStrictEqual(actual, expected, message); +} +export function assertSingleKey(actual, shim) { + shim.assert.strictEqual(typeof actual, 'string'); +} +export function objectKeys(object) { + return Object.keys(object); +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/typings/yargs-parser-types.js b/node_modules/concurrently/node_modules/yargs/build/lib/typings/yargs-parser-types.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/typings/yargs-parser-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/usage.js b/node_modules/concurrently/node_modules/yargs/build/lib/usage.js new file mode 100644 index 000000000..0127c130d --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/usage.js @@ -0,0 +1,584 @@ +import { objFilter } from './utils/obj-filter.js'; +import { YError } from './yerror.js'; +import setBlocking from './utils/set-blocking.js'; +function isBoolean(fail) { + return typeof fail === 'boolean'; +} +export function usage(yargs, shim) { + const __ = shim.y18n.__; + const self = {}; + const fails = []; + self.failFn = function failFn(f) { + fails.push(f); + }; + let failMessage = null; + let globalFailMessage = null; + let showHelpOnFail = true; + self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { + const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; + if (yargs.getInternalMethods().isGlobalContext()) { + globalFailMessage = message; + } + failMessage = message; + showHelpOnFail = enabled; + return self; + }; + let failureOutput = false; + self.fail = function fail(msg, err) { + const logger = yargs.getInternalMethods().getLoggerInstance(); + if (fails.length) { + for (let i = fails.length - 1; i >= 0; --i) { + const fail = fails[i]; + if (isBoolean(fail)) { + if (err) + throw err; + else if (msg) + throw Error(msg); + } + else { + fail(msg, err, self); + } + } + } + else { + if (yargs.getExitProcess()) + setBlocking(true); + if (!failureOutput) { + failureOutput = true; + if (showHelpOnFail) { + yargs.showHelp('error'); + logger.error(); + } + if (msg || err) + logger.error(msg || err); + const globalOrCommandFailMessage = failMessage || globalFailMessage; + if (globalOrCommandFailMessage) { + if (msg || err) + logger.error(''); + logger.error(globalOrCommandFailMessage); + } + } + err = err || new YError(msg); + if (yargs.getExitProcess()) { + return yargs.exit(1); + } + else if (yargs.getInternalMethods().hasParseCallback()) { + return yargs.exit(1, err); + } + else { + throw err; + } + } + }; + let usages = []; + let usageDisabled = false; + self.usage = (msg, description) => { + if (msg === null) { + usageDisabled = true; + usages = []; + return self; + } + usageDisabled = false; + usages.push([msg, description || '']); + return self; + }; + self.getUsage = () => { + return usages; + }; + self.getUsageDisabled = () => { + return usageDisabled; + }; + self.getPositionalGroupName = () => { + return __('Positionals:'); + }; + let examples = []; + self.example = (cmd, description) => { + examples.push([cmd, description || '']); + }; + let commands = []; + self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { + if (isDefault) { + commands = commands.map(cmdArray => { + cmdArray[2] = false; + return cmdArray; + }); + } + commands.push([cmd, description || '', isDefault, aliases, deprecated]); + }; + self.getCommands = () => commands; + let descriptions = {}; + self.describe = function describe(keyOrKeys, desc) { + if (Array.isArray(keyOrKeys)) { + keyOrKeys.forEach(k => { + self.describe(k, desc); + }); + } + else if (typeof keyOrKeys === 'object') { + Object.keys(keyOrKeys).forEach(k => { + self.describe(k, keyOrKeys[k]); + }); + } + else { + descriptions[keyOrKeys] = desc; + } + }; + self.getDescriptions = () => descriptions; + let epilogs = []; + self.epilog = msg => { + epilogs.push(msg); + }; + let wrapSet = false; + let wrap; + self.wrap = cols => { + wrapSet = true; + wrap = cols; + }; + self.getWrap = () => { + if (shim.getEnv('YARGS_DISABLE_WRAP')) { + return null; + } + if (!wrapSet) { + wrap = windowWidth(); + wrapSet = true; + } + return wrap; + }; + const deferY18nLookupPrefix = '__yargsString__:'; + self.deferY18nLookup = str => deferY18nLookupPrefix + str; + self.help = function help() { + if (cachedHelpMessage) + return cachedHelpMessage; + normalizeAliases(); + const base$0 = yargs.customScriptName + ? yargs.$0 + : shim.path.basename(yargs.$0); + const demandedOptions = yargs.getDemandedOptions(); + const demandedCommands = yargs.getDemandedCommands(); + const deprecatedOptions = yargs.getDeprecatedOptions(); + const groups = yargs.getGroups(); + const options = yargs.getOptions(); + let keys = []; + keys = keys.concat(Object.keys(descriptions)); + keys = keys.concat(Object.keys(demandedOptions)); + keys = keys.concat(Object.keys(demandedCommands)); + keys = keys.concat(Object.keys(options.default)); + keys = keys.filter(filterHiddenOptions); + keys = Object.keys(keys.reduce((acc, key) => { + if (key !== '_') + acc[key] = true; + return acc; + }, {})); + const theWrap = self.getWrap(); + const ui = shim.cliui({ + width: theWrap, + wrap: !!theWrap, + }); + if (!usageDisabled) { + if (usages.length) { + usages.forEach(usage => { + ui.div({ text: `${usage[0].replace(/\$0/g, base$0)}` }); + if (usage[1]) { + ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); + } + }); + ui.div(); + } + else if (commands.length) { + let u = null; + if (demandedCommands._) { + u = `${base$0} <${__('command')}>\n`; + } + else { + u = `${base$0} [${__('command')}]\n`; + } + ui.div(`${u}`); + } + } + if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) { + ui.div(__('Commands:')); + const context = yargs.getInternalMethods().getContext(); + const parentCommands = context.commands.length + ? `${context.commands.join(' ')} ` + : ''; + if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] === + true) { + commands = commands.sort((a, b) => a[0].localeCompare(b[0])); + } + const prefix = base$0 ? `${base$0} ` : ''; + commands.forEach(command => { + const commandString = `${prefix}${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; + ui.span({ + text: commandString, + padding: [0, 2, 0, 2], + width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4, + }, { text: command[1] }); + const hints = []; + if (command[2]) + hints.push(`[${__('default')}]`); + if (command[3] && command[3].length) { + hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); + } + if (command[4]) { + if (typeof command[4] === 'string') { + hints.push(`[${__('deprecated: %s', command[4])}]`); + } + else { + hints.push(`[${__('deprecated')}]`); + } + } + if (hints.length) { + ui.div({ + text: hints.join(' '), + padding: [0, 0, 0, 2], + align: 'right', + }); + } + else { + ui.div(); + } + }); + ui.div(); + } + const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []); + keys = keys.filter(key => !yargs.parsed.newAliases[key] && + aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); + const defaultGroup = __('Options:'); + if (!groups[defaultGroup]) + groups[defaultGroup] = []; + addUngroupedKeys(keys, options.alias, groups, defaultGroup); + const isLongSwitch = (sw) => /^--/.test(getText(sw)); + const displayedGroups = Object.keys(groups) + .filter(groupName => groups[groupName].length > 0) + .map(groupName => { + const normalizedKeys = groups[groupName] + .filter(filterHiddenOptions) + .map(key => { + if (aliasKeys.includes(key)) + return key; + for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { + if ((options.alias[aliasKey] || []).includes(key)) + return aliasKey; + } + return key; + }); + return { groupName, normalizedKeys }; + }) + .filter(({ normalizedKeys }) => normalizedKeys.length > 0) + .map(({ groupName, normalizedKeys }) => { + const switches = normalizedKeys.reduce((acc, key) => { + acc[key] = [key] + .concat(options.alias[key] || []) + .map(sw => { + if (groupName === self.getPositionalGroupName()) + return sw; + else { + return ((/^[0-9]$/.test(sw) + ? options.boolean.includes(key) + ? '-' + : '--' + : sw.length > 1 + ? '--' + : '-') + sw); + } + }) + .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) + ? 0 + : isLongSwitch(sw1) + ? 1 + : -1) + .join(', '); + return acc; + }, {}); + return { groupName, normalizedKeys, switches }; + }); + const shortSwitchesUsed = displayedGroups + .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) + .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key]))); + if (shortSwitchesUsed) { + displayedGroups + .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) + .forEach(({ normalizedKeys, switches }) => { + normalizedKeys.forEach(key => { + if (isLongSwitch(switches[key])) { + switches[key] = addIndentation(switches[key], '-x, '.length); + } + }); + }); + } + displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => { + ui.div(groupName); + normalizedKeys.forEach(key => { + const kswitch = switches[key]; + let desc = descriptions[key] || ''; + let type = null; + if (desc.includes(deferY18nLookupPrefix)) + desc = __(desc.substring(deferY18nLookupPrefix.length)); + if (options.boolean.includes(key)) + type = `[${__('boolean')}]`; + if (options.count.includes(key)) + type = `[${__('count')}]`; + if (options.string.includes(key)) + type = `[${__('string')}]`; + if (options.normalize.includes(key)) + type = `[${__('string')}]`; + if (options.array.includes(key)) + type = `[${__('array')}]`; + if (options.number.includes(key)) + type = `[${__('number')}]`; + const deprecatedExtra = (deprecated) => typeof deprecated === 'string' + ? `[${__('deprecated: %s', deprecated)}]` + : `[${__('deprecated')}]`; + const extra = [ + key in deprecatedOptions + ? deprecatedExtra(deprecatedOptions[key]) + : null, + type, + key in demandedOptions ? `[${__('required')}]` : null, + options.choices && options.choices[key] + ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` + : null, + defaultString(options.default[key], options.defaultDescription[key]), + ] + .filter(Boolean) + .join(' '); + ui.span({ + text: getText(kswitch), + padding: [0, 2, 0, 2 + getIndentation(kswitch)], + width: maxWidth(switches, theWrap) + 4, + }, desc); + const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] === + true; + if (extra && !shouldHideOptionExtras) + ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); + else + ui.div(); + }); + ui.div(); + }); + if (examples.length) { + ui.div(__('Examples:')); + examples.forEach(example => { + example[0] = example[0].replace(/\$0/g, base$0); + }); + examples.forEach(example => { + if (example[1] === '') { + ui.div({ + text: example[0], + padding: [0, 2, 0, 2], + }); + } + else { + ui.div({ + text: example[0], + padding: [0, 2, 0, 2], + width: maxWidth(examples, theWrap) + 4, + }, { + text: example[1], + }); + } + }); + ui.div(); + } + if (epilogs.length > 0) { + const e = epilogs + .map(epilog => epilog.replace(/\$0/g, base$0)) + .join('\n'); + ui.div(`${e}\n`); + } + return ui.toString().replace(/\s*$/, ''); + }; + function maxWidth(table, theWrap, modifier) { + let width = 0; + if (!Array.isArray(table)) { + table = Object.values(table).map(v => [v]); + } + table.forEach(v => { + width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width); + }); + if (theWrap) + width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); + return width; + } + function normalizeAliases() { + const demandedOptions = yargs.getDemandedOptions(); + const options = yargs.getOptions(); + (Object.keys(options.alias) || []).forEach(key => { + options.alias[key].forEach(alias => { + if (descriptions[alias]) + self.describe(key, descriptions[alias]); + if (alias in demandedOptions) + yargs.demandOption(key, demandedOptions[alias]); + if (options.boolean.includes(alias)) + yargs.boolean(key); + if (options.count.includes(alias)) + yargs.count(key); + if (options.string.includes(alias)) + yargs.string(key); + if (options.normalize.includes(alias)) + yargs.normalize(key); + if (options.array.includes(alias)) + yargs.array(key); + if (options.number.includes(alias)) + yargs.number(key); + }); + }); + } + let cachedHelpMessage; + self.cacheHelpMessage = function () { + cachedHelpMessage = this.help(); + }; + self.clearCachedHelpMessage = function () { + cachedHelpMessage = undefined; + }; + self.hasCachedHelpMessage = function () { + return !!cachedHelpMessage; + }; + function addUngroupedKeys(keys, aliases, groups, defaultGroup) { + let groupedKeys = []; + let toCheck = null; + Object.keys(groups).forEach(group => { + groupedKeys = groupedKeys.concat(groups[group]); + }); + keys.forEach(key => { + toCheck = [key].concat(aliases[key]); + if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { + groups[defaultGroup].push(key); + } + }); + return groupedKeys; + } + function filterHiddenOptions(key) { + return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 || + yargs.parsed.argv[yargs.getOptions().showHiddenOpt]); + } + self.showHelp = (level) => { + const logger = yargs.getInternalMethods().getLoggerInstance(); + if (!level) + level = 'error'; + const emit = typeof level === 'function' ? level : logger[level]; + emit(self.help()); + }; + self.functionDescription = fn => { + const description = fn.name + ? shim.Parser.decamelize(fn.name, '-') + : __('generated-value'); + return ['(', description, ')'].join(''); + }; + self.stringifiedValues = function stringifiedValues(values, separator) { + let string = ''; + const sep = separator || ', '; + const array = [].concat(values); + if (!values || !array.length) + return string; + array.forEach(value => { + if (string.length) + string += sep; + string += JSON.stringify(value); + }); + return string; + }; + function defaultString(value, defaultDescription) { + let string = `[${__('default:')} `; + if (value === undefined && !defaultDescription) + return null; + if (defaultDescription) { + string += defaultDescription; + } + else { + switch (typeof value) { + case 'string': + string += `"${value}"`; + break; + case 'object': + string += JSON.stringify(value); + break; + default: + string += value; + } + } + return `${string}]`; + } + function windowWidth() { + const maxWidth = 80; + if (shim.process.stdColumns) { + return Math.min(maxWidth, shim.process.stdColumns); + } + else { + return maxWidth; + } + } + let version = null; + self.version = ver => { + version = ver; + }; + self.showVersion = level => { + const logger = yargs.getInternalMethods().getLoggerInstance(); + if (!level) + level = 'error'; + const emit = typeof level === 'function' ? level : logger[level]; + emit(version); + }; + self.reset = function reset(localLookup) { + failMessage = null; + failureOutput = false; + usages = []; + usageDisabled = false; + epilogs = []; + examples = []; + commands = []; + descriptions = objFilter(descriptions, k => !localLookup[k]); + return self; + }; + const frozens = []; + self.freeze = function freeze() { + frozens.push({ + failMessage, + failureOutput, + usages, + usageDisabled, + epilogs, + examples, + commands, + descriptions, + }); + }; + self.unfreeze = function unfreeze(defaultCommand = false) { + const frozen = frozens.pop(); + if (!frozen) + return; + if (defaultCommand) { + descriptions = { ...frozen.descriptions, ...descriptions }; + commands = [...frozen.commands, ...commands]; + usages = [...frozen.usages, ...usages]; + examples = [...frozen.examples, ...examples]; + epilogs = [...frozen.epilogs, ...epilogs]; + } + else { + ({ + failMessage, + failureOutput, + usages, + usageDisabled, + epilogs, + examples, + commands, + descriptions, + } = frozen); + } + }; + return self; +} +function isIndentedText(text) { + return typeof text === 'object'; +} +function addIndentation(text, indent) { + return isIndentedText(text) + ? { text: text.text, indentation: text.indentation + indent } + : { text, indentation: indent }; +} +function getIndentation(text) { + return isIndentedText(text) ? text.indentation : 0; +} +function getText(text) { + return isIndentedText(text) ? text.text : text; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/apply-extends.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/apply-extends.js new file mode 100644 index 000000000..0e593b4fe --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/apply-extends.js @@ -0,0 +1,59 @@ +import { YError } from '../yerror.js'; +let previouslyVisitedConfigs = []; +let shim; +export function applyExtends(config, cwd, mergeExtends, _shim) { + shim = _shim; + let defaultConfig = {}; + if (Object.prototype.hasOwnProperty.call(config, 'extends')) { + if (typeof config.extends !== 'string') + return defaultConfig; + const isPath = /\.json|\..*rc$/.test(config.extends); + let pathToDefault = null; + if (!isPath) { + try { + pathToDefault = require.resolve(config.extends); + } + catch (_err) { + return config; + } + } + else { + pathToDefault = getPathToDefaultConfig(cwd, config.extends); + } + checkForCircularExtends(pathToDefault); + previouslyVisitedConfigs.push(pathToDefault); + defaultConfig = isPath + ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8')) + : require(config.extends); + delete config.extends; + defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim); + } + previouslyVisitedConfigs = []; + return mergeExtends + ? mergeDeep(defaultConfig, config) + : Object.assign({}, defaultConfig, config); +} +function checkForCircularExtends(cfgPath) { + if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { + throw new YError(`Circular extended configurations: '${cfgPath}'.`); + } +} +function getPathToDefaultConfig(cwd, pathToExtend) { + return shim.path.resolve(cwd, pathToExtend); +} +function mergeDeep(config1, config2) { + const target = {}; + function isObject(obj) { + return obj && typeof obj === 'object' && !Array.isArray(obj); + } + Object.assign(target, config1); + for (const key of Object.keys(config2)) { + if (isObject(config2[key]) && isObject(target[key])) { + target[key] = mergeDeep(config1[key], config2[key]); + } + else { + target[key] = config2[key]; + } + } + return target; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/is-promise.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/is-promise.js new file mode 100644 index 000000000..d250c08aa --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/is-promise.js @@ -0,0 +1,5 @@ +export function isPromise(maybePromise) { + return (!!maybePromise && + !!maybePromise.then && + typeof maybePromise.then === 'function'); +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/levenshtein.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/levenshtein.js new file mode 100644 index 000000000..60575ef34 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/levenshtein.js @@ -0,0 +1,34 @@ +export function levenshtein(a, b) { + if (a.length === 0) + return b.length; + if (b.length === 0) + return a.length; + const matrix = []; + let i; + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } + let j; + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } + else { + if (i > 1 && + j > 1 && + b.charAt(i - 2) === a.charAt(j - 1) && + b.charAt(i - 1) === a.charAt(j - 2)) { + matrix[i][j] = matrix[i - 2][j - 2] + 1; + } + else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); + } + } + } + } + return matrix[b.length][a.length]; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/maybe-async-result.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/maybe-async-result.js new file mode 100644 index 000000000..8c6a40c65 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/maybe-async-result.js @@ -0,0 +1,17 @@ +import { isPromise } from './is-promise.js'; +export function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => { + throw err; +}) { + try { + const result = isFunction(getResult) ? getResult() : getResult; + return isPromise(result) + ? result.then((result) => resultHandler(result)) + : resultHandler(result); + } + catch (err) { + return errorHandler(err); + } +} +function isFunction(arg) { + return typeof arg === 'function'; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/obj-filter.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/obj-filter.js new file mode 100644 index 000000000..cd68ad298 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/obj-filter.js @@ -0,0 +1,10 @@ +import { objectKeys } from '../typings/common-types.js'; +export function objFilter(original = {}, filter = () => true) { + const obj = {}; + objectKeys(original).forEach(key => { + if (filter(key, original[key])) { + obj[key] = original[key]; + } + }); + return obj; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/process-argv.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/process-argv.js new file mode 100644 index 000000000..74dc9e4c4 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/process-argv.js @@ -0,0 +1,17 @@ +function getProcessArgvBinIndex() { + if (isBundledElectronApp()) + return 0; + return 1; +} +function isBundledElectronApp() { + return isElectronApp() && !process.defaultApp; +} +function isElectronApp() { + return !!process.versions.electron; +} +export function hideBin(argv) { + return argv.slice(getProcessArgvBinIndex() + 1); +} +export function getProcessArgvBin() { + return process.argv[getProcessArgvBinIndex()]; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/set-blocking.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/set-blocking.js new file mode 100644 index 000000000..88fb806df --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/set-blocking.js @@ -0,0 +1,12 @@ +export default function setBlocking(blocking) { + if (typeof process === 'undefined') + return; + [process.stdout, process.stderr].forEach(_stream => { + const stream = _stream; + if (stream._handle && + stream.isTTY && + typeof stream._handle.setBlocking === 'function') { + stream._handle.setBlocking(blocking); + } + }); +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/utils/which-module.js b/node_modules/concurrently/node_modules/yargs/build/lib/utils/which-module.js new file mode 100644 index 000000000..5974e2268 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/utils/which-module.js @@ -0,0 +1,10 @@ +export default function whichModule(exported) { + if (typeof require === 'undefined') + return null; + for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]]; + if (mod.exports === exported) + return mod; + } + return null; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/validation.js b/node_modules/concurrently/node_modules/yargs/build/lib/validation.js new file mode 100644 index 000000000..bd2e1b8b1 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/validation.js @@ -0,0 +1,305 @@ +import { argsert } from './argsert.js'; +import { assertNotStrictEqual, } from './typings/common-types.js'; +import { levenshtein as distance } from './utils/levenshtein.js'; +import { objFilter } from './utils/obj-filter.js'; +const specialKeys = ['$0', '--', '_']; +export function validation(yargs, usage, shim) { + const __ = shim.y18n.__; + const __n = shim.y18n.__n; + const self = {}; + self.nonOptionCount = function nonOptionCount(argv) { + const demandedCommands = yargs.getDemandedCommands(); + const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0); + const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length; + if (demandedCommands._ && + (_s < demandedCommands._.min || _s > demandedCommands._.max)) { + if (_s < demandedCommands._.min) { + if (demandedCommands._.minMsg !== undefined) { + usage.fail(demandedCommands._.minMsg + ? demandedCommands._.minMsg + .replace(/\$0/g, _s.toString()) + .replace(/\$1/, demandedCommands._.min.toString()) + : null); + } + else { + usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString())); + } + } + else if (_s > demandedCommands._.max) { + if (demandedCommands._.maxMsg !== undefined) { + usage.fail(demandedCommands._.maxMsg + ? demandedCommands._.maxMsg + .replace(/\$0/g, _s.toString()) + .replace(/\$1/, demandedCommands._.max.toString()) + : null); + } + else { + usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString())); + } + } + } + }; + self.positionalCount = function positionalCount(required, observed) { + if (observed < required) { + usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + '')); + } + }; + self.requiredArguments = function requiredArguments(argv, demandedOptions) { + let missing = null; + for (const key of Object.keys(demandedOptions)) { + if (!Object.prototype.hasOwnProperty.call(argv, key) || + typeof argv[key] === 'undefined') { + missing = missing || {}; + missing[key] = demandedOptions[key]; + } + } + if (missing) { + const customMsgs = []; + for (const key of Object.keys(missing)) { + const msg = missing[key]; + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg); + } + } + const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; + usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); + } + }; + self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) { + var _a; + const commandKeys = yargs + .getInternalMethods() + .getCommandInstance() + .getCommands(); + const unknown = []; + const currentContext = yargs.getInternalMethods().getContext(); + Object.keys(argv).forEach(key => { + if (!specialKeys.includes(key) && + !Object.prototype.hasOwnProperty.call(positionalMap, key) && + !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) && + !self.isValidAndSomeAliasIsNotNew(key, aliases)) { + unknown.push(key); + } + }); + if (checkPositionals && + (currentContext.commands.length > 0 || + commandKeys.length > 0 || + isDefaultCommand)) { + argv._.slice(currentContext.commands.length).forEach(key => { + if (!commandKeys.includes('' + key)) { + unknown.push('' + key); + } + }); + } + if (checkPositionals) { + const demandedCommands = yargs.getDemandedCommands(); + const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0; + const expected = currentContext.commands.length + maxNonOptDemanded; + if (expected < argv._.length) { + argv._.slice(expected).forEach(key => { + key = String(key); + if (!currentContext.commands.includes(key) && + !unknown.includes(key)) { + unknown.push(key); + } + }); + } + } + if (unknown.length) { + usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `"${s}"`)).join(', '))); + } + }; + self.unknownCommands = function unknownCommands(argv) { + const commandKeys = yargs + .getInternalMethods() + .getCommandInstance() + .getCommands(); + const unknown = []; + const currentContext = yargs.getInternalMethods().getContext(); + if (currentContext.commands.length > 0 || commandKeys.length > 0) { + argv._.slice(currentContext.commands.length).forEach(key => { + if (!commandKeys.includes('' + key)) { + unknown.push('' + key); + } + }); + } + if (unknown.length > 0) { + usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); + return true; + } + else { + return false; + } + }; + self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { + if (!Object.prototype.hasOwnProperty.call(aliases, key)) { + return false; + } + const newAliases = yargs.parsed.newAliases; + return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]); + }; + self.limitedChoices = function limitedChoices(argv) { + const options = yargs.getOptions(); + const invalid = {}; + if (!Object.keys(options.choices).length) + return; + Object.keys(argv).forEach(key => { + if (specialKeys.indexOf(key) === -1 && + Object.prototype.hasOwnProperty.call(options.choices, key)) { + [].concat(argv[key]).forEach(value => { + if (options.choices[key].indexOf(value) === -1 && + value !== undefined) { + invalid[key] = (invalid[key] || []).concat(value); + } + }); + } + }); + const invalidKeys = Object.keys(invalid); + if (!invalidKeys.length) + return; + let msg = __('Invalid values:'); + invalidKeys.forEach(key => { + msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; + }); + usage.fail(msg); + }; + let implied = {}; + self.implies = function implies(key, value) { + argsert(' [array|number|string]', [key, value], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach(k => { + self.implies(k, key[k]); + }); + } + else { + yargs.global(key); + if (!implied[key]) { + implied[key] = []; + } + if (Array.isArray(value)) { + value.forEach(i => self.implies(key, i)); + } + else { + assertNotStrictEqual(value, undefined, shim); + implied[key].push(value); + } + } + }; + self.getImplied = function getImplied() { + return implied; + }; + function keyExists(argv, val) { + const num = Number(val); + val = isNaN(num) ? val : num; + if (typeof val === 'number') { + val = argv._.length >= val; + } + else if (val.match(/^--no-.+/)) { + val = val.match(/^--no-(.+)/)[1]; + val = !Object.prototype.hasOwnProperty.call(argv, val); + } + else { + val = Object.prototype.hasOwnProperty.call(argv, val); + } + return val; + } + self.implications = function implications(argv) { + const implyFail = []; + Object.keys(implied).forEach(key => { + const origKey = key; + (implied[key] || []).forEach(value => { + let key = origKey; + const origValue = value; + key = keyExists(argv, key); + value = keyExists(argv, value); + if (key && !value) { + implyFail.push(` ${origKey} -> ${origValue}`); + } + }); + }); + if (implyFail.length) { + let msg = `${__('Implications failed:')}\n`; + implyFail.forEach(value => { + msg += value; + }); + usage.fail(msg); + } + }; + let conflicting = {}; + self.conflicts = function conflicts(key, value) { + argsert(' [array|string]', [key, value], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach(k => { + self.conflicts(k, key[k]); + }); + } + else { + yargs.global(key); + if (!conflicting[key]) { + conflicting[key] = []; + } + if (Array.isArray(value)) { + value.forEach(i => self.conflicts(key, i)); + } + else { + conflicting[key].push(value); + } + } + }; + self.getConflicting = () => conflicting; + self.conflicting = function conflictingFn(argv) { + Object.keys(argv).forEach(key => { + if (conflicting[key]) { + conflicting[key].forEach(value => { + if (value && argv[key] !== undefined && argv[value] !== undefined) { + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); + } + }); + } + }); + if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) { + Object.keys(conflicting).forEach(key => { + conflicting[key].forEach(value => { + if (value && + argv[shim.Parser.camelCase(key)] !== undefined && + argv[shim.Parser.camelCase(value)] !== undefined) { + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); + } + }); + }); + } + }; + self.recommendCommands = function recommendCommands(cmd, potentialCommands) { + const threshold = 3; + potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); + let recommended = null; + let bestDistance = Infinity; + for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { + const d = distance(cmd, candidate); + if (d <= threshold && d < bestDistance) { + bestDistance = d; + recommended = candidate; + } + } + if (recommended) + usage.fail(__('Did you mean %s?', recommended)); + }; + self.reset = function reset(localLookup) { + implied = objFilter(implied, k => !localLookup[k]); + conflicting = objFilter(conflicting, k => !localLookup[k]); + return self; + }; + const frozens = []; + self.freeze = function freeze() { + frozens.push({ + implied, + conflicting, + }); + }; + self.unfreeze = function unfreeze() { + const frozen = frozens.pop(); + assertNotStrictEqual(frozen, undefined, shim); + ({ implied, conflicting } = frozen); + }; + return self; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/yargs-factory.js b/node_modules/concurrently/node_modules/yargs/build/lib/yargs-factory.js new file mode 100644 index 000000000..c4b1d5098 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/yargs-factory.js @@ -0,0 +1,1512 @@ +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation; +import { command as Command, } from './command.js'; +import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js'; +import { YError } from './yerror.js'; +import { usage as Usage } from './usage.js'; +import { argsert } from './argsert.js'; +import { completion as Completion, } from './completion.js'; +import { validation as Validation, } from './validation.js'; +import { objFilter } from './utils/obj-filter.js'; +import { applyExtends } from './utils/apply-extends.js'; +import { applyMiddleware, GlobalMiddleware, } from './middleware.js'; +import { isPromise } from './utils/is-promise.js'; +import { maybeAsyncResult } from './utils/maybe-async-result.js'; +import setBlocking from './utils/set-blocking.js'; +export function YargsFactory(_shim) { + return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => { + const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim); + Object.defineProperty(yargs, 'argv', { + get: () => { + return yargs.parse(); + }, + enumerable: true, + }); + yargs.help(); + yargs.version(); + return yargs; + }; +} +const kCopyDoubleDash = Symbol('copyDoubleDash'); +const kCreateLogger = Symbol('copyDoubleDash'); +const kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject'); +const kEmitWarning = Symbol('emitWarning'); +const kFreeze = Symbol('freeze'); +const kGetDollarZero = Symbol('getDollarZero'); +const kGetParserConfiguration = Symbol('getParserConfiguration'); +const kGetUsageConfiguration = Symbol('getUsageConfiguration'); +const kGuessLocale = Symbol('guessLocale'); +const kGuessVersion = Symbol('guessVersion'); +const kParsePositionalNumbers = Symbol('parsePositionalNumbers'); +const kPkgUp = Symbol('pkgUp'); +const kPopulateParserHintArray = Symbol('populateParserHintArray'); +const kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary'); +const kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary'); +const kPopulateParserHintDictionary = Symbol('populateParserHintDictionary'); +const kSanitizeKey = Symbol('sanitizeKey'); +const kSetKey = Symbol('setKey'); +const kUnfreeze = Symbol('unfreeze'); +const kValidateAsync = Symbol('validateAsync'); +const kGetCommandInstance = Symbol('getCommandInstance'); +const kGetContext = Symbol('getContext'); +const kGetHasOutput = Symbol('getHasOutput'); +const kGetLoggerInstance = Symbol('getLoggerInstance'); +const kGetParseContext = Symbol('getParseContext'); +const kGetUsageInstance = Symbol('getUsageInstance'); +const kGetValidationInstance = Symbol('getValidationInstance'); +const kHasParseCallback = Symbol('hasParseCallback'); +const kIsGlobalContext = Symbol('isGlobalContext'); +const kPostProcess = Symbol('postProcess'); +const kRebase = Symbol('rebase'); +const kReset = Symbol('reset'); +const kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands'); +const kRunValidation = Symbol('runValidation'); +const kSetHasOutput = Symbol('setHasOutput'); +const kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys'); +export class YargsInstance { + constructor(processArgs = [], cwd, parentRequire, shim) { + this.customScriptName = false; + this.parsed = false; + _YargsInstance_command.set(this, void 0); + _YargsInstance_cwd.set(this, void 0); + _YargsInstance_context.set(this, { commands: [], fullCommands: [] }); + _YargsInstance_completion.set(this, null); + _YargsInstance_completionCommand.set(this, null); + _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden'); + _YargsInstance_exitError.set(this, null); + _YargsInstance_detectLocale.set(this, true); + _YargsInstance_emittedWarnings.set(this, {}); + _YargsInstance_exitProcess.set(this, true); + _YargsInstance_frozens.set(this, []); + _YargsInstance_globalMiddleware.set(this, void 0); + _YargsInstance_groups.set(this, {}); + _YargsInstance_hasOutput.set(this, false); + _YargsInstance_helpOpt.set(this, null); + _YargsInstance_isGlobalContext.set(this, true); + _YargsInstance_logger.set(this, void 0); + _YargsInstance_output.set(this, ''); + _YargsInstance_options.set(this, void 0); + _YargsInstance_parentRequire.set(this, void 0); + _YargsInstance_parserConfig.set(this, {}); + _YargsInstance_parseFn.set(this, null); + _YargsInstance_parseContext.set(this, null); + _YargsInstance_pkgs.set(this, {}); + _YargsInstance_preservedGroups.set(this, {}); + _YargsInstance_processArgs.set(this, void 0); + _YargsInstance_recommendCommands.set(this, false); + _YargsInstance_shim.set(this, void 0); + _YargsInstance_strict.set(this, false); + _YargsInstance_strictCommands.set(this, false); + _YargsInstance_strictOptions.set(this, false); + _YargsInstance_usage.set(this, void 0); + _YargsInstance_usageConfig.set(this, {}); + _YargsInstance_versionOpt.set(this, null); + _YargsInstance_validation.set(this, void 0); + __classPrivateFieldSet(this, _YargsInstance_shim, shim, "f"); + __classPrivateFieldSet(this, _YargsInstance_processArgs, processArgs, "f"); + __classPrivateFieldSet(this, _YargsInstance_cwd, cwd, "f"); + __classPrivateFieldSet(this, _YargsInstance_parentRequire, parentRequire, "f"); + __classPrivateFieldSet(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f"); + this.$0 = this[kGetDollarZero](); + this[kReset](); + __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f"), "f"); + __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), "f"); + __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f"), "f"); + __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f"), "f"); + __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); + __classPrivateFieldSet(this, _YargsInstance_logger, this[kCreateLogger](), "f"); + } + addHelpOpt(opt, msg) { + const defaultHelpOpt = 'help'; + argsert('[string|boolean] [string]', [opt, msg], arguments.length); + if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { + this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); + __classPrivateFieldSet(this, _YargsInstance_helpOpt, null, "f"); + } + if (opt === false && msg === undefined) + return this; + __classPrivateFieldSet(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, "f"); + this.boolean(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); + this.describe(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show help')); + return this; + } + help(opt, msg) { + return this.addHelpOpt(opt, msg); + } + addShowHiddenOpt(opt, msg) { + argsert('[string|boolean] [string]', [opt, msg], arguments.length); + if (opt === false && msg === undefined) + return this; + const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); + this.boolean(showHiddenOpt); + this.describe(showHiddenOpt, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show hidden options')); + __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt; + return this; + } + showHidden(opt, msg) { + return this.addShowHiddenOpt(opt, msg); + } + alias(key, value) { + argsert(' [string|array]', [key, value], arguments.length); + this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value); + return this; + } + array(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('array', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + boolean(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('boolean', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + check(f, global) { + argsert(' [boolean]', [f, global], arguments.length); + this.middleware((argv, _yargs) => { + return maybeAsyncResult(() => { + return f(argv, _yargs.getOptions()); + }, (result) => { + if (!result) { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__('Argument check failed: %s', f.toString())); + } + else if (typeof result === 'string' || result instanceof Error) { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(result.toString(), result); + } + return argv; + }, (err) => { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err); + return argv; + }); + }, false, global); + return this; + } + choices(key, value) { + argsert(' [string|array]', [key, value], arguments.length); + this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value); + return this; + } + coerce(keys, value) { + argsert(' [function]', [keys, value], arguments.length); + if (Array.isArray(keys)) { + if (!value) { + throw new YError('coerce callback must be provided'); + } + for (const key of keys) { + this.coerce(key, value); + } + return this; + } + else if (typeof keys === 'object') { + for (const key of Object.keys(keys)) { + this.coerce(key, keys[key]); + } + return this; + } + if (!value) { + throw new YError('coerce callback must be provided'); + } + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => { + let aliases; + const shouldCoerce = Object.prototype.hasOwnProperty.call(argv, keys); + if (!shouldCoerce) { + return argv; + } + return maybeAsyncResult(() => { + aliases = yargs.getAliases(); + return value(argv[keys]); + }, (result) => { + argv[keys] = result; + const stripAliased = yargs + .getInternalMethods() + .getParserConfiguration()['strip-aliased']; + if (aliases[keys] && stripAliased !== true) { + for (const alias of aliases[keys]) { + argv[alias] = result; + } + } + return argv; + }, (err) => { + throw new YError(err.message); + }); + }, keys); + return this; + } + conflicts(key1, key2) { + argsert(' [string|array]', [key1, key2], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicts(key1, key2); + return this; + } + config(key = 'config', msg, parseFn) { + argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); + if (typeof key === 'object' && !Array.isArray(key)) { + key = applyExtends(key, __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(key); + return this; + } + if (typeof msg === 'function') { + parseFn = msg; + msg = undefined; + } + this.describe(key, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Path to JSON config file')); + (Array.isArray(key) ? key : [key]).forEach(k => { + __classPrivateFieldGet(this, _YargsInstance_options, "f").config[k] = parseFn || true; + }); + return this; + } + completion(cmd, desc, fn) { + argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); + if (typeof desc === 'function') { + fn = desc; + desc = undefined; + } + __classPrivateFieldSet(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion', "f"); + if (!desc && desc !== false) { + desc = 'generate completion script'; + } + this.command(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), desc); + if (fn) + __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn); + return this; + } + command(cmd, description, builder, handler, middlewares, deprecated) { + argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder, handler, middlewares, deprecated); + return this; + } + commands(cmd, description, builder, handler, middlewares, deprecated) { + return this.command(cmd, description, builder, handler, middlewares, deprecated); + } + commandDir(dir, opts) { + argsert(' [object]', [dir, opts], arguments.length); + const req = __classPrivateFieldGet(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet(this, _YargsInstance_shim, "f").require; + __classPrivateFieldGet(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet(this, _YargsInstance_shim, "f").getCallerFile(), opts); + return this; + } + count(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('count', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + default(key, value, defaultDescription) { + argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); + if (defaultDescription) { + assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription; + } + if (typeof value === 'function') { + assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key]) + __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = + __classPrivateFieldGet(this, _YargsInstance_usage, "f").functionDescription(value); + value = value.call(); + } + this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value); + return this; + } + defaults(key, value, defaultDescription) { + return this.default(key, value, defaultDescription); + } + demandCommand(min = 1, max, minMsg, maxMsg) { + argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); + if (typeof max !== 'number') { + minMsg = max; + max = Infinity; + } + this.global('_', false); + __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands._ = { + min, + max, + minMsg, + maxMsg, + }; + return this; + } + demand(keys, max, msg) { + if (Array.isArray(max)) { + max.forEach(key => { + assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + this.demandOption(key, msg); + }); + max = Infinity; + } + else if (typeof max !== 'number') { + msg = max; + max = Infinity; + } + if (typeof keys === 'number') { + assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + this.demandCommand(keys, max, msg, msg); + } + else if (Array.isArray(keys)) { + keys.forEach(key => { + assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + this.demandOption(key, msg); + }); + } + else { + if (typeof msg === 'string') { + this.demandOption(keys, msg); + } + else if (msg === true || typeof msg === 'undefined') { + this.demandOption(keys); + } + } + return this; + } + demandOption(keys, msg) { + argsert(' [string]', [keys, msg], arguments.length); + this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg); + return this; + } + deprecateOption(option, message) { + argsert(' [string|boolean]', [option, message], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message; + return this; + } + describe(keys, description) { + argsert(' [string]', [keys, description], arguments.length); + this[kSetKey](keys, true); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description); + return this; + } + detectLocale(detect) { + argsert('', [detect], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_detectLocale, detect, "f"); + return this; + } + env(prefix) { + argsert('[string|boolean]', [prefix], arguments.length); + if (prefix === false) + delete __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; + else + __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix = prefix || ''; + return this; + } + epilogue(msg) { + argsert('', [msg], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").epilog(msg); + return this; + } + epilog(msg) { + return this.epilogue(msg); + } + example(cmd, description) { + argsert(' [string]', [cmd, description], arguments.length); + if (Array.isArray(cmd)) { + cmd.forEach(exampleParams => this.example(...exampleParams)); + } + else { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description); + } + return this; + } + exit(code, err) { + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + __classPrivateFieldSet(this, _YargsInstance_exitError, err, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.exit(code); + } + exitProcess(enabled = true) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_exitProcess, enabled, "f"); + return this; + } + fail(f) { + argsert('', [f], arguments.length); + if (typeof f === 'boolean' && f !== false) { + throw new YError("Invalid first argument. Expected function or boolean 'false'"); + } + __classPrivateFieldGet(this, _YargsInstance_usage, "f").failFn(f); + return this; + } + getAliases() { + return this.parsed ? this.parsed.aliases : {}; + } + async getCompletion(args, done) { + argsert(' [function]', [args, done], arguments.length); + if (!done) { + return new Promise((resolve, reject) => { + __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => { + if (err) + reject(err); + else + resolve(completions); + }); + }); + } + else { + return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, done); + } + } + getDemandedOptions() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedOptions; + } + getDemandedCommands() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands; + } + getDeprecatedOptions() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions; + } + getDetectLocale() { + return __classPrivateFieldGet(this, _YargsInstance_detectLocale, "f"); + } + getExitProcess() { + return __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"); + } + getGroups() { + return Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_groups, "f"), __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")); + } + getHelp() { + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { + if (!this.parsed) { + const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); + if (isPromise(parse)) { + return parse.then(() => { + return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); + }); + } + } + const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); + if (isPromise(builderResponse)) { + return builderResponse.then(() => { + return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); + }); + } + } + return Promise.resolve(__classPrivateFieldGet(this, _YargsInstance_usage, "f").help()); + } + getOptions() { + return __classPrivateFieldGet(this, _YargsInstance_options, "f"); + } + getStrict() { + return __classPrivateFieldGet(this, _YargsInstance_strict, "f"); + } + getStrictCommands() { + return __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"); + } + getStrictOptions() { + return __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"); + } + global(globals, global) { + argsert(' [boolean]', [globals, global], arguments.length); + globals = [].concat(globals); + if (global !== false) { + __classPrivateFieldGet(this, _YargsInstance_options, "f").local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local.filter(l => globals.indexOf(l) === -1); + } + else { + globals.forEach(g => { + if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").local.includes(g)) + __classPrivateFieldGet(this, _YargsInstance_options, "f").local.push(g); + }); + } + return this; + } + group(opts, groupName) { + argsert(' ', [opts, groupName], arguments.length); + const existing = __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName]; + if (__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]) { + delete __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]; + } + const seen = {}; + __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter(key => { + if (seen[key]) + return false; + return (seen[key] = true); + }); + return this; + } + hide(key) { + argsert('', [key], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_options, "f").hiddenOptions.push(key); + return this; + } + implies(key, value) { + argsert(' [number|string|array]', [key, value], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").implies(key, value); + return this; + } + locale(locale) { + argsert('[string]', [locale], arguments.length); + if (locale === undefined) { + this[kGuessLocale](); + return __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.getLocale(); + } + __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); + __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(locale); + return this; + } + middleware(callback, applyBeforeValidation, global) { + return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global); + } + nargs(key, value) { + argsert(' [number]', [key, value], arguments.length); + this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value); + return this; + } + normalize(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('normalize', keys); + return this; + } + number(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('number', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + option(key, opt) { + argsert(' [object]', [key, opt], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach(k => { + this.options(k, key[k]); + }); + } + else { + if (typeof opt !== 'object') { + opt = {}; + } + this[kTrackManuallySetKeys](key); + if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) { + this[kEmitWarning]([ + '"version" is a reserved word.', + 'Please do one of the following:', + '- Disable version with `yargs.version(false)` if using "version" as an option', + '- Use the built-in `yargs.version` method instead (if applicable)', + '- Use a different option key', + 'https://yargs.js.org/docs/#api-reference-version', + ].join('\n'), undefined, 'versionWarning'); + } + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[key] = true; + if (opt.alias) + this.alias(key, opt.alias); + const deprecate = opt.deprecate || opt.deprecated; + if (deprecate) { + this.deprecateOption(key, deprecate); + } + const demand = opt.demand || opt.required || opt.require; + if (demand) { + this.demand(key, demand); + } + if (opt.demandOption) { + this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); + } + if (opt.conflicts) { + this.conflicts(key, opt.conflicts); + } + if ('default' in opt) { + this.default(key, opt.default); + } + if (opt.implies !== undefined) { + this.implies(key, opt.implies); + } + if (opt.nargs !== undefined) { + this.nargs(key, opt.nargs); + } + if (opt.config) { + this.config(key, opt.configParser); + } + if (opt.normalize) { + this.normalize(key); + } + if (opt.choices) { + this.choices(key, opt.choices); + } + if (opt.coerce) { + this.coerce(key, opt.coerce); + } + if (opt.group) { + this.group(key, opt.group); + } + if (opt.boolean || opt.type === 'boolean') { + this.boolean(key); + if (opt.alias) + this.boolean(opt.alias); + } + if (opt.array || opt.type === 'array') { + this.array(key); + if (opt.alias) + this.array(opt.alias); + } + if (opt.number || opt.type === 'number') { + this.number(key); + if (opt.alias) + this.number(opt.alias); + } + if (opt.string || opt.type === 'string') { + this.string(key); + if (opt.alias) + this.string(opt.alias); + } + if (opt.count || opt.type === 'count') { + this.count(key); + } + if (typeof opt.global === 'boolean') { + this.global(key, opt.global); + } + if (opt.defaultDescription) { + __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription; + } + if (opt.skipValidation) { + this.skipValidation(key); + } + const desc = opt.describe || opt.description || opt.desc; + const descriptions = __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions(); + if (!Object.prototype.hasOwnProperty.call(descriptions, key) || + typeof desc === 'string') { + this.describe(key, desc); + } + if (opt.hidden) { + this.hide(key); + } + if (opt.requiresArg) { + this.requiresArg(key); + } + } + return this; + } + options(key, opt) { + return this.option(key, opt); + } + parse(args, shortCircuit, _parseFn) { + argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); + this[kFreeze](); + if (typeof args === 'undefined') { + args = __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); + } + if (typeof shortCircuit === 'object') { + __classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, "f"); + shortCircuit = _parseFn; + } + if (typeof shortCircuit === 'function') { + __classPrivateFieldSet(this, _YargsInstance_parseFn, shortCircuit, "f"); + shortCircuit = false; + } + if (!shortCircuit) + __classPrivateFieldSet(this, _YargsInstance_processArgs, args, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) + __classPrivateFieldSet(this, _YargsInstance_exitProcess, false, "f"); + const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit); + const tmpParsed = this.parsed; + __classPrivateFieldGet(this, _YargsInstance_completion, "f").setParsed(this.parsed); + if (isPromise(parsed)) { + return parsed + .then(argv => { + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) + __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); + return argv; + }) + .catch(err => { + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) { + __classPrivateFieldGet(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); + } + throw err; + }) + .finally(() => { + this[kUnfreeze](); + this.parsed = tmpParsed; + }); + } + else { + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) + __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet(this, _YargsInstance_output, "f")); + this[kUnfreeze](); + this.parsed = tmpParsed; + } + return parsed; + } + parseAsync(args, shortCircuit, _parseFn) { + const maybePromise = this.parse(args, shortCircuit, _parseFn); + return !isPromise(maybePromise) + ? Promise.resolve(maybePromise) + : maybePromise; + } + parseSync(args, shortCircuit, _parseFn) { + const maybePromise = this.parse(args, shortCircuit, _parseFn); + if (isPromise(maybePromise)) { + throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware'); + } + return maybePromise; + } + parserConfiguration(config) { + argsert('', [config], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, "f"); + return this; + } + pkgConf(key, rootPath) { + argsert(' [string]', [key, rootPath], arguments.length); + let conf = null; + const obj = this[kPkgUp](rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f")); + if (obj[key] && typeof obj[key] === 'object') { + conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(conf); + } + return this; + } + positional(key, opts) { + argsert(' ', [key, opts], arguments.length); + const supportedOpts = [ + 'default', + 'defaultDescription', + 'implies', + 'normalize', + 'choices', + 'conflicts', + 'coerce', + 'type', + 'describe', + 'desc', + 'description', + 'alias', + ]; + opts = objFilter(opts, (k, v) => { + if (k === 'type' && !['string', 'number', 'boolean'].includes(v)) + return false; + return supportedOpts.includes(k); + }); + const fullCommand = __classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands.length - 1]; + const parseOptions = fullCommand + ? __classPrivateFieldGet(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand) + : { + array: [], + alias: {}, + default: {}, + demand: {}, + }; + objectKeys(parseOptions).forEach(pk => { + const parseOption = parseOptions[pk]; + if (Array.isArray(parseOption)) { + if (parseOption.indexOf(key) !== -1) + opts[pk] = true; + } + else { + if (parseOption[key] && !(pk in opts)) + opts[pk] = parseOption[key]; + } + }); + this.group(key, __classPrivateFieldGet(this, _YargsInstance_usage, "f").getPositionalGroupName()); + return this.option(key, opts); + } + recommendCommands(recommend = true) { + argsert('[boolean]', [recommend], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_recommendCommands, recommend, "f"); + return this; + } + required(keys, max, msg) { + return this.demand(keys, max, msg); + } + require(keys, max, msg) { + return this.demand(keys, max, msg); + } + requiresArg(keys) { + argsert(' [number]', [keys], arguments.length); + if (typeof keys === 'string' && __classPrivateFieldGet(this, _YargsInstance_options, "f").narg[keys]) { + return this; + } + else { + this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN); + } + return this; + } + showCompletionScript($0, cmd) { + argsert('[string] [string]', [$0, cmd], arguments.length); + $0 = $0 || this.$0; + __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion')); + return this; + } + showHelp(level) { + argsert('[string|function]', [level], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { + if (!this.parsed) { + const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); + if (isPromise(parse)) { + parse.then(() => { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); + }); + return this; + } + } + const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); + if (isPromise(builderResponse)) { + builderResponse.then(() => { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); + }); + return this; + } + } + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); + return this; + } + scriptName(scriptName) { + this.customScriptName = true; + this.$0 = scriptName; + return this; + } + showHelpOnFail(enabled, message) { + argsert('[boolean|string] [string]', [enabled, message], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message); + return this; + } + showVersion(level) { + argsert('[string|function]', [level], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion(level); + return this; + } + skipValidation(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('skipValidation', keys); + return this; + } + strict(enabled) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_strict, enabled !== false, "f"); + return this; + } + strictCommands(enabled) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_strictCommands, enabled !== false, "f"); + return this; + } + strictOptions(enabled) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_strictOptions, enabled !== false, "f"); + return this; + } + string(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('string', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + terminalWidth() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.stdColumns; + } + updateLocale(obj) { + return this.updateStrings(obj); + } + updateStrings(obj) { + argsert('', [obj], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); + __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj); + return this; + } + usage(msg, description, builder, handler) { + argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); + if (description !== undefined) { + assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + if ((msg || '').match(/^\$0( |$)/)) { + return this.command(msg, description, builder, handler); + } + else { + throw new YError('.usage() description must start with $0 if being used as alias for .command()'); + } + } + else { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").usage(msg); + return this; + } + } + usageConfiguration(config) { + argsert('', [config], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f"); + return this; + } + version(opt, msg, ver) { + const defaultVersionOpt = 'version'; + argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); + if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")) { + this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(undefined); + __classPrivateFieldSet(this, _YargsInstance_versionOpt, null, "f"); + } + if (arguments.length === 0) { + ver = this[kGuessVersion](); + opt = defaultVersionOpt; + } + else if (arguments.length === 1) { + if (opt === false) { + return this; + } + ver = opt; + opt = defaultVersionOpt; + } + else if (arguments.length === 2) { + ver = msg; + msg = undefined; + } + __classPrivateFieldSet(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, "f"); + msg = msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show version number'); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(ver || undefined); + this.boolean(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); + this.describe(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"), msg); + return this; + } + wrap(cols) { + argsert('', [cols], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols); + return this; + } + [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { + if (!argv._ || !argv['--']) + return argv; + argv._.push.apply(argv._, argv['--']); + try { + delete argv['--']; + } + catch (_err) { } + return argv; + } + [kCreateLogger]() { + return { + log: (...args) => { + if (!this[kHasParseCallback]()) + console.log(...args); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); + }, + error: (...args) => { + if (!this[kHasParseCallback]()) + console.error(...args); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); + }, + }; + } + [kDeleteFromParserHintObject](optionKey) { + objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, "f")).forEach((hintKey) => { + if (((key) => key === 'configObjects')(hintKey)) + return; + const hint = __classPrivateFieldGet(this, _YargsInstance_options, "f")[hintKey]; + if (Array.isArray(hint)) { + if (hint.includes(optionKey)) + hint.splice(hint.indexOf(optionKey), 1); + } + else if (typeof hint === 'object') { + delete hint[optionKey]; + } + }); + delete __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions()[optionKey]; + } + [kEmitWarning](warning, type, deduplicationId) { + if (!__classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) { + __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.emitWarning(warning, type); + __classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true; + } + } + [kFreeze]() { + __classPrivateFieldGet(this, _YargsInstance_frozens, "f").push({ + options: __classPrivateFieldGet(this, _YargsInstance_options, "f"), + configObjects: __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects.slice(0), + exitProcess: __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"), + groups: __classPrivateFieldGet(this, _YargsInstance_groups, "f"), + strict: __classPrivateFieldGet(this, _YargsInstance_strict, "f"), + strictCommands: __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"), + strictOptions: __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"), + completionCommand: __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), + output: __classPrivateFieldGet(this, _YargsInstance_output, "f"), + exitError: __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), + hasOutput: __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"), + parsed: this.parsed, + parseFn: __classPrivateFieldGet(this, _YargsInstance_parseFn, "f"), + parseContext: __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"), + }); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").freeze(); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").freeze(); + __classPrivateFieldGet(this, _YargsInstance_command, "f").freeze(); + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").freeze(); + } + [kGetDollarZero]() { + let $0 = ''; + let default$0; + if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) { + default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2); + } + else { + default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(0, 1); + } + $0 = default$0 + .map(x => { + const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, "f"), x); + return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; + }) + .join(' ') + .trim(); + if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_') && + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_')) { + $0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f") + .getEnv('_') + .replace(`${__classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.execPath())}/`, ''); + } + return $0; + } + [kGetParserConfiguration]() { + return __classPrivateFieldGet(this, _YargsInstance_parserConfig, "f"); + } + [kGetUsageConfiguration]() { + return __classPrivateFieldGet(this, _YargsInstance_usageConfig, "f"); + } + [kGuessLocale]() { + if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, "f")) + return; + const locale = __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_ALL') || + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_MESSAGES') || + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANG') || + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANGUAGE') || + 'en_US'; + this.locale(locale.replace(/[.:].*/, '')); + } + [kGuessVersion]() { + const obj = this[kPkgUp](); + return obj.version || 'unknown'; + } + [kParsePositionalNumbers](argv) { + const args = argv['--'] ? argv['--'] : argv._; + for (let i = 0, arg; (arg = args[i]) !== undefined; i++) { + if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && + Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) { + args[i] = Number(arg); + } + } + return argv; + } + [kPkgUp](rootPath) { + const npath = rootPath || '*'; + if (__classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]) + return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; + let obj = {}; + try { + let startDir = rootPath || __classPrivateFieldGet(this, _YargsInstance_shim, "f").mainFilename; + if (!rootPath && __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.extname(startDir)) { + startDir = __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(startDir); + } + const pkgJsonPath = __classPrivateFieldGet(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names) => { + if (names.includes('package.json')) { + return 'package.json'; + } + else { + return undefined; + } + }); + assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + obj = JSON.parse(__classPrivateFieldGet(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, 'utf8')); + } + catch (_noop) { } + __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath] = obj || {}; + return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; + } + [kPopulateParserHintArray](type, keys) { + keys = [].concat(keys); + keys.forEach(key => { + key = this[kSanitizeKey](key); + __classPrivateFieldGet(this, _YargsInstance_options, "f")[type].push(key); + }); + } + [kPopulateParserHintSingleValueDictionary](builder, type, key, value) { + this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { + __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = value; + }); + } + [kPopulateParserHintArrayDictionary](builder, type, key, value) { + this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { + __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] || []).concat(value); + }); + } + [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) { + if (Array.isArray(key)) { + key.forEach(k => { + builder(k, value); + }); + } + else if (((key) => typeof key === 'object')(key)) { + for (const k of objectKeys(key)) { + builder(k, key[k]); + } + } + else { + singleKeyHandler(type, this[kSanitizeKey](key), value); + } + } + [kSanitizeKey](key) { + if (key === '__proto__') + return '___proto___'; + return key; + } + [kSetKey](key, set) { + this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set); + return this; + } + [kUnfreeze]() { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + const frozen = __classPrivateFieldGet(this, _YargsInstance_frozens, "f").pop(); + assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + let configObjects; + (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, { + options: ({ set value(_o) { __classPrivateFieldSet(_a, _YargsInstance_options, _o, "f"); } }).value, + configObjects, + exitProcess: ({ set value(_o) { __classPrivateFieldSet(_b, _YargsInstance_exitProcess, _o, "f"); } }).value, + groups: ({ set value(_o) { __classPrivateFieldSet(_c, _YargsInstance_groups, _o, "f"); } }).value, + output: ({ set value(_o) { __classPrivateFieldSet(_d, _YargsInstance_output, _o, "f"); } }).value, + exitError: ({ set value(_o) { __classPrivateFieldSet(_e, _YargsInstance_exitError, _o, "f"); } }).value, + hasOutput: ({ set value(_o) { __classPrivateFieldSet(_f, _YargsInstance_hasOutput, _o, "f"); } }).value, + parsed: this.parsed, + strict: ({ set value(_o) { __classPrivateFieldSet(_g, _YargsInstance_strict, _o, "f"); } }).value, + strictCommands: ({ set value(_o) { __classPrivateFieldSet(_h, _YargsInstance_strictCommands, _o, "f"); } }).value, + strictOptions: ({ set value(_o) { __classPrivateFieldSet(_j, _YargsInstance_strictOptions, _o, "f"); } }).value, + completionCommand: ({ set value(_o) { __classPrivateFieldSet(_k, _YargsInstance_completionCommand, _o, "f"); } }).value, + parseFn: ({ set value(_o) { __classPrivateFieldSet(_l, _YargsInstance_parseFn, _o, "f"); } }).value, + parseContext: ({ set value(_o) { __classPrivateFieldSet(_m, _YargsInstance_parseContext, _o, "f"); } }).value, + } = frozen); + __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = configObjects; + __classPrivateFieldGet(this, _YargsInstance_usage, "f").unfreeze(); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").unfreeze(); + __classPrivateFieldGet(this, _YargsInstance_command, "f").unfreeze(); + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").unfreeze(); + } + [kValidateAsync](validation, argv) { + return maybeAsyncResult(argv, result => { + validation(result); + return result; + }); + } + getInternalMethods() { + return { + getCommandInstance: this[kGetCommandInstance].bind(this), + getContext: this[kGetContext].bind(this), + getHasOutput: this[kGetHasOutput].bind(this), + getLoggerInstance: this[kGetLoggerInstance].bind(this), + getParseContext: this[kGetParseContext].bind(this), + getParserConfiguration: this[kGetParserConfiguration].bind(this), + getUsageConfiguration: this[kGetUsageConfiguration].bind(this), + getUsageInstance: this[kGetUsageInstance].bind(this), + getValidationInstance: this[kGetValidationInstance].bind(this), + hasParseCallback: this[kHasParseCallback].bind(this), + isGlobalContext: this[kIsGlobalContext].bind(this), + postProcess: this[kPostProcess].bind(this), + reset: this[kReset].bind(this), + runValidation: this[kRunValidation].bind(this), + runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this), + setHasOutput: this[kSetHasOutput].bind(this), + }; + } + [kGetCommandInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_command, "f"); + } + [kGetContext]() { + return __classPrivateFieldGet(this, _YargsInstance_context, "f"); + } + [kGetHasOutput]() { + return __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"); + } + [kGetLoggerInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_logger, "f"); + } + [kGetParseContext]() { + return __classPrivateFieldGet(this, _YargsInstance_parseContext, "f") || {}; + } + [kGetUsageInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_usage, "f"); + } + [kGetValidationInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_validation, "f"); + } + [kHasParseCallback]() { + return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"); + } + [kIsGlobalContext]() { + return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, "f"); + } + [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) { + if (calledFromCommand) + return argv; + if (isPromise(argv)) + return argv; + if (!populateDoubleDash) { + argv = this[kCopyDoubleDash](argv); + } + const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] || + this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined; + if (parsePositionalNumbers) { + argv = this[kParsePositionalNumbers](argv); + } + if (runGlobalMiddleware) { + argv = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); + } + return argv; + } + [kReset](aliases = {}) { + __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f") || {}, "f"); + const tmpOptions = {}; + tmpOptions.local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local || []; + tmpOptions.configObjects = __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []; + const localLookup = {}; + tmpOptions.local.forEach(l => { + localLookup[l] = true; + (aliases[l] || []).forEach(a => { + localLookup[a] = true; + }); + }); + Object.assign(__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => { + const keys = __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName].filter(key => !(key in localLookup)); + if (keys.length > 0) { + acc[groupName] = keys; + } + return acc; + }, {})); + __classPrivateFieldSet(this, _YargsInstance_groups, {}, "f"); + const arrayOptions = [ + 'array', + 'boolean', + 'string', + 'skipValidation', + 'count', + 'normalize', + 'number', + 'hiddenOptions', + ]; + const objectOptions = [ + 'narg', + 'key', + 'alias', + 'default', + 'defaultDescription', + 'config', + 'choices', + 'demandedOptions', + 'demandedCommands', + 'deprecatedOptions', + ]; + arrayOptions.forEach(k => { + tmpOptions[k] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[k] || []).filter((k) => !localLookup[k]); + }); + objectOptions.forEach((k) => { + tmpOptions[k] = objFilter(__classPrivateFieldGet(this, _YargsInstance_options, "f")[k], k => !localLookup[k]); + }); + tmpOptions.envPrefix = __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; + __classPrivateFieldSet(this, _YargsInstance_options, tmpOptions, "f"); + __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f") + ? __classPrivateFieldGet(this, _YargsInstance_usage, "f").reset(localLookup) + : Usage(this, __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f") + ? __classPrivateFieldGet(this, _YargsInstance_validation, "f").reset(localLookup) + : Validation(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f") + ? __classPrivateFieldGet(this, _YargsInstance_command, "f").reset() + : Command(__classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_validation, "f"), __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + if (!__classPrivateFieldGet(this, _YargsInstance_completion, "f")) + __classPrivateFieldSet(this, _YargsInstance_completion, Completion(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_command, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").reset(); + __classPrivateFieldSet(this, _YargsInstance_completionCommand, null, "f"); + __classPrivateFieldSet(this, _YargsInstance_output, '', "f"); + __classPrivateFieldSet(this, _YargsInstance_exitError, null, "f"); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, false, "f"); + this.parsed = false; + return this; + } + [kRebase](base, dir) { + return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir); + } + [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) { + let skipValidation = !!calledFromCommand || helpOnly; + args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); + __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__; + __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration](); + const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration['populate--']; + const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, { + 'populate--': true, + }); + const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), { + configuration: { 'parse-positional-numbers': false, ...config }, + })); + const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f")); + let argvPromise = undefined; + const aliases = parsed.aliases; + let helpOptSet = false; + let versionOptSet = false; + Object.keys(argv).forEach(key => { + if (key === __classPrivateFieldGet(this, _YargsInstance_helpOpt, "f") && argv[key]) { + helpOptSet = true; + } + else if (key === __classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && argv[key]) { + versionOptSet = true; + } + }); + argv.$0 = this.$0; + this.parsed = parsed; + if (commandIndex === 0) { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").clearCachedHelpMessage(); + } + try { + this[kGuessLocale](); + if (shortCircuit) { + return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false); + } + if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { + const helpCmds = [__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] + .concat(aliases[__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] || []) + .filter(k => k.length > 1); + if (helpCmds.includes('' + argv._[argv._.length - 1])) { + argv._.pop(); + helpOptSet = true; + } + } + __classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f"); + const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands(); + const requestCompletions = __classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey in argv; + const skipRecommendation = helpOptSet || requestCompletions || helpOnly; + if (argv._.length) { + if (handlerKeys.length) { + let firstUnknownCommand; + for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) { + cmd = String(argv._[i]); + if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { + const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly); + return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); + } + else if (!firstUnknownCommand && + cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { + firstUnknownCommand = cmd; + break; + } + } + if (!__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && + __classPrivateFieldGet(this, _YargsInstance_recommendCommands, "f") && + firstUnknownCommand && + !skipRecommendation) { + __classPrivateFieldGet(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys); + } + } + if (__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") && + argv._.includes(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) && + !requestCompletions) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + this.showCompletionScript(); + this.exit(0); + } + } + if (__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) { + const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly); + return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); + } + if (requestCompletions) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + args = [].concat(args); + const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey}`) + 1); + __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => { + if (err) + throw new YError(err.message); + (completions || []).forEach(completion => { + __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(completion); + }); + this.exit(0); + }); + return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false); + } + if (!__classPrivateFieldGet(this, _YargsInstance_hasOutput, "f")) { + if (helpOptSet) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + skipValidation = true; + this.showHelp('log'); + this.exit(0); + } + else if (versionOptSet) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + skipValidation = true; + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion('log'); + this.exit(0); + } + } + if (!skipValidation && __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.length > 0) { + skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true); + } + if (!skipValidation) { + if (parsed.error) + throw new YError(parsed.error.message); + if (!requestCompletions) { + const validation = this[kRunValidation](aliases, {}, parsed.error); + if (!calledFromCommand) { + argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true); + } + argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv); + if (isPromise(argvPromise) && !calledFromCommand) { + argvPromise = argvPromise.then(() => { + return applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); + }); + } + } + } + } + catch (err) { + if (err instanceof YError) + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message, err); + else + throw err; + } + return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true); + } + [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) { + const demandedOptions = { ...this.getDemandedOptions() }; + return (argv) => { + if (parseErrors) + throw new YError(parseErrors.message); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").nonOptionCount(argv); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions); + let failedStrictCommands = false; + if (__classPrivateFieldGet(this, _YargsInstance_strictCommands, "f")) { + failedStrictCommands = __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownCommands(argv); + } + if (__classPrivateFieldGet(this, _YargsInstance_strict, "f") && !failedStrictCommands) { + __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand); + } + else if (__classPrivateFieldGet(this, _YargsInstance_strictOptions, "f")) { + __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false); + } + __classPrivateFieldGet(this, _YargsInstance_validation, "f").limitedChoices(argv); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").implications(argv); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicting(argv); + }; + } + [kSetHasOutput]() { + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + } + [kTrackManuallySetKeys](keys) { + if (typeof keys === 'string') { + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; + } + else { + for (const k of keys) { + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[k] = true; + } + } + } +} +export function isYargsInstance(y) { + return !!y && typeof y.getInternalMethods === 'function'; +} diff --git a/node_modules/concurrently/node_modules/yargs/build/lib/yerror.js b/node_modules/concurrently/node_modules/yargs/build/lib/yerror.js new file mode 100644 index 000000000..7a36684da --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/build/lib/yerror.js @@ -0,0 +1,9 @@ +export class YError extends Error { + constructor(msg) { + super(msg || 'yargs error'); + this.name = 'YError'; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, YError); + } + } +} diff --git a/node_modules/concurrently/node_modules/yargs/helpers/helpers.mjs b/node_modules/concurrently/node_modules/yargs/helpers/helpers.mjs new file mode 100644 index 000000000..3f96b3db8 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/helpers/helpers.mjs @@ -0,0 +1,10 @@ +import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js'; +import {hideBin} from '../build/lib/utils/process-argv.js'; +import Parser from 'yargs-parser'; +import shim from '../lib/platform-shims/esm.mjs'; + +const applyExtends = (config, cwd, mergeExtends) => { + return _applyExtends(config, cwd, mergeExtends, shim); +}; + +export {applyExtends, hideBin, Parser}; diff --git a/node_modules/concurrently/node_modules/yargs/helpers/index.js b/node_modules/concurrently/node_modules/yargs/helpers/index.js new file mode 100644 index 000000000..8ab79a337 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/helpers/index.js @@ -0,0 +1,14 @@ +const { + applyExtends, + cjsPlatformShim, + Parser, + processArgv, +} = require('../build/index.cjs'); + +module.exports = { + applyExtends: (config, cwd, mergeExtends) => { + return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); + }, + hideBin: processArgv.hideBin, + Parser, +}; diff --git a/node_modules/concurrently/node_modules/yargs/helpers/package.json b/node_modules/concurrently/node_modules/yargs/helpers/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/helpers/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/concurrently/node_modules/yargs/index.cjs b/node_modules/concurrently/node_modules/yargs/index.cjs new file mode 100644 index 000000000..d1eee821e --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/index.cjs @@ -0,0 +1,53 @@ +'use strict'; +// classic singleton yargs API, to use yargs +// without running as a singleton do: +// require('yargs/yargs')(process.argv.slice(2)) +const {Yargs, processArgv} = require('./build/index.cjs'); + +Argv(processArgv.hideBin(process.argv)); + +module.exports = Argv; + +function Argv(processArgs, cwd) { + const argv = Yargs(processArgs, cwd, require); + singletonify(argv); + // TODO(bcoe): warn if argv.parse() or argv.argv is used directly. + return argv; +} + +function defineGetter(obj, key, getter) { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: true, + get: getter, + }); +} +function lookupGetter(obj, key) { + const desc = Object.getOwnPropertyDescriptor(obj, key); + if (typeof desc !== 'undefined') { + return desc.get; + } +} + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('yargs')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('yargs').argv + to get a parsed version of process.argv. +*/ +function singletonify(inst) { + [ + ...Object.keys(inst), + ...Object.getOwnPropertyNames(inst.constructor.prototype), + ].forEach(key => { + if (key === 'argv') { + defineGetter(Argv, key, lookupGetter(inst, key)); + } else if (typeof inst[key] === 'function') { + Argv[key] = inst[key].bind(inst); + } else { + defineGetter(Argv, '$0', () => inst.$0); + defineGetter(Argv, 'parsed', () => inst.parsed); + } + }); +} diff --git a/node_modules/concurrently/node_modules/yargs/index.mjs b/node_modules/concurrently/node_modules/yargs/index.mjs new file mode 100644 index 000000000..c6440b9ed --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/index.mjs @@ -0,0 +1,8 @@ +'use strict'; + +// Bootstraps yargs for ESM: +import esmPlatformShim from './lib/platform-shims/esm.mjs'; +import {YargsFactory} from './build/lib/yargs-factory.js'; + +const Yargs = YargsFactory(esmPlatformShim); +export default Yargs; diff --git a/node_modules/concurrently/node_modules/yargs/lib/platform-shims/browser.mjs b/node_modules/concurrently/node_modules/yargs/lib/platform-shims/browser.mjs new file mode 100644 index 000000000..5f8ec61f4 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/lib/platform-shims/browser.mjs @@ -0,0 +1,95 @@ +/* eslint-disable no-unused-vars */ +'use strict'; + +import cliui from 'https://unpkg.com/cliui@7.0.1/index.mjs'; // eslint-disable-line +import Parser from 'https://unpkg.com/yargs-parser@19.0.0/browser.js'; // eslint-disable-line +import {getProcessArgvBin} from '../../build/lib/utils/process-argv.js'; +import {YError} from '../../build/lib/yerror.js'; + +const REQUIRE_ERROR = 'require is not supported in browser'; +const REQUIRE_DIRECTORY_ERROR = + 'loading a directory of commands is not supported in browser'; + +export default { + assert: { + notStrictEqual: (a, b) => { + // noop. + }, + strictEqual: (a, b) => { + // noop. + }, + }, + cliui, + findUp: () => undefined, + getEnv: key => { + // There is no environment in browser: + return undefined; + }, + inspect: console.log, + getCallerFile: () => { + throw new YError(REQUIRE_DIRECTORY_ERROR); + }, + getProcessArgvBin, + mainFilename: 'yargs', + Parser, + path: { + basename: str => str, + dirname: str => str, + extname: str => str, + relative: str => str, + }, + process: { + argv: () => [], + cwd: () => '', + emitWarning: (warning, name) => {}, + execPath: () => '', + // exit is noop browser: + exit: () => {}, + nextTick: cb => { + // eslint-disable-next-line no-undef + window.setTimeout(cb, 1); + }, + stdColumns: 80, + }, + readFileSync: () => { + return ''; + }, + require: () => { + throw new YError(REQUIRE_ERROR); + }, + requireDirectory: () => { + throw new YError(REQUIRE_DIRECTORY_ERROR); + }, + stringWidth: str => { + return [...str].length; + }, + // TODO: replace this with y18n once it's ported to ESM: + y18n: { + __: (...str) => { + if (str.length === 0) return ''; + const args = str.slice(1); + return sprintf(str[0], ...args); + }, + __n: (str1, str2, count, ...args) => { + if (count === 1) { + return sprintf(str1, ...args); + } else { + return sprintf(str2, ...args); + } + }, + getLocale: () => { + return 'en_US'; + }, + setLocale: () => {}, + updateLocale: () => {}, + }, +}; + +function sprintf(_str, ...args) { + let str = ''; + const split = _str.split('%s'); + split.forEach((token, i) => { + str += `${token}${split[i + 1] !== undefined && args[i] ? args[i] : ''}`; + }); + return str; +} diff --git a/node_modules/concurrently/node_modules/yargs/lib/platform-shims/esm.mjs b/node_modules/concurrently/node_modules/yargs/lib/platform-shims/esm.mjs new file mode 100644 index 000000000..c25baa5a3 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/lib/platform-shims/esm.mjs @@ -0,0 +1,73 @@ +'use strict' + +import { notStrictEqual, strictEqual } from 'assert' +import cliui from 'cliui' +import escalade from 'escalade/sync' +import { inspect } from 'util' +import { readFileSync } from 'fs' +import { fileURLToPath } from 'url'; +import Parser from 'yargs-parser' +import { basename, dirname, extname, relative, resolve } from 'path' +import { getProcessArgvBin } from '../../build/lib/utils/process-argv.js' +import { YError } from '../../build/lib/yerror.js' +import y18n from 'y18n' + +const REQUIRE_ERROR = 'require is not supported by ESM' +const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM' + +let __dirname; +try { + __dirname = fileURLToPath(import.meta.url); +} catch (e) { + __dirname = process.cwd(); +} +const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules')); + +export default { + assert: { + notStrictEqual, + strictEqual + }, + cliui, + findUp: escalade, + getEnv: (key) => { + return process.env[key] + }, + inspect, + getCallerFile: () => { + throw new YError(REQUIRE_DIRECTORY_ERROR) + }, + getProcessArgvBin, + mainFilename: mainFilename || process.cwd(), + Parser, + path: { + basename, + dirname, + extname, + relative, + resolve + }, + process: { + argv: () => process.argv, + cwd: process.cwd, + emitWarning: (warning, type) => process.emitWarning(warning, type), + execPath: () => process.execPath, + exit: process.exit, + nextTick: process.nextTick, + stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null + }, + readFileSync, + require: () => { + throw new YError(REQUIRE_ERROR) + }, + requireDirectory: () => { + throw new YError(REQUIRE_DIRECTORY_ERROR) + }, + stringWidth: (str) => { + return [...str].length + }, + y18n: y18n({ + directory: resolve(__dirname, '../../../locales'), + updateFiles: false + }) +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/be.json b/node_modules/concurrently/node_modules/yargs/locales/be.json new file mode 100644 index 000000000..e28fa3013 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/be.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Каманды:", + "Options:": "Опцыі:", + "Examples:": "Прыклады:", + "boolean": "булевы тып", + "count": "падлік", + "string": "радковы тып", + "number": "лік", + "array": "масіў", + "required": "неабходна", + "default": "па змаўчанні", + "default:": "па змаўчанні:", + "choices:": "магчымасці:", + "aliases:": "аліасы:", + "generated-value": "згенераванае значэнне", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", + "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", + "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s" + }, + "Missing argument value: %s": { + "one": "Не хапае значэння аргументу: %s", + "other": "Не хапае значэнняў аргументаў: %s" + }, + "Missing required argument: %s": { + "one": "Не хапае неабходнага аргументу: %s", + "other": "Не хапае неабходных аргументаў: %s" + }, + "Unknown argument: %s": { + "one": "Невядомы аргумент: %s", + "other": "Невядомыя аргументы: %s" + }, + "Invalid values:": "Несапраўдныя значэння:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", + "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", + "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", + "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", + "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", + "Path to JSON config file": "Шлях да файла канфігурацыі JSON", + "Show help": "Паказаць дапамогу", + "Show version number": "Паказаць нумар версіі", + "Did you mean %s?": "Вы мелі на ўвазе %s?" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/cs.json b/node_modules/concurrently/node_modules/yargs/locales/cs.json new file mode 100644 index 000000000..639487564 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/cs.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Příkazy:", + "Options:": "Možnosti:", + "Examples:": "Příklady:", + "boolean": "logická hodnota", + "count": "počet", + "string": "řetězec", + "number": "číslo", + "array": "pole", + "required": "povinné", + "default": "výchozí", + "default:": "výchozí:", + "choices:": "volby:", + "aliases:": "aliasy:", + "generated-value": "generovaná-hodnota", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s", + "other": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Příliš mnoho argumentů: zadáno %s, maximálně %s", + "other": "Příliš mnoho argumentů: zadáno %s, maximálně %s" + }, + "Missing argument value: %s": { + "one": "Chybí hodnota argumentu: %s", + "other": "Chybí hodnoty argumentů: %s" + }, + "Missing required argument: %s": { + "one": "Chybí požadovaný argument: %s", + "other": "Chybí požadované argumenty: %s" + }, + "Unknown argument: %s": { + "one": "Neznámý argument: %s", + "other": "Neznámé argumenty: %s" + }, + "Invalid values:": "Neplatné hodnoty:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Zadáno: %s, Možnosti: %s", + "Argument check failed: %s": "Kontrola argumentů se nezdařila: %s", + "Implications failed:": "Chybí závislé argumenty:", + "Not enough arguments following: %s": "Následuje nedostatek argumentů: %s", + "Invalid JSON config file: %s": "Neplatný konfigurační soubor JSON: %s", + "Path to JSON config file": "Cesta ke konfiguračnímu souboru JSON", + "Show help": "Zobrazit nápovědu", + "Show version number": "Zobrazit číslo verze", + "Did you mean %s?": "Měl jste na mysli %s?", + "Arguments %s and %s are mutually exclusive" : "Argumenty %s a %s se vzájemně vylučují", + "Positionals:": "Poziční:", + "command": "příkaz", + "deprecated": "zastaralé", + "deprecated: %s": "zastaralé: %s" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/de.json b/node_modules/concurrently/node_modules/yargs/locales/de.json new file mode 100644 index 000000000..dc73ec3f0 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/de.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Kommandos:", + "Options:": "Optionen:", + "Examples:": "Beispiele:", + "boolean": "boolean", + "count": "Zähler", + "string": "string", + "number": "Zahl", + "array": "array", + "required": "erforderlich", + "default": "Standard", + "default:": "Standard:", + "choices:": "Möglichkeiten:", + "aliases:": "Aliase:", + "generated-value": "Generierter-Wert", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", + "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", + "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt" + }, + "Missing argument value: %s": { + "one": "Fehlender Argumentwert: %s", + "other": "Fehlende Argumentwerte: %s" + }, + "Missing required argument: %s": { + "one": "Fehlendes Argument: %s", + "other": "Fehlende Argumente: %s" + }, + "Unknown argument: %s": { + "one": "Unbekanntes Argument: %s", + "other": "Unbekannte Argumente: %s" + }, + "Invalid values:": "Unzulässige Werte:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", + "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", + "Implications failed:": "Fehlende abhängige Argumente:", + "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", + "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", + "Path to JSON config file": "Pfad zur JSON-Config Datei", + "Show help": "Hilfe anzeigen", + "Show version number": "Version anzeigen", + "Did you mean %s?": "Meintest du %s?" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/en.json b/node_modules/concurrently/node_modules/yargs/locales/en.json new file mode 100644 index 000000000..af096a110 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/en.json @@ -0,0 +1,55 @@ +{ + "Commands:": "Commands:", + "Options:": "Options:", + "Examples:": "Examples:", + "boolean": "boolean", + "count": "count", + "string": "string", + "number": "number", + "array": "array", + "required": "required", + "default": "default", + "default:": "default:", + "choices:": "choices:", + "aliases:": "aliases:", + "generated-value": "generated-value", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Not enough non-option arguments: got %s, need at least %s", + "other": "Not enough non-option arguments: got %s, need at least %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Too many non-option arguments: got %s, maximum of %s", + "other": "Too many non-option arguments: got %s, maximum of %s" + }, + "Missing argument value: %s": { + "one": "Missing argument value: %s", + "other": "Missing argument values: %s" + }, + "Missing required argument: %s": { + "one": "Missing required argument: %s", + "other": "Missing required arguments: %s" + }, + "Unknown argument: %s": { + "one": "Unknown argument: %s", + "other": "Unknown arguments: %s" + }, + "Unknown command: %s": { + "one": "Unknown command: %s", + "other": "Unknown commands: %s" + }, + "Invalid values:": "Invalid values:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", + "Argument check failed: %s": "Argument check failed: %s", + "Implications failed:": "Missing dependent arguments:", + "Not enough arguments following: %s": "Not enough arguments following: %s", + "Invalid JSON config file: %s": "Invalid JSON config file: %s", + "Path to JSON config file": "Path to JSON config file", + "Show help": "Show help", + "Show version number": "Show version number", + "Did you mean %s?": "Did you mean %s?", + "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", + "Positionals:": "Positionals:", + "command": "command", + "deprecated": "deprecated", + "deprecated: %s": "deprecated: %s" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/es.json b/node_modules/concurrently/node_modules/yargs/locales/es.json new file mode 100644 index 000000000..d77b4616a --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/es.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opciones:", + "Examples:": "Ejemplos:", + "boolean": "booleano", + "count": "cuenta", + "string": "cadena de caracteres", + "number": "número", + "array": "tabla", + "required": "requerido", + "default": "defecto", + "default:": "defecto:", + "choices:": "selección:", + "aliases:": "alias:", + "generated-value": "valor-generado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", + "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", + "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s" + }, + "Missing argument value: %s": { + "one": "Falta argumento: %s", + "other": "Faltan argumentos: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento requerido: %s", + "other": "Faltan argumentos requeridos: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconocido: %s", + "other": "Argumentos desconocidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", + "Argument check failed: %s": "Verificación de argumento ha fallado: %s", + "Implications failed:": "Implicaciones fallidas:", + "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", + "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", + "Path to JSON config file": "Ruta al archivo de configuración JSON", + "Show help": "Muestra ayuda", + "Show version number": "Muestra número de versión", + "Did you mean %s?": "Quisiste decir %s?" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/fi.json b/node_modules/concurrently/node_modules/yargs/locales/fi.json new file mode 100644 index 000000000..481feb710 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/fi.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Komennot:", + "Options:": "Valinnat:", + "Examples:": "Esimerkkejä:", + "boolean": "totuusarvo", + "count": "lukumäärä", + "string": "merkkijono", + "number": "numero", + "array": "taulukko", + "required": "pakollinen", + "default": "oletusarvo", + "default:": "oletusarvo:", + "choices:": "vaihtoehdot:", + "aliases:": "aliakset:", + "generated-value": "generoitu-arvo", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s", + "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s", + "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s" + }, + "Missing argument value: %s": { + "one": "Argumentin arvo puuttuu: %s", + "other": "Argumentin arvot puuttuvat: %s" + }, + "Missing required argument: %s": { + "one": "Pakollinen argumentti puuttuu: %s", + "other": "Pakollisia argumentteja puuttuu: %s" + }, + "Unknown argument: %s": { + "one": "Tuntematon argumentti: %s", + "other": "Tuntemattomia argumentteja: %s" + }, + "Invalid values:": "Virheelliset arvot:", + "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s", + "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s", + "Implications failed:": "Riippuvia argumentteja puuttuu:", + "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s", + "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s", + "Path to JSON config file": "JSON-asetustiedoston polku", + "Show help": "Näytä ohje", + "Show version number": "Näytä versionumero", + "Did you mean %s?": "Tarkoititko %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat", + "Positionals:": "Sijaintiparametrit:", + "command": "komento" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/fr.json b/node_modules/concurrently/node_modules/yargs/locales/fr.json new file mode 100644 index 000000000..edd743f0c --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/fr.json @@ -0,0 +1,53 @@ +{ + "Commands:": "Commandes :", + "Options:": "Options :", + "Examples:": "Exemples :", + "boolean": "booléen", + "count": "compteur", + "string": "chaîne de caractères", + "number": "nombre", + "array": "tableau", + "required": "requis", + "default": "défaut", + "default:": "défaut :", + "choices:": "choix :", + "aliases:": "alias :", + "generated-value": "valeur générée", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s", + "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s", + "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s" + }, + "Missing argument value: %s": { + "one": "Argument manquant : %s", + "other": "Arguments manquants : %s" + }, + "Missing required argument: %s": { + "one": "Argument requis manquant : %s", + "other": "Arguments requis manquants : %s" + }, + "Unknown argument: %s": { + "one": "Argument inconnu : %s", + "other": "Arguments inconnus : %s" + }, + "Unknown command: %s": { + "one": "Commande inconnue : %s", + "other": "Commandes inconnues : %s" + }, + "Invalid values:": "Valeurs invalides :", + "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s", + "Argument check failed: %s": "Echec de la vérification de l'argument : %s", + "Implications failed:": "Arguments dépendants manquants :", + "Not enough arguments following: %s": "Pas assez d'arguments après : %s", + "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s", + "Path to JSON config file": "Chemin du fichier de configuration JSON", + "Show help": "Affiche l'aide", + "Show version number": "Affiche le numéro de version", + "Did you mean %s?": "Vouliez-vous dire %s ?", + "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs", + "Positionals:": "Arguments positionnels :", + "command": "commande" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/hi.json b/node_modules/concurrently/node_modules/yargs/locales/hi.json new file mode 100644 index 000000000..a9de77cce --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/hi.json @@ -0,0 +1,49 @@ +{ + "Commands:": "आदेश:", + "Options:": "विकल्प:", + "Examples:": "उदाहरण:", + "boolean": "सत्यता", + "count": "संख्या", + "string": "वर्णों का तार ", + "number": "अंक", + "array": "सरणी", + "required": "आवश्यक", + "default": "डिफॉल्ट", + "default:": "डिफॉल्ट:", + "choices:": "विकल्प:", + "aliases:": "उपनाम:", + "generated-value": "उत्पन्न-मूल्य", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", + "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", + "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य" + }, + "Missing argument value: %s": { + "one": "कुछ तर्को के मूल्य गुम हैं: %s", + "other": "कुछ तर्को के मूल्य गुम हैं: %s" + }, + "Missing required argument: %s": { + "one": "आवश्यक तर्क गुम हैं: %s", + "other": "आवश्यक तर्क गुम हैं: %s" + }, + "Unknown argument: %s": { + "one": "अज्ञात तर्क प्राप्त: %s", + "other": "अज्ञात तर्क प्राप्त: %s" + }, + "Invalid values:": "अमान्य मूल्य:", + "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", + "Argument check failed: %s": "तर्क जांच विफल: %s", + "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", + "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", + "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", + "Path to JSON config file": "JSON config फाइल का पथ", + "Show help": "सहायता दिखाएँ", + "Show version number": "Version संख्या दिखाएँ", + "Did you mean %s?": "क्या आपका मतलब है %s?", + "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", + "Positionals:": "स्थानीय:", + "command": "आदेश" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/hu.json b/node_modules/concurrently/node_modules/yargs/locales/hu.json new file mode 100644 index 000000000..21492d05a --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/hu.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Parancsok:", + "Options:": "Opciók:", + "Examples:": "Példák:", + "boolean": "boolean", + "count": "számláló", + "string": "szöveg", + "number": "szám", + "array": "tömb", + "required": "kötelező", + "default": "alapértelmezett", + "default:": "alapértelmezett:", + "choices:": "lehetőségek:", + "aliases:": "aliaszok:", + "generated-value": "generált-érték", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", + "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", + "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet" + }, + "Missing argument value: %s": { + "one": "Hiányzó argumentum érték: %s", + "other": "Hiányzó argumentum értékek: %s" + }, + "Missing required argument: %s": { + "one": "Hiányzó kötelező argumentum: %s", + "other": "Hiányzó kötelező argumentumok: %s" + }, + "Unknown argument: %s": { + "one": "Ismeretlen argumentum: %s", + "other": "Ismeretlen argumentumok: %s" + }, + "Invalid values:": "Érvénytelen érték:", + "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", + "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", + "Implications failed:": "Implikációk sikertelenek:", + "Not enough arguments following: %s": "Nem elég argumentum követi: %s", + "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", + "Path to JSON config file": "JSON konfigurációs file helye", + "Show help": "Súgo megjelenítése", + "Show version number": "Verziószám megjelenítése", + "Did you mean %s?": "Erre gondoltál %s?" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/id.json b/node_modules/concurrently/node_modules/yargs/locales/id.json new file mode 100644 index 000000000..125867cbb --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/id.json @@ -0,0 +1,50 @@ + +{ + "Commands:": "Perintah:", + "Options:": "Pilihan:", + "Examples:": "Contoh:", + "boolean": "boolean", + "count": "jumlah", + "number": "nomor", + "string": "string", + "array": "larik", + "required": "diperlukan", + "default": "bawaan", + "default:": "bawaan:", + "aliases:": "istilah lain:", + "choices:": "pilihan:", + "generated-value": "nilai-yang-dihasilkan", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumen wajib kurang: hanya %s, minimal %s", + "other": "Argumen wajib kurang: hanya %s, minimal %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s", + "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s" + }, + "Missing argument value: %s": { + "one": "Kurang argumen: %s", + "other": "Kurang argumen: %s" + }, + "Missing required argument: %s": { + "one": "Kurang argumen wajib: %s", + "other": "Kurang argumen wajib: %s" + }, + "Unknown argument: %s": { + "one": "Argumen tak diketahui: %s", + "other": "Argumen tak diketahui: %s" + }, + "Invalid values:": "Nilai-nilai tidak valid:", + "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", + "Argument check failed: %s": "Pemeriksaan argument gagal: %s", + "Implications failed:": "Implikasi gagal:", + "Not enough arguments following: %s": "Kurang argumen untuk: %s", + "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", + "Path to JSON config file": "Alamat berkas konfigurasi JSON", + "Show help": "Lihat bantuan", + "Show version number": "Lihat nomor versi", + "Did you mean %s?": "Maksud Anda: %s?", + "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", + "Positionals:": "Posisional-posisional:", + "command": "perintah" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/it.json b/node_modules/concurrently/node_modules/yargs/locales/it.json new file mode 100644 index 000000000..fde575618 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/it.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Comandi:", + "Options:": "Opzioni:", + "Examples:": "Esempi:", + "boolean": "booleano", + "count": "contatore", + "string": "stringa", + "number": "numero", + "array": "vettore", + "required": "richiesto", + "default": "predefinito", + "default:": "predefinito:", + "choices:": "scelte:", + "aliases:": "alias:", + "generated-value": "valore generato", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", + "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", + "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s" + }, + "Missing argument value: %s": { + "one": "Argomento mancante: %s", + "other": "Argomenti mancanti: %s" + }, + "Missing required argument: %s": { + "one": "Argomento richiesto mancante: %s", + "other": "Argomenti richiesti mancanti: %s" + }, + "Unknown argument: %s": { + "one": "Argomento sconosciuto: %s", + "other": "Argomenti sconosciuti: %s" + }, + "Invalid values:": "Valori non validi:", + "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", + "Argument check failed: %s": "Controllo dell'argomento fallito: %s", + "Implications failed:": "Argomenti dipendenti mancanti:", + "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", + "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", + "Path to JSON config file": "Percorso del file di configurazione JSON", + "Show help": "Mostra la schermata di aiuto", + "Show version number": "Mostra il numero di versione", + "Did you mean %s?": "Intendi forse %s?" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/ja.json b/node_modules/concurrently/node_modules/yargs/locales/ja.json new file mode 100644 index 000000000..3954ae68f --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/ja.json @@ -0,0 +1,51 @@ +{ + "Commands:": "コマンド:", + "Options:": "オプション:", + "Examples:": "例:", + "boolean": "真偽", + "count": "カウント", + "string": "文字列", + "number": "数値", + "array": "配列", + "required": "必須", + "default": "デフォルト", + "default:": "デフォルト:", + "choices:": "選択してください:", + "aliases:": "エイリアス:", + "generated-value": "生成された値", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", + "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", + "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:" + }, + "Missing argument value: %s": { + "one": "引数の値が見つかりません: %s", + "other": "引数の値が見つかりません: %s" + }, + "Missing required argument: %s": { + "one": "必須の引数が見つかりません: %s", + "other": "必須の引数が見つかりません: %s" + }, + "Unknown argument: %s": { + "one": "未知の引数です: %s", + "other": "未知の引数です: %s" + }, + "Invalid values:": "不正な値です:", + "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s", + "Argument check failed: %s": "引数のチェックに失敗しました: %s", + "Implications failed:": "オプションの組み合わせで不正が生じました:", + "Not enough arguments following: %s": "次の引数が不足しています。: %s", + "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", + "Path to JSON config file": "JSONの設定ファイルまでのpath", + "Show help": "ヘルプを表示", + "Show version number": "バージョンを表示", + "Did you mean %s?": "もしかして %s?", + "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", + "Positionals:": "位置:", + "command": "コマンド", + "deprecated": "非推奨", + "deprecated: %s": "非推奨: %s" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/ko.json b/node_modules/concurrently/node_modules/yargs/locales/ko.json new file mode 100644 index 000000000..746bc89fe --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/ko.json @@ -0,0 +1,49 @@ +{ + "Commands:": "명령:", + "Options:": "옵션:", + "Examples:": "예시:", + "boolean": "불리언", + "count": "개수", + "string": "문자열", + "number": "숫자", + "array": "배열", + "required": "필수", + "default": "기본값", + "default:": "기본값:", + "choices:": "선택지:", + "aliases:": "별칭:", + "generated-value": "생성된 값", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요", + "other": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능", + "other": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능" + }, + "Missing argument value: %s": { + "one": "인수가 주어지지 않았습니다: %s", + "other": "인수가 주어지지 않았습니다: %s" + }, + "Missing required argument: %s": { + "one": "필수 인수가 주어지지 않았습니다: %s", + "other": "필수 인수가 주어지지 않았습니다: %s" + }, + "Unknown argument: %s": { + "one": "알 수 없는 인수입니다: %s", + "other": "알 수 없는 인수입니다: %s" + }, + "Invalid values:": "유효하지 않은 값:", + "Argument: %s, Given: %s, Choices: %s": "인수: %s, 주어진 값: %s, 선택지: %s", + "Argument check failed: %s": "인수 체크에 실패했습니다: %s", + "Implications failed:": "주어진 인수에 필요한 추가 인수가 주어지지 않았습니다:", + "Not enough arguments following: %s": "다음 인수가 주어지지 않았습니다: %s", + "Invalid JSON config file: %s": "유효하지 않은 JSON 설정 파일: %s", + "Path to JSON config file": "JSON 설정 파일 경로", + "Show help": "도움말 표시", + "Show version number": "버전 표시", + "Did you mean %s?": "%s을(를) 찾으시나요?", + "Arguments %s and %s are mutually exclusive" : "인수 %s과(와) %s은(는) 동시에 지정할 수 없습니다", + "Positionals:": "위치:", + "command": "명령" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/nb.json b/node_modules/concurrently/node_modules/yargs/locales/nb.json new file mode 100644 index 000000000..6f410ed09 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/nb.json @@ -0,0 +1,44 @@ +{ + "Commands:": "Kommandoer:", + "Options:": "Alternativer:", + "Examples:": "Eksempler:", + "boolean": "boolsk", + "count": "antall", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default": "standard", + "default:": "standard:", + "choices:": "valg:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", + "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", + "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Mangler argument verdi: %s", + "other": "Mangler argument verdier: %s" + }, + "Missing required argument: %s": { + "one": "Mangler obligatorisk argument: %s", + "other": "Mangler obligatoriske argumenter: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjente argumenter: %s" + }, + "Invalid values:": "Ugyldige verdier:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", + "Argument check failed: %s": "Argumentsjekk mislyktes: %s", + "Implications failed:": "Konsekvensene mislyktes:", + "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/nl.json b/node_modules/concurrently/node_modules/yargs/locales/nl.json new file mode 100644 index 000000000..9ff95c559 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/nl.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Commando's:", + "Options:": "Opties:", + "Examples:": "Voorbeelden:", + "boolean": "booleaans", + "count": "aantal", + "string": "string", + "number": "getal", + "array": "lijst", + "required": "verplicht", + "default": "standaard", + "default:": "standaard:", + "choices:": "keuzes:", + "aliases:": "aliassen:", + "generated-value": "gegenereerde waarde", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", + "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", + "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s" + }, + "Missing argument value: %s": { + "one": "Missende argumentwaarde: %s", + "other": "Missende argumentwaarden: %s" + }, + "Missing required argument: %s": { + "one": "Missend verplicht argument: %s", + "other": "Missende verplichte argumenten: %s" + }, + "Unknown argument: %s": { + "one": "Onbekend argument: %s", + "other": "Onbekende argumenten: %s" + }, + "Invalid values:": "Ongeldige waarden:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", + "Argument check failed: %s": "Argumentcontrole mislukt: %s", + "Implications failed:": "Ontbrekende afhankelijke argumenten:", + "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", + "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", + "Path to JSON config file": "Pad naar JSON-config-bestand", + "Show help": "Toon help", + "Show version number": "Toon versienummer", + "Did you mean %s?": "Bedoelde u misschien %s?", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", + "Positionals:": "Positie-afhankelijke argumenten", + "command": "commando" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/nn.json b/node_modules/concurrently/node_modules/yargs/locales/nn.json new file mode 100644 index 000000000..24479ac94 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/nn.json @@ -0,0 +1,44 @@ +{ + "Commands:": "Kommandoar:", + "Options:": "Alternativ:", + "Examples:": "Døme:", + "boolean": "boolsk", + "count": "mengd", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default": "standard", + "default:": "standard:", + "choices:": "val:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", + "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s", + "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Manglar argumentverdi: %s", + "other": "Manglar argumentverdiar: %s" + }, + "Missing required argument: %s": { + "one": "Manglar obligatorisk argument: %s", + "other": "Manglar obligatoriske argument: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjende argument: %s" + }, + "Invalid values:": "Ugyldige verdiar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", + "Argument check failed: %s": "Argumentsjekk mislukkast: %s", + "Implications failed:": "Konsekvensane mislukkast:", + "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/pirate.json b/node_modules/concurrently/node_modules/yargs/locales/pirate.json new file mode 100644 index 000000000..dcb5cb753 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/pirate.json @@ -0,0 +1,13 @@ +{ + "Commands:": "Choose yer command:", + "Options:": "Options for me hearties!", + "Examples:": "Ex. marks the spot:", + "required": "requi-yar-ed", + "Missing required argument: %s": { + "one": "Ye be havin' to set the followin' argument land lubber: %s", + "other": "Ye be havin' to set the followin' arguments land lubber: %s" + }, + "Show help": "Parlay this here code of conduct", + "Show version number": "'Tis the version ye be askin' fer", + "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/pl.json b/node_modules/concurrently/node_modules/yargs/locales/pl.json new file mode 100644 index 000000000..a41d4bd50 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/pl.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Polecenia:", + "Options:": "Opcje:", + "Examples:": "Przykłady:", + "boolean": "boolean", + "count": "ilość", + "string": "ciąg znaków", + "number": "liczba", + "array": "tablica", + "required": "wymagany", + "default": "domyślny", + "default:": "domyślny:", + "choices:": "dostępne:", + "aliases:": "aliasy:", + "generated-value": "wygenerowana-wartość", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", + "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", + "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s" + }, + "Missing argument value: %s": { + "one": "Brak wartości dla argumentu: %s", + "other": "Brak wartości dla argumentów: %s" + }, + "Missing required argument: %s": { + "one": "Brak wymaganego argumentu: %s", + "other": "Brak wymaganych argumentów: %s" + }, + "Unknown argument: %s": { + "one": "Nieznany argument: %s", + "other": "Nieznane argumenty: %s" + }, + "Invalid values:": "Nieprawidłowe wartości:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", + "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", + "Implications failed:": "Założenia nie zostały spełnione:", + "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", + "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", + "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", + "Show help": "Pokaż pomoc", + "Show version number": "Pokaż numer wersji", + "Did you mean %s?": "Czy chodziło Ci o %s?", + "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", + "Positionals:": "Pozycyjne:", + "command": "polecenie" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/pt.json b/node_modules/concurrently/node_modules/yargs/locales/pt.json new file mode 100644 index 000000000..0c8ac99c8 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/pt.json @@ -0,0 +1,45 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "boolean", + "count": "contagem", + "string": "cadeia de caracteres", + "number": "número", + "array": "arranjo", + "required": "requerido", + "default": "padrão", + "default:": "padrão:", + "choices:": "escolhas:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", + "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", + "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s" + }, + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", + "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", + "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", + "Show help": "Mostra ajuda", + "Show version number": "Mostra número de versão", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/pt_BR.json b/node_modules/concurrently/node_modules/yargs/locales/pt_BR.json new file mode 100644 index 000000000..eae1ec60d --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/pt_BR.json @@ -0,0 +1,48 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "booleano", + "count": "contagem", + "string": "string", + "number": "número", + "array": "array", + "required": "obrigatório", + "default:": "padrão:", + "choices:": "opções:", + "aliases:": "sinônimos:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", + "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Excesso de argumentos: recebido %s, máximo de %s", + "other": "Excesso de argumentos: recebido %s, máximo de %s" + }, + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", + "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", + "Path to JSON config file": "Caminho para o arquivo JSON de configuração", + "Show help": "Exibe ajuda", + "Show version number": "Exibe a versão", + "Did you mean %s?": "Você quis dizer %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", + "Positionals:": "Posicionais:", + "command": "comando" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/ru.json b/node_modules/concurrently/node_modules/yargs/locales/ru.json new file mode 100644 index 000000000..d5c9e323b --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/ru.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Команды:", + "Options:": "Опции:", + "Examples:": "Примеры:", + "boolean": "булевый тип", + "count": "подсчет", + "string": "строковой тип", + "number": "число", + "array": "массив", + "required": "необходимо", + "default": "по умолчанию", + "default:": "по умолчанию:", + "choices:": "возможности:", + "aliases:": "алиасы:", + "generated-value": "генерированное значение", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", + "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", + "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s" + }, + "Missing argument value: %s": { + "one": "Не хватает значения аргумента: %s", + "other": "Не хватает значений аргументов: %s" + }, + "Missing required argument: %s": { + "one": "Не хватает необходимого аргумента: %s", + "other": "Не хватает необходимых аргументов: %s" + }, + "Unknown argument: %s": { + "one": "Неизвестный аргумент: %s", + "other": "Неизвестные аргументы: %s" + }, + "Invalid values:": "Недействительные значения:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", + "Argument check failed: %s": "Проверка аргументов не удалась: %s", + "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", + "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", + "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", + "Path to JSON config file": "Путь к файлу конфигурации JSON", + "Show help": "Показать помощь", + "Show version number": "Показать номер версии", + "Did you mean %s?": "Вы имели в виду %s?", + "Arguments %s and %s are mutually exclusive": "Аргументы %s и %s являются взаимоисключающими", + "Positionals:": "Позиционные аргументы:", + "command": "команда", + "deprecated": "устар.", + "deprecated: %s": "устар.: %s" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/th.json b/node_modules/concurrently/node_modules/yargs/locales/th.json new file mode 100644 index 000000000..33b048e2a --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/th.json @@ -0,0 +1,46 @@ +{ + "Commands:": "คอมมาน", + "Options:": "ออฟชั่น", + "Examples:": "ตัวอย่าง", + "boolean": "บูลีน", + "count": "นับ", + "string": "สตริง", + "number": "ตัวเลข", + "array": "อาเรย์", + "required": "จำเป็น", + "default": "ค่าเริ่มต้", + "default:": "ค่าเริ่มต้น", + "choices:": "ตัวเลือก", + "aliases:": "เอเลียส", + "generated-value": "ค่าที่ถูกสร้างขึ้น", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", + "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", + "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า" + }, + "Missing argument value: %s": { + "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", + "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" + }, + "Missing required argument: %s": { + "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", + "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" + }, + "Unknown argument: %s": { + "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", + "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" + }, + "Invalid values:": "ค่าไม่ถูกต้อง:", + "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", + "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", + "Implications failed:": "Implications ไม่สำเร็จ:", + "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", + "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", + "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", + "Show help": "ขอความช่วยเหลือ", + "Show version number": "แสดงตัวเลขเวอร์ชั่น", + "Did you mean %s?": "คุณหมายถึง %s?" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/tr.json b/node_modules/concurrently/node_modules/yargs/locales/tr.json new file mode 100644 index 000000000..0d0d2ccd8 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/tr.json @@ -0,0 +1,48 @@ +{ + "Commands:": "Komutlar:", + "Options:": "Seçenekler:", + "Examples:": "Örnekler:", + "boolean": "boolean", + "count": "sayı", + "string": "string", + "number": "numara", + "array": "array", + "required": "zorunlu", + "default": "varsayılan", + "default:": "varsayılan:", + "choices:": "seçimler:", + "aliases:": "takma adlar:", + "generated-value": "oluşturulan-değer", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", + "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", + "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s" + }, + "Missing argument value: %s": { + "one": "Eksik argüman değeri: %s", + "other": "Eksik argüman değerleri: %s" + }, + "Missing required argument: %s": { + "one": "Eksik zorunlu argüman: %s", + "other": "Eksik zorunlu argümanlar: %s" + }, + "Unknown argument: %s": { + "one": "Bilinmeyen argüman: %s", + "other": "Bilinmeyen argümanlar: %s" + }, + "Invalid values:": "Geçersiz değerler:", + "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", + "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", + "Implications failed:": "Sonuçlar başarısız oldu:", + "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", + "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", + "Path to JSON config file": "JSON yapılandırma dosya konumu", + "Show help": "Yardım detaylarını göster", + "Show version number": "Versiyon detaylarını göster", + "Did you mean %s?": "Bunu mu demek istediniz: %s?", + "Positionals:": "Sıralılar:", + "command": "komut" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/uk_UA.json b/node_modules/concurrently/node_modules/yargs/locales/uk_UA.json new file mode 100644 index 000000000..0af0e99cb --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/uk_UA.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Команди:", + "Options:": "Опції:", + "Examples:": "Приклади:", + "boolean": "boolean", + "count": "кількість", + "string": "строка", + "number": "число", + "array": "масива", + "required": "обов'язково", + "default": "за замовчуванням", + "default:": "за замовчуванням:", + "choices:": "доступні варіанти:", + "aliases:": "псевдоніми:", + "generated-value": "згенероване значення", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недостатньо аргументів: наразі %s, потрібно %s або більше", + "other": "Недостатньо аргументів: наразі %s, потрібно %s або більше" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Забагато аргументів: наразі %s, максимум %s", + "other": "Too many non-option arguments: наразі %s, максимум of %s" + }, + "Missing argument value: %s": { + "one": "Відсутнє значення для аргументу: %s", + "other": "Відсутні значення для аргументу: %s" + }, + "Missing required argument: %s": { + "one": "Відсутній обов'язковий аргумент: %s", + "other": "Відсутні обов'язкові аргументи: %s" + }, + "Unknown argument: %s": { + "one": "Аргумент %s не підтримується", + "other": "Аргументи %s не підтримуються" + }, + "Invalid values:": "Некоректні значення:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Введено: %s, Доступні варіанти: %s", + "Argument check failed: %s": "Аргумент не пройшов перевірку: %s", + "Implications failed:": "Відсутні залежні аргументи:", + "Not enough arguments following: %s": "Не достатньо аргументів після: %s", + "Invalid JSON config file: %s": "Некоректний JSON-файл конфігурації: %s", + "Path to JSON config file": "Шлях до JSON-файлу конфігурації", + "Show help": "Показати довідку", + "Show version number": "Показати версію", + "Did you mean %s?": "Можливо, ви мали на увазі %s?", + "Arguments %s and %s are mutually exclusive" : "Аргументи %s та %s взаємовиключні", + "Positionals:": "Позиційні:", + "command": "команда", + "deprecated": "застарілий", + "deprecated: %s": "застарілий: %s" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/uz.json b/node_modules/concurrently/node_modules/yargs/locales/uz.json new file mode 100644 index 000000000..0d0716819 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/uz.json @@ -0,0 +1,52 @@ +{ + "Commands:": "Buyruqlar:", + "Options:": "Imkoniyatlar:", + "Examples:": "Misollar:", + "boolean": "boolean", + "count": "sanoq", + "string": "satr", + "number": "raqam", + "array": "massiv", + "required": "majburiy", + "default": "boshlang'ich", + "default:": "boshlang'ich:", + "choices:": "tanlovlar:", + "aliases:": "taxalluslar:", + "generated-value": "yaratilgan-qiymat", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s", + "other": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "No-imkoniyat argumentlar juda ko'p: berilgan %s, maksimum %s", + "other": "No-imkoniyat argumentlar juda ko'p: got %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Argument qiymati berilmagan: %s", + "other": "Argument qiymatlari berilmagan: %s" + }, + "Missing required argument: %s": { + "one": "Majburiy argument berilmagan: %s", + "other": "Majburiy argumentlar berilmagan: %s" + }, + "Unknown argument: %s": { + "one": "Noma'lum argument berilmagan: %s", + "other": "Noma'lum argumentlar berilmagan: %s" + }, + "Invalid values:": "Nosoz qiymatlar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Berilgan: %s, Tanlovlar: %s", + "Argument check failed: %s": "Muvaffaqiyatsiz argument tekshiruvi: %s", + "Implications failed:": "Bog'liq argumentlar berilmagan:", + "Not enough arguments following: %s": "Quyidagi argumentlar yetarli emas: %s", + "Invalid JSON config file: %s": "Nosoz JSON konfiguratsiya fayli: %s", + "Path to JSON config file": "JSON konfiguratsiya fayli joylashuvi", + "Show help": "Yordam ko'rsatish", + "Show version number": "Versiyani ko'rsatish", + "Did you mean %s?": "%s ni nazarda tutyapsizmi?", + "Arguments %s and %s are mutually exclusive" : "%s va %s argumentlari alohida", + "Positionals:": "Positsionallar:", + "command": "buyruq", + "deprecated": "eskirgan", + "deprecated: %s": "eskirgan: %s" + } + \ No newline at end of file diff --git a/node_modules/concurrently/node_modules/yargs/locales/zh_CN.json b/node_modules/concurrently/node_modules/yargs/locales/zh_CN.json new file mode 100644 index 000000000..257d26bab --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/zh_CN.json @@ -0,0 +1,48 @@ +{ + "Commands:": "命令:", + "Options:": "选项:", + "Examples:": "示例:", + "boolean": "布尔", + "count": "计数", + "string": "字符串", + "number": "数字", + "array": "数组", + "required": "必需", + "default": "默认值", + "default:": "默认值:", + "choices:": "可选值:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", + "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", + "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个" + }, + "Missing argument value: %s": { + "one": "没有给此选项指定值:%s", + "other": "没有给这些选项指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必须的选项:%s", + "other": "缺少这些必须的选项:%s" + }, + "Unknown argument: %s": { + "one": "无法识别的选项:%s", + "other": "无法识别这些选项:%s" + }, + "Invalid values:": "无效的选项值:", + "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", + "Argument check failed: %s": "选项值验证失败:%s", + "Implications failed:": "缺少依赖的选项:", + "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", + "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", + "Path to JSON config file": "JSON 配置文件的路径", + "Show help": "显示帮助信息", + "Show version number": "显示版本号", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", + "Positionals:": "位置:", + "command": "命令" +} diff --git a/node_modules/concurrently/node_modules/yargs/locales/zh_TW.json b/node_modules/concurrently/node_modules/yargs/locales/zh_TW.json new file mode 100644 index 000000000..e38495d3a --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/locales/zh_TW.json @@ -0,0 +1,51 @@ +{ + "Commands:": "命令:", + "Options:": "選項:", + "Examples:": "範例:", + "boolean": "布林", + "count": "次數", + "string": "字串", + "number": "數字", + "array": "陣列", + "required": "必填", + "default": "預設值", + "default:": "預設值:", + "choices:": "可選值:", + "aliases:": "別名:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", + "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", + "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個" + }, + "Missing argument value: %s": { + "one": "此引數無指定值:%s", + "other": "這些引數無指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必須的引數:%s", + "other": "缺少這些必須的引數:%s" + }, + "Unknown argument: %s": { + "one": "未知的引數:%s", + "other": "未知的引數:%s" + }, + "Invalid values:": "無效的選項值:", + "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", + "Argument check failed: %s": "引數驗證失敗:%s", + "Implications failed:": "缺少依賴引數:", + "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", + "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", + "Path to JSON config file": "JSON 設置文件的路徑", + "Show help": "顯示說明", + "Show version number": "顯示版本", + "Did you mean %s?": "您是指 %s 嗎?", + "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 互斥", + "Positionals:": "位置:", + "command": "命令", + "deprecated": "已淘汰", + "deprecated: %s": "已淘汰:%s" + } diff --git a/node_modules/concurrently/node_modules/yargs/package.json b/node_modules/concurrently/node_modules/yargs/package.json new file mode 100644 index 000000000..389cc6b06 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/package.json @@ -0,0 +1,123 @@ +{ + "name": "yargs", + "version": "17.7.2", + "description": "yargs the modern, pirate-themed, successor to optimist.", + "main": "./index.cjs", + "exports": { + "./package.json": "./package.json", + ".": [ + { + "import": "./index.mjs", + "require": "./index.cjs" + }, + "./index.cjs" + ], + "./helpers": { + "import": "./helpers/helpers.mjs", + "require": "./helpers/index.js" + }, + "./browser": { + "import": "./browser.mjs", + "types": "./browser.d.ts" + }, + "./yargs": [ + { + "import": "./yargs.mjs", + "require": "./yargs" + }, + "./yargs" + ] + }, + "type": "module", + "module": "./index.mjs", + "contributors": [ + { + "name": "Yargs Contributors", + "url": "https://github.com/yargs/yargs/graphs/contributors" + } + ], + "files": [ + "browser.mjs", + "browser.d.ts", + "index.cjs", + "helpers/*.js", + "helpers/*", + "index.mjs", + "yargs", + "yargs.mjs", + "build", + "locales", + "LICENSE", + "lib/platform-shims/*.mjs", + "!*.d.ts", + "!**/*.d.ts" + ], + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "c8": "^7.7.0", + "chai": "^4.2.0", + "chalk": "^4.0.0", + "coveralls": "^3.0.9", + "cpr": "^3.0.1", + "cross-env": "^7.0.2", + "cross-spawn": "^7.0.0", + "eslint": "^7.23.0", + "gts": "^3.0.0", + "hashish": "0.0.4", + "mocha": "^9.0.0", + "rimraf": "^3.0.2", + "rollup": "^2.23.0", + "rollup-plugin-cleanup": "^3.1.1", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-ts": "^2.0.4", + "typescript": "^4.0.2", + "which": "^2.0.0", + "yargs-test-extends": "^1.0.1" + }, + "scripts": { + "fix": "gts fix && npm run fix:js", + "fix:js": "eslint . --ext cjs --ext mjs --ext js --fix", + "posttest": "npm run check", + "test": "c8 mocha --enable-source-maps ./test/*.cjs --require ./test/before.cjs --timeout=12000 --check-leaks", + "test:esm": "c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks", + "coverage": "c8 report --check-coverage", + "prepare": "npm run compile", + "pretest": "npm run compile -- -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", + "compile": "rimraf build && tsc", + "postcompile": "npm run build:cjs", + "build:cjs": "rollup -c rollup.config.cjs", + "postbuild:cjs": "rimraf ./build/index.cjs.d.ts", + "check": "gts lint && npm run check:js", + "check:js": "eslint . --ext cjs --ext mjs --ext js", + "clean": "gts clean" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs.git" + }, + "homepage": "https://yargs.js.org/", + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "license": "MIT", + "engines": { + "node": ">=12" + } +} diff --git a/node_modules/concurrently/node_modules/yargs/yargs b/node_modules/concurrently/node_modules/yargs/yargs new file mode 100644 index 000000000..8460d10a6 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/yargs @@ -0,0 +1,9 @@ +// TODO: consolidate on using a helpers file at some point in the future, which +// is the approach currently used to export Parser and applyExtends for ESM: +const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs') +Yargs.applyExtends = (config, cwd, mergeExtends) => { + return applyExtends(config, cwd, mergeExtends, cjsPlatformShim) +} +Yargs.hideBin = processArgv.hideBin +Yargs.Parser = Parser +module.exports = Yargs diff --git a/node_modules/concurrently/node_modules/yargs/yargs.mjs b/node_modules/concurrently/node_modules/yargs/yargs.mjs new file mode 100644 index 000000000..6d9f390c1 --- /dev/null +++ b/node_modules/concurrently/node_modules/yargs/yargs.mjs @@ -0,0 +1,10 @@ +// TODO: consolidate on using a helpers file at some point in the future, which +// is the approach currently used to export Parser and applyExtends for ESM: +import pkg from './build/index.cjs'; +const {applyExtends, cjsPlatformShim, Parser, processArgv, Yargs} = pkg; +Yargs.applyExtends = (config, cwd, mergeExtends) => { + return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); +}; +Yargs.hideBin = processArgv.hideBin; +Yargs.Parser = Parser; +export default Yargs; diff --git a/node_modules/concurrently/package.json b/node_modules/concurrently/package.json new file mode 100644 index 000000000..0e20d1306 --- /dev/null +++ b/node_modules/concurrently/package.json @@ -0,0 +1,106 @@ +{ + "name": "concurrently", + "version": "9.2.5", + "description": "Run commands concurrently", + "main": "index.js", + "types": "index.d.ts", + "type": "commonjs", + "bin": { + "concurrently": "./dist/bin/concurrently.js", + "conc": "./dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "exports": { + ".": { + "import": { + "types": "./index.d.mts", + "default": "./index.mjs" + }, + "require": { + "types": "./index.d.ts", + "default": "./index.js" + } + }, + "./package.json": "./package.json" + }, + "repository": { + "type": "git", + "url": "https://github.com/open-cli-tools/concurrently.git" + }, + "funding": "https://github.com/open-cli-tools/concurrently?sponsor=1", + "keywords": [ + "bash", + "concurrent", + "parallel", + "concurrently", + "command", + "sh" + ], + "author": "Kimmo Brunfeldt", + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.12.0", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "devDependencies": { + "@eslint/js": "^9.33.0", + "@hirez_io/observer-spy": "^2.2.0", + "@types/node": "^18.19.123", + "@types/shell-quote": "^1.7.5", + "@types/supports-color": "^8.1.3", + "@types/yargs": "^17.0.33", + "@vitest/coverage-v8": "^3.2.4", + "@vitest/eslint-plugin": "^1.3.4", + "coveralls-next": "^5.0.0", + "ctrlc-wrapper": "^0.0.5", + "esbuild": "~0.25.9", + "eslint": "^9.33.0", + "eslint-config-flat-gitignore": "^2.1.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import-lite": "^0.3.0", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-simple-import-sort": "^12.1.1", + "globals": "16.3.0", + "husky": "^9.1.7", + "lint-staged": "^15.5.2", + "prettier": "^3.6.2", + "safe-publish-latest": "^2.0.0", + "string-argv": "^0.3.2", + "typescript": "~5.9.2", + "typescript-eslint": "^8.40.0", + "vitest": "^3.2.4" + }, + "files": [ + "dist", + "index.js", + "index.d.ts", + "index.mjs", + "index.d.mts", + "!**/fixtures", + "!**/*.spec.js", + "!**/*.spec.d.ts", + "docs" + ], + "lint-staged": { + "*.?(m){js,ts}": "eslint --fix", + "*.{json,y?(a)ml,md}": "prettier --write" + }, + "scripts": { + "build": "tsc --build", + "postbuild": "chmod +x dist/bin/concurrently.js", + "clean": "tsc --build --clean", + "format": "prettier --check '**/*.{json,y?(a)ml,md}'", + "format:fix": "pnpm run format --write", + "lint": "eslint", + "lint:fix": "pnpm run lint --fix", + "report-coverage": "cat coverage/lcov.info | coveralls", + "test": "vitest --project unit", + "test:smoke": "vitest run --project smoke" + } +} \ No newline at end of file diff --git a/node_modules/conventional-changelog-angular/LICENSE.md b/node_modules/conventional-changelog-angular/LICENSE.md new file mode 100644 index 000000000..7d82383bf --- /dev/null +++ b/node_modules/conventional-changelog-angular/LICENSE.md @@ -0,0 +1,15 @@ +### ISC License + +Copyright © [conventional-changelog team](https://github.com/conventional-changelog) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/conventional-changelog-angular/README.md b/node_modules/conventional-changelog-angular/README.md new file mode 100644 index 000000000..0d6431fa2 --- /dev/null +++ b/node_modules/conventional-changelog-angular/README.md @@ -0,0 +1,57 @@ +# conventional-changelog-angular + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/conventional-changelog-angular.svg +[npm-url]: https://npmjs.com/package/conventional-changelog-angular + +[node]: https://img.shields.io/node/v/conventional-changelog-angular.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/conventional-changelog-angular +[deps-url]: https://libraries.io/npm/conventional-changelog-angular + +[size]: https://packagephobia.com/badge?p=conventional-changelog-angular +[size-url]: https://packagephobia.com/result?p=conventional-changelog-angular + +[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master +[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions + +[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master + +[conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) [angular](https://github.com/angular/angular) preset. + +**Issues with the convention itself should be reported on the Angular issue tracker.** + +## Install + +```bash +# pnpm +pnpm add -D conventional-changelog-angular +# yarn +yarn add -D conventional-changelog-angular +# npm +npm i -D conventional-changelog-angular +``` + +## Usage + +Use with [conventional-changelog](https://conventional-changelog.js.org/conventional-changelog/) by passing the preset name with `-p`: + +```sh +conventional-changelog -p angular +``` + +## Documentation + +For the commit convention details and preset options, visit the [documentation website](https://conventional-changelog.js.org/presets/angular/). diff --git a/node_modules/conventional-changelog-angular/package.json b/node_modules/conventional-changelog-angular/package.json new file mode 100644 index 000000000..35ebb016c --- /dev/null +++ b/node_modules/conventional-changelog-angular/package.json @@ -0,0 +1,35 @@ +{ + "name": "conventional-changelog-angular", + "type": "module", + "version": "9.4.0", + "description": "Angular preset for conventional-changelog.", + "author": "Steve Mao", + "license": "ISC", + "homepage": "https://conventional-changelog.js.org/presets/angular/", + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/conventional-changelog.git", + "directory": "packages/conventional-changelog-angular" + }, + "bugs": { + "url": "https://github.com/conventional-changelog/conventional-changelog/issues" + }, + "keywords": [ + "conventional-changelog", + "angular", + "preset" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./src/index.d.ts", + "import": "./src/index.js" + }, + "files": [ + "src" + ], + "dependencies": { + "@conventional-changelog/template": "^1.4.0" + } +} \ No newline at end of file diff --git a/node_modules/conventional-changelog-angular/src/index.d.ts b/node_modules/conventional-changelog-angular/src/index.d.ts new file mode 100644 index 000000000..e3c494110 --- /dev/null +++ b/node_modules/conventional-changelog-angular/src/index.d.ts @@ -0,0 +1,5 @@ +export interface PresetConfig { + ignoreCommits?: RegExp +} + +export default function createPreset(config?: PresetConfig): {} diff --git a/node_modules/conventional-changelog-angular/src/index.js b/node_modules/conventional-changelog-angular/src/index.js new file mode 100644 index 000000000..4e2c04b0c --- /dev/null +++ b/node_modules/conventional-changelog-angular/src/index.js @@ -0,0 +1,15 @@ +import { createParserOpts } from './parser.js' +import { createWriterOpts } from './writer.js' +import { whatBump } from './whatBump.js' + +export default function createPreset(config) { + return { + commits: { + ignore: config?.ignoreCommits, + merges: false + }, + parser: createParserOpts(), + writer: createWriterOpts(), + whatBump + } +} diff --git a/node_modules/conventional-changelog-angular/src/parser.js b/node_modules/conventional-changelog-angular/src/parser.js new file mode 100644 index 000000000..601806662 --- /dev/null +++ b/node_modules/conventional-changelog-angular/src/parser.js @@ -0,0 +1,13 @@ +export function createParserOpts() { + return { + headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/, + headerCorrespondence: [ + 'type', + 'scope', + 'subject' + ], + noteKeywords: ['BREAKING CHANGE'], + revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w{7,40})\b/i, + revertCorrespondence: ['header', 'hash'] + } +} diff --git a/node_modules/conventional-changelog-angular/src/templates.js b/node_modules/conventional-changelog-angular/src/templates.js new file mode 100644 index 000000000..1bbbe2967 --- /dev/null +++ b/node_modules/conventional-changelog-angular/src/templates.js @@ -0,0 +1,131 @@ +import { + bold, + compareUrl, + each, + link, + list, + reference, + referenceRepositoryUrl, + repositoryUrl, + heading, + url, + newline, + segments, + strings, + words +} from '@conventional-changelog/template' + +export function headerPartial(context) { + const { + isPatch, + linkCompare, + version, + title, + date + } = context + const versionText = linkCompare + ? link(version, compareUrl(context)) + : version + + return heading( + Boolean(isPatch) + 1, + words( + versionText, + title && `"${title}"`, + date && `(${date})` + ) + ) +} + +export function preamblePartial(context) { + return strings(context.preamble) +} + +export function commitPartial(context, commit) { + const { + linkReferences, + issue, + commit: commitUrlPath + } = context + const { + scope, + subject, + header, + shortHash, + hash, + references + } = commit + const commitLink = + hash + ? linkReferences + ? `(${link(shortHash, url(repositoryUrl(context), commitUrlPath, hash))})` + : shortHash + : '' + const renderedReferences = each( + references, + (linkReference) => { + if (linkReferences) { + return link( + reference(linkReference), + url(referenceRepositoryUrl(context, linkReference), issue, linkReference.issue) + ) + } + + return reference(linkReference) + }, + ' ' + ) + + return strings( + words( + scope && bold(`${scope}:`), + subject || header || '', + commitLink + ), + renderedReferences && `, closes ${renderedReferences}` + ) +} + +export function footerPartial({ noteGroups }) { + return each( + noteGroups, + group => segments( + heading(3, group.title), + list( + group.notes, + note => words( + note.commit.scope && bold(`${note.commit.scope}:`), + note.text + ) + ) + ), + newline(2) + ) +} + +export function template(context) { + const { + headerPartial, + preamblePartial, + commitPartial, + footerPartial, + commitGroups + } = context + + return segments( + headerPartial(context), + preamblePartial(context), + each( + commitGroups, + group => segments( + group.title && heading(3, group.title), + list( + group.commits, + commit => commitPartial(context, commit) + ) + ), + newline(2) + ), + footerPartial(context) + ) +} diff --git a/node_modules/conventional-changelog-angular/src/whatBump.js b/node_modules/conventional-changelog-angular/src/whatBump.js new file mode 100644 index 000000000..12a5348ea --- /dev/null +++ b/node_modules/conventional-changelog-angular/src/whatBump.js @@ -0,0 +1,31 @@ +import { isBreakingNote } from '@conventional-changelog/template' + +export function whatBump(commits) { + let level = 2 + let breakings = 0 + let features = 0 + + commits.forEach((commit) => { + // only breaking change notes affect the version, + // any other note keyword is just a changelog section + const breakingNotes = commit.notes.filter(isBreakingNote) + + if (breakingNotes.length > 0) { + breakings += breakingNotes.length + level = 0 + } else if (commit.type === 'feat') { + features += 1 + + if (level === 2) { + level = 1 + } + } + }) + + return { + level, + reason: breakings === 1 + ? `There is ${breakings} BREAKING CHANGE and ${features} features` + : `There are ${breakings} BREAKING CHANGES and ${features} features` + } +} diff --git a/node_modules/conventional-changelog-angular/src/writer.js b/node_modules/conventional-changelog-angular/src/writer.js new file mode 100644 index 000000000..b66e26a98 --- /dev/null +++ b/node_modules/conventional-changelog-angular/src/writer.js @@ -0,0 +1,113 @@ +import { + createLegacyWriterGuard, + createReferencesFormatter, + noteTitle, + referenceRepositoryUrl, + url +} from '@conventional-changelog/template' +import { + template, + headerPartial, + preamblePartial, + commitPartial, + footerPartial +} from './templates.js' + +const COMMIT_HASH_LENGTH = 7 +const formatReferences = createReferencesFormatter({ + issuePrefixes: ['#'], + issuePattern: /[0-9]+/, + formatIssueUrl: (context, reference) => { + const repositoryUrl = referenceRepositoryUrl(context, reference) + + // without a repository url there is nothing to link to + return repositoryUrl + ? url(repositoryUrl, context.issue || 'issues', reference.issue) + : '' + }, + formatUserUrl: (context, user) => (context.host + ? url(context.host, user) + : '') +}) + +function compareNotes(a, b) { + return (a.title || '').localeCompare(b.title || '') + || (a.text || '').localeCompare(b.text || '') +} + +export function createWriterOpts() { + return { + ...createLegacyWriterGuard('conventional-changelog-angular'), + template, + headerPartial, + preamblePartial, + commitPartial, + footerPartial, + transform: (commit, context) => { + let discard = true + const notes = commit.notes.map((note) => { + discard = false + + return { + ...note, + title: noteTitle(note.title), + text: formatReferences(note.text, context) + } + }) + let { type } = commit + + if (commit.type === 'feat') { + type = 'Features' + } else if (commit.type === 'fix') { + type = 'Bug Fixes' + } else if (commit.type === 'perf') { + type = 'Performance Improvements' + } else if (commit.type === 'revert' || commit.revert) { + type = 'Reverts' + } else if (discard) { + return undefined + } else if (commit.type === 'docs') { + type = 'Documentation' + } else if (commit.type === 'style') { + type = 'Styles' + } else if (commit.type === 'refactor') { + type = 'Code Refactoring' + } else if (commit.type === 'test') { + type = 'Tests' + } else if (commit.type === 'build') { + type = 'Build System' + } else if (commit.type === 'ci') { + type = 'Continuous Integration' + } + + const scope = commit.scope === '*' ? '' : commit.scope + const shortHash = typeof commit.hash === 'string' + ? commit.hash.substring(0, COMMIT_HASH_LENGTH) + : commit.shortHash + const issues = [] + let { subject } = commit + + if (typeof subject === 'string') { + // Issue and user URLs. + subject = formatReferences(subject, context, issues) + } + + // remove references that already appear in the subject + const references = commit.references.filter(reference => !issues.includes(reference.prefix + reference.issue)) + + return { + notes, + type, + scope, + shortHash, + subject, + references + } + }, + groupBy: 'type', + commitGroupsSort: 'title', + commitsSort: ['scope', 'subject'], + noteGroupsSort: 'title', + notesSort: compareNotes + } +} diff --git a/node_modules/conventional-changelog-conventionalcommits/LICENSE.md b/node_modules/conventional-changelog-conventionalcommits/LICENSE.md new file mode 100644 index 000000000..7d82383bf --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/LICENSE.md @@ -0,0 +1,15 @@ +### ISC License + +Copyright © [conventional-changelog team](https://github.com/conventional-changelog) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/conventional-changelog-conventionalcommits/README.md b/node_modules/conventional-changelog-conventionalcommits/README.md new file mode 100644 index 000000000..31541b6cf --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/README.md @@ -0,0 +1,66 @@ +# conventional-changelog-conventionalcommits + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/conventional-changelog-conventionalcommits.svg +[npm-url]: https://npmjs.com/package/conventional-changelog-conventionalcommits + +[node]: https://img.shields.io/node/v/conventional-changelog-conventionalcommits.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/conventional-changelog-conventionalcommits +[deps-url]: https://libraries.io/npm/conventional-changelog-conventionalcommits + +[size]: https://packagephobia.com/badge?p=conventional-changelog-conventionalcommits +[size-url]: https://packagephobia.com/result?p=conventional-changelog-conventionalcommits + +[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master +[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions + +[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master + +A concrete implementation of the specification described at [conventionalcommits.org](https://conventionalcommits.org/) for automated CHANGELOG generation and version management. + +## Install + +```bash +# pnpm +pnpm add -D conventional-changelog-conventionalcommits +# yarn +yarn add -D conventional-changelog-conventionalcommits +# npm +npm i -D conventional-changelog-conventionalcommits +``` + +## Usage + +Use with [conventional-changelog](https://conventional-changelog.js.org/conventional-changelog/) by passing the preset name with `-p`: + +```sh +conventional-changelog -p conventionalcommits +``` + +Or use it directly as a base preset to customize it: + +```js +import createPreset from 'conventional-changelog-conventionalcommits' + +const config = createPreset({ + issuePrefixes: ['TEST-'] +}) +// do something with the config +``` + +## Documentation + +For the commit convention details and preset options, visit the [documentation website](https://conventional-changelog.js.org/presets/conventional-commits/). diff --git a/node_modules/conventional-changelog-conventionalcommits/package.json b/node_modules/conventional-changelog-conventionalcommits/package.json new file mode 100644 index 000000000..56c432b08 --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/package.json @@ -0,0 +1,35 @@ +{ + "name": "conventional-changelog-conventionalcommits", + "type": "module", + "version": "10.4.1", + "description": "Conventionalcommits.org preset for conventional-changelog.", + "author": "Ben Coe", + "license": "ISC", + "homepage": "https://conventional-changelog.js.org/presets/conventional-commits/", + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/conventional-changelog.git", + "directory": "packages/conventional-changelog-conventionalcommits" + }, + "bugs": { + "url": "https://github.com/conventional-changelog/conventional-changelog/issues" + }, + "keywords": [ + "conventional-changelog", + "conventionalcommits.org", + "preset" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./src/index.d.ts", + "import": "./src/index.js" + }, + "files": [ + "src" + ], + "dependencies": { + "@conventional-changelog/template": "^1.4.0" + } +} \ No newline at end of file diff --git a/node_modules/conventional-changelog-conventionalcommits/src/constants.js b/node_modules/conventional-changelog-conventionalcommits/src/constants.js new file mode 100644 index 000000000..d38333a82 --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/constants.js @@ -0,0 +1,64 @@ +export const BREAKING_HEADER_PATTERN = /^(\w*)(?:\((.*)\))?!: (.*)$/ + +export const DEFAULT_COMMIT_TYPES = Object.freeze([ + { + type: 'feat', + section: 'Features', + effect: 'bump' + }, + { + type: 'feature', + section: 'Features', + effect: 'bump' + }, + { + type: 'fix', + section: 'Bug Fixes', + effect: 'bump' + }, + { + type: 'perf', + section: 'Performance Improvements', + effect: 'bump' + }, + { + type: 'revert', + section: 'Reverts', + effect: 'bump' + }, + { + type: 'docs', + section: 'Documentation', + effect: 'hidden' + }, + { + type: 'style', + section: 'Styles', + effect: 'hidden' + }, + { + type: 'chore', + section: 'Miscellaneous Chores', + effect: 'hidden' + }, + { + type: 'refactor', + section: 'Code Refactoring', + effect: 'hidden' + }, + { + type: 'test', + section: 'Tests', + effect: 'hidden' + }, + { + type: 'build', + section: 'Build System', + effect: 'hidden' + }, + { + type: 'ci', + section: 'Continuous Integration', + effect: 'hidden' + } +].map(Object.freeze)) diff --git a/node_modules/conventional-changelog-conventionalcommits/src/format.js b/node_modules/conventional-changelog-conventionalcommits/src/format.js new file mode 100644 index 000000000..8cae78fa6 --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/format.js @@ -0,0 +1,36 @@ +import { + BREAKING_CHANGES_TITLE, + compareUrl, + noteTitle, + referenceRepositoryUrl, + repositoryUrl, + url +} from '@conventional-changelog/template' + +export function formatNoteTitle(context, title) { + return noteTitle(title) +} + +export function formatNoteIcon(context, title) { + return title === BREAKING_CHANGES_TITLE ? '⚠' : '' +} + +export function formatIssueUrl(context, reference) { + return url( + referenceRepositoryUrl(context, reference), + context.issue || 'issues', + reference.issue + ) +} + +export function formatCommitUrl(context, commit) { + return url(repositoryUrl(context), context.commit || 'commit', commit.hash) +} + +export function formatCompareUrl(context) { + return compareUrl(context) +} + +export function formatUserUrl(context, user) { + return url(context.host, user) +} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/index.d.ts b/node_modules/conventional-changelog-conventionalcommits/src/index.d.ts new file mode 100644 index 000000000..05e24134d --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/index.d.ts @@ -0,0 +1,37 @@ +export interface CommitType { + type: string + section?: string + effect?: 'bump' | 'changelog' | 'hidden' + scope?: string +} + +export type PresetRecord = Partial> +export type Context = PresetRecord +export type Commit = PresetRecord +export type Reference = PresetRecord + +export interface PresetConfig { + ignoreCommits?: RegExp + issuePrefixes?: string[] + types?: readonly CommitType[] + scope?: string | string[] + scopeOnly?: boolean + preMajor?: boolean + formatIssueUrl?: (context: Context, reference: Reference) => string + formatCommitUrl?: (context: Context, commit: Commit) => string + formatCompareUrl?: (context: Context) => string + formatUserUrl?: (context: Context, user: string) => string + formatNoteTitle?: (context: Context, title: string) => string + formatNoteIcon?: (context: Context, title: string) => string +} + +export const DEFAULT_COMMIT_TYPES: readonly Readonly[] + +export function formatNoteTitle(context: Context, title: string): string +export function formatNoteIcon(context: Context, title: string): string +export function formatIssueUrl(context: Context, reference: Reference): string +export function formatCommitUrl(context: Context, commit: Commit): string +export function formatCompareUrl(context: Context): string +export function formatUserUrl(context: Context, user: string): string + +export default function createPreset(config?: PresetConfig): {} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/index.js b/node_modules/conventional-changelog-conventionalcommits/src/index.js new file mode 100644 index 000000000..c83e43751 --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/index.js @@ -0,0 +1,18 @@ +import { createParserOpts } from './parser.js' +import { createWriterOpts } from './writer.js' +import { createWhatBump } from './whatBump.js' + +export { DEFAULT_COMMIT_TYPES } from './constants.js' +export * from './format.js' + +export default function createPreset(config) { + return { + commits: { + ignore: config?.ignoreCommits, + merges: false + }, + parser: createParserOpts(config), + writer: createWriterOpts(config), + whatBump: createWhatBump(config) + } +} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/parser.js b/node_modules/conventional-changelog-conventionalcommits/src/parser.js new file mode 100644 index 000000000..acc6c7eea --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/parser.js @@ -0,0 +1,18 @@ +import { BREAKING_CHANGE_KEYWORDS } from '@conventional-changelog/template' +import { BREAKING_HEADER_PATTERN } from './constants.js' + +export function createParserOpts(config) { + return { + headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/, + breakingHeaderPattern: BREAKING_HEADER_PATTERN, + headerCorrespondence: [ + 'type', + 'scope', + 'subject' + ], + noteKeywords: BREAKING_CHANGE_KEYWORDS, + revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i, + revertCorrespondence: ['header', 'hash'], + issuePrefixes: config?.issuePrefixes || ['#'] + } +} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/templates.js b/node_modules/conventional-changelog-conventionalcommits/src/templates.js new file mode 100644 index 000000000..c0b4a435d --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/templates.js @@ -0,0 +1,139 @@ +import { + bold, + each, + link, + list, + reference, + heading, + newline, + segments, + strings, + words +} from '@conventional-changelog/template' + +export function headerPartial(context) { + const { + linkCompare, + version, + title, + date + } = context + const versionText = linkCompare + ? link(version, this.formatCompareUrl(context)) + : version + + return heading( + 2, + words( + versionText, + title && `"${title}"`, + date && `(${date})` + ) + ) +} + +export function preamblePartial(context) { + return strings(context.preamble) +} + +function renderReferences(context, references, filter) { + return each( + references?.filter(filter), + (commitReference) => { + if (context.linkReferences) { + return link( + reference(commitReference), + this.formatIssueUrl(context, commitReference) + ) + } + + return reference(commitReference) + }, + ' ' + ) +} + +export function commitPartial(context, commit) { + const { linkReferences } = context + const { + scope, + subject, + header, + shortHash, + hash, + references + } = commit + const commitLink = hash + ? linkReferences + ? `(${link(shortHash, this.formatCommitUrl(context, commit))})` + : shortHash + : '' + const closingReferences = renderReferences.call( + this, + context, + references, + commitReference => commitReference.action + ) + const otherReferences = renderReferences.call( + this, + context, + references, + commitReference => !commitReference.action + ) + + return strings( + words( + scope && bold(`${scope}:`), + subject || header || '', + commitLink + ), + closingReferences && `, closes ${closingReferences}`, + otherReferences && `, references ${otherReferences}` + ) +} + +export function footerPartial() { + return '' +} + +export function template(context) { + const { + headerPartial, + preamblePartial, + commitPartial, + footerPartial, + noteGroups, + commitGroups + } = context + + return segments( + headerPartial(context), + preamblePartial(context), + each( + noteGroups, + group => segments( + heading(3, words(this.formatNoteIcon(context, group.title), group.title)), + list( + group.notes, + note => words( + note.commit.scope && bold(`${note.commit.scope}:`), + note.text + ) + ) + ), + newline(2) + ), + each( + commitGroups, + group => segments( + group.title && heading(3, group.title), + list( + group.commits, + commit => commitPartial(context, commit) + ) + ), + newline(2) + ), + footerPartial(context) + ) +} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/utils.js b/node_modules/conventional-changelog-conventionalcommits/src/utils.js new file mode 100644 index 000000000..721a1ef77 --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/utils.js @@ -0,0 +1,80 @@ +import { + BREAKING_CHANGE_KEYWORDS, + isBreakingNote +} from '@conventional-changelog/template' +import { BREAKING_HEADER_PATTERN } from './constants.js' + +/** + * Get commit notes with the breaking change declared by `!` in the header. + * The parser adds that note only if the commit has no notes at all, + * so a footer of any other keyword hides the breaking change. + * @param commit + * @returns Commit notes. + */ +export function getNotes(commit) { + if (commit.notes.some(isBreakingNote) || !BREAKING_HEADER_PATTERN.test(commit.header || '')) { + return commit.notes + } + + return [ + { + title: BREAKING_CHANGE_KEYWORDS[0], + text: commit.subject || '' + }, + ...commit.notes + ] +} + +function hasIntersection(a, b) { + if (!a || !b) { + return false + } + + let listA = a + let listB = b + + if (!Array.isArray(listA)) { + listA = [listA] + } + + if (!Array.isArray(listB)) { + listB = [listB] + } + + return listA.some(item => listB.includes(item)) +} + +export function matchScope(config = {}, commit) { + const { + scope: targetScope, + scopeOnly = false + } = config + const includesScope = hasIntersection( + commit.scope?.split(','), + targetScope + ) + + return !targetScope + || (scopeOnly && includesScope) + || (!scopeOnly && (!commit.scope || includesScope)) +} + +export function findTypeEntry(types, commit) { + const typeKey = (commit.revert ? 'revert' : commit.type || '').toLowerCase() + + return types.find((entry) => { + if (entry.type !== typeKey) { + return false + } + + if (entry.scope && entry.scope !== commit.scope) { + return false + } + + return true + }) +} + +export function isTypeEffect(type, effect) { + return (type.effect || 'bump') === effect +} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/whatBump.js b/node_modules/conventional-changelog-conventionalcommits/src/whatBump.js new file mode 100644 index 000000000..5063ab9de --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/whatBump.js @@ -0,0 +1,62 @@ +import { isBreakingNote } from '@conventional-changelog/template' +import { DEFAULT_COMMIT_TYPES } from './constants.js' +import { + findTypeEntry, + getNotes, + isTypeEffect, + matchScope +} from './utils.js' + +export function createWhatBump(config = {}) { + const { types = DEFAULT_COMMIT_TYPES } = config + + return function whatBump(commits) { + let level = null + let breakings = 0 + let features = 0 + + commits.forEach((commit) => { + if (!matchScope(config, commit)) { + return + } + + const entry = findTypeEntry(types, commit) + // only breaking change notes affect the version, + // any other note keyword is just a changelog section + const breakingNotes = getNotes(commit).filter(isBreakingNote) + + if (breakingNotes.length > 0) { + breakings += breakingNotes.length + level = 0 + } else + if (entry && isTypeEffect(entry, 'bump')) { + if (level === null) { + level = 2 + } + + if (commit.type === 'feat' || commit.type === 'feature') { + features += 1 + + if (level > 1) { + level = 1 + } + } + } + }) + + if (level === null) { + return null + } + + if (config?.preMajor && level < 2) { + level++ + } + + return { + level, + reason: breakings === 1 + ? `There is ${breakings} BREAKING CHANGE and ${features} features` + : `There are ${breakings} BREAKING CHANGES and ${features} features` + } + } +} diff --git a/node_modules/conventional-changelog-conventionalcommits/src/writer.js b/node_modules/conventional-changelog-conventionalcommits/src/writer.js new file mode 100644 index 000000000..5c795e2bb --- /dev/null +++ b/node_modules/conventional-changelog-conventionalcommits/src/writer.js @@ -0,0 +1,117 @@ +import { + createLegacyWriterGuard, + createReferencesFormatter +} from '@conventional-changelog/template' +import { DEFAULT_COMMIT_TYPES } from './constants.js' +import { + findTypeEntry, + getNotes, + isTypeEffect, + matchScope +} from './utils.js' +import { + template, + headerPartial, + preamblePartial, + commitPartial, + footerPartial +} from './templates.js' +import * as format from './format.js' + +const COMMIT_HASH_LENGTH = 7 +const releaseAsRegex = /release-as:\s*\w*@?([0-9]+\.[0-9]+\.[0-9a-z]+(-[0-9a-z.]+)?)\s*/i + +function compareNotes(a, b) { + return (a.title || '').localeCompare(b.title || '') + || (a.text || '').localeCompare(b.text || '') +} + +export function createWriterOpts(config) { + const finalConfig = { + types: DEFAULT_COMMIT_TYPES, + issuePrefixes: ['#'], + ...format, + ...config + } + const commitGroupOrder = finalConfig.types.map(t => t.section).filter(Boolean) + const formatReferences = createReferencesFormatter(finalConfig) + + return { + ...createLegacyWriterGuard('conventional-changelog-conventionalcommits'), + template: template.bind(finalConfig), + headerPartial: headerPartial.bind(finalConfig), + preamblePartial: preamblePartial.bind(finalConfig), + commitPartial: commitPartial.bind(finalConfig), + footerPartial: footerPartial.bind(finalConfig), + transform: (commit, context) => { + let discard = true + const issues = [] + const entry = findTypeEntry(finalConfig.types, commit) + + // Add an entry in the CHANGELOG if special Release-As footer + // is used: + if ((commit.footer && releaseAsRegex.test(commit.footer)) + || (commit.body && releaseAsRegex.test(commit.body))) { + discard = false + } + + const notes = getNotes(commit).map((note) => { + discard = false + + return { + ...note, + title: finalConfig.formatNoteTitle(context, note.title), + text: formatReferences(note.text, context) + } + }) + + if ( + // notes attached to any type are still displayed. + discard && (entry === undefined || isTypeEffect(entry, 'hidden')) + || !matchScope(finalConfig, commit) + ) { + return undefined + } + + const type = entry + ? entry.section + : commit.type + const scope = commit.scope === '*' || finalConfig.scope + ? '' + : commit.scope + const shortHash = typeof commit.hash === 'string' + ? commit.hash.substring(0, COMMIT_HASH_LENGTH) + : commit.shortHash + let { subject } = commit + + if (typeof subject === 'string') { + // Issue and user URLs. + subject = formatReferences(subject, context, issues) + } + + // remove references that already appear in the subject + const references = commit.references.filter(reference => !issues.includes(reference.prefix + reference.issue)) + + return { + notes, + type, + scope, + shortHash, + subject, + references + } + }, + groupBy: 'type', + // the groupings of commit messages, e.g., Features vs., Bug Fixes, are + // sorted based on their probable importance: + commitGroupsSort: (a, b) => { + const gRankA = commitGroupOrder.indexOf(a.title) + const gRankB = commitGroupOrder.indexOf(b.title) + + return gRankA - gRankB + }, + commitsSort: ['scope', 'subject'], + noteGroupsSort: 'title', + notesSort: compareNotes + } +} diff --git a/node_modules/conventional-commits-parser/LICENSE.md b/node_modules/conventional-commits-parser/LICENSE.md new file mode 100644 index 000000000..97b4ed538 --- /dev/null +++ b/node_modules/conventional-commits-parser/LICENSE.md @@ -0,0 +1,21 @@ +### MIT License + +Copyright © [conventional-changelog team](https://github.com/conventional-changelog) + +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. diff --git a/node_modules/conventional-commits-parser/README.md b/node_modules/conventional-commits-parser/README.md new file mode 100644 index 000000000..f8a70e931 --- /dev/null +++ b/node_modules/conventional-commits-parser/README.md @@ -0,0 +1,79 @@ +# conventional-commits-parser + +[![ESM-only package][package]][package-url] +[![NPM version][npm]][npm-url] +[![Node version][node]][node-url] +[![Dependencies status][deps]][deps-url] +[![Install size][size]][size-url] +[![Build status][build]][build-url] +[![Coverage status][coverage]][coverage-url] + +[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg +[package-url]: https://nodejs.org/api/esm.html + +[npm]: https://img.shields.io/npm/v/conventional-commits-parser.svg +[npm-url]: https://npmjs.com/package/conventional-commits-parser + +[node]: https://img.shields.io/node/v/conventional-commits-parser.svg +[node-url]: https://nodejs.org + +[deps]: https://img.shields.io/librariesio/release/npm/conventional-commits-parser +[deps-url]: https://libraries.io/npm/conventional-commits-parser + +[size]: https://packagephobia.com/badge?p=conventional-commits-parser +[size-url]: https://packagephobia.com/result?p=conventional-commits-parser + +[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master +[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions + +[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master +[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master + +Parse raw conventional commits. + +## Install + +```bash +# pnpm +pnpm add conventional-commits-parser +# yarn +yarn add conventional-commits-parser +# npm +npm i conventional-commits-parser +``` + +## Usage + +```js +import { CommitParser } from 'conventional-commits-parser' + +const parser = new CommitParser() +const commit = parser.parse( + 'feat(scope): broadcast $destroy event on scope destruction\nCloses #1' +) + +console.log(commit) +/* { + type: 'feat', + scope: 'scope', + subject: 'broadcast $destroy event on scope destruction', + header: 'feat(scope): broadcast $destroy event on scope destruction', + footer: 'Closes #1', + references: [{ + action: 'Closes', + issue: '1', + raw: '#1', + prefix: '#', + ... + }], + ... +} */ +``` + +## Documentation + +For streams and async iterables helpers, parser options, and CLI usage, visit the [documentation website](https://conventional-changelog.js.org/commits-parser/). + +## License + +MIT © [Steve Mao](https://github.com/stevemao) diff --git a/node_modules/conventional-commits-parser/dist/CommitParser.d.ts b/node_modules/conventional-commits-parser/dist/CommitParser.d.ts new file mode 100644 index 000000000..ed9361fb1 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/CommitParser.d.ts @@ -0,0 +1,40 @@ +import type { ParserOptions, Commit } from './types.js'; +/** + * Helper to create commit object. + * @param initialData - Initial commit data. + * @returns Commit object with empty data. + */ +export declare function createCommitObject(initialData?: Partial): Commit; +/** + * Commit message parser. + */ +export declare class CommitParser { + private readonly options; + private readonly regexes; + private lines; + private lineIndex; + private commit; + constructor(options?: ParserOptions); + private currentLine; + private nextLine; + private isLineAvailable; + private parseReference; + private parseReferences; + private skipEmptyLines; + private parseMerge; + private parseHeader; + private parseMeta; + private parseNotes; + private parseBodyAndFooter; + private parseBreakingHeader; + private parseMentions; + private parseRevert; + private cleanupCommit; + /** + * Parse commit message string into an object. + * @param input - Commit message string. + * @returns Commit object. + */ + parse(input: string): Commit; +} +//# sourceMappingURL=CommitParser.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/CommitParser.d.ts.map b/node_modules/conventional-commits-parser/dist/CommitParser.d.ts.map new file mode 100644 index 000000000..d4db3a5fa --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/CommitParser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CommitParser.d.ts","sourceRoot":"","sources":["../src/CommitParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAIb,MAAM,EACP,MAAM,YAAY,CAAA;AAYnB;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,MAAM,CAa5E;AAED;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,MAAM,CAAuB;IAErC,YAAY,OAAO,GAAE,aAAkB,EAMtC;IAED,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,cAAc;IA2CtB,OAAO,CAAC,eAAe;IAyCvB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,WAAW;IA6BnB,OAAO,CAAC,SAAS;IAmCjB,OAAO,CAAC,UAAU;IAwDlB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,aAAa;IAwBrB;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,UA6ClB;CACF"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/CommitParser.js b/node_modules/conventional-commits-parser/dist/CommitParser.js new file mode 100644 index 000000000..6307d83be --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/CommitParser.js @@ -0,0 +1,322 @@ +import { getParserRegexes } from './regex.js'; +import { trimNewLines, appendLine, getCommentFilter, gpgFilter, truncateToScissor, assignMatchedCorrespondence } from './utils.js'; +import { defaultOptions } from './options.js'; +/** + * Helper to create commit object. + * @param initialData - Initial commit data. + * @returns Commit object with empty data. + */ +export function createCommitObject(initialData = {}) { + // @ts-expect-error: You can read properties from `Commit` without problems, but you can't assign object to this type. So here is helper for that. + return { + merge: null, + revert: null, + header: null, + body: null, + footer: null, + notes: [], + mentions: [], + references: [], + ...initialData + }; +} +/** + * Commit message parser. + */ +export class CommitParser { + options; + regexes; + lines = []; + lineIndex = 0; + commit = createCommitObject(); + constructor(options = {}) { + this.options = { + ...defaultOptions, + ...options + }; + this.regexes = getParserRegexes(this.options); + } + currentLine() { + return this.lines[this.lineIndex]; + } + nextLine() { + return this.lines[this.lineIndex++]; + } + isLineAvailable() { + return this.lineIndex < this.lines.length; + } + parseReference(input, action) { + const { regexes } = this; + if (regexes.url.test(input)) { + return null; + } + const matches = regexes.referenceParts.exec(input); + if (!matches) { + return null; + } + let [raw, repository = null, prefix, issue] = matches; + let owner = null; + if (repository) { + const slashIndex = repository.indexOf('/'); + if (slashIndex !== -1) { + owner = repository.slice(0, slashIndex); + repository = repository.slice(slashIndex + 1); + } + } + return { + raw, + action, + owner, + repository, + prefix, + issue + }; + } + parseReferences(input, isFooterToken = false) { + const { regexes } = this; + const referencesRegex = isFooterToken + ? regexes.footerReferences + : regexes.references; + const regex = input.match(referencesRegex) + ? referencesRegex + : /()(.+)/gi; + const references = []; + let matches; + let action; + let sentence; + let reference; + while (true) { + matches = regex.exec(input); + if (!matches) { + break; + } + action = matches[1] || null; + sentence = matches[2] || ''; + while (true) { + reference = this.parseReference(sentence, action); + if (!reference) { + break; + } + references.push(reference); + } + } + return references; + } + skipEmptyLines() { + let line = this.currentLine(); + while (line !== undefined && !line.trim()) { + this.nextLine(); + line = this.currentLine(); + } + } + parseMerge() { + const { commit, options } = this; + const correspondence = options.mergeCorrespondence || []; + const merge = this.currentLine(); + const matches = merge && options.mergePattern + ? merge.match(options.mergePattern) + : null; + if (matches) { + this.nextLine(); + commit.merge = matches[0] || null; + assignMatchedCorrespondence(commit, matches, correspondence); + return true; + } + return false; + } + parseHeader(isMergeCommit) { + if (isMergeCommit) { + this.skipEmptyLines(); + } + const { commit, options } = this; + const correspondence = options.headerCorrespondence || []; + const header = commit.header ?? this.nextLine(); + let matches = null; + if (header) { + if (options.breakingHeaderPattern) { + matches = header.match(options.breakingHeaderPattern); + } + if (!matches && options.headerPattern) { + matches = header.match(options.headerPattern); + } + } + if (header) { + commit.header = header; + } + if (matches) { + assignMatchedCorrespondence(commit, matches, correspondence); + } + } + parseMeta() { + const { options, commit } = this; + if (!options.fieldPattern || !this.isLineAvailable()) { + return false; + } + let matches; + let field = null; + let parsed = false; + while (this.isLineAvailable()) { + matches = this.currentLine().match(options.fieldPattern); + if (matches) { + field = matches[1] || null; + this.nextLine(); + continue; + } + if (field) { + parsed = true; + commit[field] = appendLine(commit[field], this.currentLine()); + this.nextLine(); + } + else { + break; + } + } + return parsed; + } + parseNotes() { + const { regexes, commit } = this; + if (!this.isLineAvailable()) { + return false; + } + const matches = this.currentLine().match(regexes.notes); + let isFooterToken; + if (matches) { + const note = { + title: matches[1], + text: matches[2] + }; + commit.notes.push(note); + commit.footer = appendLine(commit.footer, this.currentLine()); + this.nextLine(); + while (this.isLineAvailable()) { + if (this.parseMeta()) { + return true; + } + if (this.parseNotes()) { + return true; + } + isFooterToken = regexes.footerToken.test(this.currentLine()); + commit.references.push(...this.parseReferences(this.currentLine(), isFooterToken)); + if (!isFooterToken) { + note.text = appendLine(note.text, this.currentLine()); + } + commit.footer = appendLine(commit.footer, this.currentLine()); + this.nextLine(); + if (isFooterToken) { + break; + } + } + return true; + } + return false; + } + parseBodyAndFooter(isBody) { + const { commit, regexes } = this; + if (!this.isLineAvailable()) { + return isBody; + } + const isFooterToken = regexes.footerToken.test(this.currentLine()); + const isStillBody = !isFooterToken && isBody; + commit.references.push(...this.parseReferences(this.currentLine(), isFooterToken)); + if (isStillBody) { + commit.body = appendLine(commit.body, this.currentLine()); + } + else { + commit.footer = appendLine(commit.footer, this.currentLine()); + } + this.nextLine(); + return isStillBody; + } + parseBreakingHeader() { + const { commit, options } = this; + if (!options.breakingHeaderPattern || commit.notes.length || !commit.header) { + return; + } + const matches = commit.header.match(options.breakingHeaderPattern); + if (matches) { + commit.notes.push({ + title: 'BREAKING CHANGE', + text: matches[3] + }); + } + } + parseMentions(input) { + const { commit, regexes } = this; + let matches; + for (;;) { + matches = regexes.mentions.exec(input); + if (!matches) { + break; + } + commit.mentions.push(matches[1]); + } + } + parseRevert(input) { + const { commit, options } = this; + const correspondence = options.revertCorrespondence || []; + const matches = options.revertPattern + ? input.match(options.revertPattern) + : null; + if (matches) { + commit.revert = assignMatchedCorrespondence({}, matches, correspondence); + } + } + cleanupCommit() { + const { commit } = this; + commit.body &&= trimNewLines(commit.body); + commit.footer &&= trimNewLines(commit.footer); + commit.notes.forEach((note) => { + note.text = trimNewLines(note.text); + }); + const referencesSet = new Set(); + commit.references = commit.references.filter((reference) => { + const uid = `${reference.action} ${reference.raw}`.toLocaleLowerCase(); + const ok = !referencesSet.has(uid); + if (ok) { + referencesSet.add(uid); + } + return ok; + }); + } + /** + * Parse commit message string into an object. + * @param input - Commit message string. + * @returns Commit object. + */ + parse(input) { + if (!input.trim()) { + throw new TypeError('Expected a raw commit'); + } + const { commentChar } = this.options; + const commentFilter = getCommentFilter(commentChar); + const rawLines = trimNewLines(input).split(/\r?\n/); + const lines = commentChar + ? truncateToScissor(rawLines, commentChar).filter(line => commentFilter(line) && gpgFilter(line)) + : rawLines.filter(line => gpgFilter(line)); + const commit = createCommitObject(); + this.lines = lines; + this.lineIndex = 0; + this.commit = commit; + const isMergeCommit = this.parseMerge(); + this.parseHeader(isMergeCommit); + if (commit.header) { + commit.references = this.parseReferences(commit.header); + } + let isBody = true; + while (this.isLineAvailable()) { + this.parseMeta(); + if (this.parseNotes()) { + isBody = false; + } + if (!this.parseBodyAndFooter(isBody)) { + isBody = false; + } + } + this.parseBreakingHeader(); + this.parseMentions(input); + this.parseRevert(input); + this.cleanupCommit(); + return commit; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tbWl0UGFyc2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0NvbW1pdFBhcnNlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxZQUFZLENBQUE7QUFDN0MsT0FBTyxFQUNMLFlBQVksRUFDWixVQUFVLEVBQ1YsZ0JBQWdCLEVBQ2hCLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsMkJBQTJCLEVBQzVCLE1BQU0sWUFBWSxDQUFBO0FBQ25CLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFN0M7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxrQkFBa0IsQ0FBQyxXQUFXLEdBQW9CLEVBQUU7SUFDbEUsa0pBQWtKO0lBQ2xKLE9BQU87UUFDTCxLQUFLLEVBQUUsSUFBSTtRQUNYLE1BQU0sRUFBRSxJQUFJO1FBQ1osTUFBTSxFQUFFLElBQUk7UUFDWixJQUFJLEVBQUUsSUFBSTtRQUNWLE1BQU0sRUFBRSxJQUFJO1FBQ1osS0FBSyxFQUFFLEVBQUU7UUFDVCxRQUFRLEVBQUUsRUFBRTtRQUNaLFVBQVUsRUFBRSxFQUFFO1FBQ2QsR0FBRyxXQUFXO0tBQ2YsQ0FBQTtBQUNILENBQUM7QUFFRDs7R0FFRztBQUNILE1BQU0sT0FBTyxZQUFZO0lBQ04sT0FBTyxDQUFlO0lBQ3RCLE9BQU8sQ0FBZTtJQUMvQixLQUFLLEdBQWEsRUFBRSxDQUFBO0lBQ3BCLFNBQVMsR0FBRyxDQU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ules/conventional-commits-parser/dist/cli/index.d.ts b/node_modules/conventional-commits-parser/dist/cli/index.d.ts new file mode 100644 index 000000000..dc1ec8956 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/index.d.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/index.d.ts.map b/node_modules/conventional-commits-parser/dist/cli/index.d.ts.map new file mode 100644 index 000000000..a275f8023 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/index.js b/node_modules/conventional-commits-parser/dist/cli/index.js new file mode 100755 index 000000000..68ae419c0 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/index.js @@ -0,0 +1,67 @@ +#!/usr/bin/env node +import { pipeline } from 'stream/promises'; +import { readFile } from 'fs/promises'; +import { readOptions, option, flag, alias, autocase, rest } from 'argue-cli'; +import { parseCommits } from '../index.js'; +import { parseOptions } from './options.js'; +import { readRawCommitsFromFiles, readRawCommitsFromLine, readRawCommitsFromStdin, stringify } from './utils.js'; +const DEFAULT_SEPARATOR = '\n\n\n'; +const HELP = ` + Practice writing commit messages or parse messages from files. + If used without specifying a text file path, you will enter an interactive shell. + Otherwise the commit messages in the files are parsed and printed + By default, commits will be split by three newlines ('\\n\\n\\n') or you can specify a separator. + + Usage + conventional-commits-parser [-s ] + conventional-commits-parser [-s ] [ ...] + cat | conventional-commits-parser [-s ] + + Example + conventional-commits-parser + conventional-commits-parser log.txt + cat log.txt | conventional-commits-parser + conventional-commits-parser log2.txt -s '===' >> parsed.txt + + Options + -s, --separator Commit separator + -p, --header-pattern Regex to match header pattern + -c, --header-correspondence Comma separated parts used to define what capturing group of 'headerPattern' captures what + -r, --reference-actions Comma separated keywords that used to reference issues + -i, --issue-prefixes Comma separated prefixes of an issue + --issue-prefixes-case-sensitive Treat issue prefixes as case sensitive + -n, --note-keywords Comma separated keywords for important notes + -f, --field-pattern Regex to match other fields + --revert-pattern Regex to match revert pattern + --revert-correspondence Comma separated fields used to define what the commit reverts + -v, --verbose Verbose output +`; +const flags = readOptions(option(alias('separator', 's'), String), option(autocase(alias('headerPattern', 'p')), String), option(autocase(alias('headerCorrespondence', 'c')), String), option(autocase(alias('referenceActions', 'r')), String), option(autocase(alias('issuePrefixes', 'i')), String), flag(autocase('issuePrefixesCaseSensitive')), option(autocase(alias('noteKeywords', 'n')), String), option(autocase(alias('fieldPattern', 'f')), String), option(autocase('revertPattern'), String), option(autocase('revertCorrespondence'), String), flag(alias('verbose', 'v')), flag('help'), flag('version')); +const files = rest(); +if (flags.help || flags.version) { + const pkg = JSON.parse(await readFile(new URL('../../package.json', import.meta.url), 'utf8')); + console.log(flags.help + ? `\n ${pkg.description}\n${HELP}` + : pkg.version); + process.exit(0); +} +const separator = flags.separator ?? DEFAULT_SEPARATOR; +const options = parseOptions(flags); +let inputStream; +try { + if (files.length) { + inputStream = readRawCommitsFromFiles(files, separator); + } + else if (process.stdin.isTTY) { + inputStream = readRawCommitsFromLine(separator); + } + else { + inputStream = readRawCommitsFromStdin(separator); + } + await pipeline(inputStream, parseCommits(options), stringify, process.stdout); +} +catch (err) { + console.error(err); + process.exit(1); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xpL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFDMUMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQUN0QyxPQUFPLEVBQ0ws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QUFNLFNBQVMsR0FBRyxLQUFLLENBQUMsU0FBUyxJQUFJLGlCQUFpQixDQUFBO0FBQ3RELE1BQU0sT0FBTyxHQUFHLFlBQVksQ0FBQyxLQUFLLENBQUMsQ0FBQTtBQUNuQyxJQUFJLFdBQWtDLENBQUE7QUFFdEMsSUFBSSxDQUFDO0lBQ0gsSUFBSSxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUM7UUFDakIsV0FBVyxHQUFHLHVCQUF1QixDQUFDLEtBQUssRUFBRSxTQUFTLENBQUMsQ0FBQTtJQUN6RCxDQUFDO1NBQ0MsSUFBSSxPQUFPLENBQUMsS0FBSyxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ3hCLFdBQVcsR0FBRyxzQkFBc0IsQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUNqRCxDQUFDO1NBQU0sQ0FBQztRQUNOLFdBQVcsR0FBRyx1QkFBdUIsQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUNsRCxDQUFDO0lBRUgsTUFBTSxRQUFRLENBQ1osV0FBVyxFQUNYLFlBQVksQ0FBQyxPQUFPLENBQUMsRUFDckIsU0FBUyxFQUNULE9BQU8sQ0FBQyxNQUFNLENBQ2YsQ0FBQTtBQUNILENBQUM7QUFBQyxPQUFPLEdBQUcsRUFBRSxDQUFDO0lBQ2IsT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNsQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBQ2pCLENBQUMifQ== \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/options.d.ts b/node_modules/conventional-commits-parser/dist/cli/options.d.ts new file mode 100644 index 000000000..f91074f6f --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/options.d.ts @@ -0,0 +1,3 @@ +import type { ParserStreamOptions } from '../types.js'; +export declare function parseOptions(options: Record): ParserStreamOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/options.d.ts.map b/node_modules/conventional-commits-parser/dist/cli/options.d.ts.map new file mode 100644 index 000000000..a8c2dc014 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAMtD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,mBAAmB,CA4ClF"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/options.js b/node_modules/conventional-commits-parser/dist/cli/options.js new file mode 100644 index 000000000..097df4023 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/options.js @@ -0,0 +1,40 @@ +function trim(str) { + return str.trim(); +} +export function parseOptions(options) { + if (typeof options.headerPattern === 'string') { + options.headerPattern = new RegExp(options.headerPattern); + } + if (typeof options.headerCorrespondence === 'string') { + options.headerCorrespondence = options.headerCorrespondence.split(',').map(trim); + } + if (typeof options.referenceActions === 'string') { + options.referenceActions = options.referenceActions.split(',').map(trim); + } + if (typeof options.issuePrefixes === 'string') { + options.issuePrefixes = options.issuePrefixes.split(',').map(trim); + } + if (typeof options.noteKeywords === 'string') { + options.noteKeywords = options.noteKeywords.split(',').map(trim); + } + if (typeof options.fieldPattern === 'string') { + options.fieldPattern = new RegExp(options.fieldPattern); + } + if (typeof options.revertPattern === 'string') { + options.revertPattern = new RegExp(options.revertPattern); + } + if (typeof options.revertCorrespondence === 'string') { + options.revertCorrespondence = options.revertCorrespondence.split(',').map(trim); + } + if (typeof options.mergePattern === 'string') { + options.mergePattern = new RegExp(options.mergePattern); + } + if (options.verbose) { + options.warn = console.warn.bind(console); + } + else { + options.warn = true; + } + return options; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDM0MsQ0FBQztTQUFNLENBQUM7UUFDTixPQUFPLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQTtJQUNyQixDQUFDO0lBRUQsT0FBTyxPQUFPLENBQUE7QUFDaEIsQ0FBQyJ9 \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/utils.d.ts b/node_modules/conventional-commits-parser/dist/cli/utils.d.ts new file mode 100644 index 000000000..20a0f7163 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/utils.d.ts @@ -0,0 +1,5 @@ +export declare function readRawCommitsFromFiles(files: string[], separator: string): AsyncGenerator; +export declare function readRawCommitsFromLine(separator: string): AsyncGenerator; +export declare function readRawCommitsFromStdin(separator: string): AsyncGenerator; +export declare function stringify(commits: AsyncIterable>): AsyncGenerator; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/utils.d.ts.map b/node_modules/conventional-commits-parser/dist/cli/utils.d.ts.map new file mode 100644 index 000000000..1037288be --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/cli/utils.ts"],"names":[],"mappings":"AAIA,wBAAuB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,yCAQhF;AAED,wBAAuB,sBAAsB,CAAC,SAAS,EAAE,MAAM,yCAmB9D;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,yCAExD;AAMD,wBAAuB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,yCAe/E"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/cli/utils.js b/node_modules/conventional-commits-parser/dist/cli/utils.js new file mode 100644 index 000000000..f22252540 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/cli/utils.js @@ -0,0 +1,49 @@ +import fs from 'fs'; +import readline from 'readline'; +import { splitStream } from '@simple-libs/stream-utils'; +export async function* readRawCommitsFromFiles(files, separator) { + for (const file of files) { + try { + yield* splitStream(fs.createReadStream(file), separator); + } + catch (err) { + console.warn(`Failed to read file ${file}:\n ${err}`); + } + } +} +export async function* readRawCommitsFromLine(separator) { + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + terminal: true + }); + let line; + let commit = ''; + for await (line of rl) { + commit += `${line}\n`; + if (!commit.includes(separator)) { + return; + } + yield commit; + commit = ''; + } +} +export function readRawCommitsFromStdin(separator) { + return splitStream(process.stdin, separator); +} +const JSON_STREAM_OPEN = '[\n'; +const JSON_STREAM_SEPARATOR = '\n,\n'; +const JSON_STREAM_CLOSE = '\n]\n'; +export async function* stringify(commits) { + let jsonStreamOpened = false; + yield JSON_STREAM_OPEN; + for await (const commit of commits) { + if (jsonStreamOpened) { + yield JSON_STREAM_SEPARATOR; + } + yield JSON.stringify(commit); + jsonStreamOpened = true; + } + yield JSON_STREAM_CLOSE; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xpL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQTtBQUNuQixPQUFPLFFBQVEsTUFBTSxVQUFVLENBQUE7QUFDL0IsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLDJCQUEyQixDQUFBO0FBRXZELE1BQU0sQ0FBQyxLQUFLLFNBQVMsQ0FBQyxDQUFDLHVCQUF1QixDQUFDLEtBQWUsRUFBRSxTQUFpQjtJQUMvRSxLQUFLLE1BQU0sSUFBSSxJQUFJLEtBQUss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BQUE7QUFDOUMsQ0FBQztBQUVELE1BQU0sZ0JBQWdCLEdBQUcsS0FBSyxDQUFBO0FBQzlCLE1BQU0scUJBQXFCLEdBQUcsT0FBTyxDQUFBO0FBQ3JDLE1BQU0saUJBQWlCLEdBQUcsT0FBTyxDQUFBO0FBRWpDLE1BQU0sQ0FBQyxLQUFLLFNBQVMsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxPQUErQztJQUM5RSxJQUFJLGdCQUFnQixHQUFHLEtBQUssQ0FBQTtJQUU1QixNQUFNLGdCQUFnQixDQUFBO0lBRXRCLElBQUksS0FBSyxFQUFFLE1BQU0sTUFBTSxJQUFJLE9BQU8sRUFBRSxDQUFDO1FBQ25DLElBQUksZ0JBQWdCLEVBQUUsQ0FBQztZQUNyQixNQUFNLHFCQUFxQixDQUFBO1FBQzdCLENBQUM7UUFFRCxNQUFNLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLENBQUE7UUFDNUIsZ0JBQWdCLEdBQUcsSUFBSSxDQUFBO0lBQ3pCLENBQUM7SUFFRCxNQUFNLGlCQUFpQixDQUFBO0FBQ3pCLENBQUMifQ== \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/index.d.ts b/node_modules/conventional-commits-parser/dist/index.d.ts new file mode 100644 index 000000000..5af023e25 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/index.d.ts @@ -0,0 +1,4 @@ +export type * from './types.js'; +export * from './CommitParser.js'; +export * from './stream.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/index.d.ts.map b/node_modules/conventional-commits-parser/dist/index.d.ts.map new file mode 100644 index 000000000..cbf2092e5 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/index.js b/node_modules/conventional-commits-parser/dist/index.js new file mode 100644 index 000000000..ff0f38e05 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/index.js @@ -0,0 +1,3 @@ +export * from './CommitParser.js'; +export * from './stream.js'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsY0FBYyxtQkFBbUIsQ0FBQTtBQUNqQyxjQUFjLGFBQWEsQ0FBQSJ9 \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/options.d.ts b/node_modules/conventional-commits-parser/dist/options.d.ts new file mode 100644 index 000000000..684f07e8e --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/options.d.ts @@ -0,0 +1,3 @@ +import type { ParserOptions } from './types.js'; +export declare const defaultOptions: ParserOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/options.d.ts.map b/node_modules/conventional-commits-parser/dist/options.d.ts.map new file mode 100644 index 000000000..08c4cc9df --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,eAAO,MAAM,cAAc,EAAE,aAyB5B,CAAA"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/options.js b/node_modules/conventional-commits-parser/dist/options.js new file mode 100644 index 000000000..dc938324b --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/options.js @@ -0,0 +1,27 @@ +export const defaultOptions = { + noteKeywords: ['BREAKING CHANGE', 'BREAKING-CHANGE'], + issuePrefixes: ['#'], + referenceActions: [ + 'close', + 'closes', + 'closed', + 'fix', + 'fixes', + 'fixed', + 'resolve', + 'resolves', + 'resolved' + ], + headerPattern: /^(\w*)(?:\(([\w$@.\-*/ ]*)\))?: (.*)$/, + headerCorrespondence: [ + 'type', + 'scope', + 'subject' + ], + revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\.?/, + revertCorrespondence: ['header', 'hash'], + // The field name must contain at least one word character so that + // YAML document markers like `---` are not treated as field markers. + fieldPattern: /^-(?=.*\w)(.*?)-$/ +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBa0I7SUFDM0MsWUFBWSxFQUFFLENBQUMsaUJBQWlCLEVBQUUsaUJBQWlCLENBQUM7SUFDcEQsYUFBYSxFQUFFLENBQUMsR0FBRyxDQUFDO0lBQ3BCLGdCQUFnQixFQUFFO1FBQ2hCLE9BQU87UUFDUCxRQUFRO1FBQ1IsUUFBUTtRQUNSLEtBQUs7UUFDTCxPQUFPO1FBQ1AsT0FBTztRQUNQLFNBQVM7UUFDVCxVQUFVO1FBQ1YsVUFBVTtLQUNYO0lBQ0QsYUFBYSxFQUFFLHVDQUF1QztJQUN0RCxvQkFBb0IsRUFBRTtRQUNwQixNQUFNO1FBQ04sT0FBTztRQUNQLFNBQVM7S0FDVjtJQUNELGFBQWEsRUFBRSxxREFBcUQ7SUFDcEUsb0JBQW9CLEVBQUUsQ0FBQyxRQUFRLEVBQUUsTUFBTSxDQUFDO0lBQ3hDLGtFQUFrRTtJQUNsRSxxRUFBcUU7SUFDckUsWUFBWSxFQUFFLG1CQUFtQjtDQUNsQyxDQUFBIn0= \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/regex.d.ts b/node_modules/conventional-commits-parser/dist/regex.d.ts new file mode 100644 index 000000000..47c2862cc --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/regex.d.ts @@ -0,0 +1,8 @@ +import type { ParserOptions, ParserRegexes } from './types.js'; +/** + * Make the regexes used to parse a commit. + * @param options + * @returns Regexes. + */ +export declare function getParserRegexes(options?: Pick): ParserRegexes; +//# sourceMappingURL=regex.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/regex.d.ts.map b/node_modules/conventional-commits-parser/dist/regex.d.ts.map new file mode 100644 index 000000000..c8677829d --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/regex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../src/regex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACd,MAAM,YAAY,CAAA;AA0EnB;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,IAAI,CAAC,aAAa,EAAE,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,4BAA4B,GAAG,kBAAkB,CAAM,GACvI,aAAa,CAiBf"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/regex.js b/node_modules/conventional-commits-parser/dist/regex.js new file mode 100644 index 000000000..2665e5e43 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/regex.js @@ -0,0 +1,69 @@ +const nomatchRegex = /(?!.*)/; +function escape(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} +function joinOr(parts) { + return parts + .map(val => (typeof val === 'string' ? escape(val.trim()) : val.source)) + .filter(Boolean) + .join('|'); +} +function getNotesRegex(noteKeywords, notesPattern) { + if (!noteKeywords) { + return nomatchRegex; + } + const noteKeywordsSelection = joinOr(noteKeywords); + if (!notesPattern) { + return new RegExp(`^(?:\\*\\s+)?(${noteKeywordsSelection}):\\s*(.*)`, 'i'); + } + return notesPattern(noteKeywordsSelection); +} +function getReferencePartsRegex(issuePrefixes, issuePrefixesCaseSensitive) { + if (!issuePrefixes) { + return nomatchRegex; + } + const flags = issuePrefixesCaseSensitive ? 'g' : 'gi'; + return new RegExp(`(?:.*?)??\\s*([\\w-\\.\\/]*?)??(${joinOr(issuePrefixes)})([\\w-]+)(?=\\s|$|[,;.)\\]])`, flags); +} +function getReferencesRegex(referenceActions, separator = '') { + if (!referenceActions) { + // matches everything + return /()(.+)/gi; + } + const joinedKeywords = joinOr(referenceActions); + // Keywords are whole words: `prefix #1` has no `fix` action, + // and `fixups` does not end the references of the previous keyword. + const nextKeyword = `(? | AsyncIterable) => AsyncGenerator; +/** + * Create stream to parse commits. + * @param options - CommitParser options. + * @returns Stream of parsed commits. + */ +export declare function parseCommitsStream(options?: ParserStreamOptions): import("stream").Duplex; +//# sourceMappingURL=stream.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/stream.d.ts.map b/node_modules/conventional-commits-parser/dist/stream.d.ts.map new file mode 100644 index 000000000..c56789cff --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/stream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAGrD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,GAAE,mBAAwB,gBAYnB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,gEAazE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,2BAEnE"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/stream.js b/node_modules/conventional-commits-parser/dist/stream.js new file mode 100644 index 000000000..5a8ec75c6 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/stream.js @@ -0,0 +1,38 @@ +import { Transform } from 'stream'; +import { CommitParser } from './CommitParser.js'; +/** + * Create async generator function to parse async iterable of raw commits. + * @param options - CommitParser options. + * @returns Async generator function to parse async iterable of raw commits. + */ +export function parseCommits(options = {}) { + const warnOption = options.warn; + const warn = warnOption === true + ? (err) => { + throw err; + } + : warnOption + ? (err) => warnOption(err.toString()) + : () => { }; + return async function* parse(rawCommits) { + const parser = new CommitParser(options); + let rawCommit; + for await (rawCommit of rawCommits) { + try { + yield parser.parse(rawCommit.toString()); + } + catch (err) { + warn(err); + } + } + }; +} +/** + * Create stream to parse commits. + * @param options - CommitParser options. + * @returns Stream of parsed commits. + */ +export function parseCommitsStream(options = {}) { + return Transform.from(parseCommits(options)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyZWFtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3N0cmVhbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBRWxDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUVoRDs7OztHQUlHO0FBQ0gsTUFBTSxVQUFVLFlBQVksQ0FDMUIsT0FBTyxHQUF3QixFQUFFO0lBRWpDLE1BQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUE7SUFDL0IsTUFBTSxJQUFJLEdBQUcsVUFBVSxLQUFLLElBQUk7UUFDOUIsQ0FBQyxDQUFDLENBQUMsR0FBVSxFQUFFLEVBQUU7WUFDZixNQUFNLEdBQUcsQ0FBQTtRQUNYLENBQUM7UUFDRCxDQUFDLENBQUMsVUFBVTtZQUNWLENBQUMsQ0FBQyxDQUFDLEdBQVUsRUFBRSxFQUFFLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxRQUFRLEVBQUUsQ0FBQztZQUM1QyxDQUFDLENBQUMsR0FBRyxFQUFFLEdBQWMsQ0FBQyxDQUFBO0lBRTFCLE9BQU8sS0FBSyxTQUFTLENBQUMsQ0FBQyxLQUFLLENBQzFCLFVBQXNFO1FBRXRFLE1BQU0sTUFBTSxHQUFHLElBQUksWUFBWSxDQUFDLE9BQU8sQ0FBQyxDQUFBO1FBQ3hDLElBQUksU0FBMEIsQ0FBQTtRQUU5QixJQUFJLEtBQUssRUFBRSxTQUFTLElBQUksVUFBVSxFQUFFLENBQUM7WUFDbkMsSUFBSSxDQUFDO2dCQUNILE1BQU0sTUFBTSxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQTtZQUMxQyxDQUFDO1lBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQztnQkFDYixJQUFJLENBQUMsR0FBWSxDQUFDLENBQUE7WUFDcEIsQ0FBQztRQUNILENBQUM7SUFDSCxDQUFDLENBQUE7QUFDSCxDQUFDO0FBRUQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxrQkFBa0IsQ0FBQyxPQUFPLEdBQXdCLEVBQUU7SUFDbEUsT0FBTyxTQUFTLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFBO0FBQzlDLENBQUMifQ== \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/types.d.ts b/node_modules/conventional-commits-parser/dist/types.d.ts new file mode 100644 index 000000000..2710b596a --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/types.d.ts @@ -0,0 +1,101 @@ +export interface ParserOptions { + /** + * Character used to comment out a line. + */ + commentChar?: string; + /** + * Pattern to match merge headers. EG: branch merge, GitHub or GitLab like pull requests headers. + * When a merge header is parsed, the next line is used for conventional header parsing. + */ + mergePattern?: RegExp; + /** + * Used to define what capturing group of `mergePattern`. + */ + mergeCorrespondence?: string[]; + /** + * Used to match header pattern. + */ + headerPattern?: RegExp; + /** + * Breaking changes header pattern. + */ + breakingHeaderPattern?: RegExp; + /** + * Used to define what capturing group of `headerPattern` captures what header part. + * The order of the array should correspond to the order of `headerPattern`'s capturing group. + */ + headerCorrespondence?: string[]; + /** + * Pattern to match what this commit reverts. + */ + revertPattern?: RegExp; + /** + * Used to define what capturing group of `revertPattern` captures what reverted commit fields. + * The order of the array should correspond to the order of `revertPattern`'s capturing group. + */ + revertCorrespondence?: string[]; + /** + * Pattern to match other fields. + */ + fieldPattern?: RegExp; + /** + * Keywords for important notes. This value is case **insensitive**. + */ + noteKeywords?: (string | RegExp)[]; + /** + * The prefixes of an issue. EG: In `gh-123` `gh-` is the prefix. + */ + issuePrefixes?: (string | RegExp)[]; + /** + * Used to define if `issuePrefixes` should be considered case sensitive. + */ + issuePrefixesCaseSensitive?: boolean; + /** + * Keywords to reference an issue. This value is case **insensitive**. + */ + referenceActions?: (string | RegExp)[]; + /** + * A function that takes `noteKeywordsSelection` and returns a `RegExp` to be matched against the notes. + */ + notesPattern?(text: string): RegExp; +} +export interface ParserStreamOptions extends ParserOptions { + /** + * What warn function to use. For example, `console.warn.bind(console)`. By default, it's a noop. If it is `true`, it will error if commit cannot be parsed (strict). + */ + warn?: boolean | ((message: string) => void); +} +export interface ParserRegexes { + notes: RegExp; + referenceParts: RegExp; + references: RegExp; + footerReferences: RegExp; + footerToken: RegExp; + mentions: RegExp; + url: RegExp; +} +export interface CommitReference { + raw: string; + action: string | null; + owner: string | null; + repository: string | null; + issue: string; + prefix: string; +} +export interface CommitNote { + title: string; + text: string; +} +export type CommitMeta = Record; +export interface CommitBase { + merge: string | null; + revert: CommitMeta | null; + header: string | null; + body: string | null; + footer: string | null; + notes: CommitNote[]; + mentions: string[]; + references: CommitReference[]; +} +export type Commit = CommitBase & CommitMeta; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/types.d.ts.map b/node_modules/conventional-commits-parser/dist/types.d.ts.map new file mode 100644 index 000000000..1d84617ef --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACnC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACtC;;OAEG;IACH,YAAY,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CACpC;AAED,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;AAEtD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAA;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,UAAU,CAAA"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/types.js b/node_modules/conventional-commits-parser/dist/types.js new file mode 100644 index 000000000..a0dabde2e --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/utils.d.ts b/node_modules/conventional-commits-parser/dist/utils.d.ts new file mode 100644 index 000000000..869e4b553 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/utils.d.ts @@ -0,0 +1,41 @@ +/** + * Remove leading and trailing newlines. + * @param input + * @returns String without leading and trailing newlines. + */ +export declare function trimNewLines(input: string): string; +/** + * Append a newline to a string. + * @param src + * @param line + * @returns String with appended newline. + */ +export declare function appendLine(src: string | null, line: string | undefined): string; +/** + * Creates a function that filters out comments lines. + * @param char + * @returns Comment filter function. + */ +export declare function getCommentFilter(char: string | undefined): (line: string) => boolean; +/** + * Select lines before the scissor. + * @param lines + * @param commentChar + * @returns Lines before the scissor. + */ +export declare function truncateToScissor(lines: string[], commentChar: string): string[]; +/** + * Filter out GPG sign lines. + * @param line + * @returns True if the line is not a GPG sign line. + */ +export declare function gpgFilter(line: string): boolean; +/** + * Assign matched correspondence to the target object. + * @param target - The target object to assign values to. + * @param matches - The RegExp match array containing the matched groups. + * @param correspondence - An array of keys that correspond to the matched groups. + * @returns The target object with assigned values. + */ +export declare function assignMatchedCorrespondence(target: Record, matches: RegExpMatchArray, correspondence: string[]): Record; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/utils.d.ts.map b/node_modules/conventional-commits-parser/dist/utils.d.ts.map new file mode 100644 index 000000000..934c4c4e5 --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,UAiBzC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,UAEtE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,UAE5C,MAAM,aAElB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EAAE,EACf,WAAW,EAAE,MAAM,YASpB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,WAErC;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EACrC,OAAO,EAAE,gBAAgB,EACzB,cAAc,EAAE,MAAM,EAAE,iCAUzB"} \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/dist/utils.js b/node_modules/conventional-commits-parser/dist/utils.js new file mode 100644 index 000000000..c7505ab1c --- /dev/null +++ b/node_modules/conventional-commits-parser/dist/utils.js @@ -0,0 +1,75 @@ +const SCISSOR = '------------------------ >8 ------------------------'; +/** + * Remove leading and trailing newlines. + * @param input + * @returns String without leading and trailing newlines. + */ +export function trimNewLines(input) { + // To escape ReDos we should escape String#replace with regex. + const matches = input.match(/[^\r\n]/); + if (typeof matches?.index !== 'number') { + return ''; + } + const firstIndex = matches.index; + let lastIndex = input.length - 1; + while (input[lastIndex] === '\r' || input[lastIndex] === '\n') { + lastIndex--; + } + return input.substring(firstIndex, lastIndex + 1); +} +/** + * Append a newline to a string. + * @param src + * @param line + * @returns String with appended newline. + */ +export function appendLine(src, line) { + return src ? `${src}\n${line || ''}` : line || ''; +} +/** + * Creates a function that filters out comments lines. + * @param char + * @returns Comment filter function. + */ +export function getCommentFilter(char) { + return char + ? (line) => !line.startsWith(char) + : () => true; +} +/** + * Select lines before the scissor. + * @param lines + * @param commentChar + * @returns Lines before the scissor. + */ +export function truncateToScissor(lines, commentChar) { + const scissorIndex = lines.indexOf(`${commentChar} ${SCISSOR}`); + if (scissorIndex === -1) { + return lines; + } + return lines.slice(0, scissorIndex); +} +/** + * Filter out GPG sign lines. + * @param line + * @returns True if the line is not a GPG sign line. + */ +export function gpgFilter(line) { + return !line.match(/^\s*gpg:/); +} +/** + * Assign matched correspondence to the target object. + * @param target - The target object to assign values to. + * @param matches - The RegExp match array containing the matched groups. + * @param correspondence - An array of keys that correspond to the matched groups. + * @returns The target object with assigned values. + */ +export function assignMatchedCorrespondence(target, matches, correspondence) { + const { groups } = matches; + for (let i = 0, len = correspondence.length, key; i < len; i++) { + key = correspondence[i]; + target[key] = (groups ? groups[key] : matches[i + 1]) || null; + } + return target; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxPQUFPLEdBQUcsc0RBQXNELENBQUE7QUFFdEU7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsS0FBYTtJQUN4Qyw4REFBOEQ7SUFFOUQsTUFBTSxPQUFPLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUV0QyxJQUFJLE9BQU8sT0FBTyxFQUFFLEtBQUssS0FBSyxRQUFRLEVBQUUsQ0FBQztRQUN2QyxPQUFPLEVBQUUsQ0FBQTtJQUNYLENBQUM7SUFFRCxNQUFNLFVBQVUsR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFBO0lBQ2hDLElBQUksU0FBUyxHQUFHLEtBQUssQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFBO0lBRWhDLE9BQU8sS0FBSyxDQUFDLFNBQVMsQ0FBQyxLQUFLLElBQUksSUFBSSxLQUFLLENBQUMsU0FBUyxDQUFDLEtBQUssSUFBSSxFQUFFLENBQUM7UUFDOUQsU0FBUyxFQUFFLENBQUE7SUFDYixDQU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BQUssQ0FBQyxVQUFVLENBQUMsQ0FBQTtBQUNoQyxDQUFDO0FBRUQ7Ozs7OztHQU1HO0FBQ0gsTUFBTSxVQUFVLDJCQUEyQixDQUN6QyxNQUFxQyxFQUNyQyxPQUF5QixFQUN6QixjQUF3QjtJQUV4QixNQUFNLEVBQUUsTUFBTSxFQUFFLEdBQUcsT0FBTyxDQUFBO0lBRTFCLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEdBQUcsR0FBRyxjQUFjLENBQUMsTUFBTSxFQUFFLEdBQUcsRUFBRSxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUM7UUFDL0QsR0FBRyxHQUFHLGNBQWMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUN2QixNQUFNLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksQ0FBQTtJQUMvRCxDQUFDO0lBRUQsT0FBTyxNQUFNLENBQUE7QUFDZixDQUFDIn0= \ No newline at end of file diff --git a/node_modules/conventional-commits-parser/package.json b/node_modules/conventional-commits-parser/package.json new file mode 100644 index 000000000..39d884597 --- /dev/null +++ b/node_modules/conventional-commits-parser/package.json @@ -0,0 +1,46 @@ +{ + "name": "conventional-commits-parser", + "type": "module", + "version": "7.1.3", + "description": "Parse raw conventional commits.", + "author": { + "name": "Steve Mao", + "email": "maochenyan@gmail.com", + "url": "https://github.com/stevemao" + }, + "license": "MIT", + "homepage": "https://conventional-changelog.js.org/commits-parser/", + "repository": { + "type": "git", + "url": "https://github.com/conventional-changelog/conventional-changelog.git", + "directory": "packages/conventional-commits-parser" + }, + "bugs": { + "url": "https://github.com/conventional-changelog/conventional-changelog/issues" + }, + "keywords": [ + "conventional-commits-parser", + "changelog", + "conventional", + "parser", + "parsing", + "logs" + ], + "engines": { + "node": ">=22" + }, + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "files": [ + "dist" + ], + "dependencies": { + "@simple-libs/stream-utils": "^2.0.0", + "argue-cli": "^3.1.0" + }, + "bin": { + "conventional-commits-parser": "./dist/cli/index.js" + } +} \ No newline at end of file diff --git a/node_modules/cosmiconfig-typescript-loader/LICENCE b/node_modules/cosmiconfig-typescript-loader/LICENCE new file mode 100644 index 000000000..5189a6e3d --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/LICENCE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Alex Miller + +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. diff --git a/node_modules/cosmiconfig-typescript-loader/README.md b/node_modules/cosmiconfig-typescript-loader/README.md new file mode 100644 index 000000000..c15df761e --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/README.md @@ -0,0 +1,82 @@ +# cosmiconfig-typescript-loader + +> ⚙️🚀 TypeScript config file support for cosmiconfig + +[![build](https://github.com/Codex-/cosmiconfig-typescript-loader/actions/workflows/build.yml/badge.svg)](https://github.com/Codex-/cosmiconfig-typescript-loader/actions/workflows/build.yml) +[![codecov](https://codecov.io/gh/Codex-/cosmiconfig-typescript-loader/branch/main/graph/badge.svg?token=WWGNIPC249)](https://codecov.io/gh/Codex-/cosmiconfig-typescript-loader) +[![npm](https://img.shields.io/npm/v/cosmiconfig-typescript-loader.svg)](https://www.npmjs.com/package/cosmiconfig-typescript-loader) + +## Usage + +Simply add `TypeScriptLoader` to the list of loaders for the `.ts` file type, and `await` loading: + +```ts +import { cosmiconfig } from "cosmiconfig"; +import { TypeScriptLoader } from "cosmiconfig-typescript-loader"; + +const moduleName = "module"; +const explorer = cosmiconfig("test", { + searchPlaces: [ + "package.json", + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.cjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.cjs`, + ], + loaders: { + ".ts": TypeScriptLoader(), + }, +}); + +const cfg = await explorer.load("./"); +``` + +Or more simply if you only support loading of a TypeScript based configuration file: + +```ts +import { cosmiconfig } from "cosmiconfig"; +import { TypeScriptLoader } from "cosmiconfig-typescript-loader"; + +const moduleName = "module"; +const explorer = cosmiconfig("test", { + loaders: { + ".ts": TypeScriptLoader(), + }, +}); + +const cfg = await explorer.load("./amazing.config.ts"); +``` + +### Synchronously loading + +With the release of Jiti 2, the synchronous loader has now been deprecated. It can still be used by using the `TypeScriptLoaderSync` export: + +```ts +import { cosmiconfig } from "cosmiconfig"; +import { TypeScriptLoaderSync } from "cosmiconfig-typescript-loader"; + +const moduleName = "module"; +const explorer = cosmiconfig("test", { + loaders: { + ".ts": TypeScriptLoaderSync(), + }, +}); + +const cfg = explorer.load("./amazing.config.ts"); +``` + +## `@endemolshinegroup/cosmiconfig-typescript-loader` + +This package serves as a drop in replacement for `@endemolshinegroup/cosmiconfig-typescript-loader`. At the time of publishing this, `endemolshinegroup` is not maintaining the original package. I can only assume this is to do with the fact that Endemol Shine Group [was purchased and absorbed by another business](https://en.wikipedia.org/wiki/Endemol_Shine_Group#Sale_to_Banijay). This discontinuation of development efforts towards the original package left any open issues and pull requests unresolved. + +This new package resolves the following original issues: + +- [`#134`](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/issues/134): "Doesn't work with Cosmiconfig sync API" +- [`#147`](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/issues/147): "doesn't provide typescript, requested by ts-node" +- [`#155`](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/issues/155): "Misleading TypeScriptCompileError when user's tsconfig.json "module" is set to "es2015"" diff --git a/node_modules/cosmiconfig-typescript-loader/dist/cjs/index.cjs b/node_modules/cosmiconfig-typescript-loader/dist/cjs/index.cjs new file mode 100644 index 000000000..161591d8a --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/cjs/index.cjs @@ -0,0 +1,32 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/index.ts +var index_exports = {}; +__export(index_exports, { + TypeScriptLoader: () => import_loader.TypeScriptLoader, + TypeScriptLoaderSync: () => import_loader.TypeScriptLoaderSync +}); +module.exports = __toCommonJS(index_exports); +var import_loader = require("./loader.cjs"); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + TypeScriptLoader, + TypeScriptLoaderSync +}); diff --git a/node_modules/cosmiconfig-typescript-loader/dist/cjs/loader.cjs b/node_modules/cosmiconfig-typescript-loader/dist/cjs/loader.cjs new file mode 100644 index 000000000..d1bb9a4ba --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/cjs/loader.cjs @@ -0,0 +1,61 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/loader.ts +var loader_exports = {}; +__export(loader_exports, { + TypeScriptLoader: () => TypeScriptLoader, + TypeScriptLoaderSync: () => TypeScriptLoaderSync +}); +module.exports = __toCommonJS(loader_exports); +var import_jiti = require("jiti"); +var import_typescript_compile_error = require("./typescript-compile-error.cjs"); +function TypeScriptLoader(options) { + const loader = (0, import_jiti.createJiti)("", { interopDefault: true, ...options }); + return async (path, _content) => { + try { + const result = await loader.import(path); + return result.default || result; + } catch (error) { + if (error instanceof Error) { + throw import_typescript_compile_error.TypeScriptCompileError.fromError(error); + } + throw error; + } + }; +} +function TypeScriptLoaderSync(options) { + const loader = (0, import_jiti.createJiti)("", { interopDefault: true, ...options }); + return (path, _content) => { + try { + const result = loader(path); + return result.default || result; + } catch (error) { + if (error instanceof Error) { + throw import_typescript_compile_error.TypeScriptCompileError.fromError(error); + } + throw error; + } + }; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + TypeScriptLoader, + TypeScriptLoaderSync +}); diff --git a/node_modules/cosmiconfig-typescript-loader/dist/cjs/typescript-compile-error.cjs b/node_modules/cosmiconfig-typescript-loader/dist/cjs/typescript-compile-error.cjs new file mode 100644 index 000000000..9ddd242b9 --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/cjs/typescript-compile-error.cjs @@ -0,0 +1,43 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/typescript-compile-error.ts +var typescript_compile_error_exports = {}; +__export(typescript_compile_error_exports, { + TypeScriptCompileError: () => TypeScriptCompileError +}); +module.exports = __toCommonJS(typescript_compile_error_exports); +var TypeScriptCompileError = class _TypeScriptCompileError extends Error { + constructor(message) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + static fromError(error) { + const message = `TypeScriptLoader failed to compile TypeScript: +${error.message}`; + const newError = new _TypeScriptCompileError(message); + newError.stack = error.stack; + return newError; + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + TypeScriptCompileError +}); diff --git a/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs b/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs new file mode 100644 index 000000000..93fd3f82f --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs @@ -0,0 +1,9 @@ +// lib/index.ts +import { + TypeScriptLoader, + TypeScriptLoaderSync +} from "./loader.mjs"; +export { + TypeScriptLoader, + TypeScriptLoaderSync +}; diff --git a/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs b/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs new file mode 100644 index 000000000..afa271fe9 --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs @@ -0,0 +1,35 @@ +// lib/loader.ts +import { createJiti } from "jiti"; +import { TypeScriptCompileError } from "./typescript-compile-error.mjs"; +function TypeScriptLoader(options) { + const loader = createJiti("", { interopDefault: true, ...options }); + return async (path, _content) => { + try { + const result = await loader.import(path); + return result.default || result; + } catch (error) { + if (error instanceof Error) { + throw TypeScriptCompileError.fromError(error); + } + throw error; + } + }; +} +function TypeScriptLoaderSync(options) { + const loader = createJiti("", { interopDefault: true, ...options }); + return (path, _content) => { + try { + const result = loader(path); + return result.default || result; + } catch (error) { + if (error instanceof Error) { + throw TypeScriptCompileError.fromError(error); + } + throw error; + } + }; +} +export { + TypeScriptLoader, + TypeScriptLoaderSync +}; diff --git a/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs b/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs new file mode 100644 index 000000000..aeb39761b --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs @@ -0,0 +1,18 @@ +// lib/typescript-compile-error.ts +var TypeScriptCompileError = class _TypeScriptCompileError extends Error { + constructor(message) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + static fromError(error) { + const message = `TypeScriptLoader failed to compile TypeScript: +${error.message}`; + const newError = new _TypeScriptCompileError(message); + newError.stack = error.stack; + return newError; + } +}; +export { + TypeScriptCompileError +}; diff --git a/node_modules/cosmiconfig-typescript-loader/dist/types/index.d.ts b/node_modules/cosmiconfig-typescript-loader/dist/types/index.d.ts new file mode 100644 index 000000000..39f3a92c0 --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/types/index.d.ts @@ -0,0 +1,2 @@ +export { TypeScriptLoader, TypeScriptLoaderSync, } from "./loader.js"; +export type { TypeScriptCompileError } from "./typescript-compile-error.js"; diff --git a/node_modules/cosmiconfig-typescript-loader/dist/types/loader.d.ts b/node_modules/cosmiconfig-typescript-loader/dist/types/loader.d.ts new file mode 100644 index 000000000..bf87d74e9 --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/types/loader.d.ts @@ -0,0 +1,10 @@ +import type { LoaderResult, LoaderSync } from "cosmiconfig"; +import { createJiti } from "jiti"; +type JitiOptions = Parameters[1]; +type LoaderAsync = (filepath: string, content: string) => Promise; +export declare function TypeScriptLoader(options?: JitiOptions): LoaderAsync; +/** + * @deprecated use `TypeScriptLoader` + */ +export declare function TypeScriptLoaderSync(options?: JitiOptions): LoaderSync; +export {}; diff --git a/node_modules/cosmiconfig-typescript-loader/dist/types/typescript-compile-error.d.ts b/node_modules/cosmiconfig-typescript-loader/dist/types/typescript-compile-error.d.ts new file mode 100644 index 000000000..141eb2ace --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/dist/types/typescript-compile-error.d.ts @@ -0,0 +1,4 @@ +export declare class TypeScriptCompileError extends Error { + constructor(message: string); + static fromError(error: Error): TypeScriptCompileError; +} diff --git a/node_modules/cosmiconfig-typescript-loader/package.json b/node_modules/cosmiconfig-typescript-loader/package.json new file mode 100644 index 000000000..03a3aa156 --- /dev/null +++ b/node_modules/cosmiconfig-typescript-loader/package.json @@ -0,0 +1,81 @@ +{ + "name": "cosmiconfig-typescript-loader", + "version": "6.3.0", + "description": "TypeScript loader for cosmiconfig", + "author": "Alex Miller ", + "license": "MIT", + "homepage": "https://github.com/Codex-/cosmiconfig-typescript-loader#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/Codex-/cosmiconfig-typescript-loader.git" + }, + "bugs": { + "url": "https://github.com/Codex-/cosmiconfig-typescript-loader/issues" + }, + "files": [ + "dist/**/*" + ], + "main": "dist/cjs/index.cjs", + "module": "dist/esm/index.mjs", + "types": "dist/types/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/types/index.d.ts", + "default": "./dist/esm/index.mjs" + }, + "require": { + "types": "./dist/types/index.d.ts", + "default": "./dist/cjs/index.cjs" + } + } + }, + "scripts": { + "build": "pnpm build:types && pnpm build:sources", + "build:sources": "node ./scripts/esbuild.config.mjs", + "build:types": "tsc -p tsconfig.build.json", + "check:types": "tsc -p tsconfig.json", + "format": "pnpm format:check --write", + "format:check": "prettier --check \"{**/*,*}.{js,cjs,mjs,ts}\"", + "lint": "eslint .", + "lint:fix": "pnpm lint --fix", + "release": "release-it", + "test": "jest", + "test:coverage": "jest --coverage" + }, + "engines": { + "node": ">=v18" + }, + "peerDependencies": { + "@types/node": "*", + "cosmiconfig": ">=9", + "typescript": ">=5" + }, + "dependencies": { + "jiti": "2.6.1" + }, + "devDependencies": { + "@eslint/js": "10.0.1", + "@swc/core": "1.15.24", + "@swc/jest": "0.2.39", + "@types/jest": "30.0.0", + "@typescript-eslint/eslint-plugin": "8.58.0", + "auto-changelog": "2.5.0", + "chalk": "5.6.2", + "cosmiconfig": "9.0.1", + "esbuild": "0.28.0", + "eslint": "10.2.0", + "eslint-config-prettier": "10.1.8", + "eslint-import-resolver-typescript": "4.4.4", + "eslint-plugin-import-x": "4.16.2", + "jest": "30.3.0", + "prettier": "3.8.1", + "release-it": "20.0.0-1", + "typescript": "5.9.3", + "typescript-eslint": "8.58.0" + }, + "keywords": [ + "cosmiconfig", + "typescript" + ] +} diff --git a/node_modules/cosmiconfig/LICENSE b/node_modules/cosmiconfig/LICENSE new file mode 100644 index 000000000..6d347c066 --- /dev/null +++ b/node_modules/cosmiconfig/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 David Clark + +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. + diff --git a/node_modules/cosmiconfig/README.md b/node_modules/cosmiconfig/README.md new file mode 100644 index 000000000..59b09d073 --- /dev/null +++ b/node_modules/cosmiconfig/README.md @@ -0,0 +1,782 @@ +# cosmiconfig + +[![codecov](https://codecov.io/gh/cosmiconfig/cosmiconfig/branch/main/graph/badge.svg)](https://codecov.io/gh/cosmiconfig/cosmiconfig) + +Cosmiconfig searches for and loads configuration for your program. + +It features smart defaults based on conventional expectations in the JavaScript ecosystem. +But it's also flexible enough to search wherever you'd like to search, and load whatever you'd like to load. + +By default, Cosmiconfig will check the current directory for the following: + +- a `package.json` property +- a JSON or YAML, extensionless "rc file" +- an "rc file" with the extensions `.json`, `.yaml`, `.yml`, `.js`, `.ts`, `.mjs`, or `.cjs` +- any of the above two inside a `.config` subdirectory +- a `.config.js`, `.config.ts`, `.config.mjs`, or `.config.cjs` file + +For example, if your module's name is "myapp", cosmiconfig will search up the directory tree for configuration in the following places: + +- a `myapp` property in `package.json` +- a `.myapprc` file in JSON or YAML format +- a `.myapprc.json`, `.myapprc.yaml`, `.myapprc.yml`, `.myapprc.js`, `.myapprc.ts`, `.myapprc.mjs`, or `.myapprc.cjs` file +- a `myapprc`, `myapprc.json`, `myapprc.yaml`, `myapprc.yml`, `myapprc.js`, `myapprc.ts`, `myapprc.mjs`, or `myapprc.cjs` file inside a `.config` subdirectory +- a `myapp.config.js`, `myapp.config.ts`, `myapp.config.mjs`, or `myapp.config.cjs` file + +Optionally, you can tell it to search up the directory tree using [search strategies], +checking each of these places in each directory, until it finds some acceptable configuration (or hits the home directory). + +## Table of contents + +- [Installation](#installation) +- [Usage for tooling developers](#usage-for-tooling-developers) +- [Result](#result) +- [Asynchronous API](#asynchronous-api) + - [cosmiconfig()](#cosmiconfig-1) + - [explorer.search()](#explorersearch) + - [explorer.load()](#explorerload) + - [explorer.clearLoadCache()](#explorerclearloadcache) + - [explorer.clearSearchCache()](#explorerclearsearchcache) + - [explorer.clearCaches()](#explorerclearcaches) +- [Synchronous API](#synchronous-api) + - [cosmiconfigSync()](#cosmiconfigsync) + - [explorerSync.search()](#explorersyncsearch) + - [explorerSync.load()](#explorersyncload) + - [explorerSync.clearLoadCache()](#explorersyncclearloadcache) + - [explorerSync.clearSearchCache()](#explorersyncclearsearchcache) + - [explorerSync.clearCaches()](#explorersyncclearcaches) +- [cosmiconfigOptions](#cosmiconfigoptions) + - [searchStrategy](#searchstrategy) + - [searchPlaces](#searchplaces) + - [loaders](#loaders) + - [packageProp](#packageprop) + - [stopDir](#stopdir) + - [cache](#cache) + - [transform](#transform) + - [ignoreEmptySearchPlaces](#ignoreemptysearchplaces) +- [Loading JS modules](#loading-js-modules) +- [Caching](#caching) +- [Differences from rc](#differences-from-rc) +- [Usage for end users](#usage-for-end-users) + - [Imports](#imports) +- [Contributing & Development](#contributing--development) + +## Installation + +``` +npm install cosmiconfig +``` + +Tested in Node 14+. + +## Usage for tooling developers + +*If you are an end user (i.e. a user of a tool that uses cosmiconfig, like `prettier` or `stylelint`), +you can skip down to [the end user section](#usage-for-end-users).* + +Create a Cosmiconfig explorer, then either `search` for or directly `load` a configuration file. + +```js +const { cosmiconfig, cosmiconfigSync } = require('cosmiconfig'); +// ... +const explorer = cosmiconfig(moduleName); + +// Search for a configuration by walking up directories. +// See documentation for search, below. +explorer.search() + .then((result) => { + // result.config is the parsed configuration object. + // result.filepath is the path to the config file that was found. + // result.isEmpty is true if there was nothing to parse in the config file. + }) + .catch((error) => { + // Do something constructive. + }); + +// Load a configuration directly when you know where it should be. +// The result object is the same as for search. +// See documentation for load, below. +explorer.load(pathToConfig).then(/* ... */); + +// You can also search and load synchronously. +const explorerSync = cosmiconfigSync(moduleName); + +const searchedFor = explorerSync.search(); +const loaded = explorerSync.load(pathToConfig); +``` + +## Result + +The result object you get from `search` or `load` has the following properties: + +- **config:** The parsed configuration object. `undefined` if the file is empty. +- **filepath:** The path to the configuration file that was found. +- **isEmpty:** `true` if the configuration file is empty. This property will not be present if the configuration file is not empty. + +## Asynchronous API + +### cosmiconfig() + +```js +const { cosmiconfig } = require('cosmiconfig'); +const explorer = cosmiconfig(moduleName, /* optional */ cosmiconfigOptions) +``` + +Creates a cosmiconfig instance ("explorer") configured according to the arguments, and initializes its caches. + +#### moduleName + +Type: `string`. **Required.** + +Your module name. This is used to create the default [`searchPlaces`] and [`packageProp`]. + +If your [`searchPlaces`] value will include files, as it does by default (e.g. `${moduleName}rc`), your `moduleName` must consist of characters allowed in filenames. That means you should not copy scoped package names, such as `@my-org/my-package`, directly into `moduleName`. + +**[`cosmiconfigOptions`] are documented below.** +You may not need them, and should first read about the functions you'll use. + +### explorer.search() + +```js +explorer.search([searchFrom]).then(result => { /* ... */ }) +``` + +Searches for a configuration file. Returns a Promise that resolves with a [result] or with `null`, if no configuration file is found. + +You can do the same thing synchronously with [`explorerSync.search()`]. + +Let's say your module name is `goldengrahams` so you initialized with `const explorer = cosmiconfig('goldengrahams');`. +Here's how your default [`search()`] will work: + +- Starting from `process.cwd()` (or some other directory defined by the `searchFrom` argument to [`search()`]), look for configuration objects in the following places: + 1. A `goldengrahams` property in a `package.json` file. + 2. A `.goldengrahamsrc` file with JSON or YAML syntax. + 3. A `.goldengrahamsrc.json`, `.goldengrahamsrc.yaml`, `.goldengrahamsrc.yml`, `.goldengrahamsrc.js`, `.goldengrahamsrc.ts`, `.goldengrahamsrc.mjs`, or `.goldengrahamsrc.cjs` file. (To learn more about how JS files are loaded, see ["Loading JS modules"].) + 4. A `goldengrahamsrc`, `goldengrahamsrc.json`, `goldengrahamsrc.yaml`, `goldengrahamsrc.yml`, `goldengrahamsrc.js`, `goldengrahamsrc.ts`, `goldengrahamsrc.mjs`, or `goldengrahamsrc.cjs` file in the `.config` subdirectory. + 5. A `goldengrahams.config.js`, `goldengrahams.config.ts`, `goldengrahams.config.mjs`, or `goldengrahams.config.cjs` file. (To learn more about how JS files are loaded, see ["Loading JS modules"].) +- If none of those searches reveal a configuration object, continue depending on the current search strategy: + - If it's `none` (which is the default if you don't specify a [`stopDir`] option), stop here and return/resolve with `null`. + - If it's `global` (which is the default if you specify a [`stopDir`] option), move up one directory level and try again, + recursing until arriving at the configured [`stopDir`] option, which defaults to the user's home directory. + - After arriving at the [`stopDir`], the global configuration directory (as defined by [`env-paths`] without prefix) is also checked, + looking at the files `config`, `config.json`, `config.yaml`, `config.yml`, `config.js`, `config.ts`, `config.cjs`, and `config.mjs` + in the directory `~/.config/goldengrahams/` (on Linux; see [`env-paths`] documentation for other OSs). + - If it's `project`, check whether a `package.json` file is present in the current directory, and if not, + move up one directory level and try again, recursing until there is one. +- If at any point a parsable configuration is found, the [`search()`] Promise resolves with its [result] \(or, with [`explorerSync.search()`], the [result] is returned). +- If no configuration object is found, the [`search()`] Promise resolves with `null` (or, with [`explorerSync.search()`], `null` is returned). +- If a configuration object is found *but is malformed* (causing a parsing error), the [`search()`] Promise rejects with that error (so you should `.catch()` it). (Or, with [`explorerSync.search()`], the error is thrown.) + +**If you know exactly where your configuration file should be, you can use [`load()`], instead.** + +**The search process is highly customizable.** +Use the cosmiconfig options [`searchPlaces`] and [`loaders`] to precisely define where you want to look for configurations and how you want to load them. + +#### searchFrom + +Type: `string`. +Default: `process.cwd()`. + +A filename. +[`search()`] will start its search here. + +If the value is a directory, that's where the search starts. +If it's a file, the search starts in that file's directory. + +### explorer.load() + +```js +explorer.load(loadPath).then(result => { /* ... */ }) +``` + +Loads a configuration file. Returns a Promise that resolves with a [result] or rejects with an error (if the file does not exist or cannot be loaded). + +Use `load` if you already know where the configuration file is and you just need to load it. + +```js +explorer.load('load/this/file.json'); // Tries to load load/this/file.json. +``` + +If you load a `package.json` file, the result will be derived from whatever property is specified as your [`packageProp`]. +`package.yaml` will work as well if you specify these file names in your [`searchPlaces`]. + +You can do the same thing synchronously with [`explorerSync.load()`]. + +### explorer.clearLoadCache() + +Clears the cache used in [`load()`]. + +### explorer.clearSearchCache() + +Clears the cache used in [`search()`]. + +### explorer.clearCaches() + +Performs both [`clearLoadCache()`] and [`clearSearchCache()`]. + +## Synchronous API + +### cosmiconfigSync() + +```js +const { cosmiconfigSync } = require('cosmiconfig'); +const explorerSync = cosmiconfigSync(moduleName, /* optional */ cosmiconfigOptions) +``` + +Creates a *synchronous* cosmiconfig instance ("explorerSync") configured according to the arguments, and initializes its caches. + +See [`cosmiconfig()`](#cosmiconfig-1). + +### explorerSync.search() + +```js +const result = explorerSync.search([searchFrom]); +``` + +Synchronous version of [`explorer.search()`]. + +Returns a [result] or `null`. + +### explorerSync.load() + +```js +const result = explorerSync.load(loadPath); +``` + +Synchronous version of [`explorer.load()`]. + +Returns a [result]. + +### explorerSync.clearLoadCache() + +Clears the cache used in [`load()`]. + +### explorerSync.clearSearchCache() + +Clears the cache used in [`search()`]. + +### explorerSync.clearCaches() + +Performs both [`clearLoadCache()`] and [`clearSearchCache()`]. + +## cosmiconfigOptions + +Type: `Object`. + +Possible options are documented below. + +### searchStrategy + +Type: `string` +Default: `global` if [`stopDir`] is specified, `none` otherwise. + +The strategy that should be used to determine which directories to check for configuration files. + +- `none`: Only checks in the current working directory. +- `project`: Starts in the current working directory, traversing upwards until a `package.{json,yaml}` file is found. +- `global`: Starts in the current working directory, traversing upwards until the configured [`stopDir`] + (or the current user's home directory if none is given). Then, if no configuration is found, also look in the + operating system's default configuration directory (according to [`env-paths`] without prefix), + where a different set of file names is checked: + +```js +[ + `config`, + `config.json`, + `config.yaml`, + `config.yml`, + `config.js`, + `config.ts`, + `config.cjs`, + `config.mjs` +] +``` + +### searchPlaces + +Type: `Array`. +Default: See below. + +An array of places that [`search()`] will check in each directory as it moves up the directory tree. +Each place is relative to the directory being searched, and the places are checked in the specified order. + +**Default `searchPlaces`:** + +For the [asynchronous API](#asynchronous-api), these are the default `searchPlaces`: + +```js +[ + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.mjs`, + `.${moduleName}rc.cjs`, + `.config/${moduleName}rc`, + `.config/${moduleName}rc.json`, + `.config/${moduleName}rc.yaml`, + `.config/${moduleName}rc.yml`, + `.config/${moduleName}rc.js`, + `.config/${moduleName}rc.ts`, + `.config/${moduleName}rc.mjs`, + `.config/${moduleName}rc.cjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.mjs`, + `${moduleName}.config.cjs`, +]; +``` + +For the [synchronous API](#synchronous-api), the only difference is that `.mjs` files are not included. See ["Loading JS modules"] for more information. + +Create your own array to search more, fewer, or altogether different places. + +Every item in `searchPlaces` needs to have a loader in [`loaders`] that corresponds to its extension. +(Common extensions are covered by default loaders.) +Read more about [`loaders`] below. + +`package.json` is a special value: When it is included in `searchPlaces`, Cosmiconfig will always parse it as JSON and load a property within it, not the whole file. +That property is defined with the [`packageProp`] option, and defaults to your module name. + +`package.yaml` (used by pnpm) works the same way. + +Examples, with a module named `porgy`: + +```js +// Disallow extensions on rc files: +['package.json', '.porgyrc', 'porgy.config.js'] +``` + +```js +// Limit the options dramatically: +['package.json', '.porgyrc'] +``` + +```js +// Maybe you want to look for a wide variety of JS flavors: +[ + 'porgy.config.js', + 'porgy.config.mjs', + 'porgy.config.ts', + 'porgy.config.coffee' +] +// ^^ You will need to designate a custom loader to tell +// Cosmiconfig how to handle `.coffee` files. +``` + +```js +// Look within a .config/ subdirectory of every searched directory: +[ + 'package.json', + '.porgyrc', + '.config/.porgyrc', + '.porgyrc.json', + '.config/.porgyrc.json' +] +``` + +### loaders + +Type: `Object`. +Default: See below. + +An object that maps extensions to the loader functions responsible for loading and parsing files with those extensions. + +Cosmiconfig exposes its default loaders on the named export `defaultLoaders` and `defaultLoadersSync`. + +**Default `loaders`:** + +```js +const { defaultLoaders, defaultLoadersSync } = require('cosmiconfig'); + +console.log(Object.entries(defaultLoaders)); +// [ +// [ '.mjs', [Function: loadJs] ], +// [ '.cjs', [Function: loadJs] ], +// [ '.js', [Function: loadJs] ], +// [ '.ts', [Function: loadTs] ], +// [ '.json', [Function: loadJson] ], +// [ '.yaml', [Function: loadYaml] ], +// [ '.yml', [Function: loadYaml] ], +// [ 'noExt', [Function: loadYaml] ] +// ] + +console.log(Object.entries(defaultLoadersSync)); +// [ +// [ '.cjs', [Function: loadJsSync] ], +// [ '.js', [Function: loadJsSync] ], +// [ '.ts', [Function: loadTsSync] ], +// [ '.json', [Function: loadJson] ], +// [ '.yaml', [Function: loadYaml] ], +// [ '.yml', [Function: loadYaml] ], +// [ 'noExt', [Function: loadYaml] ] +// ] +``` + +(YAML is a superset of JSON; which means YAML parsers can parse JSON; which is how extensionless files can be either YAML *or* JSON with only one parser.) + +**If you provide a `loaders` object, your object will be *merged* with the defaults.** +So you can override one or two without having to override them all. + +**Keys in `loaders`** are extensions (starting with a period), or `noExt` to specify the loader for files *without* extensions, like `.myapprc`. + +**Values in `loaders`** are a loader function (described below) whose values are loader functions. + +**The most common use case for custom loaders value is to load extensionless `rc` files as strict JSON**, instead of JSON *or* YAML (the default). +To accomplish that, provide the following `loaders` value: + +```js +{ + noExt: defaultLoaders['.json']; +} +``` + +If you want to load files that are not handled by the loader functions Cosmiconfig exposes, you can write a custom loader function or use one from NPM if it exists. + +**Use cases for custom loader function:** + +- Allow configuration syntaxes that aren't handled by Cosmiconfig's defaults, like JSON5, INI, or XML. +- Parse JS files with Babel before deriving the configuration. + +**Custom loader functions** have the following signature: + +```ts +// Sync +type SyncLoader = (filepath: string, content: string) => Object | null + +// Async +type AsyncLoader = (filepath: string, content: string) => Object | null | Promise +``` + +Cosmiconfig reads the file when it checks whether the file exists, so it will provide you with both the file's path and its content. +Do whatever you need to, and return either a configuration object or `null` (or, for async-only loaders, a Promise that resolves with one of those). +`null` indicates that no real configuration was found and the search should continue. + +A few things to note: + +- If you use a custom loader, be aware of whether it's sync or async: you cannot use async customer loaders with the sync API ([`cosmiconfigSync()`]). +- **Special JS syntax can also be handled by using a `require` hook**, because `defaultLoaders['.js']` just uses `require`. + Whether you use custom loaders or a `require` hook is up to you. + +Examples: + +```js +// Allow JSON5 syntax: +cosmiconfig('foo', { + loaders: { + '.json': json5Loader + } +}); + +// Allow a special configuration syntax of your own creation: +cosmiconfig('foo', { + loaders: { + '.special': specialLoader + } +}); + +// Allow many flavors of JS, using custom loaders: +cosmiconfig('foo', { + loaders: { + '.coffee': coffeeScriptLoader + } +}); + +// Allow many flavors of JS but rely on require hooks: +cosmiconfig('foo', { + loaders: { + '.coffee': defaultLoaders['.js'] + } +}); +``` + +### packageProp + +Type: `string | Array`. +Default: `` `${moduleName}` ``. + +Name of the property in `package.json` (or `package.yaml`) to look for. + +Use a period-delimited string or an array of strings to describe a path to nested properties. + +For example, the value `'configs.myPackage'` or `['configs', 'myPackage']` will get you the `"myPackage"` value in a `package.json` like this: + +```json +{ + "configs": { + "myPackage": {"option": "value"} + } +} +``` + +If nested property names within the path include periods, you need to use an array of strings. For example, the value `['configs', 'foo.bar', 'baz']` will get you the `"baz"` value in a `package.json` like this: + +```json +{ + "configs": { + "foo.bar": { + "baz": {"option": "value"} + } + } +} +``` + +If a string includes period but corresponds to a top-level property name, it will not be interpreted as a period-delimited path. For example, the value `'one.two'` will get you the `"three"` value in a `package.json` like this: + +```json +{ + "one.two": "three", + "one": { + "two": "four" + } +} +``` + +### stopDir + +Type: `string`. +Default: Absolute path to your home directory. + +Directory where the search will stop. + +### cache + +Type: `boolean`. +Default: `true`. + +If `false`, no caches will be used. +Read more about ["Caching"](#caching) below. + +### transform + +Type: `(Result) => Promise | Result`. + +A function that transforms the parsed configuration. Receives the [result]. + +If using [`search()`] or [`load()`] \(which are async), the transform function can return the transformed result or return a Promise that resolves with the transformed result. +If using `cosmiconfigSync`, [`search()`] or [`load()`], the function must be synchronous and return the transformed result. + +The reason you might use this option — instead of simply applying your transform function some other way — is that *the transformed result will be cached*. If your transformation involves additional filesystem I/O or other potentially slow processing, you can use this option to avoid repeating those steps every time a given configuration is searched or loaded. + +### ignoreEmptySearchPlaces + +Type: `boolean`. +Default: `true`. + +By default, if [`search()`] encounters an empty file (containing nothing but whitespace) in one of the [`searchPlaces`], it will ignore the empty file and move on. +If you'd like to load empty configuration files, instead, set this option to `false`. + +Why might you want to load empty configuration files? +If you want to throw an error, or if an empty configuration file means something to your program. + +## Loading JS modules + +Your end users can provide JS configuration files as ECMAScript modules (ESM) under the following conditions: + +- You (the cosmiconfig user) use cosmiconfig's [asynchronous API](#asynchronous-api). +- Your end user runs a version of Node that supports ESM ([>=12.17.0](https://nodejs.org/en/blog/release/v12.17.0/), or earlier with the `--experimental-modules` flag). +- Your end user provides an `.mjs` configuration file, or a `.js` file whose nearest parent `package.json` file contains `"type": "module"`. (See [Node's method for determining a file's module system](https://nodejs.org/api/packages.html#packages_determining_module_system).) + +With cosmiconfig's [asynchronous API](#asynchronous-api), the default [`searchPlaces`] include `.js`, `.ts`, `.mjs`, and `.cjs` files. Cosmiconfig loads all these file types with the [dynamic `import` function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports). + +With the [synchronous API](#synchronous-api), JS configuration files are always treated as CommonJS, and `.mjs` files are ignored, because there is no synchronous API for the dynamic `import` function. + +## Caching + +As of v2, cosmiconfig uses caching to reduce the need for repetitious reading of the filesystem or expensive transforms. Every new cosmiconfig instance (created with `cosmiconfig()`) has its own caches. + +To avoid or work around caching, you can do the following: + +- Set the `cosmiconfig` option [`cache`] to `false`. +- Use the cache-clearing methods [`clearLoadCache()`], [`clearSearchCache()`], and [`clearCaches()`]. +- Create separate instances of cosmiconfig (separate "explorers"). + +## Differences from [rc](https://github.com/dominictarr/rc) + +[rc](https://github.com/dominictarr/rc) serves its focused purpose well. cosmiconfig differs in a few key ways — making it more useful for some projects, less useful for others: + +- Looks for configuration in some different places: in a `package.json` property, an rc file, a `.config.js` file, and rc files with extensions. +- Built-in support for JSON, YAML, and CommonJS formats. +- Stops at the first configuration found, instead of finding all that can be found up the directory tree and merging them automatically. +- Options. +- Asynchronous by default (though can be run synchronously). + +## Usage for end users + +When configuring a tool, you can use multiple file formats and put these in multiple places. + +Usually, a tool would mention this in its own README file, +but by default, these are the following places, where `{NAME}` represents the name of the tool: + +``` +package.json +.{NAME}rc +.{NAME}rc.json +.{NAME}rc.yaml +.{NAME}rc.yml +.{NAME}rc.js +.{NAME}rc.ts +.{NAME}rc.cjs +.config/{NAME}rc +.config/{NAME}rc.json +.config/{NAME}rc.yaml +.config/{NAME}rc.yml +.config/{NAME}rc.js +.config/{NAME}rc.ts +.config/{NAME}rc.mjs +.config/{NAME}rc.cjs +{NAME}.config.js +{NAME}.config.ts +{NAME}.config.mjs +{NAME}.config.cjs +``` + +The contents of these files are defined by the tool. +For example, you can configure prettier to enforce semicolons at the end of the line +using a file named `.config/prettierrc.yml`: + +```yaml +semi: true +``` + +Additionally, you have the option to put a property named after the tool in your `package.json` file, +with the contents of that property being the same as the file contents. To use the same example as above: + +```json +{ + "name": "your-project", + "dependencies": {}, + "prettier": { + "semi": true + } +} +``` + +This has the advantage that you can put the configuration of all tools +(at least the ones that use cosmiconfig) in one file. + +You can also add a `cosmiconfig` key within your `package.json` file or create one of the following files +to configure `cosmiconfig` itself: + +``` +.config/config.json +.config/config.yaml +.config/config.yml +.config/config.js +.config/config.ts +.config/config.cjs +``` + +The following properties are currently actively supported in these places: + +```yaml +cosmiconfig: + # adds places where configuration files are being searched + searchPlaces: + - .config/{name}.yml + # to enforce a custom naming convention and format, don't merge the above with the tool-defined search places + # (`true` is the default setting) + mergeSearchPlaces: false +``` + +> **Note:** technically, you can overwrite all options described in [cosmiconfigOptions](#cosmiconfigoptions) here, +> but everything not listed above should be used at your own risk, as it has not been tested explicitly. +> The only exceptions to this are the `loaders` property, which is explicitly not supported at this time, +> and the `searchStrategy` property, which is intentionally disallowed. + +You can also add more root properties outside the `cosmiconfig` property +to configure your tools, entirely eliminating the need to look for additional configuration files: + +```yaml +cosmiconfig: + searchPlaces: [] + +prettier: + semi: true +``` + +### Imports + +Wherever you put your configuration (the package.json file, a root config file or a package-specific config file), +you can use the special `$import` key to import another file as a base. + +For example, you can import from an npm package (in this example, `@foocorp/config`). + +`.prettierrc.base.yml` in said npm package could define some company-wide defaults: + +```yaml +printWidth: 120 +semi: true +tabWidth: 2 +``` + +And then, the `.prettierrc.yml` file in the project itself would just reference that file, +optionally overriding the defaults with project-specific settings: + +```yaml +$import: node_modules/@foocorp/config/.prettierrc.base.yml +# we want more space! +printWidth: 200 +``` + +It is possible to import multiple base files by specifying an array of paths, +which will be processed in declaration order; +that means that the last entry will win if there are conflicting properties. + +It is also possible to import file formats other than the importing format +as long as they are supported by the loaders specified by the developer of the tool you're configuring. + +```yaml +$import: [first.yml, second.json, third.config.js] +``` + +## Contributing & Development + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + +And please do participate! + +[result]: #result + +[`load()`]: #explorerload + +[`search()`]: #explorersearch + +[`clearloadcache()`]: #explorerclearloadcache + +[`clearsearchcache()`]: #explorerclearsearchcache + +[`cosmiconfig()`]: #cosmiconfig + +[`cosmiconfigSync()`]: #cosmiconfigsync + +[`clearcaches()`]: #explorerclearcaches + +[`packageprop`]: #packageprop + +[`cache`]: #cache + +[`stopdir`]: #stopdir + +[`searchplaces`]: #searchplaces + +[`loaders`]: #loaders + +[`cosmiconfigoptions`]: #cosmiconfigoptions + +[`explorerSync.search()`]: #explorersyncsearch + +[`explorerSync.load()`]: #explorersyncload + +[`explorer.search()`]: #explorersearch + +[`explorer.load()`]: #explorerload + +["Loading JS modules"]: #loading-js-modules + +[`env-paths`]: https://github.com/sindresorhus/env-paths + +[search strategies]: #searchstrategy diff --git a/node_modules/cosmiconfig/dist/Explorer.d.ts b/node_modules/cosmiconfig/dist/Explorer.d.ts new file mode 100644 index 000000000..38da5667d --- /dev/null +++ b/node_modules/cosmiconfig/dist/Explorer.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Explorer.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/Explorer.js b/node_modules/cosmiconfig/dist/Explorer.js new file mode 100644 index 000000000..2703a35dc --- /dev/null +++ b/node_modules/cosmiconfig/dist/Explorer.js @@ -0,0 +1,174 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Explorer = void 0; +const promises_1 = __importDefault(require("fs/promises")); +const path_1 = __importDefault(require("path")); +const defaults_1 = require("./defaults"); +const ExplorerBase_js_1 = require("./ExplorerBase.js"); +const merge_1 = require("./merge"); +const util_js_1 = require("./util.js"); +/** + * @internal + */ +class Explorer extends ExplorerBase_js_1.ExplorerBase { + async load(filepath) { + filepath = path_1.default.resolve(filepath); + const load = async () => { + return await this.config.transform(await this.#readConfiguration(filepath)); + }; + if (this.loadCache) { + return await (0, util_js_1.emplace)(this.loadCache, filepath, load); + } + return await load(); + } + async search(from = '') { + if (this.config.metaConfigFilePath) { + this.loadingMetaConfig = true; + const config = await this.load(this.config.metaConfigFilePath); + this.loadingMetaConfig = false; + if (config && !config.isEmpty) { + return config; + } + } + from = path_1.default.resolve(from); + const dirs = this.#getDirs(from); + const firstDirIter = await dirs.next(); + /* istanbul ignore if -- @preserve */ + if (firstDirIter.done) { + // this should never happen + throw new Error(`Could not find any folders to iterate through (start from ${from})`); + } + let currentDir = firstDirIter.value; + const search = async () => { + /* istanbul ignore if -- @preserve */ + if (await (0, util_js_1.isDirectory)(currentDir.path)) { + for (const filepath of this.getSearchPlacesForDir(currentDir, defaults_1.globalConfigSearchPlaces)) { + try { + const result = await this.#readConfiguration(filepath); + if (result !== null && + !(result.isEmpty && this.config.ignoreEmptySearchPlaces)) { + return await this.config.transform(result); + } + } + catch (error) { + if (error.code === 'ENOENT' || + error.code === 'EISDIR' || + error.code === 'ENOTDIR' || + error.code === 'EACCES') { + continue; + } + throw error; + } + } + } + const nextDirIter = await dirs.next(); + if (!nextDirIter.done) { + currentDir = nextDirIter.value; + if (this.searchCache) { + return await (0, util_js_1.emplace)(this.searchCache, currentDir.path, search); + } + return await search(); + } + return await this.config.transform(null); + }; + if (this.searchCache) { + return await (0, util_js_1.emplace)(this.searchCache, from, search); + } + return await search(); + } + async #readConfiguration(filepath, importStack = []) { + const contents = await promises_1.default.readFile(filepath, { encoding: 'utf-8' }); + return this.toCosmiconfigResult(filepath, await this.#loadConfigFileWithImports(filepath, contents, importStack)); + } + async #loadConfigFileWithImports(filepath, contents, importStack) { + const loadedContent = await this.#loadConfiguration(filepath, contents); + if (!loadedContent || !(0, merge_1.hasOwn)(loadedContent, '$import')) { + return loadedContent; + } + const fileDirectory = path_1.default.dirname(filepath); + const { $import: imports, ...ownContent } = loadedContent; + const importPaths = Array.isArray(imports) ? imports : [imports]; + const newImportStack = [...importStack, filepath]; + this.validateImports(filepath, importPaths, newImportStack); + const importedConfigs = await Promise.all(importPaths.map(async (importPath) => { + const fullPath = path_1.default.resolve(fileDirectory, importPath); + const result = await this.#readConfiguration(fullPath, newImportStack); + return result?.config; + })); + return (0, merge_1.mergeAll)([...importedConfigs, ownContent], { + mergeArrays: this.config.mergeImportArrays, + }); + } + async #loadConfiguration(filepath, contents) { + if (contents.trim() === '') { + return; + } + const extension = path_1.default.extname(filepath); + const loader = this.config.loaders[extension || 'noExt'] ?? + this.config.loaders['default']; + if (!loader) { + throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`); + } + try { + const loadedContents = await loader(filepath, contents); + if (path_1.default.basename(filepath, extension) !== 'package') { + return loadedContents; + } + return ((0, util_js_1.getPropertyByPath)(loadedContents, this.config.packageProp ?? this.config.moduleName) ?? null); + } + catch (error) { + error.filepath = filepath; + throw error; + } + } + async #fileExists(path) { + try { + await promises_1.default.stat(path); + return true; + } + catch (e) { + return false; + } + } + async *#getDirs(startDir) { + switch (this.config.searchStrategy) { + case 'none': { + // only check in the passed directory (defaults to working directory) + yield { path: startDir, isGlobalConfig: false }; + return; + } + case 'project': { + let currentDir = startDir; + while (true) { + yield { path: currentDir, isGlobalConfig: false }; + let foundPackageFile = false; + for (const ext of ['json', 'yaml']) { + const packageFile = path_1.default.join(currentDir, `package.${ext}`); + if (await this.#fileExists(packageFile)) { + foundPackageFile = true; + break; + } + } + if (foundPackageFile) { + return; + } + const parentDir = path_1.default.dirname(currentDir); + /* istanbul ignore if -- @preserve */ + if (parentDir === currentDir) { + // we're probably at the root of the directory structure + return; + } + currentDir = parentDir; + } + } + case 'global': { + yield* this.getGlobalDirs(startDir); + } + } + } +} +exports.Explorer = Explorer; +//# sourceMappingURL=Explorer.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerBase.d.ts b/node_modules/cosmiconfig/dist/ExplorerBase.d.ts new file mode 100644 index 000000000..6a73371fe --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerBase.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ExplorerBase.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerBase.js b/node_modules/cosmiconfig/dist/ExplorerBase.js new file mode 100644 index 000000000..1a977c1d4 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerBase.js @@ -0,0 +1,126 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExplorerBase = void 0; +exports.getExtensionDescription = getExtensionDescription; +const env_paths_1 = __importDefault(require("env-paths")); +const os_1 = __importDefault(require("os")); +const path_1 = __importDefault(require("path")); +const util_js_1 = require("./util.js"); +/** + * @internal + */ +class ExplorerBase { + #loadingMetaConfig = false; + config; + loadCache; + searchCache; + constructor(options) { + this.config = options; + if (options.cache) { + this.loadCache = new Map(); + this.searchCache = new Map(); + } + this.#validateConfig(); + } + set loadingMetaConfig(value) { + this.#loadingMetaConfig = value; + } + #validateConfig() { + const config = this.config; + for (const place of config.searchPlaces) { + const extension = path_1.default.extname(place); + const loader = this.config.loaders[extension || 'noExt'] ?? + this.config.loaders['default']; + if (loader === undefined) { + throw new Error(`Missing loader for ${getExtensionDescription(place)}.`); + } + if (typeof loader !== 'function') { + throw new Error(`Loader for ${getExtensionDescription(place)} is not a function: Received ${typeof loader}.`); + } + } + } + clearLoadCache() { + if (this.loadCache) { + this.loadCache.clear(); + } + } + clearSearchCache() { + if (this.searchCache) { + this.searchCache.clear(); + } + } + clearCaches() { + this.clearLoadCache(); + this.clearSearchCache(); + } + toCosmiconfigResult(filepath, config) { + if (config === null) { + return null; + } + if (config === undefined) { + return { filepath, config: undefined, isEmpty: true }; + } + if (this.config.applyPackagePropertyPathToConfiguration || + this.#loadingMetaConfig) { + const packageProp = this.config.packageProp ?? this.config.moduleName; + config = (0, util_js_1.getPropertyByPath)(config, packageProp); + } + if (config === undefined) { + return { filepath, config: undefined, isEmpty: true }; + } + return { config, filepath }; + } + validateImports(containingFilePath, imports, importStack) { + const fileDirectory = path_1.default.dirname(containingFilePath); + for (const importPath of imports) { + if (typeof importPath !== 'string') { + throw new Error(`${containingFilePath}: Key $import must contain a string or a list of strings`); + } + const fullPath = path_1.default.resolve(fileDirectory, importPath); + if (fullPath === containingFilePath) { + throw new Error(`Self-import detected in ${containingFilePath}`); + } + const idx = importStack.indexOf(fullPath); + if (idx !== -1) { + throw new Error(`Circular import detected: +${[...importStack, fullPath] + .map((path, i) => `${i + 1}. ${path}`) + .join('\n')} (same as ${idx + 1}.)`); + } + } + } + getSearchPlacesForDir(dir, globalConfigPlaces) { + return (dir.isGlobalConfig ? globalConfigPlaces : this.config.searchPlaces).map((place) => path_1.default.join(dir.path, place)); + } + getGlobalConfigDir() { + return (0, env_paths_1.default)(this.config.moduleName, { suffix: '' }).config; + } + *getGlobalDirs(startDir) { + const stopDir = path_1.default.resolve(this.config.stopDir ?? os_1.default.homedir()); + yield { path: startDir, isGlobalConfig: false }; + let currentDir = startDir; + while (currentDir !== stopDir) { + const parentDir = path_1.default.dirname(currentDir); + /* istanbul ignore if -- @preserve */ + if (parentDir === currentDir) { + // we're probably at the root of the directory structure + break; + } + yield { path: parentDir, isGlobalConfig: false }; + currentDir = parentDir; + } + yield { path: this.getGlobalConfigDir(), isGlobalConfig: true }; + } +} +exports.ExplorerBase = ExplorerBase; +/** + * @internal + */ +function getExtensionDescription(extension) { + /* istanbul ignore next -- @preserve */ + return extension ? `extension "${extension}"` : 'files without extensions'; +} +//# sourceMappingURL=ExplorerBase.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerSync.d.ts b/node_modules/cosmiconfig/dist/ExplorerSync.d.ts new file mode 100644 index 000000000..3194cb151 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerSync.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ExplorerSync.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerSync.js b/node_modules/cosmiconfig/dist/ExplorerSync.js new file mode 100644 index 000000000..61ec2b2b9 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerSync.js @@ -0,0 +1,188 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExplorerSync = void 0; +const fs_1 = __importDefault(require("fs")); +const path_1 = __importDefault(require("path")); +const defaults_1 = require("./defaults"); +const ExplorerBase_js_1 = require("./ExplorerBase.js"); +const merge_1 = require("./merge"); +const util_js_1 = require("./util.js"); +/** + * @internal + */ +class ExplorerSync extends ExplorerBase_js_1.ExplorerBase { + load(filepath) { + filepath = path_1.default.resolve(filepath); + const load = () => { + return this.config.transform(this.#readConfiguration(filepath)); + }; + if (this.loadCache) { + return (0, util_js_1.emplace)(this.loadCache, filepath, load); + } + return load(); + } + search(from = '') { + if (this.config.metaConfigFilePath) { + this.loadingMetaConfig = true; + const config = this.load(this.config.metaConfigFilePath); + this.loadingMetaConfig = false; + if (config && !config.isEmpty) { + return config; + } + } + from = path_1.default.resolve(from); + const dirs = this.#getDirs(from); + const firstDirIter = dirs.next(); + /* istanbul ignore if -- @preserve */ + if (firstDirIter.done) { + // this should never happen + throw new Error(`Could not find any folders to iterate through (start from ${from})`); + } + let currentDir = firstDirIter.value; + const search = () => { + /* istanbul ignore if -- @preserve */ + if ((0, util_js_1.isDirectorySync)(currentDir.path)) { + for (const filepath of this.getSearchPlacesForDir(currentDir, defaults_1.globalConfigSearchPlacesSync)) { + try { + const result = this.#readConfiguration(filepath); + if (result !== null && + !(result.isEmpty && this.config.ignoreEmptySearchPlaces)) { + return this.config.transform(result); + } + } + catch (error) { + if (error.code === 'ENOENT' || + error.code === 'EISDIR' || + error.code === 'ENOTDIR' || + error.code === 'EACCES') { + continue; + } + throw error; + } + } + } + const nextDirIter = dirs.next(); + if (!nextDirIter.done) { + currentDir = nextDirIter.value; + if (this.searchCache) { + return (0, util_js_1.emplace)(this.searchCache, currentDir.path, search); + } + return search(); + } + return this.config.transform(null); + }; + if (this.searchCache) { + return (0, util_js_1.emplace)(this.searchCache, from, search); + } + return search(); + } + #readConfiguration(filepath, importStack = []) { + const contents = fs_1.default.readFileSync(filepath, 'utf8'); + return this.toCosmiconfigResult(filepath, this.#loadConfigFileWithImports(filepath, contents, importStack)); + } + #loadConfigFileWithImports(filepath, contents, importStack) { + const loadedContent = this.#loadConfiguration(filepath, contents); + if (!loadedContent || !(0, merge_1.hasOwn)(loadedContent, '$import')) { + return loadedContent; + } + const fileDirectory = path_1.default.dirname(filepath); + const { $import: imports, ...ownContent } = loadedContent; + const importPaths = Array.isArray(imports) ? imports : [imports]; + const newImportStack = [...importStack, filepath]; + this.validateImports(filepath, importPaths, newImportStack); + const importedConfigs = importPaths.map((importPath) => { + const fullPath = path_1.default.resolve(fileDirectory, importPath); + const result = this.#readConfiguration(fullPath, newImportStack); + return result?.config; + }); + return (0, merge_1.mergeAll)([...importedConfigs, ownContent], { + mergeArrays: this.config.mergeImportArrays, + }); + } + #loadConfiguration(filepath, contents) { + if (contents.trim() === '') { + return; + } + const extension = path_1.default.extname(filepath); + const loader = this.config.loaders[extension || 'noExt'] ?? + this.config.loaders['default']; + if (!loader) { + throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`); + } + try { + const loadedContents = loader(filepath, contents); + if (path_1.default.basename(filepath, extension) !== 'package') { + return loadedContents; + } + return ((0, util_js_1.getPropertyByPath)(loadedContents, this.config.packageProp ?? this.config.moduleName) ?? null); + } + catch (error) { + error.filepath = filepath; + throw error; + } + } + #fileExists(path) { + try { + fs_1.default.statSync(path); + return true; + } + catch (e) { + return false; + } + } + *#getDirs(startDir) { + switch (this.config.searchStrategy) { + case 'none': { + // there is no next dir + yield { path: startDir, isGlobalConfig: false }; + return; + } + case 'project': { + let currentDir = startDir; + while (true) { + yield { path: currentDir, isGlobalConfig: false }; + let foundPackageFile = false; + for (const ext of ['json', 'yaml']) { + const packageFile = path_1.default.join(currentDir, `package.${ext}`); + if (this.#fileExists(packageFile)) { + foundPackageFile = true; + break; + } + } + if (foundPackageFile) { + return; + } + const parentDir = path_1.default.dirname(currentDir); + /* istanbul ignore if -- @preserve */ + if (parentDir === currentDir) { + // we're probably at the root of the directory structure + return; + } + currentDir = parentDir; + } + } + case 'global': { + yield* this.getGlobalDirs(startDir); + } + } + } + /** + * @deprecated Use {@link ExplorerSync.prototype.load}. + */ + /* istanbul ignore next */ + loadSync(filepath) { + return this.load(filepath); + } + /** + * @deprecated Use {@link ExplorerSync.prototype.search}. + */ + /* istanbul ignore next */ + searchSync(from = '') { + return this.search(from); + } +} +exports.ExplorerSync = ExplorerSync; +//# sourceMappingURL=ExplorerSync.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/defaults.d.ts b/node_modules/cosmiconfig/dist/defaults.d.ts new file mode 100644 index 000000000..1020ba0f2 --- /dev/null +++ b/node_modules/cosmiconfig/dist/defaults.d.ts @@ -0,0 +1,25 @@ +export declare function getDefaultSearchPlaces(moduleName: string): Array; +export declare function getDefaultSearchPlacesSync(moduleName: string): Array; +export declare const globalConfigSearchPlaces: string[]; +export declare const globalConfigSearchPlacesSync: string[]; +export declare const metaSearchPlaces: string[]; +export declare const defaultLoaders: Readonly<{ + readonly '.mjs': import("./types").Loader; + readonly '.cjs': import("./types").Loader; + readonly '.js': import("./types").Loader; + readonly '.ts': import("./types").Loader; + readonly '.json': import("./types").LoaderSync; + readonly '.yaml': import("./types").LoaderSync; + readonly '.yml': import("./types").LoaderSync; + readonly noExt: import("./types").LoaderSync; +}>; +export declare const defaultLoadersSync: Readonly<{ + readonly '.cjs': import("./types").LoaderSync; + readonly '.js': import("./types").LoaderSync; + readonly '.ts': import("./types").LoaderSync; + readonly '.json': import("./types").LoaderSync; + readonly '.yaml': import("./types").LoaderSync; + readonly '.yml': import("./types").LoaderSync; + readonly noExt: import("./types").LoaderSync; +}>; +//# sourceMappingURL=defaults.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/defaults.js b/node_modules/cosmiconfig/dist/defaults.js new file mode 100644 index 000000000..b9c4a19c4 --- /dev/null +++ b/node_modules/cosmiconfig/dist/defaults.js @@ -0,0 +1,105 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = void 0; +exports.getDefaultSearchPlaces = getDefaultSearchPlaces; +exports.getDefaultSearchPlacesSync = getDefaultSearchPlacesSync; +const loaders_1 = require("./loaders"); +function getDefaultSearchPlaces(moduleName) { + return [ + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.cjs`, + `.${moduleName}rc.mjs`, + `.config/${moduleName}rc`, + `.config/${moduleName}rc.json`, + `.config/${moduleName}rc.yaml`, + `.config/${moduleName}rc.yml`, + `.config/${moduleName}rc.js`, + `.config/${moduleName}rc.ts`, + `.config/${moduleName}rc.cjs`, + `.config/${moduleName}rc.mjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.cjs`, + `${moduleName}.config.mjs`, + ]; +} +function getDefaultSearchPlacesSync(moduleName) { + return [ + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.cjs`, + `.config/${moduleName}rc`, + `.config/${moduleName}rc.json`, + `.config/${moduleName}rc.yaml`, + `.config/${moduleName}rc.yml`, + `.config/${moduleName}rc.js`, + `.config/${moduleName}rc.ts`, + `.config/${moduleName}rc.cjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.cjs`, + ]; +} +exports.globalConfigSearchPlaces = [ + 'config', + 'config.json', + 'config.yaml', + 'config.yml', + 'config.js', + 'config.ts', + 'config.cjs', + 'config.mjs', +]; +exports.globalConfigSearchPlacesSync = [ + 'config', + 'config.json', + 'config.yaml', + 'config.yml', + 'config.js', + 'config.ts', + 'config.cjs', +]; +// this needs to be hardcoded, as this is intended for end users, who can't supply options at this point +exports.metaSearchPlaces = [ + 'package.json', + 'package.yaml', + '.config/config.json', + '.config/config.yaml', + '.config/config.yml', + '.config/config.js', + '.config/config.ts', + '.config/config.cjs', + '.config/config.mjs', +]; +// do not allow mutation of default loaders. Make sure it is set inside options +exports.defaultLoaders = Object.freeze({ + '.mjs': loaders_1.loadJs, + '.cjs': loaders_1.loadJs, + '.js': loaders_1.loadJs, + '.ts': loaders_1.loadTs, + '.json': loaders_1.loadJson, + '.yaml': loaders_1.loadYaml, + '.yml': loaders_1.loadYaml, + noExt: loaders_1.loadYaml, +}); +exports.defaultLoadersSync = Object.freeze({ + '.cjs': loaders_1.loadJsSync, + '.js': loaders_1.loadJsSync, + '.ts': loaders_1.loadTsSync, + '.json': loaders_1.loadJson, + '.yaml': loaders_1.loadYaml, + '.yml': loaders_1.loadYaml, + noExt: loaders_1.loadYaml, +}); +//# sourceMappingURL=defaults.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/index.d.ts b/node_modules/cosmiconfig/dist/index.d.ts new file mode 100644 index 000000000..b241da060 --- /dev/null +++ b/node_modules/cosmiconfig/dist/index.d.ts @@ -0,0 +1,6 @@ +import { defaultLoaders, defaultLoadersSync, getDefaultSearchPlaces, getDefaultSearchPlacesSync, globalConfigSearchPlaces, globalConfigSearchPlacesSync } from './defaults'; +import { CommonOptions, Config, CosmiconfigResult, Loader, LoaderResult, Loaders, LoadersSync, LoaderSync, Options, OptionsSync, PublicExplorer, PublicExplorerBase, PublicExplorerSync, SearchStrategy, Transform, TransformSync } from './types.js'; +export declare function cosmiconfig(moduleName: string, options?: Readonly>): PublicExplorer; +export declare function cosmiconfigSync(moduleName: string, options?: Readonly>): PublicExplorerSync; +export { Config, CosmiconfigResult, LoaderResult, Loader, Loaders, LoaderSync, LoadersSync, Transform, TransformSync, SearchStrategy, CommonOptions, Options, OptionsSync, PublicExplorerBase, PublicExplorer, PublicExplorerSync, getDefaultSearchPlaces, getDefaultSearchPlacesSync, globalConfigSearchPlaces, globalConfigSearchPlacesSync, defaultLoaders, defaultLoadersSync, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/index.js b/node_modules/cosmiconfig/dist/index.js new file mode 100644 index 000000000..53b346090 --- /dev/null +++ b/node_modules/cosmiconfig/dist/index.js @@ -0,0 +1,148 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = void 0; +exports.cosmiconfig = cosmiconfig; +exports.cosmiconfigSync = cosmiconfigSync; +const defaults_1 = require("./defaults"); +Object.defineProperty(exports, "defaultLoaders", { enumerable: true, get: function () { return defaults_1.defaultLoaders; } }); +Object.defineProperty(exports, "defaultLoadersSync", { enumerable: true, get: function () { return defaults_1.defaultLoadersSync; } }); +Object.defineProperty(exports, "getDefaultSearchPlaces", { enumerable: true, get: function () { return defaults_1.getDefaultSearchPlaces; } }); +Object.defineProperty(exports, "getDefaultSearchPlacesSync", { enumerable: true, get: function () { return defaults_1.getDefaultSearchPlacesSync; } }); +Object.defineProperty(exports, "globalConfigSearchPlaces", { enumerable: true, get: function () { return defaults_1.globalConfigSearchPlaces; } }); +Object.defineProperty(exports, "globalConfigSearchPlacesSync", { enumerable: true, get: function () { return defaults_1.globalConfigSearchPlacesSync; } }); +const Explorer_js_1 = require("./Explorer.js"); +const ExplorerSync_js_1 = require("./ExplorerSync.js"); +const util_1 = require("./util"); +const identity = function identity(x) { + return x; +}; +function getUserDefinedOptionsFromMetaConfig() { + const metaExplorer = new ExplorerSync_js_1.ExplorerSync({ + moduleName: 'cosmiconfig', + stopDir: process.cwd(), + searchPlaces: defaults_1.metaSearchPlaces, + ignoreEmptySearchPlaces: false, + applyPackagePropertyPathToConfiguration: true, + loaders: defaults_1.defaultLoaders, + transform: identity, + cache: true, + metaConfigFilePath: null, + mergeImportArrays: true, + mergeSearchPlaces: true, + searchStrategy: 'none', + }); + const metaConfig = metaExplorer.search(); + if (!metaConfig) { + return null; + } + if (metaConfig.config?.loaders) { + throw new Error('Can not specify loaders in meta config file'); + } + if (metaConfig.config?.searchStrategy) { + throw new Error('Can not specify searchStrategy in meta config file'); + } + const overrideOptions = { + mergeSearchPlaces: true, + ...(metaConfig.config ?? {}), + }; + return { + config: (0, util_1.removeUndefinedValuesFromObject)(overrideOptions), + filepath: metaConfig.filepath, + }; +} +function getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions) { + const userConfiguredSearchPlaces = userConfiguredOptions.searchPlaces?.map((path) => path.replace('{name}', moduleName)); + if (userConfiguredOptions.mergeSearchPlaces) { + return [...(userConfiguredSearchPlaces ?? []), ...toolDefinedSearchPlaces]; + } + return (userConfiguredSearchPlaces ?? + /* istanbul ignore next */ toolDefinedSearchPlaces); +} +function mergeOptionsBase(moduleName, defaults, options) { + const userDefinedConfig = getUserDefinedOptionsFromMetaConfig(); + if (!userDefinedConfig) { + return { + ...defaults, + ...(0, util_1.removeUndefinedValuesFromObject)(options), + loaders: { + ...defaults.loaders, + ...options.loaders, + }, + }; + } + const userConfiguredOptions = userDefinedConfig.config; + const toolDefinedSearchPlaces = options.searchPlaces ?? defaults.searchPlaces; + return { + ...defaults, + ...(0, util_1.removeUndefinedValuesFromObject)(options), + metaConfigFilePath: userDefinedConfig.filepath, + ...userConfiguredOptions, + searchPlaces: getResolvedSearchPlaces(moduleName, toolDefinedSearchPlaces, userConfiguredOptions), + loaders: { + ...defaults.loaders, + ...options.loaders, + }, + }; +} +function validateOptions(options) { + if (options.searchStrategy != null && + options.searchStrategy !== 'global' && + options.stopDir) { + throw new Error('Can not supply `stopDir` option with `searchStrategy` other than "global"'); + } +} +function mergeOptions(moduleName, options) { + validateOptions(options); + const defaults = { + moduleName, + searchPlaces: (0, defaults_1.getDefaultSearchPlaces)(moduleName), + ignoreEmptySearchPlaces: true, + cache: true, + transform: identity, + loaders: defaults_1.defaultLoaders, + metaConfigFilePath: null, + mergeImportArrays: true, + mergeSearchPlaces: true, + searchStrategy: options.stopDir ? 'global' : 'none', + }; + return mergeOptionsBase(moduleName, defaults, options); +} +function mergeOptionsSync(moduleName, options) { + validateOptions(options); + const defaults = { + moduleName, + searchPlaces: (0, defaults_1.getDefaultSearchPlacesSync)(moduleName), + ignoreEmptySearchPlaces: true, + cache: true, + transform: identity, + loaders: defaults_1.defaultLoadersSync, + metaConfigFilePath: null, + mergeImportArrays: true, + mergeSearchPlaces: true, + searchStrategy: options.stopDir ? 'global' : 'none', + }; + return mergeOptionsBase(moduleName, defaults, options); +} +function cosmiconfig(moduleName, options = {}) { + const normalizedOptions = mergeOptions(moduleName, options); + const explorer = new Explorer_js_1.Explorer(normalizedOptions); + return { + search: explorer.search.bind(explorer), + load: explorer.load.bind(explorer), + clearLoadCache: explorer.clearLoadCache.bind(explorer), + clearSearchCache: explorer.clearSearchCache.bind(explorer), + clearCaches: explorer.clearCaches.bind(explorer), + }; +} +function cosmiconfigSync(moduleName, options = {}) { + const normalizedOptions = mergeOptionsSync(moduleName, options); + const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions); + return { + search: explorerSync.search.bind(explorerSync), + load: explorerSync.load.bind(explorerSync), + clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync), + clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync), + clearCaches: explorerSync.clearCaches.bind(explorerSync), + }; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/loaders.d.ts b/node_modules/cosmiconfig/dist/loaders.d.ts new file mode 100644 index 000000000..96640a530 --- /dev/null +++ b/node_modules/cosmiconfig/dist/loaders.d.ts @@ -0,0 +1,8 @@ +import { Loader, LoaderSync } from './types.js'; +export declare const loadJsSync: LoaderSync; +export declare const loadJs: Loader; +export declare const loadJson: LoaderSync; +export declare const loadYaml: LoaderSync; +export declare const loadTsSync: LoaderSync; +export declare const loadTs: Loader; +//# sourceMappingURL=loaders.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/loaders.js b/node_modules/cosmiconfig/dist/loaders.js new file mode 100644 index 000000000..f0f6d8794 --- /dev/null +++ b/node_modules/cosmiconfig/dist/loaders.js @@ -0,0 +1,150 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-require-imports */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.loadTs = exports.loadTsSync = exports.loadYaml = exports.loadJson = exports.loadJs = exports.loadJsSync = void 0; +const fs_1 = require("fs"); +const promises_1 = require("fs/promises"); +const path_1 = __importDefault(require("path")); +const url_1 = require("url"); +const crypto_1 = require("crypto"); +let importFresh; +const loadJsSync = function loadJsSync(filepath) { + if (importFresh === undefined) { + importFresh = require('import-fresh'); + } + return importFresh(filepath); +}; +exports.loadJsSync = loadJsSync; +const loadJs = async function loadJs(filepath) { + try { + const { href } = (0, url_1.pathToFileURL)(await (0, promises_1.realpath)(filepath)); + return (await import(href)).default; + } + catch (error) { + try { + return (0, exports.loadJsSync)(filepath, ''); + } + catch (requireError) { + /* istanbul ignore next -- @preserve */ + if (requireError.code === 'ERR_REQUIRE_ESM' || + (requireError instanceof SyntaxError && + requireError + .toString() + .includes('Cannot use import statement outside a module'))) { + throw error; + } + throw requireError; + } + } +}; +exports.loadJs = loadJs; +let parseJson; +const loadJson = function loadJson(filepath, content) { + if (parseJson === undefined) { + parseJson = require('parse-json'); + } + try { + return parseJson(content); + } + catch (error) { + error.message = `JSON Error in ${filepath}:\n${error.message}`; + throw error; + } +}; +exports.loadJson = loadJson; +let yaml; +const loadYaml = function loadYaml(filepath, content) { + if (yaml === undefined) { + yaml = require('js-yaml'); + } + try { + return yaml.load(content); + } + catch (error) { + error.message = `YAML Error in ${filepath}:\n${error.message}`; + throw error; + } +}; +exports.loadYaml = loadYaml; +let typescript; +const loadTsSync = function loadTsSync(filepath, content) { + /* istanbul ignore next -- @preserve */ + if (typescript === undefined) { + typescript = require('typescript'); + } + const compiledFilepath = `${filepath}.${(0, crypto_1.randomUUID)()}.cjs`; + try { + const config = resolveTsConfig(path_1.default.dirname(filepath)) ?? {}; + config.compilerOptions = { + ...config.compilerOptions, + module: typescript.ModuleKind.NodeNext, + moduleResolution: typescript.ModuleResolutionKind.NodeNext, + target: typescript.ScriptTarget.ES2022, + noEmit: false, + }; + content = typescript.transpileModule(content, config).outputText; + (0, fs_1.writeFileSync)(compiledFilepath, content); + return (0, exports.loadJsSync)(compiledFilepath, content).default; + } + catch (error) { + error.message = `TypeScript Error in ${filepath}:\n${error.message}`; + throw error; + } + finally { + if ((0, fs_1.existsSync)(compiledFilepath)) { + (0, fs_1.rmSync)(compiledFilepath); + } + } +}; +exports.loadTsSync = loadTsSync; +const loadTs = async function loadTs(filepath, content) { + if (typescript === undefined) { + typescript = (await import('typescript')).default; + } + const compiledFilepath = `${filepath}.${(0, crypto_1.randomUUID)()}.mjs`; + let transpiledContent; + try { + try { + const config = resolveTsConfig(path_1.default.dirname(filepath)) ?? {}; + config.compilerOptions = { + ...config.compilerOptions, + module: typescript.ModuleKind.ES2022, + moduleResolution: typescript.ModuleResolutionKind.Bundler, + target: typescript.ScriptTarget.ES2022, + noEmit: false, + }; + transpiledContent = typescript.transpileModule(content, config).outputText; + await (0, promises_1.writeFile)(compiledFilepath, transpiledContent); + } + catch (error) { + error.message = `TypeScript Error in ${filepath}:\n${error.message}`; + throw error; + } + // eslint-disable-next-line @typescript-eslint/return-await + return await (0, exports.loadJs)(compiledFilepath, transpiledContent); + } + finally { + if ((0, fs_1.existsSync)(compiledFilepath)) { + await (0, promises_1.rm)(compiledFilepath); + } + } +}; +exports.loadTs = loadTs; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function resolveTsConfig(directory) { + const filePath = typescript.findConfigFile(directory, (fileName) => { + return typescript.sys.fileExists(fileName); + }); + if (filePath !== undefined) { + const { config, error } = typescript.readConfigFile(filePath, (path) => typescript.sys.readFile(path)); + if (error) { + throw new Error(`Error in ${filePath}: ${error.messageText.toString()}`); + } + return config; + } + return; +} +//# sourceMappingURL=loaders.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/merge.d.ts b/node_modules/cosmiconfig/dist/merge.d.ts new file mode 100644 index 000000000..0d05f6384 --- /dev/null +++ b/node_modules/cosmiconfig/dist/merge.d.ts @@ -0,0 +1,9 @@ +export declare const hasOwn: (thisArg: any, ...argArray: any[]) => any; +export interface MergeOptions { + mergeArrays: boolean; +} +/** + * Merges multiple objects. Doesn't care about cloning non-primitives, as we load all these objects fresh from a file. + */ +export declare function mergeAll(objects: ReadonlyArray, options: MergeOptions): any; +//# sourceMappingURL=merge.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/merge.js b/node_modules/cosmiconfig/dist/merge.js new file mode 100644 index 000000000..608a81401 --- /dev/null +++ b/node_modules/cosmiconfig/dist/merge.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasOwn = void 0; +exports.mergeAll = mergeAll; +/* eslint-disable @typescript-eslint/unbound-method */ +exports.hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty); +const objToString = Function.prototype.call.bind(Object.prototype.toString); +/* eslint-enable @typescript-eslint/unbound-method */ +function isPlainObject(obj) { + return objToString(obj) === '[object Object]'; +} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function merge(target, source, options) { + for (const key of Object.keys(source)) { + /* istanbul ignore next -- @preserve */ + if (key === '__proto__' || key === 'constructor') { + continue; + } + const newValue = source[key]; + if ((0, exports.hasOwn)(target, key)) { + if (Array.isArray(target[key]) && Array.isArray(newValue)) { + if (options.mergeArrays) { + target[key].push(...newValue); + continue; + } + } + else if (isPlainObject(target[key]) && isPlainObject(newValue)) { + target[key] = merge(target[key], newValue, options); + continue; + } + } + target[key] = newValue; + } + return target; +} +/** + * Merges multiple objects. Doesn't care about cloning non-primitives, as we load all these objects fresh from a file. + */ +function mergeAll( +// eslint-disable-next-line @typescript-eslint/no-explicit-any +objects, options) { + return objects.reduce((target, source) => merge(target, source, options), {}); +} +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/types.d.ts b/node_modules/cosmiconfig/dist/types.d.ts new file mode 100644 index 000000000..a7ddb910d --- /dev/null +++ b/node_modules/cosmiconfig/dist/types.d.ts @@ -0,0 +1,98 @@ +/** + * @public + */ +export type Config = any; +/** + * @public + */ +export type CosmiconfigResult = { + config: Config; + filepath: string; + isEmpty?: boolean; +} | null; +/** + * @public + */ +export type LoaderResult = Config | null; +/** + * @public + */ +export type Loader = ((filepath: string, content: string) => Promise) | LoaderSync; +/** + * @public + */ +export type LoaderSync = (filepath: string, content: string) => LoaderResult; +/** + * @public + */ +export type Transform = ((CosmiconfigResult: CosmiconfigResult) => Promise) | TransformSync; +/** + * @public + */ +export type TransformSync = (CosmiconfigResult: CosmiconfigResult) => CosmiconfigResult; +/** + * @public + */ +export type SearchStrategy = 'none' | 'project' | 'global'; +/** + * @public + */ +export interface CommonOptions { + packageProp?: string | Array; + searchPlaces: Array; + ignoreEmptySearchPlaces: boolean; + stopDir?: string; + cache: boolean; + mergeImportArrays: boolean; + mergeSearchPlaces: boolean; + searchStrategy: SearchStrategy; +} +/** + * @public + */ +export interface Options extends CommonOptions { + loaders: Loaders; + transform: Transform; +} +/** + * @public + */ +export interface OptionsSync extends CommonOptions { + loaders: LoadersSync; + transform: TransformSync; +} +/** + * @public + */ +export interface Loaders { + [key: string]: Loader; +} +/** + * @public + */ +export interface LoadersSync { + [key: string]: LoaderSync; +} +/** + * @public + */ +export interface PublicExplorerBase { + clearLoadCache: () => void; + clearSearchCache: () => void; + clearCaches: () => void; +} +/** + * @public + */ +export interface PublicExplorer extends PublicExplorerBase { + search: (searchFrom?: string) => Promise; + load: (filepath: string) => Promise; +} +/** + * @public + */ +export interface PublicExplorerSync extends PublicExplorerBase { + search: (searchFrom?: string) => CosmiconfigResult; + load: (filepath: string) => CosmiconfigResult; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/types.js b/node_modules/cosmiconfig/dist/types.js new file mode 100644 index 000000000..11e638d1e --- /dev/null +++ b/node_modules/cosmiconfig/dist/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/util.d.ts b/node_modules/cosmiconfig/dist/util.d.ts new file mode 100644 index 000000000..d1849356a --- /dev/null +++ b/node_modules/cosmiconfig/dist/util.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=util.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/util.js b/node_modules/cosmiconfig/dist/util.js new file mode 100644 index 000000000..76c29edbc --- /dev/null +++ b/node_modules/cosmiconfig/dist/util.js @@ -0,0 +1,108 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.emplace = emplace; +exports.getPropertyByPath = getPropertyByPath; +exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject; +exports.isDirectory = isDirectory; +exports.isDirectorySync = isDirectorySync; +const fs_1 = __importStar(require("fs")); +/** + * @internal + */ +function emplace(map, key, fn) { + const cached = map.get(key); + if (cached !== undefined) { + return cached; + } + const result = fn(); + map.set(key, result); + return result; +} +// Resolves property names or property paths defined with period-delimited +// strings or arrays of strings. Property names that are found on the source +// object are used directly (even if they include a period). +// Nested property names that include periods, within a path, are only +// understood in array paths. +/** + * @internal + */ +function getPropertyByPath(source, path) { + if (typeof path === 'string' && + Object.prototype.hasOwnProperty.call(source, path)) { + return source[path]; + } + const parsedPath = typeof path === 'string' ? path.split('.') : path; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return parsedPath.reduce((previous, key) => { + if (previous === undefined) { + return previous; + } + return previous[key]; + }, source); +} +/** @internal */ +function removeUndefinedValuesFromObject(options) { + return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== undefined)); +} +/** @internal */ +/* istanbul ignore next -- @preserve */ +async function isDirectory(path) { + try { + const stat = await fs_1.promises.stat(path); + return stat.isDirectory(); + } + catch (e) { + if (e.code === 'ENOENT') { + return false; + } + throw e; + } +} +/** @internal */ +/* istanbul ignore next -- @preserve */ +function isDirectorySync(path) { + try { + const stat = fs_1.default.statSync(path); + return stat.isDirectory(); + } + catch (e) { + if (e.code === 'ENOENT') { + return false; + } + throw e; + } +} +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/package.json b/node_modules/cosmiconfig/package.json new file mode 100644 index 000000000..1ec2fef3e --- /dev/null +++ b/node_modules/cosmiconfig/package.json @@ -0,0 +1,103 @@ +{ + "name": "cosmiconfig", + "version": "9.0.2", + "description": "Find and load configuration from a package.json property, rc file, TypeScript module, and more!", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist", + "!dist/**/*.map" + ], + "scripts": { + "clean": "git clean -Xdf -e '!node_modules' .", + "build": "npm run build:tsc", + "build:tsc": "cross-env NODE_ENV=production tsc -b", + "dev": "npm run build:tsc -- --watch", + "lint": "eslint --ext .js,.ts .", + "lint:fix": "eslint --ext .js,.ts . --fix", + "lint:md": "remark-preset-davidtheclark", + "format": "prettier \"**/*.{js,ts,json,yml,yaml}\" --write", + "format:md": "remark-preset-davidtheclark --format", + "format:check": "prettier \"**/*.{js,ts,json,yml,yaml}\" --check", + "test": "vitest run --coverage", + "test:watch": "vitest", + "check:all": "npm run test && npm run lint && npm run format:check", + "prepublishOnly": "npm run check:all && npm run build", + "prepare": "husky install" + }, + "lint-staged": { + "*.{js,ts}": [ + "eslint --fix", + "prettier --write" + ], + "*.{json,yml,yaml}": [ + "prettier --write" + ], + "*.md": [ + "remark-preset-davidtheclark", + "remark-preset-davidtheclark --format" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cosmiconfig/cosmiconfig.git" + }, + "keywords": [ + "load", + "configuration", + "config" + ], + "author": "Daniel Fischer ", + "contributors": [ + "Randolf J ", + "David Clark ", + "Bogdan Chadkin ", + "Suhas Karanth " + ], + "funding": "https://github.com/sponsors/d-fischer", + "license": "MIT", + "bugs": { + "url": "https://github.com/cosmiconfig/cosmiconfig/issues" + }, + "homepage": "https://github.com/cosmiconfig/cosmiconfig#readme", + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + }, + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "devDependencies": { + "@types/js-yaml": "^4.0.5", + "@types/node": "^14", + "@types/parse-json": "^4.0.0", + "@typescript-eslint/eslint-plugin": "^6.5.0", + "@typescript-eslint/parser": "^6.5.0", + "@vitest/coverage-istanbul": "^0.34.3", + "cross-env": "^7.0.3", + "eslint": "^8.48.0", + "eslint-config-davidtheclark-node": "^0.2.2", + "eslint-config-prettier": "^9.0.0", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-vitest": "^0.2.8", + "husky": "^8.0.3", + "lint-staged": "^14.0.1", + "parent-module": "^3.0.0", + "prettier": "^3.0.3", + "remark-preset-davidtheclark": "^0.12.0", + "typescript": "^5.2.2", + "vitest": "^0.34.3" + }, + "engines": { + "node": ">=14" + } +} diff --git a/node_modules/debug/CHANGELOG.md b/node_modules/debug/CHANGELOG.md new file mode 100644 index 000000000..820d21e33 --- /dev/null +++ b/node_modules/debug/CHANGELOG.md @@ -0,0 +1,395 @@ + +3.1.0 / 2017-09-26 +================== + + * Add `DEBUG_HIDE_DATE` env var (#486) + * Remove ReDoS regexp in %o formatter (#504) + * Remove "component" from package.json + * Remove `component.json` + * Ignore package-lock.json + * Examples: fix colors printout + * Fix: browser detection + * Fix: spelling mistake (#496, @EdwardBetts) + +3.0.1 / 2017-08-24 +================== + + * Fix: Disable colors in Edge and Internet Explorer (#489) + +3.0.0 / 2017-08-08 +================== + + * Breaking: Remove DEBUG_FD (#406) + * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) + * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) + * Addition: document `enabled` flag (#465) + * Addition: add 256 colors mode (#481) + * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) + * Update: component: update "ms" to v2.0.0 + * Update: separate the Node and Browser tests in Travis-CI + * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots + * Update: separate Node.js and web browser examples for organization + * Update: update "browserify" to v14.4.0 + * Fix: fix Readme typo (#473) + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE new file mode 100644 index 000000000..658c933d2 --- /dev/null +++ b/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +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. + diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md new file mode 100644 index 000000000..0ee7634dd --- /dev/null +++ b/node_modules/debug/README.md @@ -0,0 +1,437 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> + +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. diff --git a/node_modules/debug/node.js b/node_modules/debug/node.js new file mode 100644 index 000000000..7fc36fe6d --- /dev/null +++ b/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json new file mode 100644 index 000000000..191c81547 --- /dev/null +++ b/node_modules/debug/package.json @@ -0,0 +1,51 @@ +{ + "name": "debug", + "version": "3.2.7", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "node.js", + "dist/debug.js", + "LICENSE", + "README.md" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + }, + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "browserify": "14.4.0", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^3.0.2", + "istanbul": "^0.4.5", + "karma": "^3.0.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "xo": "^0.23.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "unpkg": "./dist/debug.js" +} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js new file mode 100644 index 000000000..c924b0ac4 --- /dev/null +++ b/node_modules/debug/src/browser.js @@ -0,0 +1,180 @@ +"use strict"; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +/** + * Colors. + */ + +exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ +// eslint-disable-next-line complexity + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } // Internet Explorer and Edge do not support colors. + + + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + + + return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); +} +/** + * Colorize log arguments if enabled. + * + * @api public + */ + + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function (match) { + if (match === '%%') { + return; + } + + index++; + + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + args.splice(lastC, 0, c); +} +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + +function log() { + var _console; + + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); +} +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } +} +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + +function load() { + var r; + + try { + r = exports.storage.getItem('debug'); + } catch (error) {} // Swallow + // XXX (@Qix-) should we be logging these? + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + + + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); +var formatters = module.exports.formatters; +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js new file mode 100644 index 000000000..e0de3fb53 --- /dev/null +++ b/node_modules/debug/src/common.js @@ -0,0 +1,249 @@ +"use strict"; + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + Object.keys(env).forEach(function (key) { + createDebug[key] = env[key]; + }); + /** + * Active `debug` instances. + */ + + createDebug.instances = []; + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + createDebug.formatters = {}; + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + + function selectColor(namespace) { + var hash = 0; + + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + + createDebug.selectColor = selectColor; + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + var prevTime; + + function debug() { + // Disabled? + if (!debug.enabled) { + return; + } + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var self = debug; // Set `diff` timestamp + + var curr = Number(new Date()); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } // Apply any `formatters` transformations + + + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + + index++; + var formatter = createDebug.formatters[format]; + + if (typeof formatter === 'function') { + var val = args[index]; + match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` + + args.splice(index, 1); + index--; + } + + return match; + }); // Apply env-specific formatting (colors, etc.) + + createDebug.formatArgs.call(self, args); + var logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + // env-specific initialization logic for debug instances + + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + return debug; + } + + function destroy() { + var index = createDebug.instances.indexOf(this); + + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + + return false; + } + + function extend(namespace, delimiter) { + return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + } + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + /** + * Disable debug output. + * + * @api public + */ + + + function disable() { + createDebug.enable(''); + } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + var i; + var len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + + return val; + } + + createDebug.enable(createDebug.load()); + return createDebug; +} + +module.exports = setup; + diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js new file mode 100644 index 000000000..021731593 --- /dev/null +++ b/node_modules/debug/src/index.js @@ -0,0 +1,12 @@ +"use strict"; + +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} + diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js new file mode 100644 index 000000000..1e6a5f16a --- /dev/null +++ b/node_modules/debug/src/node.js @@ -0,0 +1,177 @@ +"use strict"; + +/** + * Module dependencies. + */ +var tty = require('tty'); + +var util = require('util'); +/** + * This is the Node.js implementation of `debug()`. + */ + + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + var supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; + } +} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be. + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // Camel-case + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { + return k.toUpperCase(); + }); // Coerce string value into JS value + + var val = process.env[key]; + + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); +} +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + + +function formatArgs(args) { + var name = this.namespace, + useColors = this.useColors; + + if (useColors) { + var c = this.color; + var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c); + var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m"); + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + + return new Date().toISOString() + ' '; +} +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + + +function log() { + return process.stderr.write(util.format.apply(util, arguments) + '\n'); +} +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + +function load() { + return process.env.DEBUG; +} +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + + +function init(debug) { + debug.inspectOpts = {}; + var keys = Object.keys(exports.inspectOpts); + + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); +var formatters = module.exports.formatters; +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(function (str) { return str.trim(); }) + .join(' '); +}; +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + diff --git a/node_modules/debuglog/LICENSE b/node_modules/debuglog/LICENSE new file mode 100644 index 000000000..a3187cc10 --- /dev/null +++ b/node_modules/debuglog/LICENSE @@ -0,0 +1,19 @@ +Copyright Joyent, Inc. and other Node contributors. 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. diff --git a/node_modules/debuglog/README.md b/node_modules/debuglog/README.md new file mode 100644 index 000000000..dc6fccecc --- /dev/null +++ b/node_modules/debuglog/README.md @@ -0,0 +1,40 @@ +# debuglog - backport of util.debuglog() from node v0.11 + +To facilitate using the `util.debuglog()` function that will be available when +node v0.12 is released now, this is a copy extracted from the source. + +## require('debuglog') + +Return `util.debuglog`, if it exists, otherwise it will return an internal copy +of the implementation from node v0.11. + +## debuglog(section) + +* `section` {String} The section of the program to be debugged +* Returns: {Function} The logging function + +This is used to create a function which conditionally writes to stderr +based on the existence of a `NODE_DEBUG` environment variable. If the +`section` name appears in that environment variable, then the returned +function will be similar to `console.error()`. If not, then the +returned function is a no-op. + +For example: + +```javascript +var debuglog = util.debuglog('foo'); + +var bar = 123; +debuglog('hello from foo [%d]', bar); +``` + +If this program is run with `NODE_DEBUG=foo` in the environment, then +it will output something like: + + FOO 3245: hello from foo [123] + +where `3245` is the process id. If it is not run with that +environment variable set, then it will not print anything. + +You may separate multiple `NODE_DEBUG` environment variables with a +comma. For example, `NODE_DEBUG=fs,net,tls`. diff --git a/node_modules/debuglog/debuglog.js b/node_modules/debuglog/debuglog.js new file mode 100644 index 000000000..748fd72a1 --- /dev/null +++ b/node_modules/debuglog/debuglog.js @@ -0,0 +1,22 @@ +var util = require('util'); + +module.exports = (util && util.debuglog) || debuglog; + +var debugs = {}; +var debugEnviron = process.env.NODE_DEBUG || ''; + +function debuglog(set) { + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = util.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; diff --git a/node_modules/debuglog/package.json b/node_modules/debuglog/package.json new file mode 100644 index 000000000..e51ecc95f --- /dev/null +++ b/node_modules/debuglog/package.json @@ -0,0 +1,21 @@ +{ + "name": "debuglog", + "version": "1.0.1", + "description": "backport of util.debuglog from node v0.11", + "license": "MIT", + "main": "debuglog.js", + "repository": { + "type": "git", + "url": "https://github.com/sam-github/node-debuglog.git" + }, + "author": { + "name": "Sam Roberts", + "email": "sam@strongloop.com" + }, + "engines": { + "node": "*" + }, + "browser": { + "util": false + } +} diff --git a/node_modules/dezalgo/LICENSE b/node_modules/dezalgo/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/dezalgo/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/dezalgo/README.md b/node_modules/dezalgo/README.md new file mode 100644 index 000000000..bdfc8ba80 --- /dev/null +++ b/node_modules/dezalgo/README.md @@ -0,0 +1,29 @@ +# dezalgo + +Contain async insanity so that the dark pony lord doesn't eat souls + +See [this blog +post](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony). + +## USAGE + +Pass a callback to `dezalgo` and it will ensure that it is *always* +called in a future tick, and never in this tick. + +```javascript +var dz = require('dezalgo') + +var cache = {} +function maybeSync(arg, cb) { + cb = dz(cb) + + // this will actually defer to nextTick + if (cache[arg]) cb(null, cache[arg]) + + fs.readFile(arg, function (er, data) { + // since this is *already* defered, it will call immediately + if (er) cb(er) + cb(null, cache[arg] = data) + }) +} +``` diff --git a/node_modules/dezalgo/dezalgo.js b/node_modules/dezalgo/dezalgo.js new file mode 100644 index 000000000..04fd3ba78 --- /dev/null +++ b/node_modules/dezalgo/dezalgo.js @@ -0,0 +1,22 @@ +var wrappy = require('wrappy') +module.exports = wrappy(dezalgo) + +var asap = require('asap') + +function dezalgo (cb) { + var sync = true + asap(function () { + sync = false + }) + + return function zalgoSafe() { + var args = arguments + var me = this + if (sync) + asap(function() { + cb.apply(me, args) + }) + else + cb.apply(me, args) + } +} diff --git a/node_modules/dezalgo/package.json b/node_modules/dezalgo/package.json new file mode 100644 index 000000000..f8ba8ec2b --- /dev/null +++ b/node_modules/dezalgo/package.json @@ -0,0 +1,46 @@ +{ + "name": "dezalgo", + "version": "1.0.4", + "description": "Contain async insanity so that the dark pony lord doesn't eat souls", + "main": "dezalgo.js", + "files": [ + "dezalgo.js" + ], + "directories": { + "test": "test" + }, + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^12.4.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/dezalgo" + }, + "keywords": [ + "async", + "zalgo", + "the dark pony", + "he comes", + "asynchrony of all holy and good", + "To invoke the hive mind representing chaos", + "Invoking the feeling of chaos. /Without order", + "The Nezperdian Hive Mind of Chaos, (zalgo………………)", + "He who waits beyond the wall", + "ZALGO", + "HE COMES", + "there used to be some funky unicode keywords here, but it broke the npm website on chrome, so they were removed, sorry" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/dezalgo/issues" + }, + "homepage": "https://github.com/npm/dezalgo" +} diff --git a/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/emoji-regex/LICENSE-MIT.txt new file mode 100644 index 000000000..a41e0a7ef --- /dev/null +++ b/node_modules/emoji-regex/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +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. diff --git a/node_modules/emoji-regex/README.md b/node_modules/emoji-regex/README.md new file mode 100644 index 000000000..d4e78db66 --- /dev/null +++ b/node_modules/emoji-regex/README.md @@ -0,0 +1,107 @@ +# emoji-regex [![Build status](https://github.com/mathiasbynens/emoji-regex/actions/workflows/main.yml/badge.svg)](https://github.com/mathiasbynens/emoji-regex/actions/workflows/main.yml) [![emoji-regex on npm](https://img.shields.io/npm/v/emoji-regex)](https://www.npmjs.com/package/emoji-regex) + +_emoji-regex_ offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. It’s based on [_emoji-test-regex-pattern_](https://github.com/mathiasbynens/emoji-test-regex-pattern), which generates (at build time) the regular expression pattern based on the Unicode Standard. As a result, _emoji-regex_ can easily be updated whenever new emoji are added to Unicode. + +Since each version of _emoji-regex_ is tied to the latest Unicode version at the time of release, results are deterministic. This is important for use cases like image replacement, where you want to guarantee that an image asset is available for every possibly matched emoji. If you don’t need a deterministic regex, a lighter-weight, general emoji pattern is available via the [_emoji-regex-xs_](https://github.com/slevithan/emoji-regex-xs) package that follows the same API. + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install emoji-regex +``` + +In [Node.js](https://nodejs.org/): + +```js +const emojiRegex = require('emoji-regex'); +// Note: because the regular expression has the global flag set, this module +// exports a function that returns the regex rather than exporting the regular +// expression itself, to make it impossible to (accidentally) mutate the +// original regular expression. + +const text = ` +\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation) +\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji +\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base) +\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier +`; + +const regex = emojiRegex(); +for (const match of text.matchAll(regex)) { + const emoji = match[0]; + console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`); +} +``` + +Console output: + +``` +Matched sequence ⌚ — code points: 1 +Matched sequence ⌚ — code points: 1 +Matched sequence ↔️ — code points: 2 +Matched sequence ↔️ — code points: 2 +Matched sequence 👩 — code points: 1 +Matched sequence 👩 — code points: 1 +Matched sequence 👩🏿 — code points: 2 +Matched sequence 👩🏿 — code points: 2 +``` + +## For maintainers + +### How to update emoji-regex after new Unicode Standard releases + +1. [Update _emoji-test-regex-pattern_ as described in its repository](https://github.com/mathiasbynens/emoji-test-regex-pattern#how-to-update-emoji-test-regex-pattern-after-new-uts51-releases). + +1. Bump the _emoji-test-regex-pattern_ dependency to the latest version. + +1. Update the Unicode data dependency in `package.json` by running the following commands: + + ```sh + # Example: updating from Unicode v13 to Unicode v14. + npm uninstall @unicode/unicode-13.0.0 + npm install @unicode/unicode-14.0.0 --save-dev + ```` + + 1. Generate the new output: + + ```sh + npm run build + ``` + + 1. Verify that tests still pass: + + ```sh + npm test + ``` + +### How to publish a new release + +1. On the `main` branch, bump the emoji-regex version number in `package.json`: + + ```sh + npm version patch -m 'Release v%s' + ``` + + Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). + + Note that this produces a Git commit + tag. + +1. Push the release commit and tag: + + ```sh + git push && git push --tags + ``` + + Our CI then automatically publishes the new release to npm. + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +_emoji-regex_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/emoji-regex/index.d.ts b/node_modules/emoji-regex/index.d.ts new file mode 100644 index 000000000..6f5755509 --- /dev/null +++ b/node_modules/emoji-regex/index.d.ts @@ -0,0 +1,3 @@ +declare module 'emoji-regex' { + export default function emojiRegex(): RegExp; +} diff --git a/node_modules/emoji-regex/index.js b/node_modules/emoji-regex/index.js new file mode 100644 index 000000000..709331183 --- /dev/null +++ b/node_modules/emoji-regex/index.js @@ -0,0 +1,4 @@ +module.exports = () => { + // https://mths.be/emoji + return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB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?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; +}; diff --git a/node_modules/emoji-regex/index.mjs b/node_modules/emoji-regex/index.mjs new file mode 100644 index 000000000..654b77bfd --- /dev/null +++ b/node_modules/emoji-regex/index.mjs @@ -0,0 +1,4 @@ +export default () => { + // https://mths.be/emoji + return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE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200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; +}; diff --git a/node_modules/emoji-regex/package.json b/node_modules/emoji-regex/package.json new file mode 100644 index 000000000..f400f42a6 --- /dev/null +++ b/node_modules/emoji-regex/package.json @@ -0,0 +1,45 @@ +{ + "name": "emoji-regex", + "version": "10.6.0", + "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", + "homepage": "https://mths.be/emoji-regex", + "main": "index.js", + "module": "index.mjs", + "types": "index.d.ts", + "keywords": [ + "unicode", + "regex", + "regexp", + "regular expressions", + "code points", + "symbols", + "characters", + "emoji" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/emoji-regex.git" + }, + "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", + "files": [ + "LICENSE-MIT.txt", + "index.js", + "index.d.ts", + "index.mjs" + ], + "scripts": { + "build": "node script/build.js", + "test": "mocha", + "test:watch": "npm run test -- --watch" + }, + "devDependencies": { + "@unicode/unicode-17.0.0": "^1.6.10", + "emoji-test-regex-pattern": "^2.4.0", + "mocha": "^11.7.2" + } +} diff --git a/node_modules/env-paths/index.d.ts b/node_modules/env-paths/index.d.ts new file mode 100644 index 000000000..277ddc0a1 --- /dev/null +++ b/node_modules/env-paths/index.d.ts @@ -0,0 +1,101 @@ +declare namespace envPaths { + export interface Options { + /** + __Don't use this option unless you really have to!__ + + Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it. + + @default 'nodejs' + */ + readonly suffix?: string; + } + + export interface Paths { + /** + Directory for data files. + + Example locations (with the default `nodejs` suffix): + + - macOS: `~/Library/Application Support/MyApp-nodejs` + - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`) + - Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`) + */ + readonly data: string; + + /** + Directory for data files. + + Example locations (with the default `nodejs` suffix): + + - macOS: `~/Library/Preferences/MyApp-nodejs` + - Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`) + - Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`) + */ + readonly config: string; + + /** + Directory for non-essential data files. + + Example locations (with the default `nodejs` suffix): + + - macOS: `~/Library/Caches/MyApp-nodejs` + - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`) + - Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`) + */ + readonly cache: string; + + /** + Directory for log files. + + Example locations (with the default `nodejs` suffix): + + - macOS: `~/Library/Logs/MyApp-nodejs` + - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`) + - Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`) + */ + readonly log: string; + + /** + Directory for temporary files. + + Example locations (with the default `nodejs` suffix): + + - macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs` + - Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`) + - Linux: `/tmp/USERNAME/MyApp-nodejs` + */ + readonly temp: string; + } +} + +declare const envPaths: { + /** + Get paths for storing things like data, config, cache, etc. + + Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories. + + @param name - Name of your project. Used to generate the paths. + @returns The paths to use for your project on current OS. + + @example + ``` + import envPaths = require('env-paths'); + + const paths = envPaths('MyApp'); + + paths.data; + //=> '/home/sindresorhus/.local/share/MyApp-nodejs' + + paths.config + //=> '/home/sindresorhus/.config/MyApp-nodejs' + ``` + */ + (name: string, options?: envPaths.Options): envPaths.Paths; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function envPaths(name: string, options?: envPaths.Options): envPaths.Paths; + // export = envPaths; + default: typeof envPaths; +}; + +export = envPaths; diff --git a/node_modules/env-paths/index.js b/node_modules/env-paths/index.js new file mode 100644 index 000000000..7e7b50baa --- /dev/null +++ b/node_modules/env-paths/index.js @@ -0,0 +1,74 @@ +'use strict'; +const path = require('path'); +const os = require('os'); + +const homedir = os.homedir(); +const tmpdir = os.tmpdir(); +const {env} = process; + +const macos = name => { + const library = path.join(homedir, 'Library'); + + return { + data: path.join(library, 'Application Support', name), + config: path.join(library, 'Preferences', name), + cache: path.join(library, 'Caches', name), + log: path.join(library, 'Logs', name), + temp: path.join(tmpdir, name) + }; +}; + +const windows = name => { + const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming'); + const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); + + return { + // Data/config/cache/log are invented by me as Windows isn't opinionated about this + data: path.join(localAppData, name, 'Data'), + config: path.join(appData, name, 'Config'), + cache: path.join(localAppData, name, 'Cache'), + log: path.join(localAppData, name, 'Log'), + temp: path.join(tmpdir, name) + }; +}; + +// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +const linux = name => { + const username = path.basename(homedir); + + return { + data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name), + config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name), + cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name), + // https://wiki.debian.org/XDGBaseDirectorySpecification#state + log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name), + temp: path.join(tmpdir, username, name) + }; +}; + +const envPaths = (name, options) => { + if (typeof name !== 'string') { + throw new TypeError(`Expected string, got ${typeof name}`); + } + + options = Object.assign({suffix: 'nodejs'}, options); + + if (options.suffix) { + // Add suffix to prevent possible conflict with native apps + name += `-${options.suffix}`; + } + + if (process.platform === 'darwin') { + return macos(name); + } + + if (process.platform === 'win32') { + return windows(name); + } + + return linux(name); +}; + +module.exports = envPaths; +// TODO: Remove this for the next major release +module.exports.default = envPaths; diff --git a/node_modules/env-paths/license b/node_modules/env-paths/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/node_modules/env-paths/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/env-paths/package.json b/node_modules/env-paths/package.json new file mode 100644 index 000000000..fae4ebcf2 --- /dev/null +++ b/node_modules/env-paths/package.json @@ -0,0 +1,45 @@ +{ + "name": "env-paths", + "version": "2.2.1", + "description": "Get paths for storing things like data, config, cache, etc", + "license": "MIT", + "repository": "sindresorhus/env-paths", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "common", + "user", + "paths", + "env", + "environment", + "directory", + "dir", + "appdir", + "path", + "data", + "config", + "cache", + "logs", + "temp", + "linux", + "unix" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/node_modules/env-paths/readme.md b/node_modules/env-paths/readme.md new file mode 100644 index 000000000..b66d571af --- /dev/null +++ b/node_modules/env-paths/readme.md @@ -0,0 +1,115 @@ +# env-paths + +> Get paths for storing things like data, config, cache, etc + +Uses the correct OS-specific paths. Most developers get this wrong. + + +## Install + +``` +$ npm install env-paths +``` + + +## Usage + +```js +const envPaths = require('env-paths'); + +const paths = envPaths('MyApp'); + +paths.data; +//=> '/home/sindresorhus/.local/share/MyApp-nodejs' + +paths.config +//=> '/home/sindresorhus/.config/MyApp-nodejs' +``` + + +## API + +### paths = envPaths(name, options?) + +Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories. + +#### name + +Type: `string` + +Name of your project. Used to generate the paths. + +#### options + +Type: `object` + +##### suffix + +Type: `string`
+Default: `'nodejs'` + +**Don't use this option unless you really have to!**
+Suffix appended to the project name to avoid name conflicts with native +apps. Pass an empty string to disable it. + +### paths.data + +Directory for data files. + +Example locations (with the default `nodejs` [suffix](#suffix)): + +- macOS: `~/Library/Application Support/MyApp-nodejs` +- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`) +- Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`) + +### paths.config + +Directory for config files. + +Example locations (with the default `nodejs` [suffix](#suffix)): + +- macOS: `~/Library/Preferences/MyApp-nodejs` +- Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`) +- Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`) + +### paths.cache + +Directory for non-essential data files. + +Example locations (with the default `nodejs` [suffix](#suffix)): + +- macOS: `~/Library/Caches/MyApp-nodejs` +- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`) +- Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`) + +### paths.log + +Directory for log files. + +Example locations (with the default `nodejs` [suffix](#suffix)): + +- macOS: `~/Library/Logs/MyApp-nodejs` +- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`) +- Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`) + +### paths.temp + +Directory for temporary files. + +Example locations (with the default `nodejs` [suffix](#suffix)): + +- macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs` +- Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`) +- Linux: `/tmp/USERNAME/MyApp-nodejs` + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/error-ex/LICENSE b/node_modules/error-ex/LICENSE new file mode 100644 index 000000000..0a5f461a6 --- /dev/null +++ b/node_modules/error-ex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +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. diff --git a/node_modules/error-ex/README.md b/node_modules/error-ex/README.md new file mode 100644 index 000000000..3233dcd5b --- /dev/null +++ b/node_modules/error-ex/README.md @@ -0,0 +1,144 @@ +# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex) +> Easily subclass and customize new Error types + +## Examples +To include in your project: +```javascript +var errorEx = require('error-ex'); +``` + +To create an error message type with a specific name (note, that `ErrorFn.name` +will not reflect this): +```javascript +var JSONError = errorEx('JSONError'); + +var err = new JSONError('error'); +err.name; //-> JSONError +throw err; //-> JSONError: error +``` + +To add a stack line: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')}); + +var err = new JSONError('error') +err.fileName = '/a/b/c/foo.json'; +throw err; //-> (line 2)-> in /a/b/c/foo.json +``` + +To append to the error message: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')}); + +var err = new JSONError('error'); +err.fileName = '/a/b/c/foo.json'; +throw err; //-> JSONError: error in /a/b/c/foo.json +``` + +## API + +#### `errorEx([name], [properties])` +Creates a new ErrorEx error type + +- `name`: the name of the new type (appears in the error message upon throw; + defaults to `Error.name`) +- `properties`: if supplied, used as a key/value dictionary of properties to + use when building up the stack message. Keys are property names that are + looked up on the error message, and then passed to function values. + - `line`: if specified and is a function, return value is added as a stack + entry (error-ex will indent for you). Passed the property value given + the key. + - `stack`: if specified and is a function, passed the value of the property + using the key, and the raw stack lines as a second argument. Takes no + return value (but the stack can be modified directly). + - `message`: if specified and is a function, return value is used as new + `.message` value upon get. Passed the property value of the property named + by key, and the existing message is passed as the second argument as an + array of lines (suitable for multi-line messages). + +Returns a constructor (Function) that can be used just like the regular Error +constructor. + +```javascript +var errorEx = require('error-ex'); + +var BasicError = errorEx(); + +var NamedError = errorEx('NamedError'); + +// -- + +var AdvancedError = errorEx('AdvancedError', { + foo: { + line: function (value, stack) { + if (value) { + return 'bar ' + value; + } + return null; + } + } +}) + +var err = new AdvancedError('hello, world'); +err.foo = 'baz'; +throw err; + +/* + AdvancedError: hello, world + bar baz + at tryReadme() (readme.js:20:1) +*/ +``` + +#### `errorEx.line(str)` +Creates a stack line using a delimiter + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to create + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')}); + +var err = new FileError('problem reading file'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + FileError: problem reading file + in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +#### `errorEx.append(str)` +Appends to the `error.message` string + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to append + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')}); + +var err = new SyntaxError('improper indentation'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + SyntaxError: improper indentation in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js new file mode 100644 index 000000000..4fb20b487 --- /dev/null +++ b/node_modules/error-ex/index.js @@ -0,0 +1,141 @@ +'use strict'; + +var util = require('util'); +var isArrayish = require('is-arrayish'); + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error + ? message.message + : (message || this.message); + + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + + this.name = name; + + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); + + var overwrittenStack = null; + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + + stackDescriptor.get = function () { + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + if (!overwrittenStack) { + stack[0] = this.name + ': ' + this.message; + } + + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +module.exports = errorEx; diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json new file mode 100644 index 000000000..c25efb032 --- /dev/null +++ b/node_modules/error-ex/package.json @@ -0,0 +1,46 @@ +{ + "name": "error-ex", + "description": "Easy error subclassing and stack customization", + "version": "1.3.4", + "maintainers": [ + "Josh Junon (github.com/qix-)", + "Sindre Sorhus (sindresorhus.com)" + ], + "keywords": [ + "error", + "errors", + "extend", + "extending", + "extension", + "subclass", + "stack", + "custom" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "xo": { + "rules": { + "operator-linebreak": [ + 0 + ] + } + }, + "repository": "qix-/node-error-ex", + "files": [ + "index.js" + ], + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.7.1" + }, + "dependencies": { + "is-arrayish": "^0.2.1" + } +} diff --git a/node_modules/es-errors/.eslintrc b/node_modules/es-errors/.eslintrc new file mode 100644 index 000000000..3b5d9e90e --- /dev/null +++ b/node_modules/es-errors/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/es-errors/.github/FUNDING.yml b/node_modules/es-errors/.github/FUNDING.yml new file mode 100644 index 000000000..f1b880554 --- /dev/null +++ b/node_modules/es-errors/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-errors +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-errors/CHANGELOG.md b/node_modules/es-errors/CHANGELOG.md new file mode 100644 index 000000000..204a9e904 --- /dev/null +++ b/node_modules/es-errors/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05 + +### Commits + +- [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf) + +## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04 + +### Commits + +- [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e) + +## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04 + +### Commits + +- [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143) + +## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04 + +### Commits + +- [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698) + +## v1.0.0 - 2024-02-03 + +### Commits + +- Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b) +- Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385) +- npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae) +- Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8) +- [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043) diff --git a/node_modules/es-errors/LICENSE b/node_modules/es-errors/LICENSE new file mode 100644 index 000000000..f82f38963 --- /dev/null +++ b/node_modules/es-errors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +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. diff --git a/node_modules/es-errors/README.md b/node_modules/es-errors/README.md new file mode 100644 index 000000000..8dbfacfea --- /dev/null +++ b/node_modules/es-errors/README.md @@ -0,0 +1,55 @@ +# es-errors [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A simple cache for a few of the JS Error constructors. + +## Example + +```js +const assert = require('assert'); + +const Base = require('es-errors'); +const Eval = require('es-errors/eval'); +const Range = require('es-errors/range'); +const Ref = require('es-errors/ref'); +const Syntax = require('es-errors/syntax'); +const Type = require('es-errors/type'); +const URI = require('es-errors/uri'); + +assert.equal(Base, Error); +assert.equal(Eval, EvalError); +assert.equal(Range, RangeError); +assert.equal(Ref, ReferenceError); +assert.equal(Syntax, SyntaxError); +assert.equal(Type, TypeError); +assert.equal(URI, URIError); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-errors +[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg +[deps-svg]: https://david-dm.org/ljharb/es-errors.svg +[deps-url]: https://david-dm.org/ljharb/es-errors +[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-errors.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-errors +[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors +[actions-url]: https://github.com/ljharb/es-errors/actions diff --git a/node_modules/es-errors/eval.d.ts b/node_modules/es-errors/eval.d.ts new file mode 100644 index 000000000..e4210e01e --- /dev/null +++ b/node_modules/es-errors/eval.d.ts @@ -0,0 +1,3 @@ +declare const EvalError: EvalErrorConstructor; + +export = EvalError; diff --git a/node_modules/es-errors/eval.js b/node_modules/es-errors/eval.js new file mode 100644 index 000000000..725ccb61a --- /dev/null +++ b/node_modules/es-errors/eval.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./eval')} */ +module.exports = EvalError; diff --git a/node_modules/es-errors/index.d.ts b/node_modules/es-errors/index.d.ts new file mode 100644 index 000000000..69bdbc92e --- /dev/null +++ b/node_modules/es-errors/index.d.ts @@ -0,0 +1,3 @@ +declare const Error: ErrorConstructor; + +export = Error; diff --git a/node_modules/es-errors/index.js b/node_modules/es-errors/index.js new file mode 100644 index 000000000..cc0c52124 --- /dev/null +++ b/node_modules/es-errors/index.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = Error; diff --git a/node_modules/es-errors/package.json b/node_modules/es-errors/package.json new file mode 100644 index 000000000..ff8c2a531 --- /dev/null +++ b/node_modules/es-errors/package.json @@ -0,0 +1,80 @@ +{ + "name": "es-errors", + "version": "1.3.0", + "description": "A simple cache for a few of the JS Error constructors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./eval": "./eval.js", + "./range": "./range.js", + "./ref": "./ref.js", + "./syntax": "./syntax.js", + "./type": "./type.js", + "./uri": "./uri.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-errors.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "error", + "typeerror", + "syntaxerror", + "rangeerror" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-errors/issues" + }, + "homepage": "https://github.com/ljharb/es-errors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/es-errors/range.d.ts b/node_modules/es-errors/range.d.ts new file mode 100644 index 000000000..3a12e8642 --- /dev/null +++ b/node_modules/es-errors/range.d.ts @@ -0,0 +1,3 @@ +declare const RangeError: RangeErrorConstructor; + +export = RangeError; diff --git a/node_modules/es-errors/range.js b/node_modules/es-errors/range.js new file mode 100644 index 000000000..2044fe036 --- /dev/null +++ b/node_modules/es-errors/range.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./range')} */ +module.exports = RangeError; diff --git a/node_modules/es-errors/ref.d.ts b/node_modules/es-errors/ref.d.ts new file mode 100644 index 000000000..a13107e24 --- /dev/null +++ b/node_modules/es-errors/ref.d.ts @@ -0,0 +1,3 @@ +declare const ReferenceError: ReferenceErrorConstructor; + +export = ReferenceError; diff --git a/node_modules/es-errors/ref.js b/node_modules/es-errors/ref.js new file mode 100644 index 000000000..d7c430fdb --- /dev/null +++ b/node_modules/es-errors/ref.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./ref')} */ +module.exports = ReferenceError; diff --git a/node_modules/es-errors/syntax.d.ts b/node_modules/es-errors/syntax.d.ts new file mode 100644 index 000000000..6a0c53c5b --- /dev/null +++ b/node_modules/es-errors/syntax.d.ts @@ -0,0 +1,3 @@ +declare const SyntaxError: SyntaxErrorConstructor; + +export = SyntaxError; diff --git a/node_modules/es-errors/syntax.js b/node_modules/es-errors/syntax.js new file mode 100644 index 000000000..5f5fddeec --- /dev/null +++ b/node_modules/es-errors/syntax.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; diff --git a/node_modules/es-errors/test/index.js b/node_modules/es-errors/test/index.js new file mode 100644 index 000000000..1ff027721 --- /dev/null +++ b/node_modules/es-errors/test/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var test = require('tape'); + +var E = require('../'); +var R = require('../range'); +var Ref = require('../ref'); +var S = require('../syntax'); +var T = require('../type'); + +test('errors', function (t) { + t.equal(E, Error); + t.equal(R, RangeError); + t.equal(Ref, ReferenceError); + t.equal(S, SyntaxError); + t.equal(T, TypeError); + + t.end(); +}); diff --git a/node_modules/es-errors/tsconfig.json b/node_modules/es-errors/tsconfig.json new file mode 100644 index 000000000..99dfeb6c8 --- /dev/null +++ b/node_modules/es-errors/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/es-errors/type.d.ts b/node_modules/es-errors/type.d.ts new file mode 100644 index 000000000..576fb5161 --- /dev/null +++ b/node_modules/es-errors/type.d.ts @@ -0,0 +1,3 @@ +declare const TypeError: TypeErrorConstructor + +export = TypeError; diff --git a/node_modules/es-errors/type.js b/node_modules/es-errors/type.js new file mode 100644 index 000000000..9769e44e3 --- /dev/null +++ b/node_modules/es-errors/type.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./type')} */ +module.exports = TypeError; diff --git a/node_modules/es-errors/uri.d.ts b/node_modules/es-errors/uri.d.ts new file mode 100644 index 000000000..c3261c91e --- /dev/null +++ b/node_modules/es-errors/uri.d.ts @@ -0,0 +1,3 @@ +declare const URIError: URIErrorConstructor; + +export = URIError; diff --git a/node_modules/es-errors/uri.js b/node_modules/es-errors/uri.js new file mode 100644 index 000000000..e9cd1c787 --- /dev/null +++ b/node_modules/es-errors/uri.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./uri')} */ +module.exports = URIError; diff --git a/node_modules/es-toolkit/CHANGELOG.md b/node_modules/es-toolkit/CHANGELOG.md new file mode 100644 index 000000000..03fa40e66 --- /dev/null +++ b/node_modules/es-toolkit/CHANGELOG.md @@ -0,0 +1,1053 @@ +# es-toolkit Changelog + +## Version v1.52.0 + +Released on August 28th, 2026. + +- Added the `es-toolkit/iterator` entrypoint, a lazy iterator module with `chunk`, + `count`, `dropWhile`, `head`, `iterate`, `partition`, `range`, `scan`, + `takeWhile`, `uniqBy`, and `zip` ([#1815]), plus `cartesianProduct` ([#2031]). + The same functions are also available from `es-toolkit/fp/iterator`. +- Added `defer` and `deferAsync` to `es-toolkit/util`. ([#2032]) +- Added `flowAsync` to `es-toolkit/fp`, a promise-aware left-to-right composition. ([#2033]) +- Added the `EmptyObject`, `IsEqual`, `JSONValue`, `Primitive`, `SetOptional`, + `SetRequired`, and `UnknownRecord` types. ([#2044]) + +- Fixed `merge` to infer the deep merged return type, and exported the `Merge` type. ([#1959]) +- Fixed `omitBy` and `pickBy` to type numeric callback keys as strings, and + exported the `ObjectKeys` type. ([#2037]) +- Fixed `attempt` and `attemptAsync` to default their error type parameter to `unknown`. ([#2052]) + +The following bring `es-toolkit/compat` closer to Lodash. Behavior for the affected +edge cases now matches Lodash, so results may differ if you relied on the previous output. + +- Fixed `compat/debounce` to skip the `maxWait` invocation when both `leading` and + `trailing` are `false`. ([#1678]) +- Fixed `compat/toString` to convert objects with a custom `valueOf`. ([#2034]) +- Fixed `compat/mergeWith` to assign `null` values in array sources. ([#1929]) +- Fixed `compat/has` and `compat/hasIn` to normalize the `-0` path key. ([#2035]) +- Fixed `compat/differenceWith` and `compat/without` to normalize `-0` to `0`. ([#2049]) +- Fixed `compat/findLastIndex` to convert `fromIndex` to an integer. ([#2047]) +- Fixed `compat/xorWith` to match Lodash when no comparator is given. ([#2057]) + +- Covered the new iterator entrypoints in the dist and browser compatibility + checks. ([#2030]) +- Made the agent skills portable when installed on their own. ([#2054]) +- Fixed documentation typos and the Deno install commands. ([#2062]) + +## Version v1.51.0 + +Released on August 17th, 2026. + +- Added the `es-toolkit/bigint` entrypoint: `bigint` counterparts of the math + functions (`sum`, `sumBy`, `max`, `min`, `maxBy`, `minBy`, `clamp`, `inRange`, + `median`, `medianBy`, `percentile`, `range`, `rangeRight`), kept separate so + the `number` implementations stay unchanged. ([#1966]) +- Added `dedent`, which removes common leading whitespace from template strings. ([#1679]) +- Added `deepFreeze` for recursively freezing objects. ([#1680]) +- Added `mapValuesAsync` and `mapKeysAsync`. ([#1544]) +- Added `toPascalCaseKeys`, `toKebabCaseKeys`, and `toConstantCaseKeys`, + completing the object key casing family. ([#1984]) +- Exported the `ToCamelCaseKeys`, `ToPascalCaseKeys`, `ToSnakeCaseKeys`, + `ToKebabCaseKeys`, and `ToConstantCaseKeys` types. ([#1651]) +- Added a `preserveArrays` option to `flattenObject`. ([#974]) + +- Fixed `retry` to pass the last error to the `delay` callback ([#1759]) and to + throw the last attempt's error without applying a final delay ([#1901]). +- Fixed `mergeWith` and `toMerged` to handle mixed array/object types + consistently with `merge`. ([#2026]) +- Fixed `pullAt` to remove the correct elements with negative indices. ([#1613]) +- Fixed `at`, `pullAt`, `orderBy`, and `sortBy` to accept readonly arrays. ([#2016]) +- Moved `limitAsync` from the array to the promise category. ([#2022]) +- Included the NOTICE file in the published npm and JSR packages. ([#2020]) + +The following bring `es-toolkit/compat` closer to Lodash. Behavior for the affected +edge cases now matches Lodash, so results may differ if you relied on the previous output. + +- Added `entries` and `entriesIn`. ([#1874]) +- Fixed `compat/isMatch` and `compat/isMatchWith` to handle object source + patterns against primitive and non-plain-object targets like Lodash. ([#1432]) +- Fixed `compat/set` to block `constructor.prototype` paths, preventing + prototype pollution. ([#1904]) +- Fixed `compat/find` to respect array-like `length` ([#1958]) and to convert + `fromIndex` to an integer ([#1961]), and `compat/indexOf` to convert + `fromIndex` to an integer when searching for `NaN` ([#1951]). +- Fixed `compat/orderBy` to resolve unresolved deep paths and nullish elements + to `undefined` ([#2010]), to exclude the `length` property from array-like + values ([#2002]), and to read the criterion property from primitive values ([#1903]). +- Fixed `compat/toPath` to split unquoted dotted keys inside brackets. ([#1899]) +- Fixed `compat/omit` to treat a key array as a single deep path. ([#1902]) +- Fixed `compat/map` to make the iteratee optional with an identity default. ([#1928]) +- Fixed `compat/size` to count combined Unicode symbols as single characters. ([#1900]) +- Fixed `compat/intersectionBy` to support number, object, and nullish iteratee + shorthands ([#1993]), and `compat/intersectionWith` to apply the comparator + when deduplicating the first array ([#1953]). +- Fixed `compat/difference`, `compat/differenceBy`, `compat/uniqBy`, and + `compat/unionBy` to normalize `-0` to `0`. ([#2007]) +- Fixed `compat/maxBy` and `compat/minBy` to skip nullish iteratee values ([#1927]), + and `compat/meanBy` to skip `undefined` values when averaging ([#1978]). +- Fixed `compat/some`, `compat/template` ([#2009]), and `compat/fill` ([#1952]) + to gate guard handling with `isIterateeCall`. +- Fixed `compat/iteratee` to treat a boolean as a property shorthand. ([#1941]) +- Fixed `compat/reverse` to support array-like objects and `arguments`. ([#2008]) +- Fixed `compat/toArray` to convert non-array-like iterables. ([#1999]) +- Fixed `compat/toString` to render nested nullish values like Lodash. ([#1992]) +- Fixed `compat/zipObject` to treat `null` keys and values as empty arrays. ([#2005]) +- Fixed `compat/sampleSize` to clamp the default size to the collection length. ([#2003]) +- Fixed `compat/takeWhile`, `compat/takeRightWhile`, and `compat/uniqBy` to + support string inputs. ([#2004]) +- Fixed `compat/chunk` to return an empty array for an empty collection with an + `Infinity` size. ([#1995]) +- Fixed `compat/lastIndexOf` to read holes in sparse arrays as `undefined`. ([#1977]) +- Fixed `compat/last` to return `undefined` for empty array-like inputs. ([#1954]) +- Fixed `compat/pullAll` to return the array as-is when `values` is nullish. ([#1962]) + +- Added a browser compatibility test suite. ([#2012]) +- Improved documentation, JSDoc accuracy, tests, and internal refactoring across + `compat` and the docs site. ([#1622], [#1789], [#1824], [#1844], [#1849], + [#1854], [#1855], [#1859], [#1860], [#1868], [#1871], [#1887], [#1898], + [#1933], [#1939], [#1947], [#1950], [#1955], [#1956], [#1957], [#1960], + [#1963], [#1964], [#1968], [#1969], [#1970], [#1972], [#1979], [#1985], + [#2000], [#2001], [#2021], [#2025], [#2027]) + +We sincerely thank @Antoliny0919, @D-Sketon, @kojesung, @chuenchen309, +@mariazuheros, @DongEun02, @raon0211, @sukvvon, @racgoo, @dayongkr, @Kropiunig, +@ssi02014, @sarathfrancis90, @mym0404, @mlnwns, @kdelay, @gwagjiug, @dohwi, +@blro0319, @benedictleejh, @amir-rezaei, @ianzone, @sen2y, @rossyman, +@eunwoo-levi, @ramong26, @Gdm0714, and everyone else who contributed. +We appreciate your great efforts! + +## Version v1.50.0 + +Released on July 24th, 2026. + +- Added the `es-toolkit/types` entrypoint: a declaration-only module of compile-time + type utilities TypeScript lacks natively — `ValueOf`, `Simplify`, `Writable`, + `NonEmptyArray`, `DeepPartial`, and `DeepReadonly`. ([#1818]) +- Added `flow` to `es-toolkit/fp`, a reusable data-last composition built on `pipe`. ([#1812]) + +The following bring `es-toolkit/compat` closer to Lodash. Behavior for the affected +edge cases now matches Lodash, so results may differ if you relied on the previous output. + +- Fixed `compat/intersectionBy` to dedupe a single array (including by the iteratee) + and to keep results consistent with Lodash. ([#1935]) +- Fixed `compat/findIndex` and `compat/findLastIndex` to coerce a `NaN` `fromIndex` + to `0` and to convert `fromIndex` to an integer. ([#1828], [#1834], [#1938]) +- Fixed `compat/lastIndexOf` to coerce `fromIndex` like Lodash. ([#1832]) +- Fixed `compat/every` to treat a falsy, non-nullish `doesMatch` as a `_.property` + shorthand instead of identity. ([#1940]) +- Fixed `compat/nth` to support string inputs. ([#1833]) +- Fixed `compat/inRange` to not throw on a lone negative bound. ([#1835]) +- Fixed `compat/toArray` to convert `Set`s to arrays like Lodash. ([#1840]) +- Fixed `compat/values` to treat sparse array holes as `undefined`. ([#1894]) +- Fixed `compat/maxBy` and `compat/minBy` to restore Lodash-compatible comparison. ([#1893]) +- Fixed `compat/includes` to exclude the `length` property when matching array-like values. ([#1886]) +- Fixed the case functions to split ordinal numbers like Lodash, and to count string + size and padding by code points for multi-byte characters. ([#1836], [#1852], [#1853]) +- Fixed `compat/unset` to not treat an own literal dotted key as a deep path. ([#1808]) +- Moved `compat/flattenDepth`'s flattening logic out of `flatten`. ([#1847]) +- Restored the standalone `eq` and `templateSettings` entry points. ([#1895]) + +- Fixed `deburr` to remove all combining diacritical marks, matching Lodash. ([#1807]) +- Fixed `partition` to accept any predicate return value, like `Array.prototype.filter`. ([#1937]) +- Fixed `has` and `hasIn` to prioritize nullish literal keys over paths. ([#1810]) +- Fixed `invokeMap` to normalize a string path via `toPath` for `this` binding. ([#1814]) +- Fixed `isDeepKey` to detect deep keys with stricter patterns. ([#1621]) +- Fixed `unzipWith` to return an empty array instead of throwing on empty input. ([#1816]) + +- Improved documentation, JSDoc accuracy, and internal refactoring across `compat` + and `fp`. ([#1817], [#1820], [#1822], [#1823], [#1825], [#1829], [#1830], [#1842], + [#1845], [#1851], [#1858], [#1867], [#1879]) + +We sincerely thank @Antoliny0919, @raon0211, @dayongkr, @spokodev, @sarathfrancis90, +@mayur-shenoy, @mahirhir, @kojesung, @Hprogram, @BangDori, and everyone else who +contributed. We appreciate your great efforts! + +## Version v1.49.0 + +Released on June 26th, 2026. + +- Added the `es-toolkit/fp` entrypoint with data-last, pipeable utilities, + documentation, benchmarks, and bundle-size checks. ([#1781]) +- Added a broad set of array utilities to `es-toolkit/fp`, covering slicing, + grouping, set operations, ordering, zipping, and collection helpers. ([#1801]) +- Fixed `trimStart` to validate multi-character trim strings correctly before + it stops trimming. ([#1615]) +- Fixed `compat/pick` to prefer a literal key over a dot-notation path when the + picked value is `undefined`. ([#1775]) +- Fixed `compat/random` to better match Lodash behavior for coerced bounds and + floating-point options. ([#1767]) +- Fixed `compat/chunk` to handle `NaN` and `Infinity` size values consistently + with Lodash. ([#1797]) +- Improved documentation and JSDoc accuracy across array, function, and compat + references. ([#1785], [#1786], [#1788], [#1790], [#1791], [#1792], [#1793], + [#1795], [#1800]) + +We sincerely thank @Antoliny0919, @D-Sketon, @eunwoo-levi, and @raon0211 for +their contributions. We appreciate your great efforts! + +## Version v1.48.1 + +Released on June 21st, 2026. + +- Fixed the `jsdelivr` and `unpkg` CDN ` + + + + + + +

Eukaryotes

+

+      
+   
+
diff --git a/node_modules/treeify/examples/eukaryotes.js b/node_modules/treeify/examples/eukaryotes.js
new file mode 100755
index 000000000..8477e3eb3
--- /dev/null
+++ b/node_modules/treeify/examples/eukaryotes.js
@@ -0,0 +1,51 @@
+var treeify = require('../treeify');
+
+// Based on information taken from the Tree of Life web project
+// http://tolweb.org/Eukaryotes/3
+var Eukaryotes = {
+   'Archaeplastida (Plantae)': {
+      'Green plants': 'green algae & land plants',
+      'Rhodophyta': 'red algae',
+      'Glaucophytes': 'microalgae'
+   },
+   'Unikonts': {
+      'Opisthokonts': {
+         'Animals': null,
+         'Choanoflagellates': null,
+         'Filasterea': null,
+         'Ichthyosporea': null,
+         'Fungi': 'mushrooms, sac fungi, yeast, molds, etc',
+         'Nucleariidae': 'filose amoebae'
+      },
+      'Amoebozoa': 'amoebae, slime molds, and parasitic protists',
+   },
+   'Chromalveolates': {
+      '': {
+         'Rhizaria': {
+            'Cercozoa': 'amoeboflagellates',
+            'Foraminifera': 'complex cells with reticulopodia',
+            'Radiolaria': null
+         },
+         'Alveolates': 'dinoflagellates, ciliates and apicomplexan parasites',
+         'Stramenopiles': 'e.g. water molds, diatoms, brown algae'
+      },
+      'Hacrobia': 'Haptophyta, Cryptomonads, etc.'
+   },
+   'Excavates': {
+      'Malawimonads': null,
+      'Discicristates': {
+         'Euglenozoa': 'euglenids, diplonemids and kinetoplastids',
+         'Heterolobosea': 'amoeboflagellates with discoidal mitchondrial cristae',
+         'Jakobida': 'free-living, heterotrophic flagellates'
+      },
+      'Parabasalids': 'trichomonads and hypermastigotes',
+      'Fornicata': 'diplomonads and retortamonads',
+      'Preaxostyla': 'oxymonads and Trimastix'
+   }
+};
+
+console.log('Eukaryotes');
+
+treeify.asLines(Eukaryotes, true, function(line) {
+   console.log(line);
+});
diff --git a/node_modules/treeify/examples/fs_tree.js b/node_modules/treeify/examples/fs_tree.js
new file mode 100755
index 000000000..d1076abb5
--- /dev/null
+++ b/node_modules/treeify/examples/fs_tree.js
@@ -0,0 +1,45 @@
+#!/usr/bin/env node
+
+(function(){
+
+   try {
+      var dive = require('dive');
+   } catch (ex) {
+      console.error('this example requires "dive", please run "npm install dive"');
+      process.exit(1);
+   }
+
+   var treeify = require('../treeify'),
+       path = require('path'),
+       fs = require('fs'),
+       rootDir = process.argv.length < 3 ? '.' : process.argv[2],
+       tree = {};
+
+   if ( ! fs.existsSync(rootDir)) {
+      console.error('path "' + rootDir + '" does not exist - unable to proceed!');
+      process.exit(1);
+   }
+
+   console.log(rootDir !== '.' ? path.relative(process.cwd(), rootDir) : '.');
+
+   function scanComplete() {
+      process.stdout.write('\r       \r');
+      console.log(treeify.asTree(tree, true));
+   }
+
+   dive(rootDir, { all: true, directories: true }, function(err, thisPath) {
+      var relativePath = path.relative(rootDir, thisPath),
+          node = tree;
+
+      if (relativePath.indexOf('..') !== 0) {
+         relativePath.split(path.sep).forEach(function(part) {
+            typeof node[part] !== 'object' && (node[part] = {});
+            node = node[part];
+         });
+      }
+
+   }, scanComplete);
+
+   process.stdout.write('wait... ');
+
+})();
diff --git a/node_modules/treeify/package.json b/node_modules/treeify/package.json
new file mode 100644
index 000000000..0de9eea38
--- /dev/null
+++ b/node_modules/treeify/package.json
@@ -0,0 +1,28 @@
+{
+  "name": "treeify",
+  "version": "1.1.0",
+  "author": "Luke Plaster ",
+  "description": "converts a JS object into a nice and readable tree structure for the console",
+  "license": "MIT",
+  "scripts": {
+    "test": "./node_modules/vows/bin/vows --spec"
+  },
+  "main": "./treeify",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/notatestuser/treeify.git"
+  },
+  "keywords": [
+    "object", "tree", "print", "console", "pretty"
+  ],
+  "devDependencies": {
+    "vows": "git://github.com/Filirom1/vows.git#expect"
+  },
+  "licenses": [{
+    "type": "MIT",
+    "url": "http://lp.mit-license.org/"
+  }],
+  "engines": {
+    "node": ">=0.6"
+  }
+}
diff --git a/node_modules/treeify/test/tree-test.js b/node_modules/treeify/test/tree-test.js
new file mode 100644
index 000000000..c5841e96f
--- /dev/null
+++ b/node_modules/treeify/test/tree-test.js
@@ -0,0 +1,347 @@
+var treeify = require('../treeify'),
+   vows = require('vows'),
+   assert = require('assert'),
+   events = require('events');
+
+// - helper functions -----------------
+
+function treeifyByLineGuts(args) {
+   var emitter = new events.EventEmitter(),
+       lineNum = 0;
+   args.push(function(line) {
+      emitter.emit('success', line);
+      emitter.emit('line ' + (++lineNum), line);
+   });
+   treeify.asLines.apply(this, args);
+   return emitter;
+}
+
+function treeifyByLine(obj) {
+   return function(showValues) {
+      var arguments = [ obj, showValues ];
+      return treeifyByLineGuts(arguments);
+   };
+}
+
+function treeifyByLineWithHideFunctionsArgument(obj) {
+   return function(showValues, hideFunctions) {
+      var arguments = [ obj, showValues, hideFunctions ];
+      return treeifyByLineGuts(arguments);
+   };
+}
+
+function treeifyEntirely(obj) {
+   return function(showValues, hideFunctions) {
+      return treeify.asTree(obj, showValues, hideFunctions);
+   };
+}
+
+function withValuesShown(showValues) {
+   return function(func){ return func(showValues, false) };
+}
+
+function withValuesShownFunctionsHidden() {
+  return function(func){ return func(true, true) };
+
+}
+
+function is(content, arrayIndex) {
+   return function(lines) {
+      var toCheck = lines;
+      if (arrayIndex !== undefined) {
+         toCheck = lines[arrayIndex];
+      }
+      assert.strictEqual(toCheck, content, 'should be "' + content + '" but was "' + toCheck + '"');
+   };
+}
+
+function checkLines(/* ... */) {
+   var ret = {}, entry;
+   for (var line = 1; line <= arguments.length; line++) {
+      if ( ! arguments[line - 1])
+         continue;
+      entry = {};
+      entry['branches correctly on line '+line] = is(arguments[line - 1]);
+      ret['line '+line] = entry;
+   }
+   return ret;
+}
+
+// - the beautiful test suite ---------
+
+vows.describe('tree-test').addBatch({
+
+   'A tree created from an empty object': {
+      topic: {},
+
+      'when returned as a whole tree': {
+         topic: treeifyEntirely,
+
+         'with values hidden': {
+            topic: withValuesShown(false),
+            'is an empty string': is('')
+         },
+         'with values shown': {
+            topic: withValuesShown(true),
+            'is an empty string': is('')
+         }
+      }
+   },
+
+   'A tree created from a single-level object': {
+      topic: {
+         apples: 'gala',      //  ├─ apples: gala
+         oranges: 'mandarin'  //  └─ oranges: mandarin
+      },
+
+      'when returned line-by-line': {
+         topic: treeifyByLine,
+
+         'with values hidden': {
+            topic: withValuesShown(false),
+
+            'is two lines long': function(err, line) {
+               this.expect(2);
+            },
+            on: checkLines('├─ apples',
+                           '└─ oranges')
+         },
+         'with values shown': {
+            topic: withValuesShown(true),
+
+            'is two lines long': function(err, line) {
+               this.expect(2);
+            },
+            on: checkLines('├─ apples: gala',
+                           '└─ oranges: mandarin')
+         }
+      },
+
+      'when returned as a whole tree': {
+         topic: treeifyEntirely,
+
+         'with values hidden': {
+            topic: withValuesShown(false),
+
+            'is not empty': function(tree) {
+               assert.notEqual(tree, '', 'should not be empty');
+            },
+            'contains 2 line breaks': function(tree) {
+               assert.strictEqual(tree.match(/\n/g).length, 2, 'should contain 2 x \n');
+            },
+            '(split into an array of lines)': {
+               topic: function(tree) { return tree.split(/\n/g) },
+               'has a correct first line':  is('├─ apples', 0),
+               'has a correct second line': is('└─ oranges', 1),
+               'has nothing at the end':    is('', 2)
+            }
+         },
+         'with values shown': {
+            topic: withValuesShown(true),
+
+            'is not empty': function(tree) {
+               assert.notEqual(tree, '', 'should not be empty');
+            },
+            'contains 2 line breaks': function(tree) {
+               assert.strictEqual(tree.match(/\n/g).length, 2, 'should contain 2 x \n');
+            },
+            '(split into an array of lines)': {
+               topic: function(tree) { return tree.split(/\n/g) },
+               'has a correct first line':  is('├─ apples: gala', 0),
+               'has a correct second line': is('└─ oranges: mandarin', 1),
+               'has nothing at the end':    is('', 2)
+            }
+         }
+      }
+   },
+
+   'A tree created from a multi-level object': {
+      topic: {
+         oranges: {                  //  ├─ oranges
+            'mandarin': {            //  │  └─ mandarin
+               clementine: null,     //  │     ├─ clementine
+               tangerine:            //  │     └─ tangerine
+                  'so cheap and juicy!'
+            }
+         },
+         apples: {                   //  └─ apples
+            'gala': null,            //     ├─ gala
+            'pink lady': null        //     └─ pink lady
+         }
+      },
+
+      'when returned line-by-line': {
+         topic: treeifyByLine,
+
+         'with values hidden': {
+            topic: withValuesShown(false),
+
+            'is seven lines long': function(err, line) {
+               this.expect(7);
+            },
+            on: checkLines('├─ oranges',
+                           '│  └─ mandarin',
+                           '│     ├─ clementine',
+                           '│     └─ tangerine',
+                           '└─ apples',
+                           '   ├─ gala',
+                           '   └─ pink lady')
+         },
+         'with values shown': {
+            topic: withValuesShown(true),
+            on: checkLines(null, null, null,
+                           '│     └─ tangerine: so cheap and juicy!')
+         }
+      },
+
+      'when returned as a whole tree': {
+         topic: treeifyEntirely,
+
+         'with values shown': {
+            topic: withValuesShown(true),
+
+            '(split into an array of lines)': {
+               topic: function(tree) { return tree.split(/\n/g) },
+               'has a correct first line': is('├─ oranges', 0),
+               'has a correct third line': is('│     └─ tangerine: so cheap and juicy!', 3),
+               'has nothing at the end':   is('', 7)
+            }
+         }
+      }
+   },
+
+   'A tree created from an object with not so circular references': {
+      topic: function() {
+         var obj = { one: 'one', two: { four: 'four' } };
+         obj['three'] = obj.two;
+         return obj;
+      },
+
+      'when returned line-by-line': {
+         topic: treeifyByLine,
+
+         'with values shown': {
+            topic: withValuesShown(true),
+            on: checkLines('├─ one: one',
+                           '├─ two',
+                           '│  └─ four: four',
+                           '└─ three',
+                           '   └─ four: four')
+         }
+      }
+   },
+
+   'A tree created from an object with circular references': {
+      topic: function() {
+         var obj = { one: 'one', two: 'two' };
+         obj['three'] = obj;
+         return obj;
+      },
+
+      'when returned line-by-line': {
+         topic: treeifyByLine,
+
+         'with values shown': {
+            topic: withValuesShown(true),
+            on: checkLines('├─ one: one',
+                           '├─ two: two',
+                           '└─ three (circular ref.)')
+         }
+      }
+   },
+
+   'A tree created from an object containing various types': {
+      topic: {
+         array: [ 'one', 'two' ],
+         numeric: 42,
+         decimal: 42.24,
+         bool: false,
+         nil: null,
+         undef: undefined,
+         date: new Date(2018,0,1)
+      },
+
+      'when returned line-by-line': {
+         topic: treeifyByLine,
+
+         'with values shown': {
+            topic: withValuesShown(true),
+            on: checkLines('├─ array',
+                           '│  ├─ 0: one',
+                           '│  └─ 1: two',
+                           '├─ numeric: 42',
+                           '├─ decimal: 42.24',
+                           '├─ bool: false',
+                           '├─ nil',
+                           '├─ undef: undefined',
+                           '└─ date: Mon Jan 01 2018 00:00:00 GMT+0000 (UTC)')
+         }
+      }
+   },
+
+   'A tree created from an object with prototyped functions': {
+      topic: function() {
+         var func = function(){
+            this.Friendly = 'stuff';
+         }
+         func.prototype.Nasty = function(){}
+         return new func();
+      },
+
+      'when returned as a whole tree': {
+         topic: treeifyEntirely,
+
+         'with values shown': {
+            topic: withValuesShown(true),
+
+            'and split into an array of lines': {
+               topic: function(tree) { return tree.split(/\n/g) },
+               'is a one liner output (with a following blank line)': function(lines) {
+                  assert.equal(lines.length, 2);
+               },
+               'has a correct first line': is('└─ Friendly: stuff', 0)
+            }
+         }
+      }
+   },
+   'A tree with functions': {
+      topic: {
+        func:function(){},
+        Friendly:"stuff",
+        Another:"stuff"
+      },
+
+      'when returned line-by-line': {
+         topic: treeifyByLineWithHideFunctionsArgument,
+
+         'with values shown, but functions hidden': {
+            topic: withValuesShownFunctionsHidden(),
+
+            'is two lines long': function(err, line) {
+               this.expect(2);
+            },
+            on: checkLines('├─ Friendly: stuff',
+                           '└─ Another: stuff')
+         }
+      },
+
+      'when returned as a whole tree': {
+         topic: treeifyEntirely,
+
+         'with values shown, but functions hidden': {
+            topic: withValuesShownFunctionsHidden(),
+
+            'and split into an array of lines': {
+               topic: function(tree) {
+                 console.error(tree);
+                 return tree.split(/\n/g) },
+               'is a one liner output (with a following blank line)': function(lines) {
+                  assert.equal(lines.length, 3);
+               },
+               'has a correct first line': is('├─ Friendly: stuff', 0)
+            }
+         }
+      }
+   }
+
+}).export(module);
diff --git a/node_modules/treeify/treeify.js b/node_modules/treeify/treeify.js
new file mode 100644
index 000000000..17fb428a0
--- /dev/null
+++ b/node_modules/treeify/treeify.js
@@ -0,0 +1,113 @@
+//     treeify.js
+//     Luke Plaster 
+//     https://github.com/notatestuser/treeify.js
+
+// do the universal module definition dance
+(function (root, factory) {
+
+  if (typeof exports === 'object') {
+    module.exports = factory();
+  } else if (typeof define === 'function' && define.amd) {
+    define(factory);
+  } else {
+    root.treeify = factory();
+  }
+
+}(this, function() {
+
+  function makePrefix(key, last) {
+    var str = (last ? '└' : '├');
+    if (key) {
+      str += '─ ';
+    } else {
+      str += '──┐';
+    }
+    return str;
+  }
+
+  function filterKeys(obj, hideFunctions) {
+    var keys = [];
+    for (var branch in obj) {
+      // always exclude anything in the object's prototype
+      if (!obj.hasOwnProperty(branch)) {
+        continue;
+      }
+      // ... and hide any keys mapped to functions if we've been told to
+      if (hideFunctions && ((typeof obj[branch])==="function")) {
+        continue;
+      }
+      keys.push(branch);
+    }
+    return keys;
+  }
+
+  function growBranch(key, root, last, lastStates, showValues, hideFunctions, callback) {
+    var line = '', index = 0, lastKey, circular, lastStatesCopy = lastStates.slice(0);
+
+    if (lastStatesCopy.push([ root, last ]) && lastStates.length > 0) {
+      // based on the "was last element" states of whatever we're nested within,
+      // we need to append either blankness or a branch to our line
+      lastStates.forEach(function(lastState, idx) {
+        if (idx > 0) {
+          line += (lastState[1] ? ' ' : '│') + '  ';
+        }
+        if ( ! circular && lastState[0] === root) {
+          circular = true;
+        }
+      });
+
+      // the prefix varies based on whether the key contains something to show and
+      // whether we're dealing with the last element in this collection
+      line += makePrefix(key, last) + key;
+
+      // append values and the circular reference indicator
+      showValues && (typeof root !== 'object' || root instanceof Date) && (line += ': ' + root);
+      circular && (line += ' (circular ref.)');
+
+      callback(line);
+    }
+
+    // can we descend into the next item?
+    if ( ! circular && typeof root === 'object') {
+      var keys = filterKeys(root, hideFunctions);
+      keys.forEach(function(branch){
+        // the last key is always printed with a different prefix, so we'll need to know if we have it
+        lastKey = ++index === keys.length;
+
+        // hold your breath for recursive action
+        growBranch(branch, root[branch], lastKey, lastStatesCopy, showValues, hideFunctions, callback);
+      });
+    }
+  };
+
+  // --------------------
+
+  var Treeify = {};
+
+  // Treeify.asLines
+  // --------------------
+  // Outputs the tree line-by-line, calling the lineCallback when each one is available.
+
+  Treeify.asLines = function(obj, showValues, hideFunctions, lineCallback) {
+    /* hideFunctions and lineCallback are curried, which means we don't break apps using the older form */
+    var hideFunctionsArg = typeof hideFunctions !== 'function' ? hideFunctions : false;
+    growBranch('.', obj, false, [], showValues, hideFunctionsArg, lineCallback || hideFunctions);
+  };
+
+  // Treeify.asTree
+  // --------------------
+  // Outputs the entire tree, returning it as a string with line breaks.
+
+  Treeify.asTree = function(obj, showValues, hideFunctions) {
+    var tree = '';
+    growBranch('.', obj, false, [], showValues, hideFunctions, function(line) {
+      tree += line + '\n';
+    });
+    return tree;
+  };
+
+  // --------------------
+
+  return Treeify;
+
+}));
diff --git a/node_modules/tslib/CopyrightNotice.txt b/node_modules/tslib/CopyrightNotice.txt
new file mode 100644
index 000000000..5d7d2d9ce
--- /dev/null
+++ b/node_modules/tslib/CopyrightNotice.txt
@@ -0,0 +1,15 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+
diff --git a/node_modules/tslib/LICENSE.txt b/node_modules/tslib/LICENSE.txt
new file mode 100644
index 000000000..fa7d1bdf9
--- /dev/null
+++ b/node_modules/tslib/LICENSE.txt
@@ -0,0 +1,12 @@
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/tslib/README.md b/node_modules/tslib/README.md
new file mode 100644
index 000000000..14b9a83dc
--- /dev/null
+++ b/node_modules/tslib/README.md
@@ -0,0 +1,164 @@
+# tslib
+
+This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
+
+This library is primarily used by the `--importHelpers` flag in TypeScript.
+When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
+
+```ts
+var __assign = (this && this.__assign) || Object.assign || function(t) {
+    for (var s, i = 1, n = arguments.length; i < n; i++) {
+        s = arguments[i];
+        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+            t[p] = s[p];
+    }
+    return t;
+};
+exports.x = {};
+exports.y = __assign({}, exports.x);
+
+```
+
+will instead be emitted as something like the following:
+
+```ts
+var tslib_1 = require("tslib");
+exports.x = {};
+exports.y = tslib_1.__assign({}, exports.x);
+```
+
+Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
+For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
+
+# Installing
+
+For the latest stable version, run:
+
+## npm
+
+```sh
+# TypeScript 3.9.2 or later
+npm install tslib
+
+# TypeScript 3.8.4 or earlier
+npm install tslib@^1
+
+# TypeScript 2.3.2 or earlier
+npm install tslib@1.6.1
+```
+
+## yarn
+
+```sh
+# TypeScript 3.9.2 or later
+yarn add tslib
+
+# TypeScript 3.8.4 or earlier
+yarn add tslib@^1
+
+# TypeScript 2.3.2 or earlier
+yarn add tslib@1.6.1
+```
+
+## bower
+
+```sh
+# TypeScript 3.9.2 or later
+bower install tslib
+
+# TypeScript 3.8.4 or earlier
+bower install tslib@^1
+
+# TypeScript 2.3.2 or earlier
+bower install tslib@1.6.1
+```
+
+## JSPM
+
+```sh
+# TypeScript 3.9.2 or later
+jspm install tslib
+
+# TypeScript 3.8.4 or earlier
+jspm install tslib@^1
+
+# TypeScript 2.3.2 or earlier
+jspm install tslib@1.6.1
+```
+
+# Usage
+
+Set the `importHelpers` compiler option on the command line:
+
+```
+tsc --importHelpers file.ts
+```
+
+or in your tsconfig.json:
+
+```json
+{
+    "compilerOptions": {
+        "importHelpers": true
+    }
+}
+```
+
+#### For bower and JSPM users
+
+You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
+
+```json
+{
+    "compilerOptions": {
+        "module": "amd",
+        "importHelpers": true,
+        "baseUrl": "./",
+        "paths": {
+            "tslib" : ["bower_components/tslib/tslib.d.ts"]
+        }
+    }
+}
+```
+
+For JSPM users:
+
+```json
+{
+    "compilerOptions": {
+        "module": "system",
+        "importHelpers": true,
+        "baseUrl": "./",
+        "paths": {
+            "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"]
+        }
+    }
+}
+```
+
+## Deployment
+
+- Choose your new version number
+- Set it in `package.json` and `bower.json`
+- Create a tag: `git tag [version]`
+- Push the tag: `git push --tags`
+- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
+- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
+
+Done.
+
+# Contribute
+
+There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
+
+* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
+* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
+* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
+* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
+* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
+
+# Documentation
+
+* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
+* [Programming handbook](http://www.typescriptlang.org/Handbook)
+* [Homepage](http://www.typescriptlang.org/)
diff --git a/node_modules/tslib/SECURITY.md b/node_modules/tslib/SECURITY.md
new file mode 100644
index 000000000..869fdfe2b
--- /dev/null
+++ b/node_modules/tslib/SECURITY.md
@@ -0,0 +1,41 @@
+
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+  * Full paths of source file(s) related to the manifestation of the issue
+  * The location of the affected source code (tag/branch/commit or direct URL)
+  * Any special configuration required to reproduce the issue
+  * Step-by-step instructions to reproduce the issue
+  * Proof-of-concept or exploit code (if possible)
+  * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+
diff --git a/node_modules/tslib/modules/index.d.ts b/node_modules/tslib/modules/index.d.ts
new file mode 100644
index 000000000..3244fabee
--- /dev/null
+++ b/node_modules/tslib/modules/index.d.ts
@@ -0,0 +1,38 @@
+// Note: named reexports are used instead of `export *` because
+// TypeScript itself doesn't resolve the `export *` when checking
+// if a particular helper exists.
+export {
+  __extends,
+  __assign,
+  __rest,
+  __decorate,
+  __param,
+  __esDecorate,
+  __runInitializers,
+  __propKey,
+  __setFunctionName,
+  __metadata,
+  __awaiter,
+  __generator,
+  __exportStar,
+  __values,
+  __read,
+  __spread,
+  __spreadArrays,
+  __spreadArray,
+  __await,
+  __asyncGenerator,
+  __asyncDelegator,
+  __asyncValues,
+  __makeTemplateObject,
+  __importStar,
+  __importDefault,
+  __classPrivateFieldGet,
+  __classPrivateFieldSet,
+  __classPrivateFieldIn,
+  __createBinding,
+  __addDisposableResource,
+  __disposeResources,
+  __rewriteRelativeImportExtension,
+} from '../tslib.js';
+export * as default from '../tslib.js';
diff --git a/node_modules/tslib/modules/index.js b/node_modules/tslib/modules/index.js
new file mode 100644
index 000000000..f4f9a06d2
--- /dev/null
+++ b/node_modules/tslib/modules/index.js
@@ -0,0 +1,70 @@
+import tslib from '../tslib.js';
+const {
+    __extends,
+    __assign,
+    __rest,
+    __decorate,
+    __param,
+    __esDecorate,
+    __runInitializers,
+    __propKey,
+    __setFunctionName,
+    __metadata,
+    __awaiter,
+    __generator,
+    __exportStar,
+    __createBinding,
+    __values,
+    __read,
+    __spread,
+    __spreadArrays,
+    __spreadArray,
+    __await,
+    __asyncGenerator,
+    __asyncDelegator,
+    __asyncValues,
+    __makeTemplateObject,
+    __importStar,
+    __importDefault,
+    __classPrivateFieldGet,
+    __classPrivateFieldSet,
+    __classPrivateFieldIn,
+    __addDisposableResource,
+    __disposeResources,
+    __rewriteRelativeImportExtension,
+} = tslib;
+export {
+    __extends,
+    __assign,
+    __rest,
+    __decorate,
+    __param,
+    __esDecorate,
+    __runInitializers,
+    __propKey,
+    __setFunctionName,
+    __metadata,
+    __awaiter,
+    __generator,
+    __exportStar,
+    __createBinding,
+    __values,
+    __read,
+    __spread,
+    __spreadArrays,
+    __spreadArray,
+    __await,
+    __asyncGenerator,
+    __asyncDelegator,
+    __asyncValues,
+    __makeTemplateObject,
+    __importStar,
+    __importDefault,
+    __classPrivateFieldGet,
+    __classPrivateFieldSet,
+    __classPrivateFieldIn,
+    __addDisposableResource,
+    __disposeResources,
+    __rewriteRelativeImportExtension,
+};
+export default tslib;
diff --git a/node_modules/tslib/modules/package.json b/node_modules/tslib/modules/package.json
new file mode 100644
index 000000000..96ae6e57e
--- /dev/null
+++ b/node_modules/tslib/modules/package.json
@@ -0,0 +1,3 @@
+{
+    "type": "module"
+}
\ No newline at end of file
diff --git a/node_modules/tslib/package.json b/node_modules/tslib/package.json
new file mode 100644
index 000000000..57d057876
--- /dev/null
+++ b/node_modules/tslib/package.json
@@ -0,0 +1,47 @@
+{
+    "name": "tslib",
+    "author": "Microsoft Corp.",
+    "homepage": "https://www.typescriptlang.org/",
+    "version": "2.8.1",
+    "license": "0BSD",
+    "description": "Runtime library for TypeScript helper functions",
+    "keywords": [
+        "TypeScript",
+        "Microsoft",
+        "compiler",
+        "language",
+        "javascript",
+        "tslib",
+        "runtime"
+    ],
+    "bugs": {
+        "url": "https://github.com/Microsoft/TypeScript/issues"
+    },
+    "repository": {
+        "type": "git",
+        "url": "https://github.com/Microsoft/tslib.git"
+    },
+    "main": "tslib.js",
+    "module": "tslib.es6.js",
+    "jsnext:main": "tslib.es6.js",
+    "typings": "tslib.d.ts",
+    "sideEffects": false,
+    "exports": {
+        ".": {
+            "module": {
+                "types": "./modules/index.d.ts",
+                "default": "./tslib.es6.mjs"
+            },
+            "import": {
+                "node": "./modules/index.js",
+                "default": {
+                    "types": "./modules/index.d.ts",
+                    "default": "./tslib.es6.mjs"
+                }
+            },
+            "default": "./tslib.js"
+        },
+        "./*": "./*",
+        "./": "./"
+    }
+}
diff --git a/node_modules/tslib/tslib.d.ts b/node_modules/tslib/tslib.d.ts
new file mode 100644
index 000000000..9c27e0586
--- /dev/null
+++ b/node_modules/tslib/tslib.d.ts
@@ -0,0 +1,460 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+
+/**
+ * Used to shim class extends.
+ *
+ * @param d The derived class.
+ * @param b The base class.
+ */
+export declare function __extends(d: Function, b: Function): void;
+
+/**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ *
+ * @param t The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+export declare function __assign(t: any, ...sources: any[]): any;
+
+/**
+ * Performs a rest spread on an object.
+ *
+ * @param t The source value.
+ * @param propertyNames The property names excluded from the rest spread.
+ */
+export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
+
+/**
+ * Applies decorators to a target object
+ *
+ * @param decorators The set of decorators to apply.
+ * @param target The target object.
+ * @param key If specified, the own property to apply the decorators to.
+ * @param desc The property descriptor, defaults to fetching the descriptor from the target object.
+ * @experimental
+ */
+export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
+
+/**
+ * Creates an observing function decorator from a parameter decorator.
+ *
+ * @param paramIndex The parameter index to apply the decorator to.
+ * @param decorator The parameter decorator to apply. Note that the return value is ignored.
+ * @experimental
+ */
+export declare function __param(paramIndex: number, decorator: Function): Function;
+
+/**
+ * Applies decorators to a class or class member, following the native ECMAScript decorator specification.
+ * @param ctor For non-field class members, the class constructor. Otherwise, `null`.
+ * @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`.
+ * @param decorators The decorators to apply
+ * @param contextIn The `DecoratorContext` to clone for each decorator application.
+ * @param initializers An array of field initializer mutation functions into which new initializers are written.
+ * @param extraInitializers An array of extra initializer functions into which new initializers are written.
+ */
+export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void;
+
+/**
+ * Runs field initializers or extra initializers generated by `__esDecorate`.
+ * @param thisArg The `this` argument to use.
+ * @param initializers The array of initializers to evaluate.
+ * @param value The initial value to pass to the initializers.
+ */
+export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any;
+
+/**
+ * Converts a computed property name into a `string` or `symbol` value.
+ */
+export declare function __propKey(x: any): string | symbol;
+
+/**
+ * Assigns the name of a function derived from the left-hand side of an assignment.
+ * @param f The function to rename.
+ * @param name The new name for the function.
+ * @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name.
+ */
+export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function;
+
+/**
+ * Creates a decorator that sets metadata.
+ *
+ * @param metadataKey The metadata key
+ * @param metadataValue The metadata value
+ * @experimental
+ */
+export declare function __metadata(metadataKey: any, metadataValue: any): Function;
+
+/**
+ * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`.
+ *
+ * @param thisArg The reference to use as the `this` value in the generator function
+ * @param _arguments The optional arguments array
+ * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object.
+ * @param generator The generator function
+ */
+export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
+
+/**
+ * Creates an Iterator object using the body as the implementation.
+ *
+ * @param thisArg The reference to use as the `this` value in the function
+ * @param body The generator state-machine based implementation.
+ *
+ * @see [./docs/generator.md]
+ */
+export declare function __generator(thisArg: any, body: Function): any;
+
+/**
+ * Creates bindings for all enumerable properties of `m` on `exports`
+ *
+ * @param m The source object
+ * @param o The `exports` object.
+ */
+export declare function __exportStar(m: any, o: any): void;
+
+/**
+ * Creates a value iterator from an `Iterable` or `ArrayLike` object.
+ *
+ * @param o The object.
+ * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`.
+ */
+export declare function __values(o: any): any;
+
+/**
+ * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array.
+ *
+ * @param o The object to read from.
+ * @param n The maximum number of arguments to read, defaults to `Infinity`.
+ */
+export declare function __read(o: any, n?: number): any[];
+
+/**
+ * Creates an array from iterable spread.
+ *
+ * @param args The Iterable objects to spread.
+ * @deprecated since TypeScript 4.2 - Use `__spreadArray`
+ */
+export declare function __spread(...args: any[][]): any[];
+
+/**
+ * Creates an array from array spread.
+ *
+ * @param args The ArrayLikes to spread into the resulting array.
+ * @deprecated since TypeScript 4.2 - Use `__spreadArray`
+ */
+export declare function __spreadArrays(...args: any[][]): any[];
+
+/**
+ * Spreads the `from` array into the `to` array.
+ *
+ * @param pack Replace empty elements with `undefined`.
+ */
+export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
+
+/**
+ * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded,
+ * and instead should be awaited and the resulting value passed back to the generator.
+ *
+ * @param v The value to await.
+ */
+export declare function __await(v: any): any;
+
+/**
+ * Converts a generator function into an async generator function, by using `yield __await`
+ * in place of normal `await`.
+ *
+ * @param thisArg The reference to use as the `this` value in the generator function
+ * @param _arguments The optional arguments array
+ * @param generator The generator function
+ */
+export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
+
+/**
+ * Used to wrap a potentially async iterator in such a way so that it wraps the result
+ * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values.
+ *
+ * @param o The potentially async iterator.
+ * @returns A synchronous iterator yielding `__await` instances on every odd invocation
+ *          and returning the awaited `IteratorResult` passed to `next` every even invocation.
+ */
+export declare function __asyncDelegator(o: any): any;
+
+/**
+ * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object.
+ *
+ * @param o The object.
+ * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`.
+ */
+export declare function __asyncValues(o: any): any;
+
+/**
+ * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays.
+ *
+ * @param cooked The cooked possibly-sparse array.
+ * @param raw The raw string content.
+ */
+export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
+
+/**
+ * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS.
+ *
+ * ```js
+ * import Default, { Named, Other } from "mod";
+ * // or
+ * import { default as Default, Named, Other } from "mod";
+ * ```
+ *
+ * @param mod The CommonJS module exports object.
+ */
+export declare function __importStar(mod: T): T;
+
+/**
+ * Used to shim default imports in ECMAScript Modules transpiled to CommonJS.
+ *
+ * ```js
+ * import Default from "mod";
+ * ```
+ *
+ * @param mod The CommonJS module exports object.
+ */
+export declare function __importDefault(mod: T): T | { default: T };
+
+/**
+ * Emulates reading a private instance field.
+ *
+ * @param receiver The instance from which to read the private field.
+ * @param state A WeakMap containing the private field value for an instance.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldGet(
+    receiver: T,
+    state: { has(o: T): boolean, get(o: T): V | undefined },
+    kind?: "f"
+): V;
+
+/**
+ * Emulates reading a private static field.
+ *
+ * @param receiver The object from which to read the private static field.
+ * @param state The class constructor containing the definition of the static field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The descriptor that holds the static field value.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldGet unknown, V>(
+    receiver: T,
+    state: T,
+    kind: "f",
+    f: { value: V }
+): V;
+
+/**
+ * Emulates evaluating a private instance "get" accessor.
+ *
+ * @param receiver The instance on which to evaluate the private "get" accessor.
+ * @param state A WeakSet used to verify an instance supports the private "get" accessor.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "get" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldGet(
+    receiver: T,
+    state: { has(o: T): boolean },
+    kind: "a",
+    f: () => V
+): V;
+
+/**
+ * Emulates evaluating a private static "get" accessor.
+ *
+ * @param receiver The object on which to evaluate the private static "get" accessor.
+ * @param state The class constructor containing the definition of the static "get" accessor.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "get" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldGet unknown, V>(
+    receiver: T,
+    state: T,
+    kind: "a",
+    f: () => V
+): V;
+
+/**
+ * Emulates reading a private instance method.
+ *
+ * @param receiver The instance from which to read a private method.
+ * @param state A WeakSet used to verify an instance supports the private method.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The function to return as the private instance method.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldGet unknown>(
+    receiver: T,
+    state: { has(o: T): boolean },
+    kind: "m",
+    f: V
+): V;
+
+/**
+ * Emulates reading a private static method.
+ *
+ * @param receiver The object from which to read the private static method.
+ * @param state The class constructor containing the definition of the static method.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The function to return as the private static method.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldGet unknown, V extends (...args: any[]) => unknown>(
+    receiver: T,
+    state: T,
+    kind: "m",
+    f: V
+): V;
+
+/**
+ * Emulates writing to a private instance field.
+ *
+ * @param receiver The instance on which to set a private field value.
+ * @param state A WeakMap used to store the private field value for an instance.
+ * @param value The value to store in the private field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldSet(
+    receiver: T,
+    state: { has(o: T): boolean, set(o: T, value: V): unknown },
+    value: V,
+    kind?: "f"
+): V;
+
+/**
+ * Emulates writing to a private static field.
+ *
+ * @param receiver The object on which to set the private static field.
+ * @param state The class constructor containing the definition of the private static field.
+ * @param value The value to store in the private field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The descriptor that holds the static field value.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldSet unknown, V>(
+    receiver: T,
+    state: T,
+    value: V,
+    kind: "f",
+    f: { value: V }
+): V;
+
+/**
+ * Emulates writing to a private instance "set" accessor.
+ *
+ * @param receiver The instance on which to evaluate the private instance "set" accessor.
+ * @param state A WeakSet used to verify an instance supports the private "set" accessor.
+ * @param value The value to store in the private accessor.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "set" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldSet(
+    receiver: T,
+    state: { has(o: T): boolean },
+    value: V,
+    kind: "a",
+    f: (v: V) => void
+): V;
+
+/**
+ * Emulates writing to a private static "set" accessor.
+ *
+ * @param receiver The object on which to evaluate the private static "set" accessor.
+ * @param state The class constructor containing the definition of the static "set" accessor.
+ * @param value The value to store in the private field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "set" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldSet unknown, V>(
+    receiver: T,
+    state: T,
+    value: V,
+    kind: "a",
+    f: (v: V) => void
+): V;
+
+/**
+ * Checks for the existence of a private field/method/accessor.
+ *
+ * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member.
+ * @param receiver The object for which to test the presence of the private member.
+ */
+export declare function __classPrivateFieldIn(
+    state: (new (...args: any[]) => unknown) | { has(o: any): boolean },
+    receiver: unknown,
+): boolean;
+
+/**
+ * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`.
+ *
+ * @param object The local `exports` object.
+ * @param target The object to re-export from.
+ * @param key The property key of `target` to re-export.
+ * @param objectKey The property key to re-export as. Defaults to `key`.
+ */
+export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
+
+/**
+ * Adds a disposable resource to a resource-tracking environment object.
+ * @param env A resource-tracking environment object.
+ * @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`.
+ * @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added.
+ * @returns The {@link value} argument.
+ *
+ * @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not
+ * defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method.
+ */
+export declare function __addDisposableResource(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T;
+
+/**
+ * Disposes all resources in a resource-tracking environment object.
+ * @param env A resource-tracking environment object.
+ * @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`.
+ *
+ * @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the
+ * error recorded in the resource-tracking environment object.
+ * @seealso {@link __addDisposableResource}
+ */
+export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any;
+
+/**
+ * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart.
+ * @param path The import specifier.
+ * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`.
+ */
+export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string;
\ No newline at end of file
diff --git a/node_modules/tslib/tslib.es6.html b/node_modules/tslib/tslib.es6.html
new file mode 100644
index 000000000..b122e41b0
--- /dev/null
+++ b/node_modules/tslib/tslib.es6.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/node_modules/tslib/tslib.es6.js b/node_modules/tslib/tslib.es6.js
new file mode 100644
index 000000000..67ba5c5ae
--- /dev/null
+++ b/node_modules/tslib/tslib.es6.js
@@ -0,0 +1,402 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
+
+var extendStatics = function(d, b) {
+    extendStatics = Object.setPrototypeOf ||
+        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+    return extendStatics(d, b);
+};
+
+export function __extends(d, b) {
+    if (typeof b !== "function" && b !== null)
+        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+    extendStatics(d, b);
+    function __() { this.constructor = d; }
+    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+export var __assign = function() {
+    __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+            s = arguments[i];
+            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+        }
+        return t;
+    }
+    return __assign.apply(this, arguments);
+}
+
+export function __rest(s, e) {
+    var t = {};
+    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+        t[p] = s[p];
+    if (s != null && typeof Object.getOwnPropertySymbols === "function")
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+                t[p[i]] = s[p[i]];
+        }
+    return t;
+}
+
+export function __decorate(decorators, target, key, desc) {
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
+}
+
+export function __param(paramIndex, decorator) {
+    return function (target, key) { decorator(target, key, paramIndex); }
+}
+
+export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+    var _, done = false;
+    for (var i = decorators.length - 1; i >= 0; i--) {
+        var context = {};
+        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+        if (kind === "accessor") {
+            if (result === void 0) continue;
+            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+            if (_ = accept(result.get)) descriptor.get = _;
+            if (_ = accept(result.set)) descriptor.set = _;
+            if (_ = accept(result.init)) initializers.unshift(_);
+        }
+        else if (_ = accept(result)) {
+            if (kind === "field") initializers.unshift(_);
+            else descriptor[key] = _;
+        }
+    }
+    if (target) Object.defineProperty(target, contextIn.name, descriptor);
+    done = true;
+};
+
+export function __runInitializers(thisArg, initializers, value) {
+    var useValue = arguments.length > 2;
+    for (var i = 0; i < initializers.length; i++) {
+        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+    }
+    return useValue ? value : void 0;
+};
+
+export function __propKey(x) {
+    return typeof x === "symbol" ? x : "".concat(x);
+};
+
+export function __setFunctionName(f, name, prefix) {
+    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+};
+
+export function __metadata(metadataKey, metadataValue) {
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+}
+
+export function __awaiter(thisArg, _arguments, P, generator) {
+    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+    return new (P || (P = Promise))(function (resolve, reject) {
+        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+    });
+}
+
+export function __generator(thisArg, body) {
+    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+    function verb(n) { return function (v) { return step([n, v]); }; }
+    function step(op) {
+        if (f) throw new TypeError("Generator is already executing.");
+        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+            if (y = 0, t) op = [op[0] & 2, t.value];
+            switch (op[0]) {
+                case 0: case 1: t = op; break;
+                case 4: _.label++; return { value: op[1], done: false };
+                case 5: _.label++; y = op[1]; op = [0]; continue;
+                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+                default:
+                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+                    if (t[2]) _.ops.pop();
+                    _.trys.pop(); continue;
+            }
+            op = body.call(thisArg, _);
+        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+    }
+}
+
+export var __createBinding = Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+        desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+});
+
+export function __exportStar(m, o) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
+}
+
+export function __values(o) {
+    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+    if (m) return m.call(o);
+    if (o && typeof o.length === "number") return {
+        next: function () {
+            if (o && i >= o.length) o = void 0;
+            return { value: o && o[i++], done: !o };
+        }
+    };
+    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+}
+
+export function __read(o, n) {
+    var m = typeof Symbol === "function" && o[Symbol.iterator];
+    if (!m) return o;
+    var i = m.call(o), r, ar = [], e;
+    try {
+        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+    }
+    catch (error) { e = { error: error }; }
+    finally {
+        try {
+            if (r && !r.done && (m = i["return"])) m.call(i);
+        }
+        finally { if (e) throw e.error; }
+    }
+    return ar;
+}
+
+/** @deprecated */
+export function __spread() {
+    for (var ar = [], i = 0; i < arguments.length; i++)
+        ar = ar.concat(__read(arguments[i]));
+    return ar;
+}
+
+/** @deprecated */
+export function __spreadArrays() {
+    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
+    for (var r = Array(s), k = 0, i = 0; i < il; i++)
+        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+            r[k] = a[j];
+    return r;
+}
+
+export function __spreadArray(to, from, pack) {
+    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+        if (ar || !(i in from)) {
+            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+            ar[i] = from[i];
+        }
+    }
+    return to.concat(ar || Array.prototype.slice.call(from));
+}
+
+export function __await(v) {
+    return this instanceof __await ? (this.v = v, this) : new __await(v);
+}
+
+export function __asyncGenerator(thisArg, _arguments, generator) {
+    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+    var g = generator.apply(thisArg, _arguments || []), i, q = [];
+    return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
+    function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
+    function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
+    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+    function fulfill(value) { resume("next", value); }
+    function reject(value) { resume("throw", value); }
+    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+}
+
+export function __asyncDelegator(o) {
+    var i, p;
+    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+}
+
+export function __asyncValues(o) {
+    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+    var m = o[Symbol.asyncIterator], i;
+    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+}
+
+export function __makeTemplateObject(cooked, raw) {
+    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+    return cooked;
+};
+
+var __setModuleDefault = Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+};
+
+var ownKeys = function(o) {
+    ownKeys = Object.getOwnPropertyNames || function (o) {
+        var ar = [];
+        for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+        return ar;
+    };
+    return ownKeys(o);
+};
+
+export function __importStar(mod) {
+    if (mod && mod.__esModule) return mod;
+    var result = {};
+    if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+    __setModuleDefault(result, mod);
+    return result;
+}
+
+export function __importDefault(mod) {
+    return (mod && mod.__esModule) ? mod : { default: mod };
+}
+
+export function __classPrivateFieldGet(receiver, state, kind, f) {
+    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+}
+
+export function __classPrivateFieldSet(receiver, state, value, kind, f) {
+    if (kind === "m") throw new TypeError("Private method is not writable");
+    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+}
+
+export function __classPrivateFieldIn(state, receiver) {
+    if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+    return typeof state === "function" ? receiver === state : state.has(receiver);
+}
+
+export function __addDisposableResource(env, value, async) {
+    if (value !== null && value !== void 0) {
+        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+        var dispose, inner;
+        if (async) {
+            if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+            dispose = value[Symbol.asyncDispose];
+        }
+        if (dispose === void 0) {
+            if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+            dispose = value[Symbol.dispose];
+            if (async) inner = dispose;
+        }
+        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+        if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
+        env.stack.push({ value: value, dispose: dispose, async: async });
+    }
+    else if (async) {
+        env.stack.push({ async: true });
+    }
+    return value;
+
+}
+
+var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+    var e = new Error(message);
+    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+};
+
+export function __disposeResources(env) {
+    function fail(e) {
+        env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+        env.hasError = true;
+    }
+    var r, s = 0;
+    function next() {
+        while (r = env.stack.pop()) {
+            try {
+                if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
+                if (r.dispose) {
+                    var result = r.dispose.call(r.value);
+                    if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+                }
+                else s |= 1;
+            }
+            catch (e) {
+                fail(e);
+            }
+        }
+        if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
+        if (env.hasError) throw env.error;
+    }
+    return next();
+}
+
+export function __rewriteRelativeImportExtension(path, preserveJsx) {
+    if (typeof path === "string" && /^\.\.?\//.test(path)) {
+        return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
+            return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
+        });
+    }
+    return path;
+}
+
+export default {
+    __extends: __extends,
+    __assign: __assign,
+    __rest: __rest,
+    __decorate: __decorate,
+    __param: __param,
+    __esDecorate: __esDecorate,
+    __runInitializers: __runInitializers,
+    __propKey: __propKey,
+    __setFunctionName: __setFunctionName,
+    __metadata: __metadata,
+    __awaiter: __awaiter,
+    __generator: __generator,
+    __createBinding: __createBinding,
+    __exportStar: __exportStar,
+    __values: __values,
+    __read: __read,
+    __spread: __spread,
+    __spreadArrays: __spreadArrays,
+    __spreadArray: __spreadArray,
+    __await: __await,
+    __asyncGenerator: __asyncGenerator,
+    __asyncDelegator: __asyncDelegator,
+    __asyncValues: __asyncValues,
+    __makeTemplateObject: __makeTemplateObject,
+    __importStar: __importStar,
+    __importDefault: __importDefault,
+    __classPrivateFieldGet: __classPrivateFieldGet,
+    __classPrivateFieldSet: __classPrivateFieldSet,
+    __classPrivateFieldIn: __classPrivateFieldIn,
+    __addDisposableResource: __addDisposableResource,
+    __disposeResources: __disposeResources,
+    __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
+};
diff --git a/node_modules/tslib/tslib.es6.mjs b/node_modules/tslib/tslib.es6.mjs
new file mode 100644
index 000000000..c17990a13
--- /dev/null
+++ b/node_modules/tslib/tslib.es6.mjs
@@ -0,0 +1,401 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
+
+var extendStatics = function(d, b) {
+  extendStatics = Object.setPrototypeOf ||
+      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+  return extendStatics(d, b);
+};
+
+export function __extends(d, b) {
+  if (typeof b !== "function" && b !== null)
+      throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+  extendStatics(d, b);
+  function __() { this.constructor = d; }
+  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+export var __assign = function() {
+  __assign = Object.assign || function __assign(t) {
+      for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+      }
+      return t;
+  }
+  return __assign.apply(this, arguments);
+}
+
+export function __rest(s, e) {
+  var t = {};
+  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+      t[p] = s[p];
+  if (s != null && typeof Object.getOwnPropertySymbols === "function")
+      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+              t[p[i]] = s[p[i]];
+      }
+  return t;
+}
+
+export function __decorate(decorators, target, key, desc) {
+  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+  return c > 3 && r && Object.defineProperty(target, key, r), r;
+}
+
+export function __param(paramIndex, decorator) {
+  return function (target, key) { decorator(target, key, paramIndex); }
+}
+
+export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+  function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+  var _, done = false;
+  for (var i = decorators.length - 1; i >= 0; i--) {
+      var context = {};
+      for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+      for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+      context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+      var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+      if (kind === "accessor") {
+          if (result === void 0) continue;
+          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+          if (_ = accept(result.get)) descriptor.get = _;
+          if (_ = accept(result.set)) descriptor.set = _;
+          if (_ = accept(result.init)) initializers.unshift(_);
+      }
+      else if (_ = accept(result)) {
+          if (kind === "field") initializers.unshift(_);
+          else descriptor[key] = _;
+      }
+  }
+  if (target) Object.defineProperty(target, contextIn.name, descriptor);
+  done = true;
+};
+
+export function __runInitializers(thisArg, initializers, value) {
+  var useValue = arguments.length > 2;
+  for (var i = 0; i < initializers.length; i++) {
+      value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+  }
+  return useValue ? value : void 0;
+};
+
+export function __propKey(x) {
+  return typeof x === "symbol" ? x : "".concat(x);
+};
+
+export function __setFunctionName(f, name, prefix) {
+  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+};
+
+export function __metadata(metadataKey, metadataValue) {
+  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+}
+
+export function __awaiter(thisArg, _arguments, P, generator) {
+  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+  return new (P || (P = Promise))(function (resolve, reject) {
+      function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+      function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+      function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+      step((generator = generator.apply(thisArg, _arguments || [])).next());
+  });
+}
+
+export function __generator(thisArg, body) {
+  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+  return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+  function verb(n) { return function (v) { return step([n, v]); }; }
+  function step(op) {
+      if (f) throw new TypeError("Generator is already executing.");
+      while (g && (g = 0, op[0] && (_ = 0)), _) try {
+          if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+          if (y = 0, t) op = [op[0] & 2, t.value];
+          switch (op[0]) {
+              case 0: case 1: t = op; break;
+              case 4: _.label++; return { value: op[1], done: false };
+              case 5: _.label++; y = op[1]; op = [0]; continue;
+              case 7: op = _.ops.pop(); _.trys.pop(); continue;
+              default:
+                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+                  if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+                  if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+                  if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+                  if (t[2]) _.ops.pop();
+                  _.trys.pop(); continue;
+          }
+          op = body.call(thisArg, _);
+      } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+      if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+  }
+}
+
+export var __createBinding = Object.create ? (function(o, m, k, k2) {
+  if (k2 === undefined) k2 = k;
+  var desc = Object.getOwnPropertyDescriptor(m, k);
+  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+  }
+  Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+  if (k2 === undefined) k2 = k;
+  o[k2] = m[k];
+});
+
+export function __exportStar(m, o) {
+  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
+}
+
+export function __values(o) {
+  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+  if (m) return m.call(o);
+  if (o && typeof o.length === "number") return {
+      next: function () {
+          if (o && i >= o.length) o = void 0;
+          return { value: o && o[i++], done: !o };
+      }
+  };
+  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+}
+
+export function __read(o, n) {
+  var m = typeof Symbol === "function" && o[Symbol.iterator];
+  if (!m) return o;
+  var i = m.call(o), r, ar = [], e;
+  try {
+      while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+  }
+  catch (error) { e = { error: error }; }
+  finally {
+      try {
+          if (r && !r.done && (m = i["return"])) m.call(i);
+      }
+      finally { if (e) throw e.error; }
+  }
+  return ar;
+}
+
+/** @deprecated */
+export function __spread() {
+  for (var ar = [], i = 0; i < arguments.length; i++)
+      ar = ar.concat(__read(arguments[i]));
+  return ar;
+}
+
+/** @deprecated */
+export function __spreadArrays() {
+  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
+  for (var r = Array(s), k = 0, i = 0; i < il; i++)
+      for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+          r[k] = a[j];
+  return r;
+}
+
+export function __spreadArray(to, from, pack) {
+  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+      if (ar || !(i in from)) {
+          if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+          ar[i] = from[i];
+      }
+  }
+  return to.concat(ar || Array.prototype.slice.call(from));
+}
+
+export function __await(v) {
+  return this instanceof __await ? (this.v = v, this) : new __await(v);
+}
+
+export function __asyncGenerator(thisArg, _arguments, generator) {
+  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+  var g = generator.apply(thisArg, _arguments || []), i, q = [];
+  return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
+  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
+  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
+  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+  function fulfill(value) { resume("next", value); }
+  function reject(value) { resume("throw", value); }
+  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+}
+
+export function __asyncDelegator(o) {
+  var i, p;
+  return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+  function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+}
+
+export function __asyncValues(o) {
+  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+  var m = o[Symbol.asyncIterator], i;
+  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+}
+
+export function __makeTemplateObject(cooked, raw) {
+  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+  return cooked;
+};
+
+var __setModuleDefault = Object.create ? (function(o, v) {
+  Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+  o["default"] = v;
+};
+
+var ownKeys = function(o) {
+  ownKeys = Object.getOwnPropertyNames || function (o) {
+    var ar = [];
+    for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+    return ar;
+  };
+  return ownKeys(o);
+};
+
+export function __importStar(mod) {
+  if (mod && mod.__esModule) return mod;
+  var result = {};
+  if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+  __setModuleDefault(result, mod);
+  return result;
+}
+
+export function __importDefault(mod) {
+  return (mod && mod.__esModule) ? mod : { default: mod };
+}
+
+export function __classPrivateFieldGet(receiver, state, kind, f) {
+  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+}
+
+export function __classPrivateFieldSet(receiver, state, value, kind, f) {
+  if (kind === "m") throw new TypeError("Private method is not writable");
+  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+}
+
+export function __classPrivateFieldIn(state, receiver) {
+  if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+  return typeof state === "function" ? receiver === state : state.has(receiver);
+}
+
+export function __addDisposableResource(env, value, async) {
+  if (value !== null && value !== void 0) {
+    if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+    var dispose, inner;
+    if (async) {
+      if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+      dispose = value[Symbol.asyncDispose];
+    }
+    if (dispose === void 0) {
+      if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+      dispose = value[Symbol.dispose];
+      if (async) inner = dispose;
+    }
+    if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+    if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
+    env.stack.push({ value: value, dispose: dispose, async: async });
+  }
+  else if (async) {
+    env.stack.push({ async: true });
+  }
+  return value;
+}
+
+var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+  var e = new Error(message);
+  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+};
+
+export function __disposeResources(env) {
+  function fail(e) {
+    env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+    env.hasError = true;
+  }
+  var r, s = 0;
+  function next() {
+    while (r = env.stack.pop()) {
+      try {
+        if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
+        if (r.dispose) {
+          var result = r.dispose.call(r.value);
+          if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+        }
+        else s |= 1;
+      }
+      catch (e) {
+        fail(e);
+      }
+    }
+    if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
+    if (env.hasError) throw env.error;
+  }
+  return next();
+}
+
+export function __rewriteRelativeImportExtension(path, preserveJsx) {
+  if (typeof path === "string" && /^\.\.?\//.test(path)) {
+      return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
+          return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
+      });
+  }
+  return path;
+}
+
+export default {
+  __extends,
+  __assign,
+  __rest,
+  __decorate,
+  __param,
+  __esDecorate,
+  __runInitializers,
+  __propKey,
+  __setFunctionName,
+  __metadata,
+  __awaiter,
+  __generator,
+  __createBinding,
+  __exportStar,
+  __values,
+  __read,
+  __spread,
+  __spreadArrays,
+  __spreadArray,
+  __await,
+  __asyncGenerator,
+  __asyncDelegator,
+  __asyncValues,
+  __makeTemplateObject,
+  __importStar,
+  __importDefault,
+  __classPrivateFieldGet,
+  __classPrivateFieldSet,
+  __classPrivateFieldIn,
+  __addDisposableResource,
+  __disposeResources,
+  __rewriteRelativeImportExtension,
+};
diff --git a/node_modules/tslib/tslib.html b/node_modules/tslib/tslib.html
new file mode 100644
index 000000000..44c9ba51e
--- /dev/null
+++ b/node_modules/tslib/tslib.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/node_modules/tslib/tslib.js b/node_modules/tslib/tslib.js
new file mode 100644
index 000000000..b6509f775
--- /dev/null
+++ b/node_modules/tslib/tslib.js
@@ -0,0 +1,484 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */
+var __extends;
+var __assign;
+var __rest;
+var __decorate;
+var __param;
+var __esDecorate;
+var __runInitializers;
+var __propKey;
+var __setFunctionName;
+var __metadata;
+var __awaiter;
+var __generator;
+var __exportStar;
+var __values;
+var __read;
+var __spread;
+var __spreadArrays;
+var __spreadArray;
+var __await;
+var __asyncGenerator;
+var __asyncDelegator;
+var __asyncValues;
+var __makeTemplateObject;
+var __importStar;
+var __importDefault;
+var __classPrivateFieldGet;
+var __classPrivateFieldSet;
+var __classPrivateFieldIn;
+var __createBinding;
+var __addDisposableResource;
+var __disposeResources;
+var __rewriteRelativeImportExtension;
+(function (factory) {
+    var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
+    if (typeof define === "function" && define.amd) {
+        define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
+    }
+    else if (typeof module === "object" && typeof module.exports === "object") {
+        factory(createExporter(root, createExporter(module.exports)));
+    }
+    else {
+        factory(createExporter(root));
+    }
+    function createExporter(exports, previous) {
+        if (exports !== root) {
+            if (typeof Object.create === "function") {
+                Object.defineProperty(exports, "__esModule", { value: true });
+            }
+            else {
+                exports.__esModule = true;
+            }
+        }
+        return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
+    }
+})
+(function (exporter) {
+    var extendStatics = Object.setPrototypeOf ||
+        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+
+    __extends = function (d, b) {
+        if (typeof b !== "function" && b !== null)
+            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+
+    __assign = Object.assign || function (t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+            s = arguments[i];
+            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+        }
+        return t;
+    };
+
+    __rest = function (s, e) {
+        var t = {};
+        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+            t[p] = s[p];
+        if (s != null && typeof Object.getOwnPropertySymbols === "function")
+            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+                    t[p[i]] = s[p[i]];
+            }
+        return t;
+    };
+
+    __decorate = function (decorators, target, key, desc) {
+        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+        return c > 3 && r && Object.defineProperty(target, key, r), r;
+    };
+
+    __param = function (paramIndex, decorator) {
+        return function (target, key) { decorator(target, key, paramIndex); }
+    };
+
+    __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+        function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+        var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+        var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+        var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+        var _, done = false;
+        for (var i = decorators.length - 1; i >= 0; i--) {
+            var context = {};
+            for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+            for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+            context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+            var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+            if (kind === "accessor") {
+                if (result === void 0) continue;
+                if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+                if (_ = accept(result.get)) descriptor.get = _;
+                if (_ = accept(result.set)) descriptor.set = _;
+                if (_ = accept(result.init)) initializers.unshift(_);
+            }
+            else if (_ = accept(result)) {
+                if (kind === "field") initializers.unshift(_);
+                else descriptor[key] = _;
+            }
+        }
+        if (target) Object.defineProperty(target, contextIn.name, descriptor);
+        done = true;
+    };
+
+    __runInitializers = function (thisArg, initializers, value) {
+        var useValue = arguments.length > 2;
+        for (var i = 0; i < initializers.length; i++) {
+            value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+        }
+        return useValue ? value : void 0;
+    };
+
+    __propKey = function (x) {
+        return typeof x === "symbol" ? x : "".concat(x);
+    };
+
+    __setFunctionName = function (f, name, prefix) {
+        if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+        return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+    };
+
+    __metadata = function (metadataKey, metadataValue) {
+        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+    };
+
+    __awaiter = function (thisArg, _arguments, P, generator) {
+        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+        return new (P || (P = Promise))(function (resolve, reject) {
+            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+            function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+            step((generator = generator.apply(thisArg, _arguments || [])).next());
+        });
+    };
+
+    __generator = function (thisArg, body) {
+        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+        return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+        function verb(n) { return function (v) { return step([n, v]); }; }
+        function step(op) {
+            if (f) throw new TypeError("Generator is already executing.");
+            while (g && (g = 0, op[0] && (_ = 0)), _) try {
+                if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+                if (y = 0, t) op = [op[0] & 2, t.value];
+                switch (op[0]) {
+                    case 0: case 1: t = op; break;
+                    case 4: _.label++; return { value: op[1], done: false };
+                    case 5: _.label++; y = op[1]; op = [0]; continue;
+                    case 7: op = _.ops.pop(); _.trys.pop(); continue;
+                    default:
+                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+                        if (t[2]) _.ops.pop();
+                        _.trys.pop(); continue;
+                }
+                op = body.call(thisArg, _);
+            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+        }
+    };
+
+    __exportStar = function(m, o) {
+        for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
+    };
+
+    __createBinding = Object.create ? (function(o, m, k, k2) {
+        if (k2 === undefined) k2 = k;
+        var desc = Object.getOwnPropertyDescriptor(m, k);
+        if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+            desc = { enumerable: true, get: function() { return m[k]; } };
+        }
+        Object.defineProperty(o, k2, desc);
+    }) : (function(o, m, k, k2) {
+        if (k2 === undefined) k2 = k;
+        o[k2] = m[k];
+    });
+
+    __values = function (o) {
+        var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+        if (m) return m.call(o);
+        if (o && typeof o.length === "number") return {
+            next: function () {
+                if (o && i >= o.length) o = void 0;
+                return { value: o && o[i++], done: !o };
+            }
+        };
+        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+    };
+
+    __read = function (o, n) {
+        var m = typeof Symbol === "function" && o[Symbol.iterator];
+        if (!m) return o;
+        var i = m.call(o), r, ar = [], e;
+        try {
+            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+        }
+        catch (error) { e = { error: error }; }
+        finally {
+            try {
+                if (r && !r.done && (m = i["return"])) m.call(i);
+            }
+            finally { if (e) throw e.error; }
+        }
+        return ar;
+    };
+
+    /** @deprecated */
+    __spread = function () {
+        for (var ar = [], i = 0; i < arguments.length; i++)
+            ar = ar.concat(__read(arguments[i]));
+        return ar;
+    };
+
+    /** @deprecated */
+    __spreadArrays = function () {
+        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
+        for (var r = Array(s), k = 0, i = 0; i < il; i++)
+            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+                r[k] = a[j];
+        return r;
+    };
+
+    __spreadArray = function (to, from, pack) {
+        if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+            if (ar || !(i in from)) {
+                if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+                ar[i] = from[i];
+            }
+        }
+        return to.concat(ar || Array.prototype.slice.call(from));
+    };
+
+    __await = function (v) {
+        return this instanceof __await ? (this.v = v, this) : new __await(v);
+    };
+
+    __asyncGenerator = function (thisArg, _arguments, generator) {
+        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+        var g = generator.apply(thisArg, _arguments || []), i, q = [];
+        return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
+        function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
+        function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
+        function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+        function fulfill(value) { resume("next", value); }
+        function reject(value) { resume("throw", value); }
+        function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+    };
+
+    __asyncDelegator = function (o) {
+        var i, p;
+        return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+    };
+
+    __asyncValues = function (o) {
+        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+        var m = o[Symbol.asyncIterator], i;
+        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+    };
+
+    __makeTemplateObject = function (cooked, raw) {
+        if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+        return cooked;
+    };
+
+    var __setModuleDefault = Object.create ? (function(o, v) {
+        Object.defineProperty(o, "default", { enumerable: true, value: v });
+    }) : function(o, v) {
+        o["default"] = v;
+    };
+
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+
+    __importStar = function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+
+    __importDefault = function (mod) {
+        return (mod && mod.__esModule) ? mod : { "default": mod };
+    };
+
+    __classPrivateFieldGet = function (receiver, state, kind, f) {
+        if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+        if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+        return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+    };
+
+    __classPrivateFieldSet = function (receiver, state, value, kind, f) {
+        if (kind === "m") throw new TypeError("Private method is not writable");
+        if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+        if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+        return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+    };
+
+    __classPrivateFieldIn = function (state, receiver) {
+        if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+        return typeof state === "function" ? receiver === state : state.has(receiver);
+    };
+
+    __addDisposableResource = function (env, value, async) {
+        if (value !== null && value !== void 0) {
+            if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+            var dispose, inner;
+            if (async) {
+                if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+                dispose = value[Symbol.asyncDispose];
+            }
+            if (dispose === void 0) {
+                if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+                dispose = value[Symbol.dispose];
+                if (async) inner = dispose;
+            }
+            if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+            if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
+            env.stack.push({ value: value, dispose: dispose, async: async });
+        }
+        else if (async) {
+            env.stack.push({ async: true });
+        }
+        return value;
+    };
+
+    var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+        var e = new Error(message);
+        return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+    };
+
+    __disposeResources = function (env) {
+        function fail(e) {
+            env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+            env.hasError = true;
+        }
+        var r, s = 0;
+        function next() {
+            while (r = env.stack.pop()) {
+                try {
+                    if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
+                    if (r.dispose) {
+                        var result = r.dispose.call(r.value);
+                        if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+                    }
+                    else s |= 1;
+                }
+                catch (e) {
+                    fail(e);
+                }
+            }
+            if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
+            if (env.hasError) throw env.error;
+        }
+        return next();
+    };
+
+    __rewriteRelativeImportExtension = function (path, preserveJsx) {
+        if (typeof path === "string" && /^\.\.?\//.test(path)) {
+            return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
+                return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
+            });
+        }
+        return path;
+    };
+
+    exporter("__extends", __extends);
+    exporter("__assign", __assign);
+    exporter("__rest", __rest);
+    exporter("__decorate", __decorate);
+    exporter("__param", __param);
+    exporter("__esDecorate", __esDecorate);
+    exporter("__runInitializers", __runInitializers);
+    exporter("__propKey", __propKey);
+    exporter("__setFunctionName", __setFunctionName);
+    exporter("__metadata", __metadata);
+    exporter("__awaiter", __awaiter);
+    exporter("__generator", __generator);
+    exporter("__exportStar", __exportStar);
+    exporter("__createBinding", __createBinding);
+    exporter("__values", __values);
+    exporter("__read", __read);
+    exporter("__spread", __spread);
+    exporter("__spreadArrays", __spreadArrays);
+    exporter("__spreadArray", __spreadArray);
+    exporter("__await", __await);
+    exporter("__asyncGenerator", __asyncGenerator);
+    exporter("__asyncDelegator", __asyncDelegator);
+    exporter("__asyncValues", __asyncValues);
+    exporter("__makeTemplateObject", __makeTemplateObject);
+    exporter("__importStar", __importStar);
+    exporter("__importDefault", __importDefault);
+    exporter("__classPrivateFieldGet", __classPrivateFieldGet);
+    exporter("__classPrivateFieldSet", __classPrivateFieldSet);
+    exporter("__classPrivateFieldIn", __classPrivateFieldIn);
+    exporter("__addDisposableResource", __addDisposableResource);
+    exporter("__disposeResources", __disposeResources);
+    exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
+});
+
+0 && (module.exports = {
+    __extends: __extends,
+    __assign: __assign,
+    __rest: __rest,
+    __decorate: __decorate,
+    __param: __param,
+    __esDecorate: __esDecorate,
+    __runInitializers: __runInitializers,
+    __propKey: __propKey,
+    __setFunctionName: __setFunctionName,
+    __metadata: __metadata,
+    __awaiter: __awaiter,
+    __generator: __generator,
+    __exportStar: __exportStar,
+    __createBinding: __createBinding,
+    __values: __values,
+    __read: __read,
+    __spread: __spread,
+    __spreadArrays: __spreadArrays,
+    __spreadArray: __spreadArray,
+    __await: __await,
+    __asyncGenerator: __asyncGenerator,
+    __asyncDelegator: __asyncDelegator,
+    __asyncValues: __asyncValues,
+    __makeTemplateObject: __makeTemplateObject,
+    __importStar: __importStar,
+    __importDefault: __importDefault,
+    __classPrivateFieldGet: __classPrivateFieldGet,
+    __classPrivateFieldSet: __classPrivateFieldSet,
+    __classPrivateFieldIn: __classPrivateFieldIn,
+    __addDisposableResource: __addDisposableResource,
+    __disposeResources: __disposeResources,
+    __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
+});
diff --git a/node_modules/typescript/LICENSE b/node_modules/typescript/LICENSE
new file mode 100644
index 000000000..edc24fd6e
--- /dev/null
+++ b/node_modules/typescript/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/node_modules/typescript/NOTICE.txt b/node_modules/typescript/NOTICE.txt
new file mode 100644
index 000000000..e301bd192
--- /dev/null
+++ b/node_modules/typescript/NOTICE.txt
@@ -0,0 +1,436 @@
+NOTICES AND INFORMATION
+Do Not Translate or Localize
+
+This software incorporates material from third parties.
+Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com,
+or you may send a check or money order for US $5.00, including the product name,
+the open source component name, platform, and version number, to:
+
+Source Code Compliance Team
+Microsoft Corporation
+One Microsoft Way
+Redmond, WA 98052
+USA
+
+Notwithstanding any other terms, you may reverse engineer this software to the extent
+required to debug changes to any libraries licensed under the GNU Lesser General Public License.
+
+
+------------------- DefinitelyTyped --------------------
+This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
+DefinitelyTyped
+This project is licensed under the MIT license. Copyrights are respective of each contributor listed at the beginning of each definition file. Provided for Informational Purposes Only
+
+MIT License
+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.
+--------------------------------------------------------------------------------------
+
+------------------- Unicode --------------------
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+
+Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+Unicode Data Files do not include PDF online code charts under the
+directory http://www.unicode.org/Public/.
+
+Software includes any source code published in the Unicode Standard
+or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+NOTICE TO USER: Carefully read the following legal agreement.
+BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT.
+IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1991-2017 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
+-------------------------------------------------------------------------------------
+
+-------------------Document Object Model-----------------------------
+DOM 
+
+W3C License
+This work is being provided by the copyright holders under the following license.
+By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
+Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following 
+on ALL copies of the work or portions thereof, including modifications:
+* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.
+* Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived 
+from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." 
+Disclaimers
+THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR 
+FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. 
+Title to copyright in this work will at all times remain with copyright holders.
+
+---------
+
+DOM
+Copyright © 2018 WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License: Attribution 4.0 International 
+======================================================================= 
+Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors:
+
+wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= 
+Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org.
+
+--------------------------------------------------------------------------------
+
+----------------------Web Background Synchronization------------------------------
+
+Web Background Synchronization Specification
+Portions of spec © by W3C
+
+W3C Community Final Specification Agreement 
+To secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a "summary" is 
+available. See also the related "W3C Community Contributor License Agreement".
+1. The Purpose of this Agreement.
+This Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification. 
+Any other capitalized terms not specifically defined herein have the same meaning as those terms have in the "W3C Patent Policy", and if not defined there, in the "W3C Process Document".
+2. Copyrights. 
+2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification. 
+2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number.
+3. Patents. 
+3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification.
+3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site.
+4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel.
+5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards.
+6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement.
+7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply: 
+7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group.
+7.2. If I Do Not Join the Corresponding Working Group. 
+7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy.
+7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy.
+8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms.
+9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED “AS IS.” The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search.
+10. Definitions. 
+10.1. Agreement. “Agreement” means this W3C Community Final Specification Agreement.
+10.2. Corresponding Working Group. “Corresponding Working Group” is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input.
+10.3. Essential Claims. “Essential Claims” shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims: 
+10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and
+10.3.2. claims which would be infringed only by: 
+portions of an implementation that are not specified in the normative portions of the Specification, or
+enabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or
+the implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification.
+10.3.3. design patents and design registrations.
+For purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative.
+10.4. I, Me, or My. “I,” “me,” or “my” refers to the signatory.
+10.5 Project. “Project” means the W3C Community Group or Business Group for which I executed this Agreement.
+10.6. Specification. “Specification” means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification.
+10.7. W3C Community RF Licensing Requirements. “W3C Community RF Licensing Requirements” license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that: 
+10.7.1. shall be available to all, worldwide, whether or not they are W3C Members;
+10.7.2. shall extend to all Essential Claims owned or controlled by me;
+10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification;
+10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all.
+10.7.5. may not be conditioned on payment of royalties, fees or other consideration;
+10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation;
+10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution;
+10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor.
+10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question.
+I am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available. 
+10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls.
+
+-------------------------------------------------------------------------------------
+
+------------------- WebGL -----------------------------
+Copyright (c) 2018 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are 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 Materials.
+
+THE MATERIALS ARE 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
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+------------------------------------------------------
+
+---------------------------------------------------------
+
+github.com/zeebo/xxh3 v1.1.0 - BSD-2-Clause
+
+
+Copyright (c) 2019, Jeff Wendling
+Copyright (c) 2012-2014, Yann Collet
+
+Copyright (c)   . All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+github.com/go-json-experiment/json v0.0.0-20260623181947-01eb4420fa68 - BSD-3-Clause
+
+
+Copyright 2010 The Go Authors
+Copyright 2011 The Go Authors
+Copyright 2016 The Go Authors
+Copyright 2018 The Go Authors
+Copyright 2020 The Go Authors
+Copyright 2021 The Go Authors
+Copyright 2022 The Go Authors
+Copyright 2023 The Go Authors
+Copyright 2024 The Go Authors
+Copyright (c) 2020 The Go Authors
+
+Copyright (c)   . All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+   3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+golang.org/x/sync v0.21.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+
+Copyright 2009 The Go Authors
+Copyright 2013 The Go Authors
+Copyright 2016 The Go Authors
+Copyright 2017 The Go Authors
+Copyright 2019 The Go Authors
+
+BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+golang.org/x/sys v0.46.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+
+Copyright 2009 The Go Authors
+Copyright 2010 The Go Authors
+Copyright 2011 The Go Authors
+Copyright 2012 The Go Authors
+Copyright 2013 The Go Authors
+Copyright 2014 The Go Authors
+Copyright 2015 The Go Authors
+Copyright 2016 The Go Authors
+Copyright 2017 The Go Authors
+Copyright 2018 The Go Authors
+Copyright 2019 The Go Authors
+Copyright 2020 The Go Authors
+Copyright 2021 The Go Authors
+Copyright 2022 The Go Authors
+Copyright 2023 The Go Authors
+Copyright 2024 The Go Authors
+Copyright 2025 The Go Authors
+Copyright 2009,2010 The Go Authors
+
+BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+golang.org/x/term v0.44.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+
+Copyright 2009 The Go Authors
+Copyright 2011 The Go Authors
+Copyright 2013 The Go Authors
+Copyright 2019 The Go Authors
+Copyright 2021 The Go Authors
+
+BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+golang.org/x/text v0.38.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+
+(c) AeHa (c)
+(c) EeAoq (c)
+(c) EAiE (c) A
+(c) lEEe (c) AE
+(c) (c) AAEE (c)
+(c) oav!A (c) AY
+(c) aA"AE (c) 1AE (c)
+Copyright 2009 The Go Authors
+Copyright 2011 The Go Authors
+Copyright 2012 The Go Authors
+Copyright 2013 The Go Authors
+Copyright 2014 The Go Authors
+Copyright 2015 The Go Authors
+Copyright 2016 The Go Authors
+Copyright 2017 The Go Authors
+Copyright 2018 The Go Authors
+Copyright 2019 The Go Authors
+Copyright 2021 The Go Authors
+Copyright 2025 The Go Authors
+
+BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+github.com/klauspost/cpuid/v2 v2.2.10 - MIT
+
+
+Copyright (c) 2015 Klaus Post
+Copyright (c) 2020 Klaus Post
+Copyright (c) 2021 Klaus Post
+Copyright 2018 The Go Authors
+Copyright (c) 2015- Klaus Post & Contributors
+
+MIT License
+
+Copyright (c)  
+
+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.
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+github.com/Microsoft/go-winio v0.6.2 - MIT
+
+
+Copyright (c) 2015 Microsoft
+Copyright 2013 The Go Authors
+
+MIT License
+
+Copyright (c)  
+
+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.
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+github.com/mackerelio/go-osstat v0.2.7 - Apache-2.0
+
+
+Copyright 2017-2019 Hatena Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+---------------------------------------------------------
+
+---------------------------------------------------------
+
+parcel-bundler/watcher 8926bb8b281733bbfcaf69bb4e62ab7a1431c42a - MIT
+
+
+Copyright Node.js contributors
+Copyright 2012-2020 Facebook, Inc.
+Copyright (c) 2017-present Devon Govett
+
+MIT License
+
+Copyright (c) 2017-present Devon Govett
+
+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.
+
+
+---------------------------------------------------------
+
diff --git a/node_modules/typescript/README.md b/node_modules/typescript/README.md
new file mode 100644
index 000000000..7b8798935
--- /dev/null
+++ b/node_modules/typescript/README.md
@@ -0,0 +1,49 @@
+# TypeScript
+
+[![CI](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
+[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
+[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
+[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
+
+[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://devblogs.microsoft.com/typescript/) and [Bluesky](https://bsky.app/profile/typescriptlang.org).
+
+Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/).
+
+## Installing
+
+For the latest stable version:
+
+```bash
+npm install -D typescript
+```
+
+For our nightly builds:
+
+```bash
+npm install -D typescript@next
+```
+
+## Contribute
+
+There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript.
+
+* [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
+* Review the [source code changes](https://github.com/microsoft/TypeScript/pulls).
+* Engage with other TypeScript users and developers on [Stack Overflow](https://stackoverflow.com/questions/tagged/typescript).
+* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
+* Join the [#typescript](https://bsky.app/search?q=%23typescript) discussion on Bluesky.
+* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md).
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
+the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
+with any additional questions or comments.
+
+## Documentation
+
+* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
+* [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
+* [Homepage](https://www.typescriptlang.org/)
+
+## Roadmap
+
+For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
diff --git a/node_modules/typescript/bin/tsc b/node_modules/typescript/bin/tsc
new file mode 100755
index 000000000..34638f82f
--- /dev/null
+++ b/node_modules/typescript/bin/tsc
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+import "../lib/tsc.js";
diff --git a/node_modules/typescript/dist/api/async/api.d.ts b/node_modules/typescript/dist/api/async/api.d.ts
new file mode 100644
index 000000000..deb29e968
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/api.d.ts
@@ -0,0 +1,529 @@
+/// 
+import { CompletionItemKind } from "#enums/completionItemKind";
+import { DiagnosticCategory } from "#enums/diagnosticCategory";
+import { ElementFlags } from "#enums/elementFlags";
+import { ModuleKind } from "#enums/moduleKind";
+import { NodeBuilderFlags } from "#enums/nodeBuilderFlags";
+import { ObjectFlags } from "#enums/objectFlags";
+import { SignatureFlags } from "#enums/signatureFlags";
+import { SignatureKind } from "#enums/signatureKind";
+import { SymbolFlags } from "#enums/symbolFlags";
+import { TypeFlags } from "#enums/typeFlags";
+import { TypePredicateKind } from "#enums/typePredicateKind";
+import { type __String, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts";
+import type { APIOptions, LSPConnectionOptions } from "../options.ts";
+import type { CompilerOptions, ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SourceFileMetadata, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts";
+import { SourceFileCache } from "../sourceFileCache.ts";
+import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts";
+import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts";
+import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts";
+export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts";
+export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind };
+export type { APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, DocumentIdentifier, DocumentPosition, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, NumberLiteralType, ObjectType, RequestTiming, SourceFileMetadata, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType };
+export declare class API {
+    private client;
+    private sourceFileCache;
+    private toPath;
+    private initialized;
+    private activeSnapshots;
+    private latestSnapshot;
+    readonly internal: InternalAPI;
+    constructor(options?: APIOptions | LSPConnectionOptions);
+    /**
+     * Create an API instance from an existing LSP connection's API session.
+     * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession.
+     */
+    static fromLSPConnection(options: LSPConnectionOptions): Promise>;
+    private ensureInitialized;
+    parseConfigFile(file: DocumentIdentifier): Promise;
+    updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Promise;
+    close(): Promise;
+    clearSourceFileCache(): void;
+    /**
+     * Returns a snapshot of collected timing information for requests made
+     * through this API instance: client-measured round-trip latency and bytes
+     * transferred, folded together with the server's own per-request processing
+     * time and an estimated transport overhead (round-trip minus server time).
+     *
+     * Fetching the snapshot issues a lightweight request to the server to
+     * retrieve its timing collection. Collection must be enabled via the
+     * `collectTiming` option; when it is not, the returned snapshot has
+     * `enabled: false` and zeroed totals.
+     */
+    getTimingInfo(): Promise;
+    /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */
+    resetTimingInfo(): Promise;
+}
+export declare class InternalAPI {
+    private client;
+    private ensureInitialized;
+    /** @internal */
+    constructor(client: Client, ensureInitialized: () => Promise);
+    startCPUProfile(dir: string): Promise;
+    stopCPUProfile(): Promise;
+    saveHeapProfile(dir: string): Promise;
+}
+export declare class Snapshot {
+    readonly id: number;
+    private projectMap;
+    private toPath;
+    private client;
+    private disposed;
+    private onDispose;
+    private snapshotRegistry;
+    constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void);
+    getProjects(): readonly Project[];
+    getProject(configFileName: string): Project | undefined;
+    getDefaultProjectForFile(file: DocumentIdentifier): Promise;
+    [globalThis.Symbol.dispose](): void;
+    dispose(): Promise;
+    isDisposed(): boolean;
+    private ensureNotDisposed;
+}
+declare class SnapshotObjectRegistry {
+    private readonly symbols;
+    private readonly client;
+    private readonly snapshotId;
+    private readonly resolveProject;
+    constructor(client: Client, snapshotId: number, resolveProject: (projectId: Path) => Project | undefined);
+    /** Resolve a project id (a config file path) to its Project within this snapshot. */
+    getProject(projectId: Path): Project | undefined;
+    getOrCreateSymbol(data: SymbolResponse): Symbol;
+    getSymbol(id: number): Symbol | undefined;
+    clear(): void;
+    fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined, projectId?: Path): Promise;
+    fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[], projectId?: Path): Promise;
+}
+declare class ProjectObjectRegistry {
+    private client;
+    private snapshotId;
+    private project;
+    private snapshotRegistry;
+    private types;
+    private signatures;
+    constructor(client: Client, snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry);
+    getOrCreateSymbol(data: SymbolResponse): Symbol;
+    getSymbol(id: number): Symbol | undefined;
+    getOrCreateType(data: TypeResponse): TypeObject;
+    getType(id: number): TypeObject | undefined;
+    getOrCreateSignature(data: SignatureResponse): Signature;
+    getSignature(id: number): Signature | undefined;
+    clear(): void;
+    fetchType(source: Symbol | Signature | Type, method: string, handle: number | false | undefined): Promise;
+    fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise;
+    fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise;
+    fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise;
+    fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise;
+    fetchBaseTypes(source: Type): Promise;
+}
+export declare class Project {
+    readonly id: Path;
+    readonly configFileName: string;
+    readonly compilerOptions: CompilerOptions;
+    readonly rootFiles: readonly string[];
+    readonly program: Program;
+    readonly checker: Checker;
+    readonly emitter: Emitter;
+    private client;
+    constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, snapshotRegistry: SnapshotObjectRegistry);
+    dispose(): void;
+}
+export declare class Program {
+    private snapshotId;
+    private project;
+    private client;
+    private sourceFileCache;
+    private toPath;
+    private decoder;
+    private sourceFileMetadataCache;
+    constructor(snapshotId: number, project: Project, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path);
+    getCompilerOptions(): CompilerOptions;
+    getSourceFile(file: DocumentIdentifier): Promise;
+    getSourceFileNames(): Promise;
+    /**
+     * Returns program-stored metadata for the given source file, or `undefined` if the file
+     * is not part of the program. Metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    getSourceFileMetadata(fileName: string): Promise;
+    /**
+     * Returns program-stored metadata for the source file at the given path, or `undefined`
+     * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips
+     * the file name to path conversion. Metadata is fetched lazily per file and cached on
+     * this `Program` instance.
+     */
+    getSourceFileMetadataByPath(path: Path): Promise;
+    private fetchSourceFileMetadata;
+    /**
+     * Returns whether the given source file was loaded as part of an external library
+     * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is
+     * fetched lazily per file and cached on this `Program` instance.
+     */
+    isSourceFileFromExternalLibrary(file: SourceFile): Promise;
+    /**
+     * Returns whether the given source file is a default library file (e.g. `lib.d.ts`).
+     * The underlying program metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    isSourceFileDefaultLibrary(file: SourceFile): Promise;
+    /**
+     * Get syntactic (parse) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSyntacticDiagnostics(file?: DocumentIdentifier): Promise;
+    /**
+     * Get binder diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getBindDiagnostics(file?: DocumentIdentifier): Promise;
+    /**
+     * Get semantic (type-check) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSemanticDiagnostics(file?: DocumentIdentifier): Promise;
+    /**
+     * Get suggestion diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSuggestionDiagnostics(file?: DocumentIdentifier): Promise;
+    /**
+     * Get declaration emit diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getDeclarationDiagnostics(file?: DocumentIdentifier): Promise;
+    /**
+     * Get program-wide diagnostics for the project, including compiler options diagnostics.
+     */
+    getProgramDiagnostics(): Promise;
+    /**
+     * Get global (non-file-specific) semantic diagnostics for the project.
+     */
+    getGlobalDiagnostics(): Promise;
+    /**
+     * Get config file parsing diagnostics for the project.
+     */
+    getConfigFileParsingDiagnostics(): Promise;
+}
+export declare class Checker {
+    private snapshotId;
+    private project;
+    private client;
+    private objectRegistry;
+    private wellKnownSymbols;
+    constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry);
+    dispose(): void;
+    getSymbolAtLocation(node: Node): Promise;
+    getSymbolAtLocation(nodes: readonly Node[]): Promise<(Symbol | undefined)[]>;
+    getSymbolAtPosition(file: DocumentIdentifier, position: number): Promise;
+    getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Symbol | undefined)[]>;
+    getTypeOfSymbol(symbol: Symbol): Promise;
+    getTypeOfSymbol(symbols: readonly Symbol[]): Promise<(Type | undefined)[]>;
+    /**
+     * Get the declared type of a symbol. Always returns a type; for symbols whose
+     * declared type cannot be determined the checker yields the error type (use
+     * {@link Type.isErrorType} to detect it).
+     */
+    getDeclaredTypeOfSymbol(symbol: Symbol): Promise;
+    getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): Promise;
+    getReferencedSymbolsForNode(node: Node, position: number): Promise;
+    getSignatureUsage(signatureDecl: Node): Promise;
+    getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): Promise;
+    getTypeAtLocation(node: Node): Promise;
+    getTypeAtLocation(nodes: readonly Node[]): Promise<(Type | undefined)[]>;
+    getSignaturesOfType(type: Type, kind: SignatureKind): Promise;
+    getResolvedSignature(node: Node): Promise;
+    getTypeAtPosition(file: DocumentIdentifier, position: number): Promise;
+    getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Type | undefined)[]>;
+    resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Promise;
+    getResolvedSymbol(node: Identifier): Promise;
+    getContextualType(node: Expression): Promise;
+    getBaseTypeOfLiteralType(type: Type): Promise;
+    getNonNullableType(type: Type): Promise;
+    getTypeFromTypeNode(node: TypeNode): Promise;
+    getWidenedType(type: Type): Promise;
+    getParameterType(signature: Signature, index: number): Promise;
+    isArrayLikeType(type: Type): Promise;
+    isTypeAssignableTo(source: Type, target: Type): Promise;
+    getShorthandAssignmentValueSymbol(node: Node): Promise;
+    /**
+     * Get the type of a symbol as narrowed at a specific location. Always returns
+     * a type; for symbols whose type cannot be determined the checker yields the
+     * error type (use {@link Type.isErrorType} to detect it).
+     */
+    getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Promise;
+    private getIntrinsicType;
+    getAnyType(): Promise;
+    getStringType(): Promise;
+    getNumberType(): Promise;
+    getBooleanType(): Promise;
+    getVoidType(): Promise;
+    getUndefinedType(): Promise;
+    getNullType(): Promise;
+    getNeverType(): Promise;
+    getUnknownType(): Promise;
+    getBigIntType(): Promise;
+    getESSymbolType(): Promise;
+    typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): Promise;
+    signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Promise;
+    typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): Promise;
+    isContextSensitive(node: Node): Promise;
+    isArrayType(type: Type): Promise;
+    isTupleType(type: Type): Promise;
+    getReturnTypeOfSignature(signature: Signature): Promise;
+    getRestTypeOfSignature(signature: Signature): Promise;
+    getTypePredicateOfSignature(signature: Signature): Promise;
+    /**
+     * Get the base types of a class or interface type. A type with no base types
+     * yields an empty array.
+     */
+    getBaseTypes(type: InterfaceType): Promise;
+    getApparentType(type: Type): Promise;
+    getPropertiesOfType(type: Type): Promise;
+    getIndexInfosOfType(type: Type): Promise;
+    /**
+     * Get the constraint of a type parameter (the `T` in ``), or
+     * undefined if it has none.
+     */
+    getConstraintOfTypeParameter(type: TypeParameter): Promise;
+    getBaseConstraintOfType(type: Type): Promise;
+    getPropertyOfType(type: Type, name: string): Promise;
+    getConstantValue(node: Node): Promise;
+    getSignatureFromDeclaration(node: Node): Promise;
+    getExportSpecifierLocalTargetSymbol(node: Node): Promise;
+    /**
+     * Follow all aliases to get the original symbol. Always returns a symbol; for
+     * an unresolved alias the checker yields the unknown symbol (use
+     * {@link Checker.isUnknownSymbol} to detect it).
+     */
+    getAliasedSymbol(symbol: Symbol): Promise;
+    getImmediateAliasedSymbol(symbol: Symbol): Promise;
+    /**
+     * Fetch (once, then cache) the handle ids of the per-checker singleton
+     * symbols (unknown, undefined, arguments). These ids are stable for the life
+     * of the project's checker, so identity checks against them are local after
+     * the first call.
+     */
+    private getWellKnownSymbols;
+    /**
+     * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the
+     * result of {@link Checker.getAliasedSymbol} on an unresolved alias).
+     */
+    isUnknownSymbol(symbol: Symbol): Promise;
+    /**
+     * Returns `true` if the symbol is the checker's "undefined" symbol.
+     */
+    isUndefinedSymbol(symbol: Symbol): Promise;
+    /**
+     * Returns `true` if the symbol is the checker's "arguments" symbol.
+     */
+    isArgumentsSymbol(symbol: Symbol): Promise;
+    getExportsOfModule(symbol: Symbol): Promise;
+    getMemberInModuleExports(symbol: Symbol, name: string): Promise;
+    getJsDocTagsOfSymbol(symbol: Symbol): Promise;
+    getDocumentationCommentOfSymbol(symbol: Symbol): Promise;
+    /**
+     * Get the type arguments of a type reference (e.g. the `string` in `Array`).
+     */
+    getTypeArguments(type: TypeReference): Promise;
+}
+export interface PrintNodeOptions {
+    preserveSourceNewlines?: boolean | undefined;
+    neverAsciiEscape?: boolean | undefined;
+    terminateUnterminatedLiterals?: boolean | undefined;
+}
+export declare class Emitter {
+    private client;
+    constructor(client: Client);
+    printNode(node: Node, options?: PrintNodeOptions): Promise;
+}
+export declare class NodeHandle {
+    /**
+     * The project this handle was produced in, used as the default for {@link resolve}.
+     * Node handles are only meaningful within a project's program, so the producing project
+     * is remembered so callers don't have to pass it explicitly.
+     */
+    private readonly canonicalProject;
+    readonly index: number;
+    readonly kind: SyntaxKind;
+    readonly path: Path;
+    constructor(handle: string, canonicalProject: Project);
+    /**
+     * Resolve this handle to the actual AST node by fetching the source file from a project
+     * and looking up the node by index. If no project is passed, the project that produced
+     * the handle is used.
+     */
+    resolve(project?: Project): Promise;
+}
+/** A symbol definition paired with all of its reference nodes. */
+export interface ReferencedSymbolEntry {
+    /** The node handle for the symbol's definition. */
+    definition: NodeHandle;
+    /** The resolved symbol for the definition, if available. */
+    symbol?: Symbol | undefined;
+    /** The node handles for each reference to the symbol. */
+    references: NodeHandle[];
+}
+/** A single usage of a signature, pairing the reference name with its call expression (if any). */
+export interface SignatureUsage {
+    /** The node handle for the name reference. */
+    name: NodeHandle;
+    /** The node handle for the call expression, if the reference is invoked. */
+    call?: NodeHandle | undefined;
+}
+export declare class Symbol {
+    private objectRegistry;
+    /**
+     * The project this symbol was first observed in, used as the default project for
+     * lookups that need a project context (members/exports/parent). Symbols are shared
+     * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use.
+     */
+    private readonly canonicalProject;
+    readonly id: number;
+    /** The escaped (`__String`) name, used as the key in member/export tables. */
+    readonly escapedName: __String;
+    /** The display name (escaped underscores removed). */
+    readonly name: string;
+    readonly flags: SymbolFlags;
+    readonly checkFlags: number;
+    readonly declarations: readonly NodeHandle[];
+    readonly valueDeclaration: NodeHandle | undefined;
+    private readonly parent;
+    private readonly exportSymbol;
+    private membersCache;
+    private exportsCache;
+    constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry);
+    getParent(): Promise;
+    /**
+     * Get this symbol's members keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getMembers(): Promise>;
+    /**
+     * Get this symbol's exports keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getExports(): Promise>;
+    private fetchSymbolTable;
+    getExportSymbol(): Promise;
+    getJsDocTags(checker: Checker): Promise;
+    getDocumentationComment(checker: Checker): Promise;
+}
+declare class TypeObject implements Type {
+    private objectRegistry;
+    readonly id: number;
+    readonly flags: TypeFlags;
+    readonly objectFlags: ObjectFlags;
+    readonly symbol: number;
+    readonly value: string | number | boolean | bigint;
+    readonly intrinsicName: string;
+    readonly isThisType: boolean;
+    readonly freshType: number;
+    readonly regularType: number;
+    readonly target: number;
+    readonly typeParameters: readonly number[];
+    readonly outerTypeParameters: readonly number[];
+    readonly localTypeParameters: readonly number[];
+    readonly aliasTypeArguments: readonly number[];
+    readonly aliasSymbol: number;
+    readonly elementFlags: readonly ElementFlags[];
+    readonly fixedLength: number;
+    readonly readonly: boolean;
+    readonly texts: readonly string[];
+    readonly objectType: number;
+    readonly indexType: number;
+    readonly checkType: number;
+    readonly extendsType: number;
+    readonly baseType: number;
+    readonly substConstraint: number;
+    private trueType;
+    private falseType;
+    constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry);
+    getSymbol(): Promise;
+    getAliasSymbol(): Promise;
+    getTarget(): Promise;
+    getFreshType(): Promise;
+    getRegularType(): Promise;
+    getTypes(): Promise;
+    getTypeParameters(): Promise;
+    getOuterTypeParameters(): Promise;
+    getLocalTypeParameters(): Promise;
+    getAliasTypeArguments(): Promise;
+    getObjectType(): Promise;
+    getIndexType(): Promise;
+    getCheckType(): Promise;
+    getExtendsType(): Promise;
+    getBaseType(): Promise;
+    getConstraint(): Promise;
+    getTrueType(): Promise;
+    getFalseType(): Promise;
+    /**
+     * Get the base types of this type. Returns `undefined` for any type that is
+     * not a class or interface.
+     */
+    getBaseTypes(): Promise;
+    isClassOrInterface(): this is InterfaceType;
+    isUnionType(): this is UnionType;
+    isIntersectionType(): this is IntersectionType;
+    isObjectType(): this is ObjectType;
+    isIntrinsicType(): this is IntrinsicType;
+    isErrorType(): boolean;
+    isLiteralType(): this is LiteralType;
+    isStringLiteralType(): this is StringLiteralType;
+    isNumberLiteralType(): this is NumberLiteralType;
+    isBigIntLiteralType(): this is BigIntLiteralType;
+    isBooleanLiteralType(): this is BooleanLiteralType;
+    isTypeReference(): this is TypeReference;
+    isTupleType(): this is TupleType;
+    isIndexType(): this is IndexType;
+    isIndexedAccessType(): this is IndexedAccessType;
+    isConditionalType(): this is ConditionalType;
+    isSubstitutionType(): this is SubstitutionType;
+    isTemplateLiteralType(): this is TemplateLiteralType;
+    isStringMappingType(): this is StringMappingType;
+    isTypeParameter(): this is TypeParameter;
+}
+export declare function isUnionType(type: Type): type is UnionType;
+export declare function isIntersectionType(type: Type): type is IntersectionType;
+export declare function isObjectType(type: Type): type is ObjectType;
+export declare function isClassOrInterfaceType(type: Type): type is InterfaceType;
+export declare function isIntrinsicType(type: Type): type is IntrinsicType;
+/**
+ * Whether this is the error type — the placeholder the checker produces when a
+ * type cannot be determined (e.g. an unresolved reference). It is an intrinsic
+ * type named `"error"` (this covers both the singleton error type and the
+ * per-alias error types manufactured for unresolved type alias references).
+ */
+export declare function isErrorType(type: Type): boolean;
+export declare function isLiteralType(type: Type): type is LiteralType;
+export declare function isStringLiteralType(type: Type): type is StringLiteralType;
+export declare function isNumberLiteralType(type: Type): type is NumberLiteralType;
+export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType;
+export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType;
+export declare function isTypeReference(type: Type): type is TypeReference;
+export declare function isTupleType(type: Type): type is TupleType;
+export declare function isIndexType(type: Type): type is IndexType;
+export declare function isIndexedAccessType(type: Type): type is IndexedAccessType;
+export declare function isConditionalType(type: Type): type is ConditionalType;
+export declare function isSubstitutionType(type: Type): type is SubstitutionType;
+export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType;
+export declare function isStringMappingType(type: Type): type is StringMappingType;
+export declare function isTypeParameter(type: Type): type is TypeParameter;
+export declare class Signature {
+    private flags;
+    private objectRegistry;
+    readonly id: number;
+    readonly declaration?: NodeHandle | undefined;
+    readonly typeParameters?: readonly number[] | undefined;
+    readonly parameters: readonly number[];
+    readonly thisParameter?: number | undefined;
+    readonly target?: number | undefined;
+    constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry);
+    getTypeParameters(): Promise;
+    getParameters(): Promise;
+    getThisParameter(): Promise;
+    getTarget(): Promise;
+    get hasRestParameter(): boolean;
+    get isConstruct(): boolean;
+    get isAbstract(): boolean;
+}
+//# sourceMappingURL=api.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/api.d.ts.map b/node_modules/typescript/dist/api/async/api.d.ts.map
new file mode 100644
index 000000000..5dfbc7dc6
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/api.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src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,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/api.js b/node_modules/typescript/dist/api/async/api.js
new file mode 100644
index 000000000..78993ae38
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/api.js
@@ -0,0 +1,1657 @@
+/// 
+import { CompletionItemKind } from "#enums/completionItemKind";
+import { DiagnosticCategory } from "#enums/diagnosticCategory";
+import { ElementFlags } from "#enums/elementFlags";
+import { ModuleKind } from "#enums/moduleKind";
+import { NodeBuilderFlags } from "#enums/nodeBuilderFlags";
+import { ObjectFlags } from "#enums/objectFlags";
+import { SignatureFlags } from "#enums/signatureFlags";
+import { SignatureKind } from "#enums/signatureKind";
+import { SymbolFlags } from "#enums/symbolFlags";
+import { TypeFlags } from "#enums/typeFlags";
+import { TypePredicateKind } from "#enums/typePredicateKind";
+import { ModifierFlags, unescapeLeadingUnderscores, } from "../../ast/index.js";
+import { encodeNode, uint8ArrayToBase64, } from "../node/encoder.js";
+import { decodeNode, getNodeId, parseNodeHandle, readParseOptionsKey, readSourceFileHash, RemoteSourceFile, } from "../node/node.js";
+import { Wtf8Decoder } from "../node/wtf8.js";
+import { createGetCanonicalFileName, toPath, } from "../path.js";
+import { resolveFileName, toUpdateSnapshotRequest, } from "../proto.js";
+import { SourceFileCache } from "../sourceFileCache.js";
+import { Client, } from "./client.js";
+export { documentURIToFileName, fileNameToDocumentURI } from "../path.js";
+export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind };
+export class API {
+    client;
+    sourceFileCache;
+    toPath;
+    initialized = false;
+    activeSnapshots = new Set();
+    latestSnapshot;
+    internal;
+    constructor(options = {}) {
+        this.client = new Client(options);
+        this.sourceFileCache = new SourceFileCache();
+        this.internal = new InternalAPI(this.client, () => this.ensureInitialized());
+    }
+    /**
+     * Create an API instance from an existing LSP connection's API session.
+     * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession.
+     */
+    static async fromLSPConnection(options) {
+        const api = new API(options);
+        await api.ensureInitialized();
+        return api;
+    }
+    async ensureInitialized() {
+        if (!this.initialized) {
+            const response = await this.client.apiRequest("initialize", null);
+            const getCanonicalFileName = createGetCanonicalFileName(response.useCaseSensitiveFileNames);
+            const currentDirectory = response.currentDirectory;
+            this.toPath = (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName);
+            this.initialized = true;
+        }
+    }
+    async parseConfigFile(file) {
+        await this.ensureInitialized();
+        return this.client.apiRequest("parseConfigFile", { file });
+    }
+    async updateSnapshot(params) {
+        await this.ensureInitialized();
+        const requestParams = toUpdateSnapshotRequest(params);
+        const data = await this.client.apiRequest("updateSnapshot", requestParams);
+        // Retain cached source files from previous snapshot for unchanged files
+        if (this.latestSnapshot) {
+            this.sourceFileCache.retainForSnapshot(data.snapshot, this.latestSnapshot.id, data.changes);
+            if (this.latestSnapshot.isDisposed()) {
+                this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id);
+            }
+        }
+        const snapshot = new Snapshot(data, this.client, this.sourceFileCache, this.toPath, () => {
+            this.activeSnapshots.delete(snapshot);
+            if (snapshot !== this.latestSnapshot) {
+                this.sourceFileCache.releaseSnapshot(snapshot.id);
+            }
+        });
+        this.latestSnapshot = snapshot;
+        this.activeSnapshots.add(snapshot);
+        return snapshot;
+    }
+    async close() {
+        // Dispose all active snapshots
+        for (const snapshot of [...this.activeSnapshots]) {
+            await snapshot.dispose();
+        }
+        // Release the latest snapshot's cache refs if still held
+        if (this.latestSnapshot) {
+            this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id);
+            this.latestSnapshot = undefined;
+        }
+        await this.client.close();
+        this.sourceFileCache.clear();
+    }
+    clearSourceFileCache() {
+        this.sourceFileCache.clear();
+    }
+    /**
+     * Returns a snapshot of collected timing information for requests made
+     * through this API instance: client-measured round-trip latency and bytes
+     * transferred, folded together with the server's own per-request processing
+     * time and an estimated transport overhead (round-trip minus server time).
+     *
+     * Fetching the snapshot issues a lightweight request to the server to
+     * retrieve its timing collection. Collection must be enabled via the
+     * `collectTiming` option; when it is not, the returned snapshot has
+     * `enabled: false` and zeroed totals.
+     */
+    getTimingInfo() {
+        return this.client.getTimingInfo();
+    }
+    /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */
+    resetTimingInfo() {
+        return this.client.resetTimingInfo();
+    }
+}
+export class InternalAPI {
+    client;
+    ensureInitialized;
+    /** @internal */
+    constructor(client, ensureInitialized) {
+        this.client = client;
+        this.ensureInitialized = ensureInitialized;
+    }
+    async startCPUProfile(dir) {
+        await this.ensureInitialized();
+        await this.client.apiRequest("startCPUProfile", { dir });
+    }
+    async stopCPUProfile() {
+        await this.ensureInitialized();
+        const result = await this.client.apiRequest("stopCPUProfile", null);
+        return result.file;
+    }
+    async saveHeapProfile(dir) {
+        await this.ensureInitialized();
+        const result = await this.client.apiRequest("saveHeapProfile", { dir });
+        return result.file;
+    }
+}
+export class Snapshot {
+    id;
+    projectMap;
+    toPath;
+    client;
+    disposed = false;
+    onDispose;
+    snapshotRegistry;
+    constructor(data, client, sourceFileCache, toPath, onDispose) {
+        this.id = data.snapshot;
+        this.client = client;
+        this.toPath = toPath;
+        this.onDispose = onDispose;
+        this.projectMap = new Map();
+        this.snapshotRegistry = new SnapshotObjectRegistry(client, this.id, projectId => this.projectMap.get(projectId));
+        for (const projData of data.projects) {
+            const project = new Project(projData, this.id, client, sourceFileCache, toPath, this.snapshotRegistry);
+            this.projectMap.set(toPath(projData.configFileName), project);
+        }
+    }
+    getProjects() {
+        this.ensureNotDisposed();
+        return [...this.projectMap.values()];
+    }
+    getProject(configFileName) {
+        this.ensureNotDisposed();
+        return this.projectMap.get(this.toPath(configFileName));
+    }
+    async getDefaultProjectForFile(file) {
+        this.ensureNotDisposed();
+        const data = await this.client.apiRequest("getDefaultProjectForFile", {
+            snapshot: this.id,
+            file,
+        });
+        if (!data)
+            return undefined;
+        return this.projectMap.get(this.toPath(data.configFileName));
+    }
+    [globalThis.Symbol.dispose]() {
+        this.dispose();
+    }
+    async dispose() {
+        if (this.disposed)
+            return;
+        this.disposed = true;
+        for (const project of this.projectMap.values()) {
+            project.dispose();
+        }
+        this.projectMap.clear();
+        this.snapshotRegistry.clear();
+        this.onDispose();
+        await this.client.apiRequest("release", { snapshot: this.id });
+    }
+    isDisposed() {
+        return this.disposed;
+    }
+    ensureNotDisposed() {
+        if (this.disposed) {
+            throw new Error("Snapshot is disposed");
+        }
+    }
+}
+class SnapshotObjectRegistry {
+    symbols = new Map();
+    client;
+    snapshotId;
+    resolveProject;
+    constructor(client, snapshotId, resolveProject) {
+        this.client = client;
+        this.snapshotId = snapshotId;
+        this.resolveProject = resolveProject;
+    }
+    /** Resolve a project id (a config file path) to its Project within this snapshot. */
+    getProject(projectId) {
+        return this.resolveProject(projectId);
+    }
+    getOrCreateSymbol(data) {
+        let symbol = this.symbols.get(data.id);
+        if (!symbol) {
+            symbol = new Symbol(data, this);
+            this.symbols.set(data.id, symbol);
+        }
+        return symbol;
+    }
+    getSymbol(id) {
+        return this.symbols.get(id);
+    }
+    clear() {
+        this.symbols.clear();
+    }
+    async fetchSymbol(source, method, handle, projectId) {
+        if (!handle)
+            return undefined;
+        const cached = this.getSymbol(handle);
+        if (cached)
+            return cached;
+        const data = await this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: projectId,
+            objectId: source.id,
+        });
+        if (!data)
+            throw new Error(`${method} returned null symbol for ${source.constructor.name} ${source.id}`);
+        return this.getOrCreateSymbol(data);
+    }
+    async fetchSymbols(source, method, handles, projectId) {
+        if (handles) {
+            const result = new Array(handles.length);
+            let allCached = true;
+            for (let i = 0; i < handles.length; i++) {
+                const cached = this.getSymbol(handles[i]);
+                if (!cached) {
+                    allCached = false;
+                    break;
+                }
+                result[i] = cached;
+            }
+            if (allCached)
+                return result;
+        }
+        const symbolData = await this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: projectId,
+            objectId: source.id,
+        });
+        if (symbolData == null)
+            return [];
+        else
+            return symbolData.map(data => this.getOrCreateSymbol(data));
+    }
+}
+class ProjectObjectRegistry {
+    client;
+    snapshotId;
+    project;
+    snapshotRegistry;
+    types = new Map();
+    signatures = new Map();
+    constructor(client, snapshotId, project, snapshotRegistry) {
+        this.client = client;
+        this.snapshotId = snapshotId;
+        this.project = project;
+        this.snapshotRegistry = snapshotRegistry;
+    }
+    getOrCreateSymbol(data) {
+        return this.snapshotRegistry.getOrCreateSymbol(data);
+    }
+    getSymbol(id) {
+        return this.snapshotRegistry.getSymbol(id);
+    }
+    getOrCreateType(data) {
+        let type = this.types.get(data.id);
+        if (!type) {
+            type = new TypeObject(data, this);
+            this.types.set(data.id, type);
+        }
+        return type;
+    }
+    getType(id) {
+        return this.types.get(id);
+    }
+    getOrCreateSignature(data) {
+        let sig = this.signatures.get(data.id);
+        if (!sig) {
+            sig = new Signature(data, this.project, this);
+            this.signatures.set(data.id, sig);
+        }
+        return sig;
+    }
+    getSignature(id) {
+        return this.signatures.get(id);
+    }
+    clear() {
+        this.types.clear();
+        this.signatures.clear();
+    }
+    async fetchType(source, method, handle) {
+        if (handle !== false) {
+            if (!handle)
+                return undefined;
+            const cached = this.getType(handle);
+            if (cached)
+                return cached;
+        }
+        const data = await this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            objectId: source.id,
+        });
+        if (!data)
+            throw new Error(`${method} returned null type for ${source.constructor.name} ${source.id}`);
+        return this.getOrCreateType(data);
+    }
+    async fetchSymbol(source, method, handle) {
+        return this.snapshotRegistry.fetchSymbol(source, method, handle, this.project.id);
+    }
+    async fetchSignature(source, method, handle) {
+        if (!handle)
+            return undefined;
+        const cached = this.getSignature(handle);
+        if (cached)
+            return cached;
+        const data = await this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            objectId: source.id,
+        });
+        if (!data)
+            throw new Error(`${method} returned null signature for ${source.constructor.name} ${source.id}`);
+        return this.getOrCreateSignature(data);
+    }
+    async fetchTypes(source, method, handles) {
+        if (handles) {
+            const result = new Array(handles.length);
+            let allCached = true;
+            for (let i = 0; i < handles.length; i++) {
+                const cached = this.getType(handles[i]);
+                if (!cached) {
+                    allCached = false;
+                    break;
+                }
+                result[i] = cached;
+            }
+            if (allCached)
+                return result;
+        }
+        const typesData = await this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            objectId: source.id,
+        });
+        if (typesData == null)
+            return [];
+        else
+            return typesData.map(data => this.getOrCreateType(data));
+    }
+    async fetchSymbols(source, method, handles) {
+        return this.snapshotRegistry.fetchSymbols(source, method, handles, this.project.id);
+    }
+    // getBaseTypes is a checker-level endpoint keyed by `type` (not `objectId`),
+    // so it cannot go through fetchTypes. This helper reuses that server method.
+    async fetchBaseTypes(source) {
+        const typesData = await this.client.apiRequest("getBaseTypes", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: source.id,
+        });
+        if (typesData == null)
+            return [];
+        return typesData.map(data => this.getOrCreateType(data));
+    }
+}
+export class Project {
+    id;
+    configFileName;
+    compilerOptions;
+    rootFiles;
+    program;
+    checker;
+    emitter;
+    client;
+    constructor(data, snapshotId, client, sourceFileCache, toPath, snapshotRegistry) {
+        this.id = data.id;
+        this.configFileName = data.configFileName;
+        this.compilerOptions = data.compilerOptions;
+        this.rootFiles = data.rootFiles;
+        this.client = client;
+        this.program = new Program(snapshotId, this, client, sourceFileCache, toPath);
+        const objectRegistry = new ProjectObjectRegistry(client, snapshotId, this, snapshotRegistry);
+        this.checker = new Checker(snapshotId, this, client, objectRegistry);
+        this.emitter = new Emitter(client);
+    }
+    dispose() {
+        this.checker.dispose();
+    }
+}
+export class Program {
+    snapshotId;
+    project;
+    client;
+    sourceFileCache;
+    toPath;
+    decoder = new Wtf8Decoder();
+    sourceFileMetadataCache = new Map();
+    constructor(snapshotId, project, client, sourceFileCache, toPath) {
+        this.snapshotId = snapshotId;
+        this.project = project;
+        this.client = client;
+        this.sourceFileCache = sourceFileCache;
+        this.toPath = toPath;
+    }
+    getCompilerOptions() {
+        return this.project.compilerOptions;
+    }
+    async getSourceFile(file) {
+        const fileName = resolveFileName(file);
+        const path = this.toPath(fileName);
+        // Check if we already have a retained cache entry for this (snapshot, project) pair
+        const retained = this.sourceFileCache.getRetained(path, this.snapshotId, this.project.id);
+        if (retained) {
+            return retained;
+        }
+        // Fetch from server
+        const binaryData = await this.client.apiRequestBinary("getSourceFile", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+        });
+        if (!binaryData) {
+            return undefined;
+        }
+        const view = new DataView(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength);
+        const contentHash = readSourceFileHash(view);
+        const parseOptionsKey = readParseOptionsKey(view);
+        // Create a new RemoteSourceFile and cache it (set returns existing if hash matches)
+        const sourceFile = new RemoteSourceFile(binaryData, this.decoder, this.client.getTimingCollector());
+        return this.sourceFileCache.set(path, sourceFile, parseOptionsKey, contentHash, this.snapshotId, this.project.id);
+    }
+    async getSourceFileNames() {
+        const data = await this.client.apiRequest("getSourceFileNames", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+    /**
+     * Returns program-stored metadata for the given source file, or `undefined` if the file
+     * is not part of the program. Metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    getSourceFileMetadata(fileName) {
+        return this.getSourceFileMetadataByPath(this.toPath(fileName));
+    }
+    /**
+     * Returns program-stored metadata for the source file at the given path, or `undefined`
+     * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips
+     * the file name to path conversion. Metadata is fetched lazily per file and cached on
+     * this `Program` instance.
+     */
+    getSourceFileMetadataByPath(path) {
+        let metadata = this.sourceFileMetadataCache.get(path);
+        if (metadata === undefined) {
+            metadata = this.fetchSourceFileMetadata(path);
+            this.sourceFileMetadataCache.set(path, metadata);
+        }
+        return metadata;
+    }
+    async fetchSourceFileMetadata(path) {
+        const data = await this.client.apiRequest("getSourceFileMetadata", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file: path,
+        });
+        return data ?? undefined;
+    }
+    /**
+     * Returns whether the given source file was loaded as part of an external library
+     * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is
+     * fetched lazily per file and cached on this `Program` instance.
+     */
+    async isSourceFileFromExternalLibrary(file) {
+        const metadata = await this.getSourceFileMetadataByPath(file.path);
+        return metadata?.isFromExternalLibrary ?? false;
+    }
+    /**
+     * Returns whether the given source file is a default library file (e.g. `lib.d.ts`).
+     * The underlying program metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    async isSourceFileDefaultLibrary(file) {
+        const metadata = await this.getSourceFileMetadataByPath(file.path);
+        return metadata?.isDefaultLibrary ?? false;
+    }
+    /**
+     * Get syntactic (parse) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    async getSyntacticDiagnostics(file) {
+        const data = await this.client.apiRequest("getSyntacticDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get binder diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    async getBindDiagnostics(file) {
+        const data = await this.client.apiRequest("getBindDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get semantic (type-check) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    async getSemanticDiagnostics(file) {
+        const data = await this.client.apiRequest("getSemanticDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get suggestion diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    async getSuggestionDiagnostics(file) {
+        const data = await this.client.apiRequest("getSuggestionDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get declaration emit diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    async getDeclarationDiagnostics(file) {
+        const data = await this.client.apiRequest("getDeclarationDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get program-wide diagnostics for the project, including compiler options diagnostics.
+     */
+    async getProgramDiagnostics() {
+        const data = await this.client.apiRequest("getProgramDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+    /**
+     * Get global (non-file-specific) semantic diagnostics for the project.
+     */
+    async getGlobalDiagnostics() {
+        const data = await this.client.apiRequest("getGlobalDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+    /**
+     * Get config file parsing diagnostics for the project.
+     */
+    async getConfigFileParsingDiagnostics() {
+        const data = await this.client.apiRequest("getConfigFileParsingDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+}
+export class Checker {
+    snapshotId;
+    project;
+    client;
+    objectRegistry;
+    wellKnownSymbols;
+    constructor(snapshotId, project, client, objectRegistry) {
+        this.snapshotId = snapshotId;
+        this.project = project;
+        this.client = client;
+        this.objectRegistry = objectRegistry;
+    }
+    dispose() {
+        this.objectRegistry.clear();
+    }
+    async getSymbolAtLocation(nodeOrNodes) {
+        if (Array.isArray(nodeOrNodes)) {
+            const data = await this.client.apiRequest("getSymbolsAtLocations", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                locations: nodeOrNodes.map(node => getNodeId(node)),
+            });
+            return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined);
+        }
+        const data = await this.client.apiRequest("getSymbolAtLocation", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(nodeOrNodes),
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    async getSymbolAtPosition(file, positionOrPositions) {
+        if (typeof positionOrPositions === "number") {
+            const data = await this.client.apiRequest("getSymbolAtPosition", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                file,
+                position: positionOrPositions,
+            });
+            return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+        }
+        const data = await this.client.apiRequest("getSymbolsAtPositions", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+            positions: positionOrPositions,
+        });
+        return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined);
+    }
+    async getTypeOfSymbol(symbolOrSymbols) {
+        if (Array.isArray(symbolOrSymbols)) {
+            const data = await this.client.apiRequest("getTypesOfSymbols", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                symbols: symbolOrSymbols.map(s => s.id),
+            });
+            return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined);
+        }
+        const data = await this.client.apiRequest("getTypeOfSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbolOrSymbols.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    /**
+     * Get the declared type of a symbol. Always returns a type; for symbols whose
+     * declared type cannot be determined the checker yields the error type (use
+     * {@link Type.isErrorType} to detect it).
+     */
+    async getDeclaredTypeOfSymbol(symbol) {
+        const data = await this.client.apiRequest("getDeclaredTypeOfSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        if (!data)
+            throw new Error(`getDeclaredTypeOfSymbol returned no type for symbol ${symbol.id}`);
+        return this.objectRegistry.getOrCreateType(data);
+    }
+    async getReferencesToSymbolInFile(file, symbol) {
+        const data = await this.client.apiRequest("getReferencesToSymbolInFile", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+            symbol: symbol.id,
+        });
+        return (data ?? []).map(h => new NodeHandle(h, this.project));
+    }
+    async getReferencedSymbolsForNode(node, position) {
+        const data = await this.client.apiRequest("getReferencedSymbolsForNode", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            node: getNodeId(node),
+            position,
+        });
+        return (data ?? []).map(entry => ({
+            definition: new NodeHandle(entry.definition, this.project),
+            symbol: entry.symbol ? this.objectRegistry.getOrCreateSymbol(entry.symbol) : undefined,
+            references: (entry.references ?? []).map(h => new NodeHandle(h, this.project)),
+        }));
+    }
+    async getSignatureUsage(signatureDecl) {
+        const data = await this.client.apiRequest("getSignatureUsages", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signatureDecl: getNodeId(signatureDecl),
+        });
+        return (data ?? []).map(entry => ({
+            name: new NodeHandle(entry.name, this.project),
+            call: entry.call ? new NodeHandle(entry.call, this.project) : undefined,
+        }));
+    }
+    async getCompletionsAtPosition(document, position, options) {
+        const data = await this.client.apiRequest("getCompletionsAtPosition", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file: document,
+            position,
+            triggerCharacter: options?.triggerCharacter,
+            includeSymbol: options?.includeSymbol,
+        });
+        if (!data)
+            return undefined;
+        return {
+            isIncomplete: data.isIncomplete,
+            entries: data.entries.map(e => ({
+                ...e,
+                symbol: e.symbol ? this.objectRegistry.getOrCreateSymbol(e.symbol) : undefined,
+            })),
+        };
+    }
+    async getTypeAtLocation(nodeOrNodes) {
+        if (Array.isArray(nodeOrNodes)) {
+            const data = await this.client.apiRequest("getTypeAtLocations", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                locations: nodeOrNodes.map(node => getNodeId(node)),
+            });
+            return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined);
+        }
+        const data = await this.client.apiRequest("getTypeAtLocation", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(nodeOrNodes),
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getSignaturesOfType(type, kind) {
+        const data = await this.client.apiRequest("getSignaturesOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            kind,
+        });
+        return data.map(d => this.objectRegistry.getOrCreateSignature(d));
+    }
+    async getResolvedSignature(node) {
+        const data = await this.client.apiRequest("getResolvedSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSignature(data) : undefined;
+    }
+    async getTypeAtPosition(file, positionOrPositions) {
+        if (typeof positionOrPositions === "number") {
+            const data = await this.client.apiRequest("getTypeAtPosition", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                file,
+                position: positionOrPositions,
+            });
+            return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+        }
+        const data = await this.client.apiRequest("getTypesAtPositions", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+            positions: positionOrPositions,
+        });
+        return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined);
+    }
+    async resolveName(name, meaning, location, excludeGlobals) {
+        // Distinguish Node (has `kind`) from DocumentPosition (has `document` and `position`)
+        const isNode = location && "kind" in location;
+        const data = await this.client.apiRequest("resolveName", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            name,
+            meaning,
+            location: isNode ? getNodeId(location) : undefined,
+            file: !isNode && location ? location.document : undefined,
+            position: !isNode && location ? location.position : undefined,
+            excludeGlobals,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    async getResolvedSymbol(node) {
+        const text = node.text;
+        if (!text)
+            return undefined;
+        return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node);
+    }
+    async getContextualType(node) {
+        const data = await this.client.apiRequest("getContextualType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getBaseTypeOfLiteralType(type) {
+        const data = await this.client.apiRequest("getBaseTypeOfLiteralType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getNonNullableType(type) {
+        const data = await this.client.apiRequest("getNonNullableType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getTypeFromTypeNode(node) {
+        const data = await this.client.apiRequest("getTypeFromTypeNode", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getWidenedType(type) {
+        const data = await this.client.apiRequest("getWidenedType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getParameterType(signature, index) {
+        const data = await this.client.apiRequest("getParameterType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+            index,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async isArrayLikeType(type) {
+        return this.client.apiRequest("isArrayLikeType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+    }
+    async isTypeAssignableTo(source, target) {
+        return this.client.apiRequest("isTypeAssignableTo", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            source: source.id,
+            target: target.id,
+        });
+    }
+    async getShorthandAssignmentValueSymbol(node) {
+        const data = await this.client.apiRequest("getShorthandAssignmentValueSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    /**
+     * Get the type of a symbol as narrowed at a specific location. Always returns
+     * a type; for symbols whose type cannot be determined the checker yields the
+     * error type (use {@link Type.isErrorType} to detect it).
+     */
+    async getTypeOfSymbolAtLocation(symbol, location) {
+        const data = await this.client.apiRequest("getTypeOfSymbolAtLocation", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+            location: getNodeId(location),
+        });
+        if (!data)
+            throw new Error(`getTypeOfSymbolAtLocation returned no type for symbol ${symbol.id}`);
+        return this.objectRegistry.getOrCreateType(data);
+    }
+    async getIntrinsicType(method) {
+        const data = await this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return this.objectRegistry.getOrCreateType(data);
+    }
+    async getAnyType() {
+        return this.getIntrinsicType("getAnyType");
+    }
+    async getStringType() {
+        return this.getIntrinsicType("getStringType");
+    }
+    async getNumberType() {
+        return this.getIntrinsicType("getNumberType");
+    }
+    async getBooleanType() {
+        return this.getIntrinsicType("getBooleanType");
+    }
+    async getVoidType() {
+        return this.getIntrinsicType("getVoidType");
+    }
+    async getUndefinedType() {
+        return this.getIntrinsicType("getUndefinedType");
+    }
+    async getNullType() {
+        return this.getIntrinsicType("getNullType");
+    }
+    async getNeverType() {
+        return this.getIntrinsicType("getNeverType");
+    }
+    async getUnknownType() {
+        return this.getIntrinsicType("getUnknownType");
+    }
+    async getBigIntType() {
+        return this.getIntrinsicType("getBigIntType");
+    }
+    async getESSymbolType() {
+        return this.getIntrinsicType("getESSymbolType");
+    }
+    async typeToTypeNode(type, enclosingDeclaration, flags) {
+        const binaryData = await this.client.apiRequestBinary("typeToTypeNode", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined,
+            flags,
+        });
+        if (!binaryData)
+            return undefined;
+        return decodeNode(binaryData);
+    }
+    async signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags) {
+        const binaryData = await this.client.apiRequestBinary("signatureToSignatureDeclaration", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+            kind,
+            location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined,
+            flags,
+        });
+        if (!binaryData)
+            return undefined;
+        return decodeNode(binaryData);
+    }
+    async typeToString(type, enclosingDeclaration, flags) {
+        return this.client.apiRequest("typeToString", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined,
+            flags,
+        });
+    }
+    async isContextSensitive(node) {
+        return this.client.apiRequest("isContextSensitive", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+    }
+    async isArrayType(type) {
+        return this.client.apiRequest("isArrayType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+    }
+    async isTupleType(type) {
+        return this.client.apiRequest("isTupleType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+    }
+    async getReturnTypeOfSignature(signature) {
+        const data = await this.client.apiRequest("getReturnTypeOfSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getRestTypeOfSignature(signature) {
+        const data = await this.client.apiRequest("getRestTypeOfSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getTypePredicateOfSignature(signature) {
+        const data = await this.client.apiRequest("getTypePredicateOfSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+        });
+        if (!data)
+            return undefined;
+        return {
+            kind: data.kind,
+            parameterIndex: data.parameterIndex,
+            parameterName: data.parameterName,
+            type: data.type ? this.objectRegistry.getOrCreateType(data.type) : undefined,
+        };
+    }
+    /**
+     * Get the base types of a class or interface type. A type with no base types
+     * yields an empty array.
+     */
+    async getBaseTypes(type) {
+        const data = await this.client.apiRequest("getBaseTypes", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : [];
+    }
+    async getApparentType(type) {
+        const data = await this.client.apiRequest("getApparentType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getPropertiesOfType(type) {
+        const data = await this.client.apiRequest("getPropertiesOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : [];
+    }
+    async getIndexInfosOfType(type) {
+        const data = await this.client.apiRequest("getIndexInfosOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        if (!data)
+            return [];
+        return data.map(d => ({
+            keyType: this.objectRegistry.getOrCreateType(d.keyType),
+            valueType: this.objectRegistry.getOrCreateType(d.valueType),
+            isReadonly: d.isReadonly ?? false,
+            declaration: d.declaration ? new NodeHandle(d.declaration, this.project) : undefined,
+        }));
+    }
+    /**
+     * Get the constraint of a type parameter (the `T` in ``), or
+     * undefined if it has none.
+     */
+    async getConstraintOfTypeParameter(type) {
+        const data = await this.client.apiRequest("getConstraintOfTypeParameter", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getBaseConstraintOfType(type) {
+        const data = await this.client.apiRequest("getBaseConstraintOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    async getPropertyOfType(type, name) {
+        const data = await this.client.apiRequest("getPropertyOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            name,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    async getConstantValue(node) {
+        const data = await this.client.apiRequest("getConstantValue", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ?? undefined;
+    }
+    async getSignatureFromDeclaration(node) {
+        const data = await this.client.apiRequest("getSignatureFromDeclaration", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSignature(data) : undefined;
+    }
+    async getExportSpecifierLocalTargetSymbol(node) {
+        const data = await this.client.apiRequest("getExportSpecifierLocalTargetSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    /**
+     * Follow all aliases to get the original symbol. Always returns a symbol; for
+     * an unresolved alias the checker yields the unknown symbol (use
+     * {@link Checker.isUnknownSymbol} to detect it).
+     */
+    async getAliasedSymbol(symbol) {
+        const data = await this.client.apiRequest("getAliasedSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        if (!data)
+            throw new Error(`getAliasedSymbol returned no symbol for symbol ${symbol.id}`);
+        return this.objectRegistry.getOrCreateSymbol(data);
+    }
+    async getImmediateAliasedSymbol(symbol) {
+        const data = await this.client.apiRequest("getImmediateAliasedSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    /**
+     * Fetch (once, then cache) the handle ids of the per-checker singleton
+     * symbols (unknown, undefined, arguments). These ids are stable for the life
+     * of the project's checker, so identity checks against them are local after
+     * the first call.
+     */
+    getWellKnownSymbols() {
+        return this.wellKnownSymbols ??= this.client.apiRequest("getWellKnownSymbols", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+    }
+    /**
+     * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the
+     * result of {@link Checker.getAliasedSymbol} on an unresolved alias).
+     */
+    async isUnknownSymbol(symbol) {
+        return symbol.id === (await this.getWellKnownSymbols()).unknown;
+    }
+    /**
+     * Returns `true` if the symbol is the checker's "undefined" symbol.
+     */
+    async isUndefinedSymbol(symbol) {
+        return symbol.id === (await this.getWellKnownSymbols()).undefined;
+    }
+    /**
+     * Returns `true` if the symbol is the checker's "arguments" symbol.
+     */
+    async isArgumentsSymbol(symbol) {
+        return symbol.id === (await this.getWellKnownSymbols()).arguments;
+    }
+    async getExportsOfModule(symbol) {
+        const data = await this.client.apiRequest("getExportsOfModule", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : [];
+    }
+    async getMemberInModuleExports(symbol, name) {
+        const data = await this.client.apiRequest("getMemberInModuleExports", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+            name,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    async getJsDocTagsOfSymbol(symbol) {
+        const data = await this.client.apiRequest("getJsDocTags", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        return data ?? [];
+    }
+    async getDocumentationCommentOfSymbol(symbol) {
+        return this.client.apiRequest("getDocumentationComment", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+    }
+    /**
+     * Get the type arguments of a type reference (e.g. the `string` in `Array`).
+     */
+    async getTypeArguments(type) {
+        const data = await this.client.apiRequest("getTypeArguments", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : [];
+    }
+}
+export class Emitter {
+    client;
+    constructor(client) {
+        this.client = client;
+    }
+    async printNode(node, options = {}) {
+        const encoded = encodeNode(node);
+        const base64 = uint8ArrayToBase64(encoded);
+        return this.client.apiRequest("printNode", {
+            data: base64,
+            ...options,
+        });
+    }
+}
+export class NodeHandle {
+    /**
+     * The project this handle was produced in, used as the default for {@link resolve}.
+     * Node handles are only meaningful within a project's program, so the producing project
+     * is remembered so callers don't have to pass it explicitly.
+     */
+    canonicalProject;
+    index;
+    kind;
+    path;
+    constructor(handle, canonicalProject) {
+        const parsed = parseNodeHandle(handle);
+        this.index = parsed.index;
+        this.kind = parsed.kind;
+        this.path = parsed.path;
+        this.canonicalProject = canonicalProject;
+    }
+    /**
+     * Resolve this handle to the actual AST node by fetching the source file from a project
+     * and looking up the node by index. If no project is passed, the project that produced
+     * the handle is used.
+     */
+    async resolve(project = this.canonicalProject) {
+        const sourceFile = await project.program.getSourceFile(this.path);
+        if (!sourceFile) {
+            return undefined;
+        }
+        return sourceFile.getOrCreateNodeAtIndex(this.index);
+    }
+}
+export class Symbol {
+    objectRegistry;
+    /**
+     * The project this symbol was first observed in, used as the default project for
+     * lookups that need a project context (members/exports/parent). Symbols are shared
+     * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use.
+     */
+    canonicalProject;
+    id;
+    /** The escaped (`__String`) name, used as the key in member/export tables. */
+    escapedName;
+    /** The display name (escaped underscores removed). */
+    name;
+    flags;
+    checkFlags;
+    declarations;
+    valueDeclaration;
+    parent;
+    exportSymbol;
+    membersCache;
+    exportsCache;
+    constructor(data, objectRegistry) {
+        this.objectRegistry = objectRegistry;
+        this.id = data.id;
+        this.escapedName = data.name;
+        this.name = unescapeLeadingUnderscores(data.name);
+        this.flags = data.flags;
+        this.checkFlags = data.checkFlags;
+        const canonicalProject = objectRegistry.getProject(data.project);
+        if (!canonicalProject) {
+            throw new Error(`Symbol ${data.id} references unknown canonical project '${data.project}'`);
+        }
+        this.canonicalProject = canonicalProject;
+        this.declarations = (data.declarations ?? []).map(d => new NodeHandle(d, canonicalProject));
+        this.valueDeclaration = data.valueDeclaration ? new NodeHandle(data.valueDeclaration, canonicalProject) : undefined;
+        if (data.parent !== undefined)
+            this.parent = data.parent;
+        if (data.exportSymbol !== undefined)
+            this.exportSymbol = data.exportSymbol;
+    }
+    async getParent() {
+        return this.objectRegistry.fetchSymbol(this, "getParentOfSymbol", this.parent, this.canonicalProject.id);
+    }
+    /**
+     * Get this symbol's members keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getMembers() {
+        return this.membersCache ??= this.fetchSymbolTable("getMembersOfSymbol");
+    }
+    /**
+     * Get this symbol's exports keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getExports() {
+        return this.exportsCache ??= this.fetchSymbolTable("getExportsOfSymbol");
+    }
+    async fetchSymbolTable(method) {
+        const symbols = await this.objectRegistry.fetchSymbols(this, method, undefined, this.canonicalProject.id);
+        const table = new Map();
+        for (const symbol of symbols) {
+            table.set(symbol.escapedName, symbol);
+        }
+        return table;
+    }
+    async getExportSymbol() {
+        if (!this.exportSymbol)
+            return this;
+        return this.objectRegistry.fetchSymbol(this, "getExportSymbolOfSymbol", this.exportSymbol, this.canonicalProject.id);
+    }
+    async getJsDocTags(checker) {
+        return checker.getJsDocTagsOfSymbol(this);
+    }
+    async getDocumentationComment(checker) {
+        return checker.getDocumentationCommentOfSymbol(this);
+    }
+}
+class TypeObject {
+    objectRegistry;
+    id;
+    flags;
+    objectFlags;
+    symbol;
+    value;
+    intrinsicName;
+    isThisType;
+    freshType;
+    regularType;
+    target;
+    typeParameters;
+    outerTypeParameters;
+    localTypeParameters;
+    aliasTypeArguments;
+    aliasSymbol;
+    elementFlags;
+    fixedLength;
+    readonly;
+    texts;
+    objectType;
+    indexType;
+    checkType;
+    extendsType;
+    baseType;
+    substConstraint;
+    trueType; // false if not yet loaded
+    falseType; // false if not yet loaded
+    constructor(data, objectRegistry) {
+        this.objectRegistry = objectRegistry;
+        this.id = data.id;
+        this.flags = data.flags;
+        if (data.objectFlags !== undefined)
+            this.objectFlags = data.objectFlags;
+        if (data.symbol !== undefined)
+            this.symbol = data.symbol;
+        if (data.value != null) {
+            // BigInt literal values are serialized as decimal strings (e.g. "-123") because
+            // JSON cannot represent bigint. Decode them back into a real bigint here.
+            this.value = (data.flags & TypeFlags.BigIntLiteral) ? BigInt(data.value) : data.value;
+        }
+        if (data.intrinsicName !== undefined)
+            this.intrinsicName = data.intrinsicName;
+        if (data.isThisType !== undefined)
+            this.isThisType = data.isThisType;
+        if (data.freshType !== undefined)
+            this.freshType = data.freshType;
+        if (data.regularType !== undefined)
+            this.regularType = data.regularType;
+        if (data.target !== undefined)
+            this.target = data.target;
+        this.typeParameters = data.typeParameters ?? [];
+        this.outerTypeParameters = data.outerTypeParameters ?? [];
+        this.localTypeParameters = data.localTypeParameters ?? [];
+        this.aliasTypeArguments = data.aliasTypeArguments ?? [];
+        if (data.aliasSymbol !== undefined)
+            this.aliasSymbol = data.aliasSymbol;
+        if (data.elementFlags !== undefined)
+            this.elementFlags = data.elementFlags;
+        if (data.fixedLength !== undefined)
+            this.fixedLength = data.fixedLength;
+        if (data.readonly !== undefined)
+            this.readonly = data.readonly;
+        if (data.texts !== undefined)
+            this.texts = data.texts;
+        if (data.objectType !== undefined)
+            this.objectType = data.objectType;
+        if (data.indexType !== undefined)
+            this.indexType = data.indexType;
+        if (data.checkType !== undefined)
+            this.checkType = data.checkType;
+        if (data.extendsType !== undefined)
+            this.extendsType = data.extendsType;
+        if (data.baseType !== undefined)
+            this.baseType = data.baseType;
+        if (data.substConstraint !== undefined)
+            this.substConstraint = data.substConstraint;
+        this.trueType = false;
+        this.falseType = false;
+    }
+    async getSymbol() {
+        return this.objectRegistry.fetchSymbol(this, "getSymbolOfType", this.symbol);
+    }
+    async getAliasSymbol() {
+        return this.objectRegistry.fetchSymbol(this, "getAliasSymbolOfType", this.aliasSymbol);
+    }
+    async getTarget() {
+        return this.objectRegistry.fetchType(this, "getTargetOfType", this.target);
+    }
+    async getFreshType() {
+        return this.objectRegistry.fetchType(this, "getFreshTypeOfType", this.freshType);
+    }
+    async getRegularType() {
+        return this.objectRegistry.fetchType(this, "getRegularTypeOfType", this.regularType);
+    }
+    async getTypes() {
+        // Only union, intersection, and template literal types have constituent
+        // types; any other kind has none, so return undefined rather than sending
+        // a request the server cannot satisfy.
+        if (!(this.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral))) {
+            return undefined;
+        }
+        return this.objectRegistry.fetchTypes(this, "getTypesOfType");
+    }
+    async getTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getTypeParametersOfType", this.typeParameters);
+    }
+    async getOuterTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getOuterTypeParametersOfType", this.outerTypeParameters);
+    }
+    async getLocalTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getLocalTypeParametersOfType", this.localTypeParameters);
+    }
+    async getAliasTypeArguments() {
+        return this.objectRegistry.fetchTypes(this, "getAliasTypeArgumentsOfType", this.aliasTypeArguments);
+    }
+    async getObjectType() {
+        return this.objectRegistry.fetchType(this, "getObjectTypeOfType", this.objectType);
+    }
+    async getIndexType() {
+        return this.objectRegistry.fetchType(this, "getIndexTypeOfType", this.indexType);
+    }
+    async getCheckType() {
+        return this.objectRegistry.fetchType(this, "getCheckTypeOfType", this.checkType);
+    }
+    async getExtendsType() {
+        return this.objectRegistry.fetchType(this, "getExtendsTypeOfType", this.extendsType);
+    }
+    async getBaseType() {
+        return this.objectRegistry.fetchType(this, "getBaseTypeOfType", this.baseType);
+    }
+    async getConstraint() {
+        return this.objectRegistry.fetchType(this, "getConstraintOfType", this.substConstraint);
+    }
+    async getTrueType() {
+        const result = await this.objectRegistry.fetchType(this, "getTrueTypeOfConditionalType", this.trueType);
+        this.trueType = result.id;
+        return result;
+    }
+    async getFalseType() {
+        const result = await this.objectRegistry.fetchType(this, "getFalseTypeOfConditionalType", this.falseType);
+        this.falseType = result.id;
+        return result;
+    }
+    /**
+     * Get the base types of this type. Returns `undefined` for any type that is
+     * not a class or interface.
+     */
+    async getBaseTypes() {
+        if (!this.isClassOrInterface()) {
+            return undefined;
+        }
+        return this.objectRegistry.fetchBaseTypes(this);
+    }
+    isClassOrInterface() {
+        return isClassOrInterfaceType(this);
+    }
+    isUnionType() {
+        return isUnionType(this);
+    }
+    isIntersectionType() {
+        return isIntersectionType(this);
+    }
+    isObjectType() {
+        return isObjectType(this);
+    }
+    isIntrinsicType() {
+        return isIntrinsicType(this);
+    }
+    isErrorType() {
+        return isErrorType(this);
+    }
+    isLiteralType() {
+        return isLiteralType(this);
+    }
+    isStringLiteralType() {
+        return isStringLiteralType(this);
+    }
+    isNumberLiteralType() {
+        return isNumberLiteralType(this);
+    }
+    isBigIntLiteralType() {
+        return isBigIntLiteralType(this);
+    }
+    isBooleanLiteralType() {
+        return isBooleanLiteralType(this);
+    }
+    isTypeReference() {
+        return isTypeReference(this);
+    }
+    isTupleType() {
+        return isTupleType(this);
+    }
+    isIndexType() {
+        return isIndexType(this);
+    }
+    isIndexedAccessType() {
+        return isIndexedAccessType(this);
+    }
+    isConditionalType() {
+        return isConditionalType(this);
+    }
+    isSubstitutionType() {
+        return isSubstitutionType(this);
+    }
+    isTemplateLiteralType() {
+        return isTemplateLiteralType(this);
+    }
+    isStringMappingType() {
+        return isStringMappingType(this);
+    }
+    isTypeParameter() {
+        return isTypeParameter(this);
+    }
+}
+export function isUnionType(type) {
+    return (type.flags & TypeFlags.Union) !== 0;
+}
+export function isIntersectionType(type) {
+    return (type.flags & TypeFlags.Intersection) !== 0;
+}
+export function isObjectType(type) {
+    return (type.flags & TypeFlags.Object) !== 0;
+}
+export function isClassOrInterfaceType(type) {
+    return isObjectType(type) && (type.objectFlags & ObjectFlags.ClassOrInterface) !== 0;
+}
+export function isIntrinsicType(type) {
+    return (type.flags & TypeFlags.Intrinsic) !== 0;
+}
+/**
+ * Whether this is the error type — the placeholder the checker produces when a
+ * type cannot be determined (e.g. an unresolved reference). It is an intrinsic
+ * type named `"error"` (this covers both the singleton error type and the
+ * per-alias error types manufactured for unresolved type alias references).
+ */
+export function isErrorType(type) {
+    return isIntrinsicType(type) && type.intrinsicName === "error";
+}
+export function isLiteralType(type) {
+    return (type.flags & TypeFlags.Literal) !== 0;
+}
+export function isStringLiteralType(type) {
+    return (type.flags & TypeFlags.StringLiteral) !== 0;
+}
+export function isNumberLiteralType(type) {
+    return (type.flags & TypeFlags.NumberLiteral) !== 0;
+}
+export function isBigIntLiteralType(type) {
+    return (type.flags & TypeFlags.BigIntLiteral) !== 0;
+}
+export function isBooleanLiteralType(type) {
+    return (type.flags & TypeFlags.BooleanLiteral) !== 0;
+}
+export function isTypeReference(type) {
+    return isObjectType(type) && (type.objectFlags & ObjectFlags.Reference) !== 0;
+}
+export function isTupleType(type) {
+    return isObjectType(type) && (type.objectFlags & ObjectFlags.Tuple) !== 0;
+}
+export function isIndexType(type) {
+    return (type.flags & TypeFlags.Index) !== 0;
+}
+export function isIndexedAccessType(type) {
+    return (type.flags & TypeFlags.IndexedAccess) !== 0;
+}
+export function isConditionalType(type) {
+    return (type.flags & TypeFlags.Conditional) !== 0;
+}
+export function isSubstitutionType(type) {
+    return (type.flags & TypeFlags.Substitution) !== 0;
+}
+export function isTemplateLiteralType(type) {
+    return (type.flags & TypeFlags.TemplateLiteral) !== 0;
+}
+export function isStringMappingType(type) {
+    return (type.flags & TypeFlags.StringMapping) !== 0;
+}
+export function isTypeParameter(type) {
+    return (type.flags & TypeFlags.TypeParameter) !== 0;
+}
+export class Signature {
+    flags;
+    objectRegistry;
+    id;
+    declaration;
+    typeParameters;
+    parameters;
+    thisParameter;
+    target;
+    constructor(data, project, objectRegistry) {
+        this.id = data.id;
+        this.flags = data.flags;
+        this.objectRegistry = objectRegistry;
+        this.declaration = data.declaration ? new NodeHandle(data.declaration, project) : undefined;
+        this.typeParameters = data.typeParameters ?? [];
+        this.parameters = data.parameters ?? [];
+        this.thisParameter = data.thisParameter;
+        this.target = data.target;
+    }
+    async getTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getTypeParametersOfSignature", this.typeParameters);
+    }
+    async getParameters() {
+        return this.objectRegistry.fetchSymbols(this, "getParametersOfSignature", this.parameters);
+    }
+    async getThisParameter() {
+        return this.objectRegistry.fetchSymbol(this, "getThisParameterOfSignature", this.thisParameter);
+    }
+    async getTarget() {
+        return this.objectRegistry.fetchSignature(this, "getTargetOfSignature", this.target);
+    }
+    get hasRestParameter() {
+        return (this.flags & SignatureFlags.HasRestParameter) !== 0;
+    }
+    get isConstruct() {
+        return (this.flags & SignatureFlags.Construct) !== 0;
+    }
+    get isAbstract() {
+        return (this.flags & SignatureFlags.Abstract) !== 0;
+    }
+}
+//# sourceMappingURL=api.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/api.js.map b/node_modules/typescript/dist/api/async/api.js.map
new file mode 100644
index 000000000..eab493904
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/api.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/async/api.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAIH,aAAa,EAMb,0BAA0B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB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E,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE,8BAA8B,EAAE,IAAI,CAAC,cAAc,CAAsC,CAAC;IAC1I,CAAC;IAED,KAAK,CAAC,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,0BAA0B,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/F,CAAC;IAED,KAAK,CAAC,gBAAgB;QAClB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,EAAE,6BAA6B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACpG,CAAC;IAED,KAAK,CAAC,SAAS;QACX,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,WAAW;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/client.d.ts b/node_modules/typescript/dist/api/async/client.d.ts
new file mode 100644
index 000000000..fd2f4352f
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/client.d.ts
@@ -0,0 +1,39 @@
+import { type ClientOptions, type ClientSocketOptions, type ClientSpawnOptions } from "../options.ts";
+import { TimingCollector, type TimingInfo } from "../timing.ts";
+export type { ClientOptions, ClientSocketOptions, ClientSpawnOptions };
+/**
+ * Client handles communication with the TypeScript API server
+ * over STDIO (spawned process) or a Unix domain socket using JSON-RPC.
+ */
+export declare class Client {
+    private socket;
+    private process;
+    private connection;
+    private options;
+    private connected;
+    private timing;
+    constructor(options: ClientOptions);
+    connect(): Promise;
+    private connectViaSpawn;
+    private connectViaSocket;
+    private registerFSCallbacks;
+    apiRequest(method: string, params?: unknown): Promise;
+    apiRequestBinary(method: string, params?: unknown): Promise;
+    /**
+     * Returns the timing collector that per-node materialization is reported
+     * into, or undefined when timing collection is disabled. The returned
+     * collector is the same one folded into {@link getTimingInfo}, so
+     * materialization totals surface alongside request timings.
+     */
+    getTimingCollector(): TimingCollector | undefined;
+    /**
+     * Returns a combined timing snapshot: client-measured round-trip and byte
+     * counts folded together with the server's own per-request processing time
+     * (fetched via a getServerTiming request) and estimated transport overhead.
+     */
+    getTimingInfo(): Promise;
+    resetTimingInfo(): Promise;
+    private fetchServerTiming;
+    close(): Promise;
+}
+//# sourceMappingURL=client.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/client.d.ts.map b/node_modules/typescript/dist/api/async/client.d.ts.map
new file mode 100644
index 000000000..c0b54b747
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/client.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/async/client.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAG1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAKH,eAAe,EACf,KAAK,UAAU,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAEvE;;;GAGG;AACH,qBAAa,MAAM;IACf,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAA8B;gBAEhC,OAAO,EAAE,aAAa;IAO5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAWhB,eAAe;YAiDf,gBAAgB;IAmB9B,OAAO,CAAC,mBAAmB;IAoBrB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAgC3D,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAOzF;;;;;OAKG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAYpC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;YAUxB,iBAAiB;IAUzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB/B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/client.js b/node_modules/typescript/dist/api/async/client.js
new file mode 100644
index 000000000..d175d9641
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/client.js
@@ -0,0 +1,211 @@
+import { createMessageConnection, RequestType, SocketMessageReader, SocketMessageWriter, StreamMessageReader, StreamMessageWriter, } from "#vscode-jsonrpc/node";
+import { fsCallbackNames, } from "../fs.js";
+import { isSpawnOptions, resolveExePath, } from "../options.js";
+import { combineTimingInfo, disabledServerTimingInfo, disabledTimingInfo, TimingCollector, } from "../timing.js";
+/**
+ * Client handles communication with the TypeScript API server
+ * over STDIO (spawned process) or a Unix domain socket using JSON-RPC.
+ */
+export class Client {
+    socket;
+    process;
+    connection;
+    options;
+    connected = false;
+    timing;
+    constructor(options) {
+        this.options = options;
+        if (isSpawnOptions(options) && options.collectTiming) {
+            this.timing = new TimingCollector();
+        }
+    }
+    async connect() {
+        if (this.connected)
+            return;
+        if (isSpawnOptions(this.options)) {
+            await this.connectViaSpawn(this.options);
+        }
+        else {
+            await this.connectViaSocket(this.options);
+        }
+    }
+    async connectViaSpawn(options) {
+        const { spawn } = await import("node:child_process");
+        return new Promise((resolve, reject) => {
+            const args = [
+                "--api",
+                "--async",
+                "--cwd",
+                options.cwd ?? process.cwd(),
+            ];
+            if (options.collectTiming) {
+                args.push("--timing");
+            }
+            // Enable virtual FS callbacks for each provided FS function
+            const enabledCallbacks = [];
+            if (options.fs) {
+                for (const name of fsCallbackNames) {
+                    if (options.fs[name]) {
+                        enabledCallbacks.push(name);
+                    }
+                }
+            }
+            if (enabledCallbacks.length > 0) {
+                args.push(`--callbacks=${enabledCallbacks.join(",")}`);
+            }
+            this.process = spawn(resolveExePath(options), args, {
+                stdio: ["pipe", "pipe", "inherit"],
+            });
+            this.process.once("error", error => {
+                reject(new Error(`Failed to start tsgo process: ${error.message}`));
+            });
+            this.process.once("spawn", () => {
+                this.connected = true;
+                resolve();
+            });
+            const reader = new StreamMessageReader(this.process.stdout);
+            const writer = new StreamMessageWriter(this.process.stdin);
+            this.connection = createMessageConnection(reader, writer);
+            this.registerFSCallbacks(this.connection, options.fs);
+            this.connection.listen();
+        });
+    }
+    async connectViaSocket(options) {
+        const { createConnection } = await import("node:net");
+        return new Promise((resolve, reject) => {
+            this.socket = createConnection(options.pipe, () => {
+                const reader = new SocketMessageReader(this.socket);
+                const writer = new SocketMessageWriter(this.socket);
+                this.connection = createMessageConnection(reader, writer);
+                this.connection.listen();
+                this.connected = true;
+                resolve();
+            });
+            this.socket.once("error", error => {
+                reject(new Error(`Socket error: ${error.message}`));
+            });
+        });
+    }
+    registerFSCallbacks(connection, fs) {
+        if (!fs)
+            return;
+        for (const name of fsCallbackNames) {
+            const callback = fs[name];
+            if (callback) {
+                const requestType = new RequestType(name);
+                connection.onRequest(requestType, (arg) => {
+                    const result = callback(arg);
+                    if (name === "readFile") {
+                        // readFile has 3 returns: string (content), null (not found), undefined (fall back).
+                        // JSON-RPC can't distinguish null from undefined, so wrap in object.
+                        if (result === undefined)
+                            return null;
+                        return { content: result };
+                    }
+                    return result ?? null;
+                });
+            }
+        }
+    }
+    async apiRequest(method, params) {
+        if (!this.connected) {
+            await this.connect();
+        }
+        if (!this.connection) {
+            throw new Error("Connection not established");
+        }
+        const requestType = new RequestType(method);
+        if (!this.timing) {
+            return this.connection.sendRequest(requestType, params);
+        }
+        // Round-trip latency is measured here; byte counts approximate the wire
+        // payload via the serialized JSON. Server-side processing time is not
+        // carried on the response; it is retrieved separately (via a
+        // getServerTiming request) and folded in by getTimingInfo().
+        const bytesSent = params === undefined ? 0 : Buffer.byteLength(JSON.stringify(params), "utf-8");
+        const start = performance.now();
+        const result = await this.connection.sendRequest(requestType, params);
+        const roundTripMs = performance.now() - start;
+        this.timing.record({
+            method,
+            roundTripMs,
+            bytesSent,
+            bytesReceived: result === undefined || result === null
+                ? 0
+                : Buffer.byteLength(JSON.stringify(result), "utf-8"),
+        });
+        return result;
+    }
+    async apiRequestBinary(method, params) {
+        const response = await this.apiRequest(method, params);
+        if (!response)
+            return undefined;
+        const buffer = Buffer.from(response.data, "base64");
+        return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
+    }
+    /**
+     * Returns the timing collector that per-node materialization is reported
+     * into, or undefined when timing collection is disabled. The returned
+     * collector is the same one folded into {@link getTimingInfo}, so
+     * materialization totals surface alongside request timings.
+     */
+    getTimingCollector() {
+        return this.timing;
+    }
+    /**
+     * Returns a combined timing snapshot: client-measured round-trip and byte
+     * counts folded together with the server's own per-request processing time
+     * (fetched via a getServerTiming request) and estimated transport overhead.
+     */
+    async getTimingInfo() {
+        if (!this.timing) {
+            return disabledTimingInfo();
+        }
+        const local = this.timing.getInfo();
+        // No requests have been sent yet: nothing to fetch from the server.
+        if (!this.connected || !this.connection) {
+            return local;
+        }
+        return combineTimingInfo(local, await this.fetchServerTiming());
+    }
+    async resetTimingInfo() {
+        if (!this.timing)
+            return;
+        this.timing.reset();
+        if (this.connected && this.connection) {
+            // Keep the server's collection in sync so combined totals stay meaningful.
+            const requestType = new RequestType("resetServerTiming");
+            await this.connection.sendRequest(requestType, undefined);
+        }
+    }
+    async fetchServerTiming() {
+        if (!this.connection) {
+            return disabledServerTimingInfo();
+        }
+        // Fetch the server's own timing collection via a dedicated request. This
+        // bypasses the client-side collector so the query does not pollute it.
+        const requestType = new RequestType("getServerTiming");
+        return this.connection.sendRequest(requestType, undefined);
+    }
+    async close() {
+        if (this.connection) {
+            this.connection.dispose();
+            this.connection = undefined;
+        }
+        if (this.socket) {
+            this.socket.destroy();
+            this.socket = undefined;
+        }
+        if (this.process) {
+            // Close stdin to unblock the server's read loop, allowing it to exit cleanly.
+            // The server is blocked on stdin.Read(), so just sending SIGTERM would deadlock:
+            // - Node won't exit while child is alive
+            // - Child can't process SIGTERM while blocked on read
+            // - Read won't error until stdin is closed
+            this.process.stdin?.end();
+            this.process = undefined;
+        }
+        this.connected = false;
+    }
+}
+//# sourceMappingURL=client.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/client.js.map b/node_modules/typescript/dist/api/async/client.js.map
new file mode 100644
index 000000000..bc39d4180
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/api/async/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EAEvB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEH,eAAe,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAIH,cAAc,EACd,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,iBAAiB,EACjB,wBAAwB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F,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,KAAK;QACP,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAChC,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,8EAA8E;YAC9E,iFAAiF;YACjF,yCAAyC;YACzC,sDAAsD;YACtD,2CAA2C;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/types.d.ts b/node_modules/typescript/dist/api/async/types.d.ts
new file mode 100644
index 000000000..fd1869cde
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/types.d.ts
@@ -0,0 +1,310 @@
+import type { CompletionItemKind } from "#enums/completionItemKind";
+import type { DiagnosticCategory } from "#enums/diagnosticCategory";
+import type { ElementFlags } from "#enums/elementFlags";
+import type { ObjectFlags } from "#enums/objectFlags";
+import type { TypeFlags } from "#enums/typeFlags";
+import type { TypePredicateKind } from "#enums/typePredicateKind";
+import type { NodeHandle, Symbol } from "./api.ts";
+/**
+ * A TypeScript type.
+ *
+ * Use TypeFlags to determine the specific kind of type and access
+ * kind-specific properties. For example:
+ *
+ * ```ts
+ * if (type.flags & TypeFlags.StringLiteral) {
+ *     console.log((type as StringLiteralType).value); // string
+ * }
+ * ```
+ */
+export interface Type {
+    /** Type flags — use to determine the specific kind of type. */
+    readonly flags: TypeFlags;
+    /** Unique identifier for this type */
+    readonly id: number;
+    /** Get the symbol associated with this type, if any */
+    getSymbol(): Promise;
+    /** Get the type arguments of the type alias this type was instantiated from, if any */
+    getAliasTypeArguments(): Promise;
+    /** Get the symbol of the type alias this type was instantiated from, if any */
+    getAliasSymbol(): Promise;
+    /**
+     * Get the base types of this type, or `undefined` if it is not a class or
+     * interface type.
+     */
+    getBaseTypes(): Promise;
+    /** Whether this type is a class or interface type */
+    isClassOrInterface(): this is InterfaceType;
+    /** Whether this type is a union type */
+    isUnionType(): this is UnionType;
+    /** Whether this type is an intersection type */
+    isIntersectionType(): this is IntersectionType;
+    /** Whether this type is an object type */
+    isObjectType(): this is ObjectType;
+    /** Whether this type is an intrinsic primitive type */
+    isIntrinsicType(): this is IntrinsicType;
+    /**
+     * Whether this is the error type — the placeholder produced when a type
+     * cannot be determined (e.g. an unresolved reference).
+     */
+    isErrorType(): boolean;
+    /** Whether this type is a literal type */
+    isLiteralType(): this is LiteralType;
+    /** Whether this type is a string literal type */
+    isStringLiteralType(): this is StringLiteralType;
+    /** Whether this type is a number literal type */
+    isNumberLiteralType(): this is NumberLiteralType;
+    /** Whether this type is a bigint literal type */
+    isBigIntLiteralType(): this is BigIntLiteralType;
+    /** Whether this type is a boolean literal type */
+    isBooleanLiteralType(): this is BooleanLiteralType;
+    /** Whether this type is a type reference */
+    isTypeReference(): this is TypeReference;
+    /** Whether this type is a tuple type */
+    isTupleType(): this is TupleType;
+    /** Whether this type is an index type (`keyof T`) */
+    isIndexType(): this is IndexType;
+    /** Whether this type is an indexed access type (`T[K]`) */
+    isIndexedAccessType(): this is IndexedAccessType;
+    /** Whether this type is a conditional type */
+    isConditionalType(): this is ConditionalType;
+    /** Whether this type is a substitution type */
+    isSubstitutionType(): this is SubstitutionType;
+    /** Whether this type is a template literal type */
+    isTemplateLiteralType(): this is TemplateLiteralType;
+    /** Whether this type is a string mapping type */
+    isStringMappingType(): this is StringMappingType;
+    /** Whether this type is a type parameter */
+    isTypeParameter(): this is TypeParameter;
+}
+/**
+ * Freshable types (TypeFlags.Freshable) - literal types (TypeFlags.Literal) and computed enum types (TypeFlags.Enum).
+ */
+export interface FreshableType extends Type {
+    /** Get the fresh version of this type, if any */
+    getFreshType(): Promise;
+    /** Get the regular (non-fresh) version of this type, if any */
+    getRegularType(): Promise;
+}
+/** Literal types: StringLiteral, NumberLiteral, BigIntLiteral, BooleanLiteral */
+export interface LiteralType extends FreshableType {
+    /** The literal value. Use TypeFlags to narrow to a specific literal subtype with a concrete value type. */
+    readonly value: string | number | boolean | bigint;
+}
+/** String literal types (TypeFlags.StringLiteral) */
+export interface StringLiteralType extends LiteralType {
+    /** The string value of the literal */
+    readonly value: string;
+}
+/** Numeric literal types (TypeFlags.NumberLiteral) */
+export interface NumberLiteralType extends LiteralType {
+    /** The numeric value of the literal */
+    readonly value: number;
+}
+/** BigInt literal types (TypeFlags.BigIntLiteral) */
+export interface BigIntLiteralType extends LiteralType {
+    /** The bigint value of the literal */
+    readonly value: bigint;
+}
+/** Boolean literal types (TypeFlags.BooleanLiteral) */
+export interface BooleanLiteralType extends LiteralType {
+    /** The boolean value of the literal */
+    readonly value: boolean;
+}
+/** Object types (TypeFlags.Object) */
+export interface ObjectType extends Type {
+    /** Object flags — use to determine the specific kind of object type. */
+    readonly objectFlags: ObjectFlags;
+}
+/** Type references (ObjectFlags.Reference) — e.g. Array, Map */
+export interface TypeReference extends ObjectType {
+    /** Get the generic target type (e.g. Array for Array) */
+    getTarget(): Promise;
+}
+/** Interface types — classes and interfaces (ObjectFlags.ClassOrInterface) */
+export interface InterfaceType extends TypeReference {
+    /** Get all type parameters (outer + local, excluding thisType) */
+    getTypeParameters(): Promise;
+    /** Get outer type parameters from enclosing declarations */
+    getOuterTypeParameters(): Promise;
+    /** Get local type parameters declared on this interface/class */
+    getLocalTypeParameters(): Promise;
+}
+/** Tuple types (ObjectFlags.Tuple) */
+export interface TupleType extends InterfaceType {
+    /** Per-element flags (Required, Optional, Rest, Variadic) */
+    readonly elementFlags: readonly ElementFlags[];
+    /** Number of initial required or optional elements */
+    readonly fixedLength: number;
+    /** Whether the tuple is readonly */
+    readonly readonly: boolean;
+}
+/** Union or intersection types (TypeFlags.Union | TypeFlags.Intersection) */
+export interface UnionOrIntersectionType extends Type {
+    /** Get the constituent types */
+    getTypes(): Promise;
+}
+/** Union types (TypeFlags.Union) */
+export interface UnionType extends UnionOrIntersectionType {
+}
+/** Intersection types (TypeFlags.Intersection) */
+export interface IntersectionType extends UnionOrIntersectionType {
+}
+/** Type parameters (TypeFlags.TypeParameter) */
+export interface TypeParameter extends Type {
+    /** True if this is the synthetic `this` type of an interface, class, or tuple */
+    readonly isThisType?: boolean | undefined;
+}
+/** Index types — keyof T (TypeFlags.Index) */
+export interface IndexType extends Type {
+    /** Get the target type T in `keyof T` */
+    getTarget(): Promise;
+}
+/** Indexed access types — T[K] (TypeFlags.IndexedAccess) */
+export interface IndexedAccessType extends Type {
+    /** Get the object type T in `T[K]` */
+    getObjectType(): Promise;
+    /** Get the index type K in `T[K]` */
+    getIndexType(): Promise;
+}
+/** Conditional types — T extends U ? X : Y (TypeFlags.Conditional) */
+export interface ConditionalType extends Type {
+    /** Get the check type T in `T extends U ? X : Y` */
+    getCheckType(): Promise;
+    /** Get the extends type U in `T extends U ? X : Y` */
+    getExtendsType(): Promise;
+    /** Get the true type X in `T extends U ? X : Y` */
+    getTrueType(): Promise;
+    /** Get the false type Y in `T extends U ? X : Y` */
+    getFalseType(): Promise;
+}
+/** Substitution types (TypeFlags.Substitution) */
+export interface SubstitutionType extends Type {
+    getBaseType(): Promise;
+    getConstraint(): Promise;
+}
+/** Template literal types (TypeFlags.TemplateLiteral) */
+export interface TemplateLiteralType extends Type {
+    /** Text segments (always one more than the number of type spans) */
+    readonly texts: readonly string[];
+    /** Get the types interspersed between text segments */
+    getTypes(): Promise;
+}
+/** String mapping types — Uppercase, Lowercase, etc. (TypeFlags.StringMapping) */
+export interface StringMappingType extends Type {
+    /** Get the mapped type */
+    getTarget(): Promise;
+}
+/** Intrinsic types — any, unknown, string, number, bigint, symbol, void, undefined, null, never, object (TypeFlags.Intrinsic) */
+export interface IntrinsicType extends Type {
+    /** The intrinsic type name (e.g. "any", "string", "never") */
+    readonly intrinsicName: string;
+}
+/** Base for all type predicates */
+export interface TypePredicateBase {
+    readonly kind: TypePredicateKind;
+    readonly type: Type | undefined;
+}
+/** `this is T` */
+export interface ThisTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.This;
+    readonly parameterName: undefined;
+    readonly parameterIndex: undefined;
+    readonly type: Type;
+}
+/** `x is T` */
+export interface IdentifierTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.Identifier;
+    readonly parameterName: string;
+    readonly parameterIndex: number;
+    readonly type: Type;
+}
+/** `asserts this is T` */
+export interface AssertsThisTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.AssertsThis;
+    readonly parameterName: undefined;
+    readonly parameterIndex: undefined;
+    readonly type: Type | undefined;
+}
+/** `asserts x is T` */
+export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.AssertsIdentifier;
+    readonly parameterName: string;
+    readonly parameterIndex: number;
+    readonly type: Type | undefined;
+}
+/** A type predicate — e.g. `x is T` or `asserts x is T` */
+export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
+/** An index signature — e.g. `[key: string]: T` */
+export interface IndexInfo {
+    /** The index key type (e.g. string or number) */
+    readonly keyType: Type;
+    /** The index value type */
+    readonly valueType: Type;
+    /** Whether the index signature is readonly */
+    readonly isReadonly: boolean;
+    /** The index signature declaration, if any */
+    readonly declaration?: NodeHandle | undefined;
+}
+/**
+ * A single JSDoc tag attached to a symbol — e.g. `@param`, `@returns`.
+ */
+export interface JSDocTagInfo {
+    /** The tag name, without the leading `@` — e.g. `"param"`. */
+    readonly name: string;
+    /** The rendered tag text, if any — e.g. `"a the first number"` for `@param a the first number`. */
+    readonly text?: string | undefined;
+}
+export interface CompletionEntryLabelDetails {
+    detail?: string | undefined;
+    description?: string | undefined;
+}
+/** Options for {@link Checker.getCompletionsAtPosition}. */
+export interface CompletionOptions {
+    triggerCharacter?: string | undefined;
+    /** Include a `symbol` property on each completion entry. Only populated for symbol-based completions (not keywords or literals). */
+    includeSymbol?: boolean | undefined;
+}
+/** A single completion item returned by {@link Checker.getCompletionsAtPosition}. */
+export interface CompletionEntry {
+    readonly name: string;
+    readonly kind?: CompletionItemKind | undefined;
+    readonly sortText?: string | undefined;
+    readonly insertText?: string | undefined;
+    readonly filterText?: string | undefined;
+    readonly detail?: string | undefined;
+    readonly labelDetails?: CompletionEntryLabelDetails | undefined;
+    /** The symbol associated with this completion entry. Only set when `includeSymbol: true` is passed and a symbol is available. */
+    readonly symbol?: Symbol | undefined;
+}
+/** The result of {@link Checker.getCompletionsAtPosition}. */
+export interface CompletionInfo {
+    readonly isIncomplete: boolean;
+    readonly entries: readonly CompletionEntry[];
+}
+/**
+ * A diagnostic message from the TypeScript compiler.
+ */
+export interface Diagnostic {
+    /** File name of the source file this diagnostic belongs to, if any */
+    readonly fileName?: string | undefined;
+    /** Start position of the diagnostic */
+    readonly pos: number;
+    /** End position of the diagnostic */
+    readonly end: number;
+    /** Diagnostic error code */
+    readonly code: number;
+    /** Diagnostic category (error, warning, suggestion, message) */
+    readonly category: DiagnosticCategory;
+    /** Localized diagnostic message text */
+    readonly text: string;
+    /** Whether this diagnostic highlights unnecessary code */
+    readonly reportsUnnecessary?: boolean | undefined;
+    /** Whether this diagnostic highlights deprecated code */
+    readonly reportsDeprecated?: boolean | undefined;
+    /** Chained diagnostic messages */
+    readonly messageChain?: readonly Diagnostic[] | undefined;
+    /** Related diagnostic information */
+    readonly relatedInformation?: readonly Diagnostic[] | undefined;
+}
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/types.d.ts.map b/node_modules/typescript/dist/api/async/types.d.ts.map
new file mode 100644
index 000000000..b539050a8
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/async/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EACR,UAAU,EACV,MAAM,EACT,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,IAAI;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAE1B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,uDAAuD;IACvD,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEzC,uFAAuF;IACvF,qBAAqB,IAAI,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IAElD,+EAA+E;IAC/E,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE9C;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,SAAS,IAAI,EAAE,GAAG,SAAS,CAAC,CAAC;IAErD,qDAAqD;IACrD,kBAAkB,IAAI,IAAI,IAAI,aAAa,CAAC;IAC5C,wCAAwC;IACxC,WAAW,IAAI,IAAI,IAAI,SAAS,CAAC;IACjC,gDAA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I,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClD,yDAAyD;IACzD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjD,kCAAkC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1D,qCAAqC;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;CACnE"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/types.js b/node_modules/typescript/dist/api/async/types.js
new file mode 100644
index 000000000..718fd38ae
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/types.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/async/types.js.map b/node_modules/typescript/dist/api/async/types.js.map
new file mode 100644
index 000000000..0defc86eb
--- /dev/null
+++ b/node_modules/typescript/dist/api/async/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/async/types.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/compilerOptions.d.ts b/node_modules/typescript/dist/api/compilerOptions.d.ts
new file mode 100644
index 000000000..d514cf48b
--- /dev/null
+++ b/node_modules/typescript/dist/api/compilerOptions.d.ts
@@ -0,0 +1,109 @@
+import type { JsxEmit } from "#enums/jsxEmit";
+import type { ModuleDetectionKind } from "#enums/moduleDetectionKind";
+import type { ModuleKind } from "#enums/moduleKind";
+import type { ModuleResolutionKind } from "#enums/moduleResolutionKind";
+import type { NewLineKind } from "#enums/newLineKind";
+import type { ScriptTarget } from "#enums/scriptTarget";
+export interface CompilerOptions {
+    allowJs?: boolean;
+    allowArbitraryExtensions?: boolean;
+    allowImportingTsExtensions?: boolean;
+    allowNonTsExtensions?: boolean;
+    allowUmdGlobalAccess?: boolean;
+    allowUnreachableCode?: boolean;
+    allowUnusedLabels?: boolean;
+    assumeChangesOnlyAffectDirectDependencies?: boolean;
+    checkJs?: boolean;
+    customConditions?: string[];
+    composite?: boolean;
+    emitDeclarationOnly?: boolean;
+    emitBOM?: boolean;
+    emitDecoratorMetadata?: boolean;
+    declaration?: boolean;
+    declarationDir?: string;
+    declarationMap?: boolean;
+    deduplicatePackages?: boolean;
+    disableSizeLimit?: boolean;
+    disableSourceOfProjectReferenceRedirect?: boolean;
+    disableSolutionSearching?: boolean;
+    disableReferencedProjectLoad?: boolean;
+    erasableSyntaxOnly?: boolean;
+    exactOptionalPropertyTypes?: boolean;
+    experimentalDecorators?: boolean;
+    forceConsistentCasingInFileNames?: boolean;
+    isolatedModules?: boolean;
+    isolatedDeclarations?: boolean;
+    ignoreConfig?: boolean;
+    ignoreDeprecations?: string;
+    importHelpers?: boolean;
+    inlineSourceMap?: boolean;
+    inlineSources?: boolean;
+    init?: boolean;
+    incremental?: boolean;
+    jsx?: JsxEmit;
+    jsxFactory?: string;
+    jsxFragmentFactory?: string;
+    jsxImportSource?: string;
+    lib?: string[];
+    libReplacement?: boolean;
+    locale?: string;
+    mapRoot?: string;
+    module?: ModuleKind;
+    moduleResolution?: ModuleResolutionKind;
+    moduleSuffixes?: string[];
+    moduleDetection?: ModuleDetectionKind;
+    newLine?: NewLineKind;
+    noEmit?: boolean;
+    noCheck?: boolean;
+    noErrorTruncation?: boolean;
+    noFallthroughCasesInSwitch?: boolean;
+    noImplicitAny?: boolean;
+    noImplicitThis?: boolean;
+    noImplicitReturns?: boolean;
+    noEmitHelpers?: boolean;
+    noLib?: boolean;
+    noPropertyAccessFromIndexSignature?: boolean;
+    noUncheckedIndexedAccess?: boolean;
+    noEmitOnError?: boolean;
+    noUnusedLocals?: boolean;
+    noUnusedParameters?: boolean;
+    noResolve?: boolean;
+    noImplicitOverride?: boolean;
+    noUncheckedSideEffectImports?: boolean;
+    outDir?: string;
+    paths?: Record;
+    preserveConstEnums?: boolean;
+    preserveSymlinks?: boolean;
+    project?: string;
+    resolveJsonModule?: boolean;
+    resolvePackageJsonExports?: boolean;
+    resolvePackageJsonImports?: boolean;
+    removeComments?: boolean;
+    rewriteRelativeImportExtensions?: boolean;
+    reactNamespace?: string;
+    rootDir?: string;
+    rootDirs?: string[];
+    skipLibCheck?: boolean;
+    stableTypeOrdering?: boolean;
+    strict?: boolean;
+    strictBindCallApply?: boolean;
+    strictBuiltinIteratorReturn?: boolean;
+    strictFunctionTypes?: boolean;
+    strictNullChecks?: boolean;
+    strictPropertyInitialization?: boolean;
+    stripInternal?: boolean;
+    skipDefaultLibCheck?: boolean;
+    sourceMap?: boolean;
+    sourceRoot?: string;
+    suppressOutputPathCheck?: boolean;
+    target?: ScriptTarget;
+    traceResolution?: boolean;
+    tsBuildInfoFile?: string;
+    typeRoots?: string[];
+    types?: string[];
+    useDefineForClassFields?: boolean;
+    useUnknownInCatchVariables?: boolean;
+    verbatimModuleSyntax?: boolean;
+    maxNodeModuleJsDepth?: number;
+}
+//# sourceMappingURL=compilerOptions.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/compilerOptions.d.ts.map b/node_modules/typescript/dist/api/compilerOptions.d.ts.map
new file mode 100644
index 000000000..9a064d679
--- /dev/null
+++ b/node_modules/typescript/dist/api/compilerOptions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"compilerOptions.d.ts","sourceRoot":"","sources":["../../src/api/compilerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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C;IACzB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/compilerOptions.js b/node_modules/typescript/dist/api/compilerOptions.js
new file mode 100644
index 000000000..aeadba7a4
--- /dev/null
+++ b/node_modules/typescript/dist/api/compilerOptions.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=compilerOptions.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/compilerOptions.js.map b/node_modules/typescript/dist/api/compilerOptions.js.map
new file mode 100644
index 000000000..68f5c8040
--- /dev/null
+++ b/node_modules/typescript/dist/api/compilerOptions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"compilerOptions.js","sourceRoot":"","sources":["../../src/api/compilerOptions.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/fs.d.ts b/node_modules/typescript/dist/api/fs.d.ts
new file mode 100644
index 000000000..8623183cc
--- /dev/null
+++ b/node_modules/typescript/dist/api/fs.d.ts
@@ -0,0 +1,23 @@
+export interface FileSystemEntries {
+    files: string[];
+    directories: string[];
+}
+export interface FileSystem {
+    directoryExists?: (directoryName: string) => boolean | undefined;
+    fileExists?: (fileName: string) => boolean | undefined;
+    getAccessibleEntries?: (directoryName: string) => FileSystemEntries | undefined;
+    /**
+     * Read a file's content.
+     * - Return the file content as a `string` (including `""` for empty files).
+     * - Return `null` to indicate the file does not exist (without falling back to the real FS).
+     * - Return `undefined` to fall back to the real filesystem.
+     */
+    readFile?: (fileName: string) => string | null | undefined;
+    realpath?: (path: string) => string | undefined;
+    writeFile?: (path: string, content: string) => void;
+    removeFile?: (path: string) => void;
+}
+/** The callback names supported by the Go server for virtual FS delegation. */
+export declare const fsCallbackNames: readonly ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"];
+export declare function createVirtualFileSystem(files: Record): FileSystem;
+//# sourceMappingURL=fs.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/fs.d.ts.map b/node_modules/typescript/dist/api/fs.d.ts.map
new file mode 100644
index 000000000..60f8465aa
--- /dev/null
+++ b/node_modules/typescript/dist/api/fs.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/api/fs.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACvB,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IACvD,oBAAoB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAChF;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,+EAA+E;AAC/E,eAAO,MAAM,eAAe,4FAA6F,CAAC;AAa1H,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAkHjF"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/fs.js b/node_modules/typescript/dist/api/fs.js
new file mode 100644
index 000000000..264edbad6
--- /dev/null
+++ b/node_modules/typescript/dist/api/fs.js
@@ -0,0 +1,109 @@
+import { getPathComponents } from "./path.js";
+/** The callback names supported by the Go server for virtual FS delegation. */
+export const fsCallbackNames = ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"];
+export function createVirtualFileSystem(files) {
+    const root = {
+        type: "directory",
+        children: {},
+    };
+    const content = {};
+    for (const filePath of Object.keys(files)) {
+        content[filePath] = files[filePath];
+        addToTree(filePath);
+    }
+    return {
+        directoryExists,
+        fileExists,
+        getAccessibleEntries,
+        readFile,
+        realpath: path => path,
+        writeFile,
+        removeFile,
+    };
+    function getNodeFromPath(path) {
+        if (!path || path === "/") {
+            return root;
+        }
+        const segments = getPathComponents(path).slice(1);
+        let current = root;
+        for (const segment of segments) {
+            if (current.type !== "directory") {
+                return undefined;
+            }
+            const child = current.children[segment];
+            if (!child) {
+                return undefined;
+            }
+            current = child;
+        }
+        return current;
+    }
+    function ensureDirectory(segments) {
+        let current = root;
+        for (const segment of segments) {
+            if (!current.children[segment]) {
+                current.children[segment] = { type: "directory", children: {} };
+            }
+            else if (current.children[segment].type !== "directory") {
+                throw new Error(`Cannot create directory: a file already exists at "/${segments.join("/")}"`);
+            }
+            current = current.children[segment];
+        }
+        return current;
+    }
+    function addToTree(path) {
+        const segments = getPathComponents(path).slice(1);
+        if (segments.length === 0) {
+            throw new Error(`Invalid file path: "${path}"`);
+        }
+        const filename = segments.pop();
+        const dirNode = ensureDirectory(segments);
+        dirNode.children[filename] = { type: "file" };
+    }
+    function writeFile(path, data) {
+        content[path] = data;
+        addToTree(path);
+    }
+    function removeFile(path) {
+        delete content[path];
+        const segments = getPathComponents(path).slice(1);
+        if (segments.length === 0)
+            return;
+        const filename = segments.pop();
+        const dirNode = getNodeFromPath("/" + segments.join("/"));
+        if (dirNode && dirNode.type === "directory") {
+            delete dirNode.children[filename];
+        }
+    }
+    function directoryExists(directoryName) {
+        const node = getNodeFromPath(directoryName);
+        return !!node && node.type === "directory";
+    }
+    function fileExists(fileName) {
+        return fileName in content;
+    }
+    function getAccessibleEntries(directoryName) {
+        const node = getNodeFromPath(directoryName);
+        if (!node || node.type !== "directory") {
+            return undefined;
+        }
+        const fileEntries = [];
+        const directories = [];
+        for (const [name, child] of Object.entries(node.children)) {
+            if (child.type === "file") {
+                fileEntries.push(name);
+            }
+            else {
+                directories.push(name);
+            }
+        }
+        return { files: fileEntries, directories };
+    }
+    function readFile(fileName) {
+        if (fileName in content) {
+            return content[fileName];
+        }
+        return undefined;
+    }
+}
+//# sourceMappingURL=fs.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/fs.js.map b/node_modules/typescript/dist/api/fs.js.map
new file mode 100644
index 000000000..9462d0acf
--- /dev/null
+++ b/node_modules/typescript/dist/api/fs.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/api/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAuB9C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,UAAU,CAAU,CAAC;AAa1H,MAAM,UAAU,uBAAuB,CAAC,KAA6B;IACjE,MAAM,IAAI,GAAe;QACrB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE;KACf,CAAC;IACF,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;QACpC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;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L,CAAC;IAED,SAAS,eAAe,CAAC,aAAqB;QAC1C,MAAM,IAAI,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IAC/C,CAAC;IAED,SAAS,UAAU,CAAC,QAAgB;QAChC,OAAO,QAAQ,IAAI,OAAO,CAAC;IAC/B,CAAC;IAED,SAAS,oBAAoB,CAAC,aAAqB;QAC/C,MAAM,IAAI,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACrC,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxD,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBACxB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;iBACI,CAAC;gBACF,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;IAC/C,CAAC;IAED,SAAS,QAAQ,CAAC,QAAgB;QAC9B,IAAI,QAAQ,IAAI,OAAO,EAAE,CAAC;YACtB,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.d.ts b/node_modules/typescript/dist/api/node/encoder.d.ts
new file mode 100644
index 000000000..415de06cc
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.d.ts
@@ -0,0 +1,15 @@
+import type { Node, SourceFile } from "../../ast/index.ts";
+/**
+ * Encode a SourceFile AST node into the binary format.
+ */
+export declare function encodeSourceFile(sourceFile: SourceFile): Uint8Array;
+/**
+ * Encode an arbitrary AST node into the binary format.
+ * When encoding a non-SourceFile node, the header hash and parse options fields will be zero.
+ */
+export declare function encodeNode(node: Node): Uint8Array;
+/**
+ * Encode a Uint8Array to a base64 string.
+ */
+export declare function uint8ArrayToBase64(data: Uint8Array): string;
+//# sourceMappingURL=encoder.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.d.ts.map b/node_modules/typescript/dist/api/node/encoder.d.ts.map
new file mode 100644
index 000000000..69c1adbfd
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/api/node/encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGR,IAAI,EAEJ,UAAU,EAEb,MAAM,oBAAoB,CAAC;AAyL5B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAEnE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAuKjD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE3D"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.generated.d.ts b/node_modules/typescript/dist/api/node/encoder.generated.d.ts
new file mode 100644
index 000000000..7170cd7d0
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.generated.d.ts
@@ -0,0 +1,5 @@
+import type { Node } from "../../ast/index.ts";
+import { SyntaxKind } from "../../ast/index.ts";
+export declare function getNodeDataType(kind: SyntaxKind): number;
+export declare function getNodeCommonData(node: Node): number;
+//# sourceMappingURL=encoder.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map b/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map
new file mode 100644
index 000000000..622d0693d
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"encoder.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/encoder.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAiBR,IAAI,EAMP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOhD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAuBxD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA6CpD"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.generated.js b/node_modules/typescript/dist/api/node/encoder.generated.js
new file mode 100644
index 000000000..fdb93ee59
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.generated.js
@@ -0,0 +1,74 @@
+// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT.
+import { SyntaxKind } from "../../ast/index.js";
+import { NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, } from "./protocol.js";
+export function getNodeDataType(kind) {
+    switch (kind) {
+        case SyntaxKind.Identifier:
+        case SyntaxKind.PrivateIdentifier:
+        case SyntaxKind.JsxText:
+        case SyntaxKind.JSDocText:
+        case SyntaxKind.JSDocLink:
+        case SyntaxKind.JSDocLinkPlain:
+        case SyntaxKind.JSDocLinkCode:
+            return NODE_DATA_TYPE_STRING;
+        case SyntaxKind.StringLiteral:
+        case SyntaxKind.NumericLiteral:
+        case SyntaxKind.BigIntLiteral:
+        case SyntaxKind.RegularExpressionLiteral:
+        case SyntaxKind.NoSubstitutionTemplateLiteral:
+        case SyntaxKind.TemplateHead:
+        case SyntaxKind.TemplateMiddle:
+        case SyntaxKind.TemplateTail:
+        case SyntaxKind.SourceFile:
+            return NODE_DATA_TYPE_EXTENDED;
+        default:
+            return NODE_DATA_TYPE_CHILDREN;
+    }
+}
+export function getNodeCommonData(node) {
+    switch (node.kind) {
+        case SyntaxKind.Block:
+            return (node.multiLine ? 1 : 0) << 24;
+        case SyntaxKind.HeritageClause:
+            return (node.token === SyntaxKind.ImplementsKeyword ? 1 : 0) << 24;
+        case SyntaxKind.ExportAssignment:
+            return (node.isExportEquals ? 1 : 0) << 24;
+        case SyntaxKind.ExportSpecifier:
+            return (node.isTypeOnly ? 1 : 0) << 24;
+        case SyntaxKind.PrefixUnaryExpression:
+            return (node.operator === SyntaxKind.MinusToken ? 1 : node.operator === SyntaxKind.TildeToken ? 2 : node.operator === SyntaxKind.ExclamationToken ? 3 : node.operator === SyntaxKind.PlusPlusToken ? 4 : node.operator === SyntaxKind.MinusMinusToken ? 5 : 0) << 24;
+        case SyntaxKind.PostfixUnaryExpression:
+            return (node.operator === SyntaxKind.MinusMinusToken ? 1 : 0) << 24;
+        case SyntaxKind.MetaProperty:
+            return (node.keywordToken === SyntaxKind.NewKeyword ? 1 : 0) << 24;
+        case SyntaxKind.ArrayLiteralExpression:
+            return (node.multiLine ? 1 : 0) << 24;
+        case SyntaxKind.ObjectLiteralExpression:
+            return (node.multiLine ? 1 : 0) << 24;
+        case SyntaxKind.TypeOperator:
+            return (node.operator === SyntaxKind.ReadonlyKeyword ? 1 : node.operator === SyntaxKind.UniqueKeyword ? 2 : 0) << 24;
+        case SyntaxKind.ImportAttributes:
+            return (node.multiLine ? 1 : 0) << 24 | (node.token === SyntaxKind.AssertKeyword ? 1 : 0) << 25;
+        case SyntaxKind.JsxText:
+            return (node.containsOnlyTriviaWhiteSpaces ? 1 : 0) << 24;
+        case SyntaxKind.ModuleDeclaration:
+            return (node.keyword === SyntaxKind.NamespaceKeyword ? 1 : 0) << 24;
+        case SyntaxKind.ImportEqualsDeclaration:
+            return (node.isTypeOnly ? 1 : 0) << 24;
+        case SyntaxKind.ExportDeclaration:
+            return (node.isTypeOnly ? 1 : 0) << 24;
+        case SyntaxKind.ImportType:
+            return (node.isTypeOf ? 1 : 0) << 24;
+        case SyntaxKind.ImportClause:
+            return (node.phaseModifier === SyntaxKind.TypeKeyword ? 1 : node.phaseModifier === SyntaxKind.DeferKeyword ? 2 : 0) << 24;
+        case SyntaxKind.ImportSpecifier:
+            return (node.isTypeOnly ? 1 : 0) << 24;
+        case SyntaxKind.JSDocTypeLiteral:
+            return (node.isArrayType ? 1 : 0) << 24;
+        case SyntaxKind.JSDocParameterTag:
+        case SyntaxKind.JSDocPropertyTag:
+            return (node.isBracketed ? 1 : 0) << 24 | (node.isNameFirst ? 1 : 0) << 25;
+    }
+    return 0;
+}
+//# sourceMappingURL=encoder.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.generated.js.map b/node_modules/typescript/dist/api/node/encoder.generated.js.map
new file mode 100644
index 000000000..b947d51fa
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"encoder.generated.js","sourceRoot":"","sources":["../../../src/api/node/encoder.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AA0B/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACH,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,GACxB,MAAM,eAAe,CAAC;AAEvB,MAAM,UAAU,eAAe,CAAC,IAAgB;IAC5C,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,UAAU,CAAC,UAAU,CAAC;QAC3B,KAAK,UAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,UAAU,CAAC,OAAO,CAAC;QACxB,KAAK,UAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,UAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,UAAU,CAAC,cAAc,CAAC;QAC/B,KAAK,UAAU,CAAC,aAAa;Y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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAClK,KAAK,UAAU,CAAC,eAAe;YAC3B,OAAO,CAAE,IAAwB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,KAAK,UAAU,CAAC,gBAAgB;YAC5B,OAAO,CAAE,IAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAClE,KAAK,UAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,UAAU,CAAC,gBAAgB;YAC5B,OAAO,CAAE,IAAoC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAE,IAAoC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACrJ,CAAC;IACD,OAAO,CAAC,CAAC;AACb,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.js b/node_modules/typescript/dist/api/node/encoder.js
new file mode 100644
index 000000000..1e4f4b0b9
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.js
@@ -0,0 +1,287 @@
+import { SyntaxKind } from "../../ast/index.js";
+import { getNodeCommonData, getNodeDataType, } from "./encoder.generated.js";
+import { MsgpackWriter } from "./msgpack.js";
+import { childProperties, HEADER_OFFSET_EXTENDED_DATA, HEADER_OFFSET_METADATA, HEADER_OFFSET_NODES, HEADER_OFFSET_STRING_TABLE, HEADER_OFFSET_STRING_TABLE_OFFSETS, HEADER_OFFSET_STRUCTURED_DATA, HEADER_SIZE, KIND_NODE_LIST, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_LEN, PROTOCOL_VERSION, } from "./protocol.js";
+const NODE_FIELDS = NODE_LEN / 4;
+const NODE_FIELD_NEXT = 3;
+const NO_STRUCTURED_DATA = 0xFFFFFFFF;
+// String table that accumulates strings into a flat byte pool.
+class StringTable {
+    parts;
+    byteLen;
+    offsets;
+    constructor() {
+        this.parts = [];
+        this.byteLen = 0;
+        this.offsets = [];
+    }
+    add(text) {
+        const index = this.offsets.length;
+        const encoder = cachedEncoder();
+        const encodedLength = encoder.encode(text).length;
+        const offset = this.byteLen;
+        this.parts.push(text);
+        this.byteLen += encodedLength;
+        this.offsets.push(offset, offset + encodedLength);
+        return index;
+    }
+    encode() {
+        const encoder = cachedEncoder();
+        const dataBytes = encoder.encode(this.parts.join(""));
+        const offsetBytes = new Uint8Array(this.offsets.length * 4);
+        const view = new DataView(offsetBytes.buffer);
+        for (let i = 0; i < this.offsets.length; i++) {
+            view.setUint32(i * 4, this.offsets[i], true);
+        }
+        const result = new Uint8Array(offsetBytes.length + dataBytes.length);
+        result.set(offsetBytes, 0);
+        result.set(dataBytes, offsetBytes.length);
+        return result;
+    }
+    stringByteLength() {
+        return this.byteLen;
+    }
+    offsetsCount() {
+        return this.offsets.length;
+    }
+}
+let _encoder;
+function cachedEncoder() {
+    return _encoder ??= new TextEncoder();
+}
+function getChildrenPropertyMask(node) {
+    const kind = node.kind;
+    const props = childProperties[kind];
+    if (!props) {
+        return 0;
+    }
+    const n = node;
+    let mask = 0;
+    for (let i = 0; i < props.length; i++) {
+        const prop = props[i];
+        if (prop !== undefined && isChildPresent(n[prop])) {
+            mask |= 1 << i;
+        }
+    }
+    return mask;
+}
+// A child is "present" if it's non-null/non-undefined.
+// This matches the Go encoder's behavior where non-nil NodeLists (even empty)
+// are treated as present, and only nil NodeLists are absent.
+function isChildPresent(v) {
+    if (v === undefined || v === null)
+        return false;
+    return true;
+}
+function recordNodeStrings(node, strs) {
+    return strs.add(node.text ?? "");
+}
+function encodeFileReferences(refs, writer) {
+    if (!refs || refs.length === 0)
+        return NO_STRUCTURED_DATA;
+    const offset = writer.finish().length;
+    writer.writeArrayHeader(refs.length);
+    for (const ref of refs) {
+        writer.writeArrayHeader(5);
+        writer.writeUint(ref.pos);
+        writer.writeUint(ref.end);
+        writer.writeString(ref.fileName);
+        writer.writeUint(ref.resolutionMode ?? 0);
+        writer.writeBool(ref.preserve ?? false);
+    }
+    return offset;
+}
+function recordExtendedData(node, strs, extendedData, structuredWriter) {
+    const offset = extendedData.length * 4;
+    if (node.kind === SyntaxKind.SourceFile) {
+        const sf = node;
+        const textIndex = strs.add(sf.text);
+        const fileNameIndex = strs.add(sf.fileName);
+        const pathIndex = strs.add(sf.path);
+        const referencedFilesOffset = encodeFileReferences(sf.referencedFiles, structuredWriter);
+        const typeRefDirectivesOffset = encodeFileReferences(sf.typeReferenceDirectives, structuredWriter);
+        const libRefDirectivesOffset = encodeFileReferences(sf.libReferenceDirectives, structuredWriter);
+        extendedData.push(textIndex, fileNameIndex, pathIndex, sf.languageVariant, sf.scriptKind, referencedFilesOffset, typeRefDirectivesOffset, libRefDirectivesOffset, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, 0);
+    }
+    else if (node.kind === SyntaxKind.TemplateHead ||
+        node.kind === SyntaxKind.TemplateMiddle ||
+        node.kind === SyntaxKind.TemplateTail) {
+        const tmpl = node;
+        const text = tmpl.text ?? "";
+        const rawText = tmpl.rawText ?? "";
+        const templateFlags = tmpl.templateFlags ?? 0;
+        const textIndex = strs.add(text);
+        const rawTextIndex = strs.add(rawText);
+        extendedData.push(textIndex, rawTextIndex, templateFlags);
+    }
+    else {
+        // StringLiteral, NumericLiteral, BigIntLiteral, RegularExpressionLiteral,
+        // NoSubstitutionTemplateLiteral — format: [textIndex, tokenFlags]
+        const n = node;
+        const text = n.text ?? "";
+        const tokenFlags = n.tokenFlags ?? 0;
+        const textIndex = strs.add(text);
+        extendedData.push(textIndex, tokenFlags);
+    }
+    return offset;
+}
+function getNodeData(node, strs, extendedData, structuredWriter) {
+    const t = getNodeDataType(node.kind);
+    const common = getNodeCommonData(node);
+    switch (t) {
+        case NODE_DATA_TYPE_CHILDREN:
+            return t | common | getChildrenPropertyMask(node);
+        case NODE_DATA_TYPE_STRING:
+            return t | common | recordNodeStrings(node, strs);
+        case NODE_DATA_TYPE_EXTENDED:
+            return t | common | recordExtendedData(node, strs, extendedData, structuredWriter);
+        default:
+            throw new Error("unreachable");
+    }
+}
+function getChildPropertiesForNode(node) {
+    return childProperties[node.kind];
+}
+// Returns whether a value is a NodeArray (array-like with pos and end).
+function isNodeArray(value) {
+    return Array.isArray(value) && typeof value.pos === "number" && typeof value.end === "number";
+}
+/**
+ * Encode a SourceFile AST node into the binary format.
+ */
+export function encodeSourceFile(sourceFile) {
+    return encodeNode(sourceFile);
+}
+/**
+ * Encode an arbitrary AST node into the binary format.
+ * When encoding a non-SourceFile node, the header hash and parse options fields will be zero.
+ */
+export function encodeNode(node) {
+    const strs = new StringTable();
+    const extendedDataValues = [];
+    const structuredWriter = new MsgpackWriter();
+    // We'll build an array of uint32 values for the nodes section, 7 per node
+    const nodeValues = [];
+    // Nil node (index 0)
+    nodeValues.push(0, 0, 0, 0, 0, 0, 0);
+    let nodeCount = 0;
+    let parentIndex = 0;
+    let prevIndex = 0;
+    function visitNode(node) {
+        nodeCount++;
+        const currentIndex = nodeCount;
+        if (prevIndex !== 0) {
+            // Set next pointer on previous sibling
+            nodeValues[prevIndex * NODE_FIELDS + NODE_FIELD_NEXT] = currentIndex;
+        }
+        const data = getNodeData(node, strs, extendedDataValues, structuredWriter);
+        nodeValues.push(node.kind, node.pos >= 0 ? node.pos : 0, node.end >= 0 ? node.end : 0, 0, // next (filled in later)
+        parentIndex, data, node.flags);
+        const saveParentIndex = parentIndex;
+        const savePrevIndex = prevIndex;
+        parentIndex = currentIndex;
+        prevIndex = 0;
+        visitChildren(node);
+        prevIndex = currentIndex;
+        parentIndex = saveParentIndex;
+    }
+    function visitNodeList(list) {
+        if (!list) {
+            return;
+        }
+        nodeCount++;
+        const currentIndex = nodeCount;
+        if (prevIndex !== 0) {
+            nodeValues[prevIndex * NODE_FIELDS + NODE_FIELD_NEXT] = currentIndex;
+        }
+        nodeValues.push(KIND_NODE_LIST, list.pos >= 0 ? list.pos : 0, list.end >= 0 ? list.end : 0, 0, // next
+        parentIndex, list.length, // data for NodeList is its length
+        0);
+        const saveParentIndex = parentIndex;
+        parentIndex = currentIndex;
+        prevIndex = 0;
+        for (const child of list) {
+            visitNode(child);
+        }
+        prevIndex = currentIndex;
+        parentIndex = saveParentIndex;
+    }
+    function visitChildren(node) {
+        const props = getChildPropertiesForNode(node);
+        const n = node;
+        if (props) {
+            for (const propName of props) {
+                if (propName === undefined)
+                    continue;
+                const child = n[propName];
+                if (child === undefined || child === null)
+                    continue;
+                if (isNodeArray(child)) {
+                    visitNodeList(child);
+                }
+                else {
+                    visitNode(child);
+                }
+            }
+        }
+    }
+    // Encode root node
+    nodeCount++;
+    parentIndex++;
+    const rootData = getNodeData(node, strs, extendedDataValues, structuredWriter);
+    nodeValues.push(node.kind, node.pos >= 0 ? node.pos : 0, node.end >= 0 ? node.end : 0, 0, 0, rootData, node.flags);
+    const saveParent = parentIndex;
+    prevIndex = 0;
+    parentIndex = 1; // root is at index 1
+    visitChildren(node);
+    parentIndex = saveParent;
+    // Encode extended data section
+    const extendedDataBytes = new Uint8Array(extendedDataValues.length * 4);
+    const extView = new DataView(extendedDataBytes.buffer);
+    for (let i = 0; i < extendedDataValues.length; i++) {
+        extView.setUint32(i * 4, extendedDataValues[i], true);
+    }
+    // Encode structured data section
+    const structuredDataBytes = structuredWriter.finish();
+    // Encode string table
+    const strsBytes = strs.encode();
+    // Encode nodes section
+    const nodesBytes = new Uint8Array(nodeValues.length * 4);
+    const nodesView = new DataView(nodesBytes.buffer);
+    for (let i = 0; i < nodeValues.length; i++) {
+        nodesView.setUint32(i * 4, nodeValues[i] >>> 0, true);
+    }
+    // Calculate section offsets
+    const offsetStringTableOffsets = HEADER_SIZE;
+    const offsetStringTableData = HEADER_SIZE + strs.offsetsCount() * 4;
+    const offsetExtendedData = offsetStringTableData + strs.stringByteLength();
+    const offsetStructuredData = offsetExtendedData + extendedDataBytes.length;
+    const offsetNodes = offsetStructuredData + structuredDataBytes.length;
+    // Build header
+    const header = new Uint8Array(HEADER_SIZE);
+    const headerView = new DataView(header.buffer);
+    const metadata = PROTOCOL_VERSION << 24;
+    headerView.setUint32(HEADER_OFFSET_METADATA, metadata, true);
+    // bytes 4-19: hash (zero for non-SourceFile, we don't have access to xxh3 here)
+    // byte 20-23: parse options (zero for non-SourceFile)
+    headerView.setUint32(HEADER_OFFSET_STRING_TABLE_OFFSETS, offsetStringTableOffsets, true);
+    headerView.setUint32(HEADER_OFFSET_STRING_TABLE, offsetStringTableData, true);
+    headerView.setUint32(HEADER_OFFSET_EXTENDED_DATA, offsetExtendedData, true);
+    headerView.setUint32(HEADER_OFFSET_STRUCTURED_DATA, offsetStructuredData, true);
+    headerView.setUint32(HEADER_OFFSET_NODES, offsetNodes, true);
+    // Concatenate all sections
+    const result = new Uint8Array(header.length + strsBytes.length + extendedDataBytes.length + structuredDataBytes.length + nodesBytes.length);
+    result.set(header, 0);
+    result.set(strsBytes, HEADER_SIZE);
+    result.set(extendedDataBytes, offsetExtendedData);
+    result.set(structuredDataBytes, offsetStructuredData);
+    result.set(nodesBytes, offsetNodes);
+    return result;
+}
+/**
+ * Encode a Uint8Array to a base64 string.
+ */
+export function uint8ArrayToBase64(data) {
+    return Buffer.from(data).toString("base64");
+}
+//# sourceMappingURL=encoder.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/encoder.js.map b/node_modules/typescript/dist/api/node/encoder.js.map
new file mode 100644
index 000000000..f71efeb8c
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/encoder.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../src/api/node/encoder.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACH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C,CAAC;IAE7D,2BAA2B;IAC3B,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5I,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACtB,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACnC,MAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IAClD,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IACtD,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IAC/C,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/msgpack.d.ts b/node_modules/typescript/dist/api/node/msgpack.d.ts
new file mode 100644
index 000000000..471e8e5f1
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/msgpack.d.ts
@@ -0,0 +1,32 @@
+export declare const MSGPACK_FIXARRAY3 = 147;
+export declare const MSGPACK_BIN8 = 196;
+export declare const MSGPACK_BIN16 = 197;
+export declare const MSGPACK_BIN32 = 198;
+export declare const MSGPACK_UINT8 = 204;
+/** Compute the MessagePack bin header size for a given data length. */
+export declare function binHeaderSize(len: number): number;
+/** Write a MessagePack bin header into `buf` at `off`, return new offset. */
+export declare function writeBinHeader(buf: Uint8Array, off: number, len: number): number;
+export declare class MsgpackWriter {
+    private buf;
+    private view;
+    private pos;
+    constructor(initialSize?: number);
+    private ensure;
+    writeArrayHeader(length: number): void;
+    writeUint(value: number): void;
+    writeString(str: string): void;
+    writeBool(value: boolean): void;
+    finish(): Uint8Array;
+}
+export declare class MsgpackReader {
+    private buf;
+    private view;
+    private pos;
+    constructor(data: Uint8Array, offset?: number);
+    readArrayHeader(): number;
+    readUint(): number;
+    readString(): string;
+    readBool(): boolean;
+}
+//# sourceMappingURL=msgpack.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/msgpack.d.ts.map b/node_modules/typescript/dist/api/node/msgpack.d.ts.map
new file mode 100644
index 000000000..91ba1b069
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/msgpack.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"msgpack.d.ts","sourceRoot":"","sources":["../../../src/api/node/msgpack.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,MAAO,CAAC;AACtC,eAAO,MAAM,YAAY,MAAO,CAAC;AACjC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,aAAa,MAAO,CAAC;AAIlC,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAkBhF;AAKD,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,GAAG,CAAS;gBAER,WAAW,SAAM;IAM7B,OAAO,CAAC,MAAM;IAWd,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAmBtC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAwB9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IA4B9B,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK/B,MAAM,IAAI,UAAU;CAGvB;AAED,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,GAAG,CAAS;gBAER,IAAI,EAAE,UAAU,EAAE,MAAM,SAAI;IAMxC,eAAe,IAAI,MAAM;IAgBzB,QAAQ,IAAI,MAAM;IAiBlB,UAAU,IAAI,MAAM;IAyBpB,QAAQ,IAAI,OAAO;CAMtB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/msgpack.js b/node_modules/typescript/dist/api/node/msgpack.js
new file mode 100644
index 000000000..7c7048e72
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/msgpack.js
@@ -0,0 +1,213 @@
+// Minimal msgpack encoder/decoder.
+// Supports: arrays, unsigned integers, strings, booleans, binary data.
+import { Wtf8Decoder } from "./wtf8.js";
+// ── MessagePack format constants ────────────────────────────────────
+export const MSGPACK_FIXARRAY3 = 0x93; // 3-element fixarray
+export const MSGPACK_BIN8 = 0xc4;
+export const MSGPACK_BIN16 = 0xc5;
+export const MSGPACK_BIN32 = 0xc6;
+export const MSGPACK_UINT8 = 0xcc;
+// ── Bin header helpers ──────────────────────────────────────────────
+/** Compute the MessagePack bin header size for a given data length. */
+export function binHeaderSize(len) {
+    if (len < 0x100)
+        return 2; // BIN8: marker + 1-byte size
+    if (len < 0x10000)
+        return 3; // BIN16: marker + 2-byte size
+    return 5; // BIN32: marker + 4-byte size
+}
+/** Write a MessagePack bin header into `buf` at `off`, return new offset. */
+export function writeBinHeader(buf, off, len) {
+    if (len < 0x100) {
+        buf[off++] = MSGPACK_BIN8;
+        buf[off++] = len;
+    }
+    else if (len < 0x10000) {
+        buf[off++] = MSGPACK_BIN16;
+        buf[off++] = (len >>> 8) & 0xff;
+        buf[off++] = len & 0xff;
+    }
+    else {
+        buf[off++] = MSGPACK_BIN32;
+        buf[off++] = (len >>> 24) & 0xff;
+        buf[off++] = (len >>> 16) & 0xff;
+        buf[off++] = (len >>> 8) & 0xff;
+        buf[off++] = len & 0xff;
+    }
+    return off;
+}
+const encoder = new TextEncoder();
+const decoder = new Wtf8Decoder();
+export class MsgpackWriter {
+    buf;
+    view;
+    pos;
+    constructor(initialSize = 256) {
+        this.buf = new Uint8Array(initialSize);
+        this.view = new DataView(this.buf.buffer);
+        this.pos = 0;
+    }
+    ensure(n) {
+        if (this.pos + n > this.buf.length) {
+            let newSize = this.buf.length * 2;
+            while (newSize < this.pos + n)
+                newSize *= 2;
+            const next = new Uint8Array(newSize);
+            next.set(this.buf);
+            this.buf = next;
+            this.view = new DataView(this.buf.buffer);
+        }
+    }
+    writeArrayHeader(length) {
+        if (length <= 0x0f) {
+            this.ensure(1);
+            this.buf[this.pos++] = 0x90 | length;
+        }
+        else if (length <= 0xffff) {
+            this.ensure(3);
+            this.buf[this.pos++] = 0xdc;
+            this.view.setUint16(this.pos, length, false);
+            this.pos += 2;
+        }
+        else {
+            this.ensure(5);
+            this.buf[this.pos++] = 0xdd;
+            this.view.setUint32(this.pos, length, false);
+            this.pos += 4;
+        }
+    }
+    writeUint(value) {
+        if (value <= 0x7f) {
+            this.ensure(1);
+            this.buf[this.pos++] = value;
+        }
+        else if (value <= 0xff) {
+            this.ensure(2);
+            this.buf[this.pos++] = 0xcc;
+            this.buf[this.pos++] = value;
+        }
+        else if (value <= 0xffff) {
+            this.ensure(3);
+            this.buf[this.pos++] = 0xcd;
+            this.view.setUint16(this.pos, value, false);
+            this.pos += 2;
+        }
+        else {
+            this.ensure(5);
+            this.buf[this.pos++] = 0xce;
+            this.view.setUint32(this.pos, value, false);
+            this.pos += 4;
+        }
+    }
+    writeString(str) {
+        const encoded = encoder.encode(str);
+        const len = encoded.length;
+        if (len <= 0x1f) {
+            this.ensure(1 + len);
+            this.buf[this.pos++] = 0xa0 | len;
+        }
+        else if (len <= 0xff) {
+            this.ensure(2 + len);
+            this.buf[this.pos++] = 0xd9;
+            this.buf[this.pos++] = len;
+        }
+        else if (len <= 0xffff) {
+            this.ensure(3 + len);
+            this.buf[this.pos++] = 0xda;
+            this.view.setUint16(this.pos, len, false);
+            this.pos += 2;
+        }
+        else {
+            this.ensure(5 + len);
+            this.buf[this.pos++] = 0xdb;
+            this.view.setUint32(this.pos, len, false);
+            this.pos += 4;
+        }
+        this.buf.set(encoded, this.pos);
+        this.pos += len;
+    }
+    writeBool(value) {
+        this.ensure(1);
+        this.buf[this.pos++] = value ? 0xc3 : 0xc2;
+    }
+    finish() {
+        return this.buf.subarray(0, this.pos);
+    }
+}
+export class MsgpackReader {
+    buf;
+    view;
+    pos;
+    constructor(data, offset = 0) {
+        this.buf = data;
+        this.view = new DataView(data.buffer, data.byteOffset, data.byteLength);
+        this.pos = offset;
+    }
+    readArrayHeader() {
+        const byte = this.buf[this.pos++];
+        if ((byte & 0xf0) === 0x90)
+            return byte & 0x0f;
+        if (byte === 0xdc) {
+            const len = this.view.getUint16(this.pos, false);
+            this.pos += 2;
+            return len;
+        }
+        if (byte === 0xdd) {
+            const len = this.view.getUint32(this.pos, false);
+            this.pos += 4;
+            return len;
+        }
+        throw new Error(`Expected array header, got 0x${byte.toString(16)}`);
+    }
+    readUint() {
+        const byte = this.buf[this.pos++];
+        if (byte <= 0x7f)
+            return byte;
+        if (byte === 0xcc)
+            return this.buf[this.pos++];
+        if (byte === 0xcd) {
+            const val = this.view.getUint16(this.pos, false);
+            this.pos += 2;
+            return val;
+        }
+        if (byte === 0xce) {
+            const val = this.view.getUint32(this.pos, false);
+            this.pos += 4;
+            return val;
+        }
+        throw new Error(`Expected uint, got 0x${byte.toString(16)}`);
+    }
+    readString() {
+        const byte = this.buf[this.pos++];
+        let len;
+        if ((byte & 0xe0) === 0xa0) {
+            len = byte & 0x1f;
+        }
+        else if (byte === 0xd9) {
+            len = this.buf[this.pos++];
+        }
+        else if (byte === 0xda) {
+            len = this.view.getUint16(this.pos, false);
+            this.pos += 2;
+        }
+        else if (byte === 0xdb) {
+            len = this.view.getUint32(this.pos, false);
+            this.pos += 4;
+        }
+        else {
+            throw new Error(`Expected string, got 0x${byte.toString(16)}`);
+        }
+        const str = decoder.decode(this.buf.subarray(this.pos, this.pos + len));
+        this.pos += len;
+        return str;
+    }
+    readBool() {
+        const byte = this.buf[this.pos++];
+        if (byte === 0xc3)
+            return true;
+        if (byte === 0xc2)
+            return false;
+        throw new Error(`Expected bool, got 0x${byte.toString(16)}`);
+    }
+}
+//# sourceMappingURL=msgpack.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/msgpack.js.map b/node_modules/typescript/dist/api/node/msgpack.js.map
new file mode 100644
index 000000000..9feecca2b
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/msgpack.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"msgpack.js","sourceRoot":"","sources":["../../../src/api/node/msgpack.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uEAAuE;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,qBAAqB;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,uEAAuE;AAEvE,uEAAuE;AACvE,MAAM,UAAU,aAAa,CAAC,GAAW;IACrC,IAAI,GAAG,GAAG,KAAK;QAAE,OAAO,CAAC,CAAC,CAAC,6BAA6B;IACxD,IAAI,GAAG,GAAG,OAAO;QAAE,OAAO,CAAC,CAAC,CAAC,8BAA8B;IAC3D,OAAO,CAAC,CAAC,CAAC,8BAA8B;AAC5C,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAAC,GAAe,EAAE,GAAW,EAAE,GAAW;IACpE,IAAI,GAAG,GAAG,KAAK,EAA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AM,IAAI,KAAK,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.d.ts b/node_modules/typescript/dist/api/node/node.d.ts
new file mode 100644
index 000000000..fdf9e2f42
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.d.ts
@@ -0,0 +1,76 @@
+import { type FileReference, type LineAndCharacter, type Node, type Path, SyntaxKind } from "../../ast/index.ts";
+import type { TimingCollector } from "../timing.ts";
+import { RemoteNode, RemoteNodeList } from "./node.generated.ts";
+import { type SourceFileInfo, type TextDecoder } from "./node.infrastructure.ts";
+export { RemoteNode, RemoteNodeList } from "./node.generated.ts";
+export { readParseOptionsKey, readSourceFileHash, RemoteNodeBase } from "./node.infrastructure.ts";
+export declare class RemoteSourceFile extends RemoteNode implements SourceFileInfo {
+    readonly nodes: (RemoteNode | RemoteNodeList)[];
+    readonly _offsetNodes: number;
+    readonly _offsetStringTableOffsets: number;
+    readonly _offsetStringTable: number;
+    readonly _offsetExtendedData: number;
+    readonly _offsetStructuredData: number;
+    readonly _decoder: TextDecoder;
+    readonly _timing: TimingCollector | undefined;
+    private _lineStarts;
+    private _cachedText;
+    private _cachedReferencedFiles;
+    private _cachedTypeReferenceDirectives;
+    private _cachedLibReferenceDirectives;
+    private _cachedImports;
+    private _cachedModuleAugmentations;
+    private _cachedAmbientModuleNames;
+    constructor(data: Uint8Array, decoder: TextDecoder, timing?: TimingCollector);
+    readFileReferences(structuredDataOffset: number): readonly FileReference[];
+    readNodeIndexArray(structuredDataOffset: number): readonly Node[];
+    readStringArray(structuredDataOffset: number): readonly string[];
+    /** @internal */
+    getOrCreateNodeAtIndex(index: number): Node;
+    private get extendedDataOffset();
+    get fileName(): string;
+    get path(): string;
+    get languageVariant(): number;
+    get scriptKind(): number;
+    get referencedFiles(): readonly FileReference[];
+    get typeReferenceDirectives(): readonly FileReference[];
+    get libReferenceDirectives(): readonly FileReference[];
+    get imports(): readonly Node[];
+    get moduleAugmentations(): readonly Node[];
+    get ambientModuleNames(): readonly string[];
+    get externalModuleIndicator(): Node | true | undefined;
+    get isDeclarationFile(): boolean;
+    get text(): string;
+    getLineStarts(): readonly number[];
+    getLineAndCharacterOfPosition(position: number): LineAndCharacter;
+    getPositionOfLineAndCharacter(line: number, character: number): number;
+}
+/**
+ * Find a descendant node at a specific position with matching kind and end position.
+ */
+export declare function findDescendant(root: Node, pos: number, end: number, kind: SyntaxKind): Node | undefined;
+/**
+ * Parsed components of a node handle.
+ */
+export interface ParsedNodeHandle {
+    index: number;
+    kind: SyntaxKind;
+    path: Path;
+}
+/**
+ * Parse a node handle string into its components.
+ * Handle format: "index.kind.path" where path may contain dots.
+ */
+export declare function parseNodeHandle(handle: string): ParsedNodeHandle;
+/**
+ * Decode binary-encoded AST data into a Node.
+ * Works for any binary-encoded node, including synthetic nodes
+ * (e.g. from typeToTypeNode) that don't have a source file.
+ */
+export declare function decodeNode(data: Uint8Array): Node;
+/**
+ * Get the unique ID string for a remote node.
+ * Throws if the node is not a RemoteNode (i.e. not decoded from binary data).
+ */
+export declare function getNodeId(node: Node): string;
+//# sourceMappingURL=node.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.d.ts.map b/node_modules/typescript/dist/api/node/node.d.ts.map
new file mode 100644
index 000000000..71c701621
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,IAAI,EAET,KAAK,IAAI,EACT,UAAU,EAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EACH,UAAU,EACV,cAAc,EACjB,MAAM,qBAAqB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,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAGjD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAK5C"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.generated.d.ts b/node_modules/typescript/dist/api/node/node.generated.d.ts
new file mode 100644
index 000000000..3fae8eb9c
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.generated.d.ts
@@ -0,0 +1,182 @@
+import { ModifierFlags, type Node, type NodeArray, type SourceFile, SyntaxKind } from "../../ast/index.ts";
+import { RemoteNodeBase, type SourceFileInfo } from "./node.infrastructure.ts";
+export declare class RemoteNodeList extends Array implements NodeArray {
+    static get [Symbol.species](): ArrayConstructor;
+    parent: RemoteNode;
+    hasTrailingComma?: boolean;
+    transformFlags: number;
+    protected view: DataView;
+    protected index: number;
+    private _byteIndex;
+    private _cursorIndex;
+    private _cursorNodeIndex;
+    get pos(): number;
+    get end(): number;
+    get next(): number;
+    private get data();
+    private sourceFile;
+    constructor(view: DataView, index: number, parent: RemoteNode, sourceFile: SourceFileInfo, offsetNodes: number);
+    get 0(): RemoteNode;
+    get 1(): RemoteNode;
+    get 2(): RemoteNode;
+    get 3(): RemoteNode;
+    get 4(): RemoteNode;
+    get 5(): RemoteNode;
+    get 6(): RemoteNode;
+    get 7(): RemoteNode;
+    get 8(): RemoteNode;
+    get 9(): RemoteNode;
+    get 10(): RemoteNode;
+    get 11(): RemoteNode;
+    get 12(): RemoteNode;
+    get 13(): RemoteNode;
+    get 14(): RemoteNode;
+    get 15(): RemoteNode;
+    [Symbol.iterator](): ArrayIterator;
+    forEachNode(visitNode: (node: RemoteNode) => T | undefined): T | undefined;
+    at(index: number): RemoteNode;
+    private getOrCreateChildAtNodeIndex;
+    __print(): string;
+}
+export declare class RemoteNode extends RemoteNodeBase implements Node {
+    protected static NODE_LEN: number;
+    protected get sourceFile(): SourceFileInfo;
+    protected _sourceFile: SourceFileInfo;
+    get id(): string;
+    constructor(view: DataView, index: number, parent: RemoteNode, sourceFile: SourceFileInfo, offsetNodes: number);
+    forEachChild(visitNode: (node: Node) => T, visitList?: (list: NodeArray) => T): T | undefined;
+    get jsDoc(): readonly Node[] | undefined;
+    getSourceFile(): SourceFile;
+    getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
+    getFullStart(): number;
+    getEnd(): number;
+    getWidth(sourceFile?: SourceFile): number;
+    getFullWidth(): number;
+    getLeadingTriviaWidth(sourceFile?: SourceFile): number;
+    getFullText(sourceFile?: SourceFile): string;
+    getText(sourceFile?: SourceFile): string;
+    protected getString(index: number): string;
+    private getOrCreateChildAtNodeIndex;
+    private hasChildren;
+    private getNamedChild;
+    private getChildAtOrder;
+    __print(): string;
+    __printChildren(): string;
+    __printSubtree(): string;
+    get containsOnlyTriviaWhiteSpaces(): boolean;
+    get isArrayType(): boolean;
+    get isBracketed(): boolean;
+    get isExportEquals(): boolean;
+    get isNameFirst(): boolean;
+    get isTypeOf(): boolean;
+    get isTypeOnly(): boolean;
+    get multiLine(): boolean;
+    get keyword(): SyntaxKind | undefined;
+    get keywordToken(): SyntaxKind | undefined;
+    get operator(): SyntaxKind | undefined;
+    get phaseModifier(): SyntaxKind | undefined;
+    get token(): SyntaxKind | undefined;
+    get templateFlags(): number | undefined;
+    get tokenFlags(): number;
+    get argument(): RemoteNode | undefined;
+    get argumentExpression(): RemoteNode | undefined;
+    get arguments(): RemoteNodeList | undefined;
+    get assertsModifier(): RemoteNode | undefined;
+    get asteriskToken(): RemoteNode | undefined;
+    get attributes(): RemoteNode | RemoteNodeList | undefined;
+    get awaitModifier(): RemoteNode | undefined;
+    get block(): RemoteNode | undefined;
+    get body(): RemoteNode | undefined;
+    get caseBlock(): RemoteNode | undefined;
+    get catchClause(): RemoteNode | undefined;
+    get checkType(): RemoteNode | undefined;
+    get children(): RemoteNode | RemoteNodeList | undefined;
+    get className(): RemoteNode | undefined;
+    get clauses(): RemoteNodeList | undefined;
+    get closingElement(): RemoteNode | undefined;
+    get closingFragment(): RemoteNode | undefined;
+    get colonToken(): RemoteNode | undefined;
+    get comment(): RemoteNodeList | undefined;
+    get condition(): RemoteNode | undefined;
+    get constraint(): RemoteNode | undefined;
+    get declarationList(): RemoteNode | undefined;
+    get declarations(): RemoteNodeList | undefined;
+    get defaultType(): RemoteNode | undefined;
+    get dotDotDotToken(): RemoteNode | undefined;
+    get elements(): RemoteNodeList | undefined;
+    get elementType(): RemoteNode | undefined;
+    get elseStatement(): RemoteNode | undefined;
+    get endOfFileToken(): RemoteNode | undefined;
+    get equalsGreaterThanToken(): RemoteNode | undefined;
+    get equalsToken(): RemoteNode | undefined;
+    get exclamationToken(): RemoteNode | undefined;
+    get exportClause(): RemoteNode | undefined;
+    get expression(): RemoteNode | undefined;
+    get exprName(): RemoteNode | undefined;
+    get extendsType(): RemoteNode | undefined;
+    get falseType(): RemoteNode | undefined;
+    get finallyBlock(): RemoteNode | undefined;
+    get head(): RemoteNode | undefined;
+    get heritageClauses(): RemoteNodeList | undefined;
+    get importClause(): RemoteNode | undefined;
+    get incrementor(): RemoteNode | undefined;
+    get indexType(): RemoteNode | undefined;
+    get initializer(): RemoteNode | undefined;
+    get jsdocPropertyTags(): RemoteNode | undefined;
+    get label(): RemoteNode | undefined;
+    get left(): RemoteNode | undefined;
+    get literal(): RemoteNode | undefined;
+    get members(): RemoteNodeList | undefined;
+    get modifiers(): RemoteNodeList | undefined;
+    get moduleReference(): RemoteNode | undefined;
+    get moduleSpecifier(): RemoteNode | undefined;
+    get name(): RemoteNode | undefined;
+    get namedBindings(): RemoteNode | undefined;
+    get nameExpression(): RemoteNode | undefined;
+    get namespace(): RemoteNode | undefined;
+    get nameType(): RemoteNode | undefined;
+    get objectAssignmentInitializer(): RemoteNode | undefined;
+    get objectType(): RemoteNode | undefined;
+    get openingElement(): RemoteNode | undefined;
+    get openingFragment(): RemoteNode | undefined;
+    get operand(): RemoteNode | undefined;
+    get operatorToken(): RemoteNode | undefined;
+    get parameterName(): RemoteNode | undefined;
+    get parameters(): RemoteNodeList | undefined;
+    get postfixToken(): RemoteNode | undefined;
+    get properties(): RemoteNodeList | undefined;
+    get propertyName(): RemoteNode | undefined;
+    get qualifier(): RemoteNode | undefined;
+    get questionDotToken(): RemoteNode | undefined;
+    get questionToken(): RemoteNode | undefined;
+    get readonlyToken(): RemoteNode | undefined;
+    get right(): RemoteNode | undefined;
+    get statement(): RemoteNode | undefined;
+    get statements(): RemoteNodeList | undefined;
+    get tag(): RemoteNode | undefined;
+    get tagName(): RemoteNode | undefined;
+    get tags(): RemoteNodeList | undefined;
+    get template(): RemoteNode | undefined;
+    get templateSpans(): RemoteNodeList | undefined;
+    get thenStatement(): RemoteNode | undefined;
+    get thisArg(): RemoteNode | undefined;
+    get trueType(): RemoteNode | undefined;
+    get tryBlock(): RemoteNode | undefined;
+    get tupleNameSource(): RemoteNode | undefined;
+    get type(): RemoteNode | undefined;
+    get typeArguments(): RemoteNodeList | undefined;
+    get typeExpression(): RemoteNode | undefined;
+    get typeName(): RemoteNode | undefined;
+    get typeParameter(): RemoteNode | undefined;
+    get typeParameters(): RemoteNodeList | undefined;
+    get types(): RemoteNodeList | undefined;
+    get value(): RemoteNode | undefined;
+    get variableDeclaration(): RemoteNode | undefined;
+    get whenFalse(): RemoteNode | undefined;
+    get whenTrue(): RemoteNode | undefined;
+    get text(): string | undefined;
+    get rawText(): string | undefined;
+    get flags(): number;
+    get modifierFlags(): ModifierFlags;
+}
+//# sourceMappingURL=node.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.generated.d.ts.map b/node_modules/typescript/dist/api/node/node.generated.d.ts.map
new file mode 100644
index 000000000..6ebc46304
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,aAAa,EAC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I,UAAU,GAAG,SAAS,CAErC;IACD,IAAI,aAAa,IAAI,cAAc,GAAG,SAAS,CAE9C;IACD,IAAI,aAAa,IAAI,UAAU,GAAG,SAAS,CAE1C;IACD,IAAI,OAAO,IAAI,UAAU,GAAG,SAAS,CAEpC;IACD,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAErC;IACD,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAErC;IACD,IAAI,eAAe,IAAI,UAAU,GAAG,SAAS,CAE5C;IACD,IAAI,IAAI,IAAI,UAAU,GAAG,SAAS,CAEjC;IACD,IAAI,aAAa,IAAI,cAAc,GAAG,SAAS,CAE9C;IACD,IAAI,cAAc,IAAI,UAAU,GAAG,SAAS,CAE3C;IACD,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAErC;IACD,IAAI,aAAa,IAAI,UAAU,GAAG,SAAS,CAE1C;IACD,IAAI,cAAc,IAAI,cAAc,GAAG,SAAS,CAE/C;IACD,IAAI,KAAK,IAAI,cAAc,GAAG,SAAS,CAEtC;IACD,IAAI,KAAK,IAAI,UAAU,GAAG,SAAS,CAElC;IACD,IAAI,mBAAmB,IAAI,UAAU,GAAG,SAAS,CAEhD;IACD,IAAI,SAAS,IAAI,UAAU,GAAG,SAAS,CAEtC;IACD,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAErC;IAID,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CA0B7B;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAShC;IAMD,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,aAAa,IAAI,aAAa,CAQjC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.generated.js b/node_modules/typescript/dist/api/node/node.generated.js
new file mode 100644
index 000000000..e42577bb2
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.generated.js
@@ -0,0 +1,835 @@
+// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT.
+import { getTokenPosOfNode, ModifierFlags, SyntaxKind, } from "../../ast/index.js";
+import { modifierToFlag, NODE_CHILD_MASK, NODE_DATA_TYPE_MASK, NODE_EXTENDED_DATA_MASK, NODE_STRING_INDEX_MASK, popcount8, RemoteNodeBase, } from "./node.infrastructure.js";
+import { childProperties, KIND_NODE_LIST, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_LEN, NODE_OFFSET_DATA, NODE_OFFSET_END, NODE_OFFSET_FLAGS, NODE_OFFSET_KIND, NODE_OFFSET_NEXT, NODE_OFFSET_PARENT, NODE_OFFSET_POS, } from "./protocol.js";
+export class RemoteNodeList extends Array {
+    // Inherited Array methods like filter/map/slice use ArraySpeciesCreate, which would
+    // otherwise call `new RemoteNodeList(length)` and fail. Produce a plain Array instead.
+    static get [Symbol.species]() {
+        return Array;
+    }
+    parent;
+    hasTrailingComma;
+    transformFlags = 0;
+    view;
+    index;
+    _byteIndex;
+    // Cursor memoizing the last resolved (logical index -> node index) so that
+    // sequential forward access (index loops and list[i], plus forEach/map/
+    // reduce/filter) resumes instead of re-walking from the head, turning an
+    // O(n) pass over the whole list from O(n^2) into O(n).
+    _cursorIndex = 0;
+    _cursorNodeIndex = 0;
+    get pos() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_POS, true);
+    }
+    get end() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_END, true);
+    }
+    get next() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_NEXT, true);
+    }
+    get data() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_DATA, true);
+    }
+    sourceFile;
+    constructor(view, index, parent, sourceFile, offsetNodes) {
+        super();
+        this.view = view;
+        this.index = index;
+        this.parent = parent;
+        this.sourceFile = sourceFile;
+        this._byteIndex = offsetNodes + index * NODE_LEN;
+        this.length = this.data;
+        this._cursorNodeIndex = index + 1;
+        const length = this.length;
+        for (let i = 16; i < length; i++) {
+            Object.defineProperty(this, i, {
+                get() {
+                    return this.at(i);
+                },
+            });
+        }
+    }
+    get 0() {
+        return this.at(0);
+    }
+    get 1() {
+        return this.at(1);
+    }
+    get 2() {
+        return this.at(2);
+    }
+    get 3() {
+        return this.at(3);
+    }
+    get 4() {
+        return this.at(4);
+    }
+    get 5() {
+        return this.at(5);
+    }
+    get 6() {
+        return this.at(6);
+    }
+    get 7() {
+        return this.at(7);
+    }
+    get 8() {
+        return this.at(8);
+    }
+    get 9() {
+        return this.at(9);
+    }
+    get 10() {
+        return this.at(10);
+    }
+    get 11() {
+        return this.at(11);
+    }
+    get 12() {
+        return this.at(12);
+    }
+    get 13() {
+        return this.at(13);
+    }
+    get 14() {
+        return this.at(14);
+    }
+    get 15() {
+        return this.at(15);
+    }
+    *[Symbol.iterator]() {
+        if (!this.length)
+            return;
+        let next = this.index + 1;
+        while (next) {
+            const child = this.getOrCreateChildAtNodeIndex(next);
+            next = child.next;
+            yield child;
+        }
+    }
+    forEachNode(visitNode) {
+        if (!this.length)
+            return;
+        let next = this.index + 1;
+        while (next) {
+            const child = this.getOrCreateChildAtNodeIndex(next);
+            next = child.next;
+            const result = visitNode(child);
+            if (result)
+                return result;
+        }
+    }
+    at(index) {
+        if (!Number.isInteger(index)) {
+            return undefined;
+        }
+        if (index >= this.data || (index < 0 && -index > this.data)) {
+            return undefined;
+        }
+        if (index < 0) {
+            index = this.length + index;
+        }
+        // Walk the raw buffer following each node's `next` pointer instead of
+        // materializing every intermediate RemoteNode just to read it. Resume from
+        // the memoized cursor when possible so sequential forward access is O(1)
+        // amortized (a full in-order pass is O(n) rather than O(n^2)).
+        const offsetNodes = this.sourceFile._offsetNodes;
+        let i;
+        let next;
+        if (index >= this._cursorIndex) {
+            i = this._cursorIndex;
+            next = this._cursorNodeIndex;
+        }
+        else {
+            i = 0;
+            next = this.index + 1;
+        }
+        for (; i < index; i++) {
+            next = this.view.getUint32(offsetNodes + next * NODE_LEN + NODE_OFFSET_NEXT, true);
+        }
+        this._cursorIndex = index;
+        this._cursorNodeIndex = next;
+        return this.getOrCreateChildAtNodeIndex(next);
+    }
+    getOrCreateChildAtNodeIndex(index) {
+        let child = this.sourceFile.nodes[index];
+        if (!child) {
+            const kind = this.view.getUint32(this.sourceFile._offsetNodes + index * NODE_LEN + NODE_OFFSET_KIND, true);
+            if (kind === KIND_NODE_LIST) {
+                throw new Error("NodeList cannot directly contain another NodeList");
+            }
+            const sf = this.sourceFile;
+            child = new RemoteNode(this.view, index, this.parent, sf, sf._offsetNodes);
+            sf.nodes[index] = child;
+            sf._timing?.recordMaterialization();
+        }
+        return child;
+    }
+    __print() {
+        const result = [];
+        result.push(`kind: NodeList`);
+        result.push(`index: ${this.index}`);
+        result.push(`byteIndex: ${this._byteIndex}`);
+        result.push(`length: ${this.length}`);
+        return result.join("\n");
+    }
+}
+export class RemoteNode extends RemoteNodeBase {
+    static NODE_LEN = NODE_LEN;
+    get sourceFile() {
+        return this._sourceFile;
+    }
+    _sourceFile;
+    get id() {
+        return `${this.index}.${this.kind}.${this.sourceFile.path}`;
+    }
+    constructor(view, index, parent, sourceFile, offsetNodes) {
+        super(view, index, parent, offsetNodes + index * NODE_LEN);
+        this._sourceFile = sourceFile;
+    }
+    forEachChild(visitNode, visitList) {
+        if (this.hasChildren()) {
+            let next = this.index + 1;
+            do {
+                const child = this.getOrCreateChildAtNodeIndex(next);
+                if (child instanceof RemoteNodeList) {
+                    if (visitList) {
+                        const result = visitList(child);
+                        if (result) {
+                            return result;
+                        }
+                    }
+                    else {
+                        const result = child.forEachNode(visitNode);
+                        if (result) {
+                            return result;
+                        }
+                    }
+                }
+                else if (child.kind !== SyntaxKind.JSDoc) {
+                    const result = visitNode(child);
+                    if (result) {
+                        return result;
+                    }
+                }
+                next = child.next;
+            } while (next);
+        }
+    }
+    get jsDoc() {
+        if (!this.hasChildren()) {
+            return undefined;
+        }
+        let result;
+        let next = this.index + 1;
+        do {
+            const child = this.getOrCreateChildAtNodeIndex(next);
+            if (!(child instanceof RemoteNodeList) && child.kind === SyntaxKind.JSDoc) {
+                (result ??= []).push(child);
+            }
+            next = child.next;
+        } while (next);
+        return result;
+    }
+    getSourceFile() {
+        return this.sourceFile;
+    }
+    getStart(sourceFile, includeJsDocComment) {
+        return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment);
+    }
+    getFullStart() {
+        return this.pos;
+    }
+    getEnd() {
+        return this.end;
+    }
+    getWidth(sourceFile) {
+        return this.getEnd() - this.getStart(sourceFile);
+    }
+    getFullWidth() {
+        return this.end - this.pos;
+    }
+    getLeadingTriviaWidth(sourceFile) {
+        return this.getStart(sourceFile) - this.pos;
+    }
+    getFullText(sourceFile) {
+        return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end);
+    }
+    getText(sourceFile) {
+        sourceFile ??= this.getSourceFile();
+        return sourceFile.text.substring(this.getStart(sourceFile), this.end);
+    }
+    getString(index) {
+        const offsetStringTableOffsets = this.sourceFile._offsetStringTableOffsets;
+        const start = this.view.getUint32(offsetStringTableOffsets + index * 4, true);
+        const end = this.view.getUint32(offsetStringTableOffsets + (index + 1) * 4, true);
+        const offsetStringTable = this.sourceFile._offsetStringTable;
+        const text = new Uint8Array(this.view.buffer, this.view.byteOffset + offsetStringTable + start, end - start);
+        return this.sourceFile._decoder.decode(text);
+    }
+    getOrCreateChildAtNodeIndex(index) {
+        let child = this.sourceFile.nodes[index];
+        if (!child) {
+            const sf = this.sourceFile;
+            const offsetNodes = sf._offsetNodes;
+            const kind = this.view.getUint32(offsetNodes + index * NODE_LEN + NODE_OFFSET_KIND, true);
+            child = kind === KIND_NODE_LIST
+                ? new RemoteNodeList(this.view, index, this, sf, offsetNodes)
+                : new RemoteNode(this.view, index, this, sf, offsetNodes);
+            sf.nodes[index] = child;
+            sf._timing?.recordMaterialization();
+        }
+        return child;
+    }
+    hasChildren() {
+        if (this._byteIndex >= this.view.byteLength - NODE_LEN) {
+            return false;
+        }
+        const nextNodeParent = this.view.getUint32(this.sourceFile._offsetNodes + (this.index + 1) * NODE_LEN + NODE_OFFSET_PARENT, true);
+        return nextNodeParent === this.index;
+    }
+    getNamedChild(propertyName) {
+        const kind = this.kind;
+        const propertyNames = childProperties[kind];
+        if (!propertyNames) {
+            return undefined;
+        }
+        const order = propertyNames.indexOf(propertyName);
+        if (order === -1) {
+            return undefined;
+        }
+        return this.getChildAtOrder(order);
+    }
+    getChildAtOrder(order) {
+        const mask = this.childMask;
+        if (!(mask & (1 << order))) {
+            // Property is not present
+            return undefined;
+        }
+        // The property index is `order`, minus the number of zeros in the mask that are in bit positions less
+        // than the `order`th bit. Example:
+        //
+        // This is a MethodDeclaration with mask 0b01110101. The possible properties are
+        // ["modifiers", "asteriskToken", "name", "postfixToken", "typeParameters", "parameters", "type", "body"]
+        // (it has modifiers, name, typeParameters, parameters, and type).
+        //
+        // | Bit   | 7    | 6    | 5          | 4              | 3            | 2    | 1             | 0         |
+        // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- |
+        // | Value | 0    | 1    | 1          | 1              | 0            | 1    | 0             | 1         |
+        // | Name  | body | type | parameters | typeParameters | postfixToken | name | asteriskToken | modifiers |
+        //
+        // We are trying to get the index of "parameters" (bit = 5).
+        // First, set all the more significant bits to 1:
+        //
+        // | Bit   | 7    | 6    | 5          | 4              | 3            | 2    | 1             | 0         |
+        // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- |
+        // | Value | 1    | 1    | 1          | 1              | 0            | 1    | 0             | 1         |
+        //
+        // Then, flip the bits:
+        //
+        // | Bit   | 7    | 6    | 5          | 4              | 3            | 2    | 1             | 0         |
+        // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- |
+        // | Value | 0    | 0    | 0          | 0              | 1            | 0    | 1             | 0         |
+        //
+        // Counting the 1s gives us the number of *missing properties* before the `order`th property. If every property
+        // were present, we would have `parameters = children[5]`, but since `postfixToken` and `astersiskToken` are
+        // missing, we have `parameters = children[5 - 2]`.
+        const propertyIndex = order - popcount8[~(mask | ((0xff << order) & 0xff)) & 0xff];
+        let childIndex = this.index + 1;
+        for (let i = 0; i < propertyIndex; i++) {
+            // Walk through children via their `next` pointer until we get to the right property index
+            childIndex = this.view.getUint32(this.sourceFile._offsetNodes + childIndex * NODE_LEN + NODE_OFFSET_NEXT, true);
+        }
+        return this.getOrCreateChildAtNodeIndex(childIndex);
+    }
+    __print() {
+        const result = [];
+        result.push(`index: ${this.index}`);
+        result.push(`byteIndex: ${this._byteIndex}`);
+        result.push(`kind: ${SyntaxKind[this.kind]}`);
+        result.push(`pos: ${this.pos}`);
+        result.push(`end: ${this.end}`);
+        result.push(`next: ${this.next}`);
+        result.push(`parent: ${this.parentIndex}`);
+        result.push(`data: ${this.data.toString(2).padStart(32, "0")}`);
+        const dataType = this.dataType === NODE_DATA_TYPE_CHILDREN ? "children" :
+            this.dataType === NODE_DATA_TYPE_STRING ? "string" :
+                "extended";
+        result.push(`dataType: ${dataType}`);
+        if (this.dataType === NODE_DATA_TYPE_CHILDREN) {
+            result.push(`childMask: ${this.childMask.toString(2).padStart(8, "0")}`);
+            result.push(`childProperties: ${childProperties[this.kind]?.join(", ")}`);
+        }
+        return result.join("\n");
+    }
+    __printChildren() {
+        const result = [];
+        let next = this.index + 1;
+        while (next) {
+            const child = this.getOrCreateChildAtNodeIndex(next);
+            next = child.next;
+            result.push(child.__print());
+        }
+        return result.join("\n\n");
+    }
+    __printSubtree() {
+        const result = [this.__print()];
+        this.forEachChild(function visitNode(node) {
+            result.push(node.__print());
+            node.forEachChild(visitNode);
+        }, visitList => {
+            result.push(visitList.__print());
+        });
+        return result.join("\n\n");
+    }
+    // ═══ Generated boolean property getters ═══
+    get containsOnlyTriviaWhiteSpaces() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    get isArrayType() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    get isBracketed() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    get isExportEquals() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    get isNameFirst() {
+        return (this.data & (1 << 25)) !== 0;
+    }
+    get isTypeOf() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    get isTypeOnly() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    get multiLine() {
+        return (this.data & (1 << 24)) !== 0;
+    }
+    // ═══ Generated SyntaxKind union property getters ═══
+    get keyword() {
+        switch (this.kind) {
+            case SyntaxKind.ModuleDeclaration:
+                return (this.data >> 24) & 0x1 ? SyntaxKind.NamespaceKeyword : SyntaxKind.ModuleKeyword;
+        }
+    }
+    get keywordToken() {
+        switch (this.kind) {
+            case SyntaxKind.MetaProperty:
+                return (this.data >> 24) & 0x1 ? SyntaxKind.NewKeyword : SyntaxKind.ImportKeyword;
+        }
+    }
+    get operator() {
+        switch (this.kind) {
+            case SyntaxKind.PrefixUnaryExpression: {
+                const idx = (this.data >> 24) & 0x7;
+                if (idx === 1)
+                    return SyntaxKind.MinusToken;
+                if (idx === 2)
+                    return SyntaxKind.TildeToken;
+                if (idx === 3)
+                    return SyntaxKind.ExclamationToken;
+                if (idx === 4)
+                    return SyntaxKind.PlusPlusToken;
+                if (idx === 5)
+                    return SyntaxKind.MinusMinusToken;
+                return SyntaxKind.PlusToken;
+            }
+            case SyntaxKind.PostfixUnaryExpression:
+                return (this.data >> 24) & 0x1 ? SyntaxKind.MinusMinusToken : SyntaxKind.PlusPlusToken;
+            case SyntaxKind.TypeOperator: {
+                const idx = (this.data >> 24) & 0x3;
+                if (idx === 1)
+                    return SyntaxKind.ReadonlyKeyword;
+                if (idx === 2)
+                    return SyntaxKind.UniqueKeyword;
+                return SyntaxKind.KeyOfKeyword;
+            }
+        }
+    }
+    get phaseModifier() {
+        switch (this.kind) {
+            case SyntaxKind.ImportClause: {
+                const idx = (this.data >> 24) & 0x3;
+                if (idx === 0)
+                    return undefined;
+                return idx === 1 ? SyntaxKind.TypeKeyword : idx === 2 ? SyntaxKind.DeferKeyword : undefined;
+            }
+        }
+    }
+    get token() {
+        switch (this.kind) {
+            case SyntaxKind.HeritageClause:
+                return (this.data >> 24) & 0x1 ? SyntaxKind.ImplementsKeyword : SyntaxKind.ExtendsKeyword;
+            case SyntaxKind.ImportAttributes:
+                return (this.data >> 25) & 0x1 ? SyntaxKind.AssertKeyword : SyntaxKind.WithKeyword;
+        }
+    }
+    get templateFlags() {
+        switch (this.kind) {
+            case SyntaxKind.TemplateHead:
+            case SyntaxKind.TemplateMiddle:
+            case SyntaxKind.TemplateTail:
+                const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK);
+                return this.view.getUint32(extendedDataOffset + 8, true);
+        }
+    }
+    get tokenFlags() {
+        switch (this.kind) {
+            case SyntaxKind.StringLiteral:
+            case SyntaxKind.NumericLiteral:
+            case SyntaxKind.BigIntLiteral:
+            case SyntaxKind.RegularExpressionLiteral:
+                const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK);
+                return this.view.getUint32(extendedDataOffset + 4, true);
+            default:
+                return 0;
+        }
+    }
+    // ═══ Generated child property getters ═══
+    get argument() {
+        return this.getNamedChild("argument");
+    }
+    get argumentExpression() {
+        return this.getNamedChild("argumentExpression");
+    }
+    get arguments() {
+        return this.getNamedChild("arguments");
+    }
+    get assertsModifier() {
+        return this.getNamedChild("assertsModifier");
+    }
+    get asteriskToken() {
+        return this.getNamedChild("asteriskToken");
+    }
+    get attributes() {
+        return this.getNamedChild("attributes");
+    }
+    get awaitModifier() {
+        return this.getNamedChild("awaitModifier");
+    }
+    get block() {
+        return this.getNamedChild("block");
+    }
+    get body() {
+        return this.getNamedChild("body");
+    }
+    get caseBlock() {
+        return this.getNamedChild("caseBlock");
+    }
+    get catchClause() {
+        return this.getNamedChild("catchClause");
+    }
+    get checkType() {
+        return this.getNamedChild("checkType");
+    }
+    get children() {
+        return this.getNamedChild("children");
+    }
+    get className() {
+        return this.getNamedChild("className");
+    }
+    get clauses() {
+        return this.getNamedChild("clauses");
+    }
+    get closingElement() {
+        return this.getNamedChild("closingElement");
+    }
+    get closingFragment() {
+        return this.getNamedChild("closingFragment");
+    }
+    get colonToken() {
+        return this.getNamedChild("colonToken");
+    }
+    get comment() {
+        return this.getNamedChild("comment");
+    }
+    get condition() {
+        return this.getNamedChild("condition");
+    }
+    get constraint() {
+        return this.getNamedChild("constraint");
+    }
+    get declarationList() {
+        return this.getNamedChild("declarationList");
+    }
+    get declarations() {
+        return this.getNamedChild("declarations");
+    }
+    get defaultType() {
+        return this.getNamedChild("defaultType");
+    }
+    get dotDotDotToken() {
+        return this.getNamedChild("dotDotDotToken");
+    }
+    get elements() {
+        return this.getNamedChild("elements");
+    }
+    get elementType() {
+        return this.getNamedChild("elementType");
+    }
+    get elseStatement() {
+        return this.getNamedChild("elseStatement");
+    }
+    get endOfFileToken() {
+        return this.getNamedChild("endOfFileToken");
+    }
+    get equalsGreaterThanToken() {
+        return this.getNamedChild("equalsGreaterThanToken");
+    }
+    get equalsToken() {
+        return this.getNamedChild("equalsToken");
+    }
+    get exclamationToken() {
+        return this.getNamedChild("exclamationToken");
+    }
+    get exportClause() {
+        return this.getNamedChild("exportClause");
+    }
+    get expression() {
+        return this.getNamedChild("expression");
+    }
+    get exprName() {
+        return this.getNamedChild("exprName");
+    }
+    get extendsType() {
+        return this.getNamedChild("extendsType");
+    }
+    get falseType() {
+        return this.getNamedChild("falseType");
+    }
+    get finallyBlock() {
+        return this.getNamedChild("finallyBlock");
+    }
+    get head() {
+        return this.getNamedChild("head");
+    }
+    get heritageClauses() {
+        return this.getNamedChild("heritageClauses");
+    }
+    get importClause() {
+        return this.getNamedChild("importClause");
+    }
+    get incrementor() {
+        return this.getNamedChild("incrementor");
+    }
+    get indexType() {
+        return this.getNamedChild("indexType");
+    }
+    get initializer() {
+        return this.getNamedChild("initializer");
+    }
+    get jsdocPropertyTags() {
+        return this.getNamedChild("jsdocPropertyTags");
+    }
+    get label() {
+        return this.getNamedChild("label");
+    }
+    get left() {
+        return this.getNamedChild("left");
+    }
+    get literal() {
+        return this.getNamedChild("literal");
+    }
+    get members() {
+        return this.getNamedChild("members");
+    }
+    get modifiers() {
+        return this.getNamedChild("modifiers");
+    }
+    get moduleReference() {
+        return this.getNamedChild("moduleReference");
+    }
+    get moduleSpecifier() {
+        return this.getNamedChild("moduleSpecifier");
+    }
+    get name() {
+        return this.getNamedChild("name");
+    }
+    get namedBindings() {
+        return this.getNamedChild("namedBindings");
+    }
+    get nameExpression() {
+        return this.getNamedChild("nameExpression");
+    }
+    get namespace() {
+        return this.getNamedChild("namespace");
+    }
+    get nameType() {
+        return this.getNamedChild("nameType");
+    }
+    get objectAssignmentInitializer() {
+        return this.getNamedChild("objectAssignmentInitializer");
+    }
+    get objectType() {
+        return this.getNamedChild("objectType");
+    }
+    get openingElement() {
+        return this.getNamedChild("openingElement");
+    }
+    get openingFragment() {
+        return this.getNamedChild("openingFragment");
+    }
+    get operand() {
+        return this.getNamedChild("operand");
+    }
+    get operatorToken() {
+        return this.getNamedChild("operatorToken");
+    }
+    get parameterName() {
+        return this.getNamedChild("parameterName");
+    }
+    get parameters() {
+        return this.getNamedChild("parameters");
+    }
+    get postfixToken() {
+        return this.getNamedChild("postfixToken");
+    }
+    get properties() {
+        return this.getNamedChild("properties");
+    }
+    get propertyName() {
+        return this.getNamedChild("propertyName");
+    }
+    get qualifier() {
+        return this.getNamedChild("qualifier");
+    }
+    get questionDotToken() {
+        return this.getNamedChild("questionDotToken");
+    }
+    get questionToken() {
+        return this.getNamedChild("questionToken");
+    }
+    get readonlyToken() {
+        return this.getNamedChild("readonlyToken");
+    }
+    get right() {
+        return this.getNamedChild("right");
+    }
+    get statement() {
+        return this.getNamedChild("statement");
+    }
+    get statements() {
+        return this.getNamedChild("statements");
+    }
+    get tag() {
+        return this.getNamedChild("tag");
+    }
+    get tagName() {
+        return this.getNamedChild("tagName");
+    }
+    get tags() {
+        return this.getNamedChild("tags");
+    }
+    get template() {
+        return this.getNamedChild("template");
+    }
+    get templateSpans() {
+        return this.getNamedChild("templateSpans");
+    }
+    get thenStatement() {
+        return this.getNamedChild("thenStatement");
+    }
+    get thisArg() {
+        return this.getNamedChild("thisArg");
+    }
+    get trueType() {
+        return this.getNamedChild("trueType");
+    }
+    get tryBlock() {
+        return this.getNamedChild("tryBlock");
+    }
+    get tupleNameSource() {
+        return this.getNamedChild("tupleNameSource");
+    }
+    get type() {
+        return this.getNamedChild("type");
+    }
+    get typeArguments() {
+        return this.getNamedChild("typeArguments");
+    }
+    get typeExpression() {
+        return this.getNamedChild("typeExpression");
+    }
+    get typeName() {
+        return this.getNamedChild("typeName");
+    }
+    get typeParameter() {
+        return this.getNamedChild("typeParameter");
+    }
+    get typeParameters() {
+        return this.getNamedChild("typeParameters");
+    }
+    get types() {
+        return this.getNamedChild("types");
+    }
+    get value() {
+        return this.getNamedChild("value");
+    }
+    get variableDeclaration() {
+        return this.getNamedChild("variableDeclaration");
+    }
+    get whenFalse() {
+        return this.getNamedChild("whenFalse");
+    }
+    get whenTrue() {
+        return this.getNamedChild("whenTrue");
+    }
+    // ═══ Generated string property getters ═══
+    get text() {
+        switch (this.kind) {
+            case SyntaxKind.Identifier:
+            case SyntaxKind.PrivateIdentifier:
+            case SyntaxKind.JsxText:
+            case SyntaxKind.JSDocText:
+            case SyntaxKind.JSDocLink:
+            case SyntaxKind.JSDocLinkPlain:
+            case SyntaxKind.JSDocLinkCode: {
+                const stringIndex = this.data & NODE_STRING_INDEX_MASK;
+                return this.getString(stringIndex);
+            }
+            case SyntaxKind.StringLiteral:
+            case SyntaxKind.NumericLiteral:
+            case SyntaxKind.BigIntLiteral:
+            case SyntaxKind.RegularExpressionLiteral:
+            case SyntaxKind.NoSubstitutionTemplateLiteral:
+            case SyntaxKind.TemplateHead:
+            case SyntaxKind.TemplateMiddle:
+            case SyntaxKind.TemplateTail:
+            case SyntaxKind.SourceFile: {
+                const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK);
+                const stringIndex = this.view.getUint32(extendedDataOffset, true);
+                return this.getString(stringIndex);
+            }
+        }
+    }
+    get rawText() {
+        switch (this.kind) {
+            case SyntaxKind.TemplateHead:
+            case SyntaxKind.TemplateMiddle:
+            case SyntaxKind.TemplateTail:
+                const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK);
+                const stringIndex = this.view.getUint32(extendedDataOffset + 4, true);
+                return this.getString(stringIndex);
+        }
+    }
+    // ═══ Generated extended data property getters ═══
+    // ═══ Other property getters ═══
+    get flags() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_FLAGS, true);
+    }
+    get modifierFlags() {
+        const mods = this.modifiers;
+        if (!mods)
+            return ModifierFlags.None;
+        let flags = ModifierFlags.None;
+        for (const mod of mods) {
+            flags |= modifierToFlag(mod.kind);
+        }
+        return flags;
+    }
+}
+//# sourceMappingURL=node.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.generated.js.map b/node_modules/typescript/dist/api/node/node.generated.js.map
new file mode 100644
index 000000000..1ab247bfe
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.generated.js","sourceRoot":"","sources":["../../../src/api/node/node.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EACH,iBAAiB,EACjB,aAAa,EAIb,UAAU,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EAEtB,SAAS,EACT,cAAc,GAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,M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C;YACvC,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,OAAO;QACP,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,KAAK,UAAU,CAAC,YAAY,CAAC;YAC7B,KAAK,UAAU,CAAC,cAAc,CAAC;YAC/B,KAAK,UAAU,CAAC,YAAY;gBACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,CAAC;gBACvG,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;gBACtE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAED,mDAAmD;IAEnD,iCAAiC;IAEjC,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,aAAa;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC5B,IAAI,CAAC,IAAI;YAAE,OAAO,aAAa,CAAC,IAAI,CAAC;QACrC,IAAI,KAAK,GAAkB,aAAa,CAAC,IAAI,CAAC;QAC9C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACrB,KAAK,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.d.ts b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts
new file mode 100644
index 000000000..d39c28241
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts
@@ -0,0 +1,62 @@
+import { type FileReference, ModifierFlags, type Node, SyntaxKind } from "../../ast/index.ts";
+import type { TimingCollector } from "../timing.ts";
+import { NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING } from "./protocol.ts";
+export declare const popcount8: number[];
+export type NodeDataType = typeof NODE_DATA_TYPE_CHILDREN | typeof NODE_DATA_TYPE_STRING | typeof NODE_DATA_TYPE_EXTENDED;
+export declare const NODE_DATA_TYPE_MASK = 3221225472;
+export declare const NODE_CHILD_MASK = 255;
+export declare const NODE_STRING_INDEX_MASK = 16777215;
+export declare const NODE_EXTENDED_DATA_MASK = 16777215;
+export interface TextDecoder {
+    decode(input?: ArrayBufferView | ArrayBufferLike): string;
+}
+export interface SourceFileInfo {
+    readonly _offsetNodes: number;
+    readonly _offsetStringTableOffsets: number;
+    readonly _offsetStringTable: number;
+    readonly _offsetExtendedData: number;
+    readonly _offsetStructuredData: number;
+    readonly _decoder: TextDecoder;
+    nodes: any[];
+    readonly path?: string;
+    /**
+     * The timing collector that per-node materialization is reported into, and
+     * that this source file registered itself with when fetched. Present only
+     * when timing collection is enabled; when undefined, materialization is not
+     * timed and no clock is read.
+     */
+    readonly _timing?: TimingCollector | undefined;
+    readFileReferences(offset: number): readonly FileReference[];
+    readNodeIndexArray(offset: number): readonly Node[];
+    readStringArray(offset: number): readonly string[];
+    getOrCreateNodeAtIndex(index: number): Node;
+}
+/**
+ * Read the 128-bit content hash from a source file binary response as a hex string.
+ */
+export declare function readSourceFileHash(data: DataView): string;
+/**
+ * Read the per-file parse options key from a source file binary response.
+ * This encodes the ExternalModuleIndicatorOptions bitmask as a string,
+ * allowing the client to distinguish files parsed with different options.
+ */
+export declare function readParseOptionsKey(data: DataView): string;
+export declare function modifierToFlag(kind: SyntaxKind): ModifierFlags;
+export declare class RemoteNodeBase {
+    parent: any;
+    view: DataView;
+    protected index: number;
+    protected _byteIndex: number;
+    constructor(view: DataView, index: number, parent: any, byteIndex: number);
+    get kind(): SyntaxKind;
+    get pos(): number;
+    get end(): number;
+    get next(): number;
+    protected get parentIndex(): number;
+    protected get data(): number;
+    protected get dataType(): NodeDataType;
+    protected get childMask(): number;
+    protected getFileText(start: number, end: number): string;
+    protected get sourceFile(): SourceFileInfo;
+}
+//# sourceMappingURL=node.infrastructure.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map
new file mode 100644
index 000000000..bcd58d5cb
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.infrastructure.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.infrastructure.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,IAAI,EACT,UAAU,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAMH,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EAOxB,MAAM,eAAe,CAAC;AAMvB,eAAO,MAAM,SAAS,EAAE,MAAM,EAAqwB,CAAC;AAEpyB,MAAM,MAAM,YAAY,GAAG,OAAO,uBAAuB,GAAG,OAAO,qBAAqB,GAAG,OAAO,uBAAuB,CAAC;AAC1H,eAAO,MAAM,mBAAmB,aAAgB,CAAC;AACjD,eAAO,MAAM,eAAe,MAAgB,CAAC;AAC7C,eAAO,MAAM,sBAAsB,WAAgB,CAAC;AACpD,eAAO,MAAM,uBAAuB,WAAgB,CAAC;AAQrD,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,eAAe,GAAG,MAAM,CAAC;CAC7D;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,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AElC;IAED,SAAS,KAAK,IAAI,IAAI,MAAM,CAE3B;IAED,SAAS,KAAK,QAAQ,IAAI,YAAY,CAErC;IAED,SAAS,KAAK,SAAS,IAAI,MAAM,CAKhC;IAED,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzD,SAAS,KAAK,UAAU,IAAI,cAAc,CAGzC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.js b/node_modules/typescript/dist/api/node/node.infrastructure.js
new file mode 100644
index 000000000..353652f58
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.infrastructure.js
@@ -0,0 +1,122 @@
+import { ModifierFlags, SyntaxKind, } from "../../ast/index.js";
+import { HEADER_OFFSET_HASH_HI0, HEADER_OFFSET_HASH_HI1, HEADER_OFFSET_HASH_LO0, HEADER_OFFSET_HASH_LO1, HEADER_OFFSET_PARSE_OPTIONS, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_OFFSET_DATA, NODE_OFFSET_END, NODE_OFFSET_KIND, NODE_OFFSET_NEXT, NODE_OFFSET_PARENT, NODE_OFFSET_POS, } from "./protocol.js";
+// ═══════════════════════════════════════════════════════════════════════════
+// Constants
+// ═══════════════════════════════════════════════════════════════════════════
+export const popcount8 = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8];
+export const NODE_DATA_TYPE_MASK = 0xc0_00_00_00;
+export const NODE_CHILD_MASK = 0x00_00_00_ff;
+export const NODE_STRING_INDEX_MASK = 0x00_ff_ff_ff;
+export const NODE_EXTENDED_DATA_MASK = 0x00_ff_ff_ff;
+// ═══════════════════════════════════════════════════════════════════════════
+// Free functions
+// ═══════════════════════════════════════════════════════════════════════════
+/**
+ * Read the 128-bit content hash from a source file binary response as a hex string.
+ */
+export function readSourceFileHash(data) {
+    const lo0 = data.getUint32(HEADER_OFFSET_HASH_LO0, true);
+    const lo1 = data.getUint32(HEADER_OFFSET_HASH_LO1, true);
+    const hi0 = data.getUint32(HEADER_OFFSET_HASH_HI0, true);
+    const hi1 = data.getUint32(HEADER_OFFSET_HASH_HI1, true);
+    return hex8(hi1) + hex8(hi0) + hex8(lo1) + hex8(lo0);
+}
+/**
+ * Read the per-file parse options key from a source file binary response.
+ * This encodes the ExternalModuleIndicatorOptions bitmask as a string,
+ * allowing the client to distinguish files parsed with different options.
+ */
+export function readParseOptionsKey(data) {
+    return data.getUint32(HEADER_OFFSET_PARSE_OPTIONS, true).toString();
+}
+function hex8(n) {
+    return (n >>> 0).toString(16).padStart(8, "0");
+}
+export function modifierToFlag(kind) {
+    switch (kind) {
+        case SyntaxKind.StaticKeyword:
+            return ModifierFlags.Static;
+        case SyntaxKind.PublicKeyword:
+            return ModifierFlags.Public;
+        case SyntaxKind.ProtectedKeyword:
+            return ModifierFlags.Protected;
+        case SyntaxKind.PrivateKeyword:
+            return ModifierFlags.Private;
+        case SyntaxKind.AbstractKeyword:
+            return ModifierFlags.Abstract;
+        case SyntaxKind.AccessorKeyword:
+            return ModifierFlags.Accessor;
+        case SyntaxKind.ExportKeyword:
+            return ModifierFlags.Export;
+        case SyntaxKind.DeclareKeyword:
+            return ModifierFlags.Ambient;
+        case SyntaxKind.ConstKeyword:
+            return ModifierFlags.Const;
+        case SyntaxKind.DefaultKeyword:
+            return ModifierFlags.Default;
+        case SyntaxKind.AsyncKeyword:
+            return ModifierFlags.Async;
+        case SyntaxKind.ReadonlyKeyword:
+            return ModifierFlags.Readonly;
+        case SyntaxKind.OverrideKeyword:
+            return ModifierFlags.Override;
+        case SyntaxKind.InKeyword:
+            return ModifierFlags.In;
+        case SyntaxKind.OutKeyword:
+            return ModifierFlags.Out;
+        case SyntaxKind.Decorator:
+            return ModifierFlags.Decorator;
+        default:
+            return ModifierFlags.None;
+    }
+}
+// ═══════════════════════════════════════════════════════════════════════════
+// RemoteNodeBase
+// ═══════════════════════════════════════════════════════════════════════════
+export class RemoteNodeBase {
+    parent; // RemoteNode at runtime
+    view;
+    index;
+    _byteIndex;
+    constructor(view, index, parent, byteIndex) {
+        this.view = view;
+        this.index = index;
+        this.parent = parent;
+        this._byteIndex = byteIndex;
+    }
+    get kind() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_KIND, true);
+    }
+    get pos() {
+        return this.view.getInt32(this._byteIndex + NODE_OFFSET_POS, true);
+    }
+    get end() {
+        return this.view.getInt32(this._byteIndex + NODE_OFFSET_END, true);
+    }
+    get next() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_NEXT, true);
+    }
+    get parentIndex() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_PARENT, true);
+    }
+    get data() {
+        return this.view.getUint32(this._byteIndex + NODE_OFFSET_DATA, true);
+    }
+    get dataType() {
+        return (this.data & NODE_DATA_TYPE_MASK);
+    }
+    get childMask() {
+        if (this.dataType !== NODE_DATA_TYPE_CHILDREN) {
+            return -1;
+        }
+        return this.data & NODE_CHILD_MASK;
+    }
+    getFileText(start, end) {
+        return this.sourceFile._decoder.decode(new Uint8Array(this.view.buffer, this.view.byteOffset + this.sourceFile._offsetStringTable + start, end - start));
+    }
+    get sourceFile() {
+        // Overridden in RemoteNode; exists here for getFileText access
+        throw new Error("sourceFile not available on base");
+    }
+}
+//# sourceMappingURL=node.infrastructure.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.js.map b/node_modules/typescript/dist/api/node/node.infrastructure.js.map
new file mode 100644
index 000000000..d32e34222
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.infrastructure.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.infrastructure.js","sourceRoot":"","sources":["../../../src/api/node/node.infrastructure.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAEb,UAAU,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,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G,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,IAAc,WAAW;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IAED,IAAc,IAAI;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,IAAc,QAAQ;QAClB,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAiB,CAAC;IAC7D,CAAC;IAED,IAAc,SAAS;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,uBAAuB,EAAE,CAAC;YAC5C,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IACvC,CAAC;IAES,WAAW,CAAC,KAAa,EAAE,GAAW;QAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IAC7J,CAAC;IAED,IAAc,UAAU;QACpB,+DAA+D;QAC/D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACxD,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.js b/node_modules/typescript/dist/api/node/node.js
new file mode 100644
index 000000000..a2e08f0de
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.js
@@ -0,0 +1,298 @@
+import { computeLineStarts, NodeFlags, SyntaxKind, TokenFlags, } from "../../ast/index.js";
+import { MsgpackReader } from "./msgpack.js";
+import { RemoteNode, RemoteNodeList, } from "./node.generated.js";
+import { NODE_EXTENDED_DATA_MASK, } from "./node.infrastructure.js";
+import { HEADER_OFFSET_EXTENDED_DATA, HEADER_OFFSET_NODES, HEADER_OFFSET_STRING_TABLE, HEADER_OFFSET_STRING_TABLE_OFFSETS, HEADER_OFFSET_STRUCTURED_DATA, KIND_NODE_LIST, NODE_LEN, NODE_OFFSET_KIND, NODE_OFFSET_PARENT, } from "./protocol.js";
+import { Wtf8Decoder } from "./wtf8.js";
+// Re-export everything consumers need from the other two files.
+export { RemoteNode, RemoteNodeList } from "./node.generated.js";
+export { readParseOptionsKey, readSourceFileHash, RemoteNodeBase } from "./node.infrastructure.js";
+// ═══════════════════════════════════════════════════════════════════════════
+// RemoteSourceFile
+// ═══════════════════════════════════════════════════════════════════════════
+const NO_STRUCTURED_DATA = 0xFFFFFFFF;
+export class RemoteSourceFile extends RemoteNode {
+    nodes;
+    _offsetNodes;
+    _offsetStringTableOffsets;
+    _offsetStringTable;
+    _offsetExtendedData;
+    _offsetStructuredData;
+    _decoder;
+    _timing;
+    _lineStarts;
+    _cachedText;
+    _cachedReferencedFiles;
+    _cachedTypeReferenceDirectives;
+    _cachedLibReferenceDirectives;
+    _cachedImports;
+    _cachedModuleAugmentations;
+    _cachedAmbientModuleNames;
+    constructor(data, decoder, timing) {
+        const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
+        const offsetNodes = view.getUint32(HEADER_OFFSET_NODES, true);
+        super(view, 1, undefined, undefined, offsetNodes);
+        this._sourceFile = this;
+        this._offsetNodes = offsetNodes;
+        this._offsetStringTableOffsets = view.getUint32(HEADER_OFFSET_STRING_TABLE_OFFSETS, true);
+        this._offsetStringTable = view.getUint32(HEADER_OFFSET_STRING_TABLE, true);
+        this._offsetExtendedData = view.getUint32(HEADER_OFFSET_EXTENDED_DATA, true);
+        this._offsetStructuredData = view.getUint32(HEADER_OFFSET_STRUCTURED_DATA, true);
+        this._decoder = decoder;
+        this._timing = timing;
+        this.nodes = Array((view.byteLength - offsetNodes) / NODE_LEN);
+        this.nodes[1] = this;
+        // Every node slot is materializable on demand except the nil sentinel at
+        // index 0 and the source-file node at index 1, which is pre-materialized.
+        timing?.recordSourceFileFetched(Math.max(0, this.nodes.length - 2));
+    }
+    readFileReferences(structuredDataOffset) {
+        if (structuredDataOffset === NO_STRUCTURED_DATA) {
+            return [];
+        }
+        const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength);
+        const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset);
+        const count = reader.readArrayHeader();
+        const result = [];
+        for (let i = 0; i < count; i++) {
+            reader.readArrayHeader(); // 5-element tuple
+            const pos = reader.readUint();
+            const end = reader.readUint();
+            const fileName = reader.readString();
+            const resolutionMode = reader.readUint();
+            const preserve = reader.readBool();
+            result.push({ pos, end, fileName, resolutionMode, preserve });
+        }
+        return result;
+    }
+    readNodeIndexArray(structuredDataOffset) {
+        if (structuredDataOffset === NO_STRUCTURED_DATA) {
+            return [];
+        }
+        const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength);
+        const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset);
+        const count = reader.readArrayHeader();
+        const result = [];
+        for (let i = 0; i < count; i++) {
+            const nodeIndex = reader.readUint();
+            result.push(this.getOrCreateNodeAtIndex(nodeIndex));
+        }
+        return result;
+    }
+    readStringArray(structuredDataOffset) {
+        if (structuredDataOffset === NO_STRUCTURED_DATA) {
+            return [];
+        }
+        const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength);
+        const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset);
+        const count = reader.readArrayHeader();
+        const result = [];
+        for (let i = 0; i < count; i++) {
+            result.push(reader.readString());
+        }
+        return result;
+    }
+    /** @internal */
+    getOrCreateNodeAtIndex(index) {
+        let node = this.nodes[index];
+        if (!node) {
+            // Resolve the real parent so that nodes looked up directly by index (e.g. via
+            // NodeHandle.resolve) report the correct `parent`, rather than always pointing at
+            // the source file. The stored parent index can refer to a synthetic NodeList
+            // container; skip those to mirror normal traversal, where list elements take the
+            // list's parent. The walk terminates at the source file, which occupies index 1
+            // and is already cached.
+            let parentIndex = this.view.getUint32(this._offsetNodes + index * NODE_LEN + NODE_OFFSET_PARENT, true);
+            while (parentIndex !== index &&
+                this.view.getUint32(this._offsetNodes + parentIndex * NODE_LEN + NODE_OFFSET_KIND, true) === KIND_NODE_LIST) {
+                parentIndex = this.view.getUint32(this._offsetNodes + parentIndex * NODE_LEN + NODE_OFFSET_PARENT, true);
+            }
+            const parent = parentIndex === index ? this : this.getOrCreateNodeAtIndex(parentIndex);
+            node = new RemoteNode(this.view, index, parent, this, this._offsetNodes);
+            this.nodes[index] = node;
+            this._timing?.recordMaterialization();
+        }
+        return node;
+    }
+    // ═══ SourceFile-specific extended data getters ═══
+    get extendedDataOffset() {
+        return this._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK);
+    }
+    get fileName() {
+        const stringIndex = this.view.getUint32(this.extendedDataOffset + 4, true);
+        return this.getString(stringIndex);
+    }
+    get path() {
+        const stringIndex = this.view.getUint32(this.extendedDataOffset + 8, true);
+        return this.getString(stringIndex);
+    }
+    get languageVariant() {
+        return this.view.getUint32(this.extendedDataOffset + 12, true);
+    }
+    get scriptKind() {
+        return this.view.getUint32(this.extendedDataOffset + 16, true);
+    }
+    get referencedFiles() {
+        if (this._cachedReferencedFiles !== undefined)
+            return this._cachedReferencedFiles;
+        const offset = this.view.getUint32(this.extendedDataOffset + 20, true);
+        const files = this.readFileReferences(offset);
+        this._cachedReferencedFiles = files;
+        return files;
+    }
+    get typeReferenceDirectives() {
+        if (this._cachedTypeReferenceDirectives !== undefined)
+            return this._cachedTypeReferenceDirectives;
+        const offset = this.view.getUint32(this.extendedDataOffset + 24, true);
+        const directives = this.readFileReferences(offset);
+        this._cachedTypeReferenceDirectives = directives;
+        return directives;
+    }
+    get libReferenceDirectives() {
+        if (this._cachedLibReferenceDirectives !== undefined)
+            return this._cachedLibReferenceDirectives;
+        const offset = this.view.getUint32(this.extendedDataOffset + 28, true);
+        const directives = this.readFileReferences(offset);
+        this._cachedLibReferenceDirectives = directives;
+        return directives;
+    }
+    get imports() {
+        if (this._cachedImports !== undefined)
+            return this._cachedImports;
+        const offset = this.view.getUint32(this.extendedDataOffset + 32, true);
+        const imports = this.readNodeIndexArray(offset);
+        this._cachedImports = imports;
+        return imports;
+    }
+    get moduleAugmentations() {
+        if (this._cachedModuleAugmentations !== undefined)
+            return this._cachedModuleAugmentations;
+        const offset = this.view.getUint32(this.extendedDataOffset + 36, true);
+        const moduleAugmentations = this.readNodeIndexArray(offset);
+        this._cachedModuleAugmentations = moduleAugmentations;
+        return moduleAugmentations;
+    }
+    get ambientModuleNames() {
+        if (this._cachedAmbientModuleNames !== undefined)
+            return this._cachedAmbientModuleNames;
+        const offset = this.view.getUint32(this.extendedDataOffset + 40, true);
+        const names = this.readStringArray(offset);
+        this._cachedAmbientModuleNames = names;
+        return names;
+    }
+    get externalModuleIndicator() {
+        const nodeIndex = this.view.getUint32(this.extendedDataOffset + 44, true);
+        if (nodeIndex === 0)
+            return undefined;
+        if (nodeIndex === this.index)
+            return true;
+        return this.getOrCreateNodeAtIndex(nodeIndex);
+    }
+    get isDeclarationFile() {
+        return (this.flags & NodeFlags.Ambient) !== 0;
+    }
+    get text() {
+        if (this._cachedText !== undefined)
+            return this._cachedText;
+        const text = super.text;
+        this._cachedText = text;
+        return text;
+    }
+    // ═══ Line/character position mapping ═══
+    getLineStarts() {
+        return this._lineStarts ??= computeLineStarts(this.text ?? "");
+    }
+    getLineAndCharacterOfPosition(position) {
+        const lineStarts = this.getLineStarts();
+        const line = computeLineOfPosition(lineStarts, position);
+        return { line, character: position - lineStarts[line] };
+    }
+    getPositionOfLineAndCharacter(line, character) {
+        const lineStarts = this.getLineStarts();
+        if (line < 0 || line >= lineStarts.length) {
+            throw new Error(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length}`);
+        }
+        return lineStarts[line] + character;
+    }
+}
+/**
+ * Find the 0-based line number containing the given position via binary search.
+ * Assumes the first line starts at position 0 and `position` is non-negative.
+ */
+function computeLineOfPosition(lineStarts, position) {
+    let low = 0;
+    let high = lineStarts.length - 1;
+    while (low <= high) {
+        const middle = low + ((high - low) >> 1);
+        const value = lineStarts[middle];
+        if (value < position) {
+            low = middle + 1;
+        }
+        else if (value > position) {
+            high = middle - 1;
+        }
+        else {
+            return middle;
+        }
+    }
+    return low - 1;
+}
+/**
+ * Find a descendant node at a specific position with matching kind and end position.
+ */
+export function findDescendant(root, pos, end, kind) {
+    if (root.pos === pos && root.end === end && root.kind === kind) {
+        return root;
+    }
+    // Search children
+    let result;
+    root.forEachChild(child => {
+        if (result)
+            return result; // Already found
+        // Only search in children that could contain our target
+        if (child.pos <= pos && child.end >= end) {
+            result = findDescendant(child, pos, end, kind);
+        }
+        return undefined;
+    });
+    return result;
+}
+/**
+ * Parse a node handle string into its components.
+ * Handle format: "index.kind.path" where path may contain dots.
+ */
+export function parseNodeHandle(handle) {
+    const firstDot = handle.indexOf(".");
+    if (firstDot === -1) {
+        throw new Error(`Invalid node handle: ${handle}`);
+    }
+    const secondDot = handle.indexOf(".", firstDot + 1);
+    if (secondDot === -1) {
+        throw new Error(`Invalid node handle: ${handle}`);
+    }
+    return {
+        index: parseInt(handle.slice(0, firstDot), 10),
+        kind: parseInt(handle.slice(firstDot + 1, secondDot), 10),
+        path: handle.slice(secondDot + 1),
+    };
+}
+/**
+ * Decode binary-encoded AST data into a Node.
+ * Works for any binary-encoded node, including synthetic nodes
+ * (e.g. from typeToTypeNode) that don't have a source file.
+ */
+export function decodeNode(data) {
+    const sf = new RemoteSourceFile(data, new Wtf8Decoder());
+    return sf;
+}
+/**
+ * Get the unique ID string for a remote node.
+ * Throws if the node is not a RemoteNode (i.e. not decoded from binary data).
+ */
+export function getNodeId(node) {
+    if (!(node instanceof RemoteNode)) {
+        throw new Error("getNodeId requires a RemoteNode");
+    }
+    return node.id;
+}
+//# sourceMappingURL=node.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/node.js.map b/node_modules/typescript/dist/api/node/node.js.map
new file mode 100644
index 000000000..e39c00c08
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/node.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/api/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAIjB,SAAS,EAET,UAAU,EACV,UAAU,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACH,UAAU,EACV,cAAc,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,uBAAuB,GAG1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,EAClC,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,gEAAgE;AAChE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEnG,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAEtC,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IACnC,KAAK,CAAkC;IACvC,YAAY,CAAS;IACrB,yBAAyB,CAAS;IAClC,kBAAkB,CAAS;IAC3B,mBAAmB,CAAS;IAC5B,qBAAqB,CAAS;IAC9B,QAAQ,CAAc;IACtB,OAAO,CAA8B;IACtC,WAAW,CAAgC;IAC3C,WAAW,CAAqB;IAChC,sBAAsB,CAAuC;IAC7D,8BAA8B,CAAuC;I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C,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC;QAC9C,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAe;QACvE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAS;KAC5C,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAgB;IACvC,MAAM,EAAE,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC;IACzD,OAAO,EAAqB,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAU;IAChC,IAAI,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,CAAC,EAAE,CAAC;AACnB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.d.ts b/node_modules/typescript/dist/api/node/protocol.d.ts
new file mode 100644
index 000000000..cbebf3837
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.d.ts
@@ -0,0 +1,29 @@
+export declare const PROTOCOL_VERSION = 5;
+export declare const HEADER_OFFSET_METADATA = 0;
+export declare const HEADER_OFFSET_HASH_LO0 = 4;
+export declare const HEADER_OFFSET_HASH_LO1 = 8;
+export declare const HEADER_OFFSET_HASH_HI0 = 12;
+export declare const HEADER_OFFSET_HASH_HI1 = 16;
+export declare const HEADER_OFFSET_PARSE_OPTIONS = 20;
+export declare const HEADER_OFFSET_STRING_TABLE_OFFSETS = 24;
+export declare const HEADER_OFFSET_STRING_TABLE = 28;
+export declare const HEADER_OFFSET_EXTENDED_DATA = 32;
+export declare const HEADER_OFFSET_STRUCTURED_DATA = 36;
+export declare const HEADER_OFFSET_NODES = 40;
+export declare const HEADER_SIZE = 44;
+export declare const NODE_LEN = 28;
+export declare const NODE_OFFSET_KIND = 0;
+export declare const NODE_OFFSET_POS = 4;
+export declare const NODE_OFFSET_END = 8;
+export declare const NODE_OFFSET_NEXT = 12;
+export declare const NODE_OFFSET_PARENT = 16;
+export declare const NODE_OFFSET_DATA = 20;
+export declare const NODE_OFFSET_FLAGS = 24;
+export declare const KIND_NODE_LIST = 4294967295;
+export declare const NODE_DATA_TYPE_CHILDREN = 0;
+export declare const NODE_DATA_TYPE_STRING = 1073741824;
+export declare const NODE_DATA_TYPE_EXTENDED = 2147483648;
+export declare const NODE_STRING_INDEX_MASK = 16777215;
+export declare const NODE_EXTENDED_DATA_MASK = 16777215;
+export { childProperties, singleChildNodePropertyNames } from "./protocol.generated.ts";
+//# sourceMappingURL=protocol.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.d.ts.map b/node_modules/typescript/dist/api/node/protocol.d.ts.map
new file mode 100644
index 000000000..d0f6deb48
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/api/node/protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,kCAAkC,KAAK,CAAC;AACrD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAE3B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,eAAO,MAAM,uBAAuB,IAAa,CAAC;AAClD,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,eAAO,MAAM,sBAAsB,WAAa,CAAC;AACjD,eAAO,MAAM,uBAAuB,WAAa,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.generated.d.ts b/node_modules/typescript/dist/api/node/protocol.generated.d.ts
new file mode 100644
index 000000000..4bcb8d52a
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.generated.d.ts
@@ -0,0 +1,4 @@
+import { SyntaxKind } from "../../ast/index.ts";
+export declare const childProperties: Readonly>>;
+export declare const singleChildNodePropertyNames: Readonly>>;
+//# sourceMappingURL=protocol.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map b/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map
new file mode 100644
index 000000000..198ac436b
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"protocol.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/protocol.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC,CA8KlG,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CA8DtF,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.generated.js b/node_modules/typescript/dist/api/node/protocol.generated.js
new file mode 100644
index 000000000..628478a30
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.generated.js
@@ -0,0 +1,241 @@
+// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT.
+import { SyntaxKind } from "../../ast/index.js";
+export const childProperties = {
+    [SyntaxKind.QualifiedName]: ["left", "right"],
+    [SyntaxKind.ComputedPropertyName]: ["expression"],
+    [SyntaxKind.Decorator]: ["expression"],
+    [SyntaxKind.IfStatement]: ["expression", "thenStatement", "elseStatement"],
+    [SyntaxKind.DoStatement]: ["statement", "expression"],
+    [SyntaxKind.WhileStatement]: ["expression", "statement"],
+    [SyntaxKind.ForStatement]: ["initializer", "condition", "incrementor", "statement"],
+    [SyntaxKind.ForInStatement]: ["awaitModifier", "initializer", "expression", "statement"],
+    [SyntaxKind.ForOfStatement]: ["awaitModifier", "initializer", "expression", "statement"],
+    [SyntaxKind.BreakStatement]: ["label"],
+    [SyntaxKind.ContinueStatement]: ["label"],
+    [SyntaxKind.ReturnStatement]: ["expression"],
+    [SyntaxKind.WithStatement]: ["expression", "statement"],
+    [SyntaxKind.SwitchStatement]: ["expression", "caseBlock"],
+    [SyntaxKind.CaseBlock]: ["clauses"],
+    [SyntaxKind.CaseClause]: ["expression", "statements"],
+    [SyntaxKind.DefaultClause]: ["expression", "statements"],
+    [SyntaxKind.ThrowStatement]: ["expression"],
+    [SyntaxKind.TryStatement]: ["tryBlock", "catchClause", "finallyBlock"],
+    [SyntaxKind.CatchClause]: ["variableDeclaration", "block"],
+    [SyntaxKind.LabeledStatement]: ["label", "statement"],
+    [SyntaxKind.ExpressionStatement]: ["expression"],
+    [SyntaxKind.Block]: ["statements"],
+    [SyntaxKind.VariableStatement]: ["modifiers", "declarationList"],
+    [SyntaxKind.VariableDeclaration]: ["name", "exclamationToken", "type", "initializer"],
+    [SyntaxKind.VariableDeclarationList]: ["declarations"],
+    [SyntaxKind.ObjectBindingPattern]: ["elements"],
+    [SyntaxKind.ArrayBindingPattern]: ["elements"],
+    [SyntaxKind.Parameter]: ["modifiers", "dotDotDotToken", "name", "questionToken", "type", "initializer"],
+    [SyntaxKind.BindingElement]: ["dotDotDotToken", "propertyName", "name", "initializer"],
+    [SyntaxKind.MissingDeclaration]: ["modifiers"],
+    [SyntaxKind.FunctionDeclaration]: ["modifiers", "asteriskToken", "name", "typeParameters", "parameters", "type", "body"],
+    [SyntaxKind.ClassDeclaration]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"],
+    [SyntaxKind.ClassExpression]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"],
+    [SyntaxKind.HeritageClause]: ["types"],
+    [SyntaxKind.InterfaceDeclaration]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"],
+    [SyntaxKind.TypeAliasDeclaration]: ["modifiers", "name", "typeParameters", "type"],
+    [SyntaxKind.JSTypeAliasDeclaration]: ["modifiers", "name", "typeParameters", "type"],
+    [SyntaxKind.EnumMember]: ["name", "initializer"],
+    [SyntaxKind.EnumDeclaration]: ["modifiers", "name", "members"],
+    [SyntaxKind.ModuleBlock]: ["statements"],
+    [SyntaxKind.ImportDeclaration]: ["modifiers", "importClause", "moduleSpecifier", "attributes"],
+    [SyntaxKind.JSImportDeclaration]: ["modifiers", "importClause", "moduleSpecifier", "attributes"],
+    [SyntaxKind.ExternalModuleReference]: ["expression"],
+    [SyntaxKind.NamespaceImport]: ["name"],
+    [SyntaxKind.NamedImports]: ["elements"],
+    [SyntaxKind.ExportAssignment]: ["modifiers", "type", "expression"],
+    [SyntaxKind.NamespaceExportDeclaration]: ["modifiers", "name"],
+    [SyntaxKind.NamespaceExport]: ["name"],
+    [SyntaxKind.NamedExports]: ["elements"],
+    [SyntaxKind.ExportSpecifier]: ["propertyName", "name"],
+    [SyntaxKind.CallSignature]: ["typeParameters", "parameters", "type"],
+    [SyntaxKind.ConstructSignature]: ["typeParameters", "parameters", "type"],
+    [SyntaxKind.Constructor]: ["modifiers", "typeParameters", "parameters", "type", "body"],
+    [SyntaxKind.GetAccessor]: ["modifiers", "name", "typeParameters", "parameters", "type", "body"],
+    [SyntaxKind.SetAccessor]: ["modifiers", "name", "typeParameters", "parameters", "type", "body"],
+    [SyntaxKind.IndexSignature]: ["modifiers", "parameters", "type"],
+    [SyntaxKind.MethodSignature]: ["modifiers", "name", "postfixToken", "typeParameters", "parameters", "type"],
+    [SyntaxKind.MethodDeclaration]: ["modifiers", "asteriskToken", "name", "postfixToken", "typeParameters", "parameters", "type", "body"],
+    [SyntaxKind.PropertySignature]: ["modifiers", "name", "postfixToken", "type", "initializer"],
+    [SyntaxKind.PropertyDeclaration]: ["modifiers", "name", "postfixToken", "type", "initializer"],
+    [SyntaxKind.ClassStaticBlockDeclaration]: ["modifiers", "body"],
+    [SyntaxKind.BinaryExpression]: ["modifiers", "left", "type", "operatorToken", "right"],
+    [SyntaxKind.PrefixUnaryExpression]: ["operand"],
+    [SyntaxKind.PostfixUnaryExpression]: ["operand"],
+    [SyntaxKind.YieldExpression]: ["asteriskToken", "expression"],
+    [SyntaxKind.ArrowFunction]: ["modifiers", "typeParameters", "parameters", "type", "equalsGreaterThanToken", "body"],
+    [SyntaxKind.FunctionExpression]: ["modifiers", "asteriskToken", "name", "typeParameters", "parameters", "type", "body"],
+    [SyntaxKind.AsExpression]: ["expression", "type"],
+    [SyntaxKind.SatisfiesExpression]: ["expression", "type"],
+    [SyntaxKind.ConditionalExpression]: ["condition", "questionToken", "whenTrue", "colonToken", "whenFalse"],
+    [SyntaxKind.PropertyAccessExpression]: ["expression", "questionDotToken", "name"],
+    [SyntaxKind.ElementAccessExpression]: ["expression", "questionDotToken", "argumentExpression"],
+    [SyntaxKind.CallExpression]: ["expression", "questionDotToken", "typeArguments", "arguments"],
+    [SyntaxKind.NewExpression]: ["expression", "typeArguments", "arguments"],
+    [SyntaxKind.MetaProperty]: ["name"],
+    [SyntaxKind.NonNullExpression]: ["expression"],
+    [SyntaxKind.SpreadElement]: ["expression"],
+    [SyntaxKind.TemplateExpression]: ["head", "templateSpans"],
+    [SyntaxKind.TemplateSpan]: ["expression", "literal"],
+    [SyntaxKind.TaggedTemplateExpression]: ["tag", "questionDotToken", "typeArguments", "template"],
+    [SyntaxKind.ParenthesizedExpression]: ["expression"],
+    [SyntaxKind.ArrayLiteralExpression]: ["elements"],
+    [SyntaxKind.ObjectLiteralExpression]: ["properties"],
+    [SyntaxKind.SpreadAssignment]: ["expression"],
+    [SyntaxKind.PropertyAssignment]: ["modifiers", "name", "postfixToken", "type", "initializer"],
+    [SyntaxKind.ShorthandPropertyAssignment]: ["modifiers", "name", "postfixToken", "type", "equalsToken", "objectAssignmentInitializer"],
+    [SyntaxKind.DeleteExpression]: ["expression"],
+    [SyntaxKind.TypeOfExpression]: ["expression"],
+    [SyntaxKind.VoidExpression]: ["expression"],
+    [SyntaxKind.AwaitExpression]: ["expression"],
+    [SyntaxKind.TypeAssertionExpression]: ["type", "expression"],
+    [SyntaxKind.UnionType]: ["types"],
+    [SyntaxKind.IntersectionType]: ["types"],
+    [SyntaxKind.ConditionalType]: ["checkType", "extendsType", "trueType", "falseType"],
+    [SyntaxKind.TypeOperator]: ["type"],
+    [SyntaxKind.InferType]: ["typeParameter"],
+    [SyntaxKind.ArrayType]: ["elementType"],
+    [SyntaxKind.IndexedAccessType]: ["objectType", "indexType"],
+    [SyntaxKind.TypeReference]: ["typeName", "typeArguments"],
+    [SyntaxKind.ExpressionWithTypeArguments]: ["expression", "typeArguments"],
+    [SyntaxKind.LiteralType]: ["literal"],
+    [SyntaxKind.TypePredicate]: ["assertsModifier", "parameterName", "type"],
+    [SyntaxKind.ImportAttribute]: ["name", "value"],
+    [SyntaxKind.ImportAttributes]: ["attributes"],
+    [SyntaxKind.TypeQuery]: ["exprName", "typeArguments"],
+    [SyntaxKind.MappedType]: ["readonlyToken", "typeParameter", "nameType", "questionToken", "type", "members"],
+    [SyntaxKind.TypeLiteral]: ["members"],
+    [SyntaxKind.TupleType]: ["elements"],
+    [SyntaxKind.NamedTupleMember]: ["dotDotDotToken", "name", "questionToken", "type"],
+    [SyntaxKind.OptionalType]: ["type"],
+    [SyntaxKind.RestType]: ["type"],
+    [SyntaxKind.ParenthesizedType]: ["type"],
+    [SyntaxKind.FunctionType]: ["typeParameters", "parameters", "type"],
+    [SyntaxKind.ConstructorType]: ["modifiers", "typeParameters", "parameters", "type"],
+    [SyntaxKind.TemplateLiteralType]: ["head", "templateSpans"],
+    [SyntaxKind.TemplateLiteralTypeSpan]: ["type", "literal"],
+    [SyntaxKind.SyntheticExpression]: ["tupleNameSource"],
+    [SyntaxKind.PartiallyEmittedExpression]: ["expression"],
+    [SyntaxKind.JsxElement]: ["openingElement", "children", "closingElement"],
+    [SyntaxKind.JsxAttributes]: ["properties"],
+    [SyntaxKind.JsxNamespacedName]: ["namespace", "name"],
+    [SyntaxKind.JsxOpeningElement]: ["tagName", "typeArguments", "attributes"],
+    [SyntaxKind.JsxSelfClosingElement]: ["tagName", "typeArguments", "attributes"],
+    [SyntaxKind.JsxFragment]: ["openingFragment", "children", "closingFragment"],
+    [SyntaxKind.JsxAttribute]: ["name", "initializer"],
+    [SyntaxKind.JsxSpreadAttribute]: ["expression"],
+    [SyntaxKind.JsxClosingElement]: ["tagName"],
+    [SyntaxKind.JsxExpression]: ["dotDotDotToken", "expression"],
+    [SyntaxKind.SyntaxList]: ["children"],
+    [SyntaxKind.JSDoc]: ["comment", "tags"],
+    [SyntaxKind.JSDocTypeExpression]: ["type"],
+    [SyntaxKind.JSDocNonNullableType]: ["type"],
+    [SyntaxKind.JSDocNullableType]: ["type"],
+    [SyntaxKind.JSDocVariadicType]: ["type"],
+    [SyntaxKind.JSDocOptionalType]: ["type"],
+    [SyntaxKind.JSDocTypeTag]: ["tagName", "typeExpression", "comment"],
+    [SyntaxKind.JSDocUnknownTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocTemplateTag]: ["tagName", "constraint", "typeParameters", "comment"],
+    [SyntaxKind.JSDocReturnTag]: ["tagName", "typeExpression", "comment"],
+    [SyntaxKind.JSDocPublicTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocPrivateTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocProtectedTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocReadonlyTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocOverrideTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocDeprecatedTag]: ["tagName", "comment"],
+    [SyntaxKind.JSDocSeeTag]: ["tagName", "nameExpression", "comment"],
+    [SyntaxKind.JSDocImplementsTag]: ["tagName", "className", "comment"],
+    [SyntaxKind.JSDocAugmentsTag]: ["tagName", "className", "comment"],
+    [SyntaxKind.JSDocSatisfiesTag]: ["tagName", "typeExpression", "comment"],
+    [SyntaxKind.JSDocThrowsTag]: ["tagName", "typeExpression", "comment"],
+    [SyntaxKind.JSDocThisTag]: ["tagName", "typeExpression", "comment"],
+    [SyntaxKind.JSDocImportTag]: ["tagName", "importClause", "moduleSpecifier", "attributes", "comment"],
+    [SyntaxKind.JSDocCallbackTag]: ["tagName", "typeExpression", "name", "comment"],
+    [SyntaxKind.JSDocOverloadTag]: ["tagName", "typeExpression", "comment"],
+    [SyntaxKind.JSDocTypedefTag]: ["tagName", "typeExpression", "name", "comment"],
+    [SyntaxKind.JSDocSignature]: ["typeParameters", "parameters", "type"],
+    [SyntaxKind.JSDocNameReference]: ["name"],
+    [SyntaxKind.SourceFile]: ["statements", "endOfFileToken"],
+    [SyntaxKind.ModuleDeclaration]: ["modifiers", "name", "body"],
+    [SyntaxKind.ImportEqualsDeclaration]: ["modifiers", "name", "moduleReference"],
+    [SyntaxKind.ExportDeclaration]: ["modifiers", "exportClause", "moduleSpecifier", "attributes"],
+    [SyntaxKind.ImportType]: ["argument", "attributes", "qualifier", "typeArguments"],
+    [SyntaxKind.ImportClause]: ["name", "namedBindings"],
+    [SyntaxKind.ImportSpecifier]: ["propertyName", "name"],
+    [SyntaxKind.JSDocLink]: ["name"],
+    [SyntaxKind.JSDocLinkPlain]: ["name"],
+    [SyntaxKind.JSDocLinkCode]: ["name"],
+    [SyntaxKind.TypeParameter]: ["modifiers", "name", "constraint", "expression", "defaultType"],
+    [SyntaxKind.SyntheticReferenceExpression]: ["expression", "thisArg"],
+    [SyntaxKind.JSDocTypeLiteral]: ["jsdocPropertyTags"],
+    [SyntaxKind.JSDocParameterTag]: ["tagName", "name", "typeExpression", "comment"],
+    [SyntaxKind.JSDocPropertyTag]: ["tagName", "name", "typeExpression", "comment"],
+};
+export const singleChildNodePropertyNames = {
+    [SyntaxKind.ComputedPropertyName]: "expression",
+    [SyntaxKind.Decorator]: "expression",
+    [SyntaxKind.BreakStatement]: "label",
+    [SyntaxKind.ContinueStatement]: "label",
+    [SyntaxKind.ReturnStatement]: "expression",
+    [SyntaxKind.CaseBlock]: "clauses",
+    [SyntaxKind.ThrowStatement]: "expression",
+    [SyntaxKind.ExpressionStatement]: "expression",
+    [SyntaxKind.Block]: "statements",
+    [SyntaxKind.VariableDeclarationList]: "declarations",
+    [SyntaxKind.ObjectBindingPattern]: "elements",
+    [SyntaxKind.ArrayBindingPattern]: "elements",
+    [SyntaxKind.MissingDeclaration]: "modifiers",
+    [SyntaxKind.HeritageClause]: "types",
+    [SyntaxKind.ModuleBlock]: "statements",
+    [SyntaxKind.ExternalModuleReference]: "expression",
+    [SyntaxKind.NamespaceImport]: "name",
+    [SyntaxKind.NamedImports]: "elements",
+    [SyntaxKind.NamespaceExport]: "name",
+    [SyntaxKind.NamedExports]: "elements",
+    [SyntaxKind.PrefixUnaryExpression]: "operand",
+    [SyntaxKind.PostfixUnaryExpression]: "operand",
+    [SyntaxKind.MetaProperty]: "name",
+    [SyntaxKind.NonNullExpression]: "expression",
+    [SyntaxKind.SpreadElement]: "expression",
+    [SyntaxKind.ParenthesizedExpression]: "expression",
+    [SyntaxKind.ArrayLiteralExpression]: "elements",
+    [SyntaxKind.ObjectLiteralExpression]: "properties",
+    [SyntaxKind.SpreadAssignment]: "expression",
+    [SyntaxKind.DeleteExpression]: "expression",
+    [SyntaxKind.TypeOfExpression]: "expression",
+    [SyntaxKind.VoidExpression]: "expression",
+    [SyntaxKind.AwaitExpression]: "expression",
+    [SyntaxKind.UnionType]: "types",
+    [SyntaxKind.IntersectionType]: "types",
+    [SyntaxKind.TypeOperator]: "type",
+    [SyntaxKind.InferType]: "typeParameter",
+    [SyntaxKind.ArrayType]: "elementType",
+    [SyntaxKind.LiteralType]: "literal",
+    [SyntaxKind.ImportAttributes]: "attributes",
+    [SyntaxKind.TypeLiteral]: "members",
+    [SyntaxKind.TupleType]: "elements",
+    [SyntaxKind.OptionalType]: "type",
+    [SyntaxKind.RestType]: "type",
+    [SyntaxKind.ParenthesizedType]: "type",
+    [SyntaxKind.SyntheticExpression]: "tupleNameSource",
+    [SyntaxKind.PartiallyEmittedExpression]: "expression",
+    [SyntaxKind.JsxAttributes]: "properties",
+    [SyntaxKind.JsxSpreadAttribute]: "expression",
+    [SyntaxKind.JsxClosingElement]: "tagName",
+    [SyntaxKind.SyntaxList]: "children",
+    [SyntaxKind.JSDocTypeExpression]: "type",
+    [SyntaxKind.JSDocNonNullableType]: "type",
+    [SyntaxKind.JSDocNullableType]: "type",
+    [SyntaxKind.JSDocVariadicType]: "type",
+    [SyntaxKind.JSDocOptionalType]: "type",
+    [SyntaxKind.JSDocNameReference]: "name",
+    [SyntaxKind.JSDocLink]: "name",
+    [SyntaxKind.JSDocLinkPlain]: "name",
+    [SyntaxKind.JSDocLinkCode]: "name",
+    [SyntaxKind.JSDocTypeLiteral]: "jsdocPropertyTags",
+};
+//# sourceMappingURL=protocol.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.generated.js.map b/node_modules/typescript/dist/api/node/protocol.generated.js.map
new file mode 100644
index 000000000..811c073a8
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"protocol.generated.js","sourceRoot":"","sources":["../../../src/api/node/protocol.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAA2E;IACnG,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7C,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC,YAAY,CAAC;IACjD,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC,YAAY,CAAC;IACtC,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;IAC1E,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;IACrD,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;IACxD,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC;IACnF,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,CAAC;IACxF,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,CAAC;IACxF,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC;IACtC,CAA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AAkB,CAAC,EAAE,MAAM;IACvC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM;IAC9B,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM;IACnC,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,MAAM;IAClC,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;CACrD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.js b/node_modules/typescript/dist/api/node/protocol.js
new file mode 100644
index 000000000..6cc2352a7
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.js
@@ -0,0 +1,30 @@
+export const PROTOCOL_VERSION = 5;
+export const HEADER_OFFSET_METADATA = 0;
+export const HEADER_OFFSET_HASH_LO0 = 4;
+export const HEADER_OFFSET_HASH_LO1 = 8;
+export const HEADER_OFFSET_HASH_HI0 = 12;
+export const HEADER_OFFSET_HASH_HI1 = 16;
+export const HEADER_OFFSET_PARSE_OPTIONS = 20;
+export const HEADER_OFFSET_STRING_TABLE_OFFSETS = 24;
+export const HEADER_OFFSET_STRING_TABLE = 28;
+export const HEADER_OFFSET_EXTENDED_DATA = 32;
+export const HEADER_OFFSET_STRUCTURED_DATA = 36;
+export const HEADER_OFFSET_NODES = 40;
+export const HEADER_SIZE = 44;
+export const NODE_LEN = 28;
+export const NODE_OFFSET_KIND = 0;
+export const NODE_OFFSET_POS = 4;
+export const NODE_OFFSET_END = 8;
+export const NODE_OFFSET_NEXT = 12;
+export const NODE_OFFSET_PARENT = 16;
+export const NODE_OFFSET_DATA = 20;
+export const NODE_OFFSET_FLAGS = 24;
+export const KIND_NODE_LIST = 0xFFFFFFFF;
+export const NODE_DATA_TYPE_CHILDREN = 0x00000000;
+export const NODE_DATA_TYPE_STRING = 0x40000000;
+export const NODE_DATA_TYPE_EXTENDED = 0x80000000;
+export const NODE_STRING_INDEX_MASK = 0x00FFFFFF;
+export const NODE_EXTENDED_DATA_MASK = 0x00FFFFFF;
+// Re-export generated child properties
+export { childProperties, singleChildNodePropertyNames } from "./protocol.generated.js";
+//# sourceMappingURL=protocol.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/protocol.js.map b/node_modules/typescript/dist/api/node/protocol.js.map
new file mode 100644
index 000000000..7905c71f7
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/protocol.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/api/node/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAC;AACrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAE3B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAChD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;AACjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAElD,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/wtf8.d.ts b/node_modules/typescript/dist/api/node/wtf8.d.ts
new file mode 100644
index 000000000..71f18458d
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/wtf8.d.ts
@@ -0,0 +1,6 @@
+type DecodeOptions = Parameters[1];
+export declare class Wtf8Decoder extends TextDecoder {
+    decode(input?: NodeJS.AllowSharedBufferSource, options?: DecodeOptions): string;
+}
+export {};
+//# sourceMappingURL=wtf8.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/wtf8.d.ts.map b/node_modules/typescript/dist/api/node/wtf8.d.ts.map
new file mode 100644
index 000000000..bacab6de2
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/wtf8.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"wtf8.d.ts","sourceRoot":"","sources":["../../../src/api/node/wtf8.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AA6B1D,qBAAa,WAAY,SAAQ,WAAW;IAC/B,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;CAkC3F"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/wtf8.js b/node_modules/typescript/dist/api/node/wtf8.js
new file mode 100644
index 000000000..ae98df97d
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/wtf8.js
@@ -0,0 +1,61 @@
+import { Buffer } from "node:buffer";
+const surrogateLeadByte = 0xED;
+const surrogateSecondByteMin = 0xA0;
+const surrogateSecondByteMax = 0xBF;
+const continuationByteMin = 0x80;
+const continuationByteMax = 0xBF;
+function isWtf8Surrogate(bytes, index) {
+    return index + 2 < bytes.length
+        && bytes[index] === surrogateLeadByte
+        && bytes[index + 1] >= surrogateSecondByteMin
+        && bytes[index + 1] <= surrogateSecondByteMax
+        && bytes[index + 2] >= continuationByteMin
+        && bytes[index + 2] <= continuationByteMax;
+}
+function getSurrogateCodeUnit(bytes, index) {
+    return 0xD000 | ((bytes[index + 1] & 0x3F) << 6) | (bytes[index + 2] & 0x3F);
+}
+function hasSurrogateLeadByte(bytes) {
+    return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).indexOf(surrogateLeadByte) >= 0;
+}
+function toUint8Array(input) {
+    if (input instanceof Uint8Array) {
+        return input;
+    }
+    if (ArrayBuffer.isView(input)) {
+        return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
+    }
+    return new Uint8Array(input);
+}
+export class Wtf8Decoder extends TextDecoder {
+    decode(input, options) {
+        if (input === undefined) {
+            return super.decode(input, options);
+        }
+        const bytes = toUint8Array(input);
+        if (!hasSurrogateLeadByte(bytes)) {
+            return super.decode(bytes, options);
+        }
+        const parts = [];
+        let segmentStart = 0;
+        for (let i = 0; i < bytes.length; i++) {
+            if (!isWtf8Surrogate(bytes, i)) {
+                continue;
+            }
+            if (segmentStart < i) {
+                parts.push(super.decode(bytes.subarray(segmentStart, i), options));
+            }
+            parts.push(String.fromCharCode(getSurrogateCodeUnit(bytes, i)));
+            i += 2;
+            segmentStart = i + 1;
+        }
+        if (segmentStart === 0) {
+            return super.decode(bytes, options);
+        }
+        if (segmentStart < bytes.length) {
+            parts.push(super.decode(bytes.subarray(segmentStart), options));
+        }
+        return parts.join("");
+    }
+}
+//# sourceMappingURL=wtf8.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/node/wtf8.js.map b/node_modules/typescript/dist/api/node/wtf8.js.map
new file mode 100644
index 000000000..2cffd1ec1
--- /dev/null
+++ b/node_modules/typescript/dist/api/node/wtf8.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"wtf8.js","sourceRoot":"","sources":["../../../src/api/node/wtf8.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAGjC,SAAS,eAAe,CAAC,KAAiB,EAAE,KAAa;IACrD,OAAO,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM;WACxB,KAAK,CAAC,KAAK,CAAC,KAAK,iBAAiB;WAClC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,sBAAsB;WAC1C,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,sBAAsB;WAC1C,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,mBAAmB;WACvC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,mBAAmB,CAAC;AACnD,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAiB,EAAE,KAAa;IAC1D,OAAO,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG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AAE,CAAC,CAAC,EAAE,CAAC;gBAC7B,SAAS;YACb,CAAC;YAED,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;gBACnB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;YACvE,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAChE,CAAC,IAAI,CAAC,CAAC;YACP,YAAY,GAAG,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QAED,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/options.d.ts b/node_modules/typescript/dist/api/options.d.ts
new file mode 100644
index 000000000..1b565b887
--- /dev/null
+++ b/node_modules/typescript/dist/api/options.d.ts
@@ -0,0 +1,32 @@
+/**
+ * Shared utilities for the TypeScript API client.
+ */
+import type { FileSystem } from "./fs.ts";
+export interface ClientSocketOptions {
+    /** Path to the Unix domain socket or Windows named pipe for API communication */
+    pipe: string;
+}
+export interface ClientSpawnOptions {
+    /** Path to the tsgo executable. Defaults to the bundled tsgo binary. */
+    tsserverPath?: string;
+    /** Current working directory */
+    cwd?: string;
+    /** Virtual filesystem callbacks */
+    fs?: FileSystem;
+    /**
+     * When true, collect timing information for each request. The client
+     * measures round-trip latency and bytes sent/received, and the server
+     * measures its own per-request processing time; both are combined (along
+     * with an estimated transport overhead) in the snapshot returned by
+     * {@link API.getTimingInfo}.
+     */
+    collectTiming?: boolean;
+}
+export type ClientOptions = ClientSocketOptions | ClientSpawnOptions;
+export declare function isSpawnOptions(options: ClientOptions): options is ClientSpawnOptions;
+export declare function resolveExePath(options: ClientSpawnOptions): string;
+export interface LSPConnectionOptions extends ClientSocketOptions {
+}
+export interface APIOptions extends ClientSpawnOptions {
+}
+//# sourceMappingURL=options.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/options.d.ts.map b/node_modules/typescript/dist/api/options.d.ts.map
new file mode 100644
index 000000000..c2036ef9f
--- /dev/null
+++ b/node_modules/typescript/dist/api/options.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/api/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAChC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IAC/B,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAErE,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,IAAI,kBAAkB,CAEpF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAElE;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;CAChE;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;CACrD"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/options.js b/node_modules/typescript/dist/api/options.js
new file mode 100644
index 000000000..f71e78b0c
--- /dev/null
+++ b/node_modules/typescript/dist/api/options.js
@@ -0,0 +1,11 @@
+/**
+ * Shared utilities for the TypeScript API client.
+ */
+import getExePath from "#getExePath";
+export function isSpawnOptions(options) {
+    return !("pipe" in options);
+}
+export function resolveExePath(options) {
+    return options.tsserverPath ?? getExePath();
+}
+//# sourceMappingURL=options.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/options.js.map b/node_modules/typescript/dist/api/options.js.map
new file mode 100644
index 000000000..f815c27cf
--- /dev/null
+++ b/node_modules/typescript/dist/api/options.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/api/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,UAAU,MAAM,aAAa,CAAC;AA2BrC,MAAM,UAAU,cAAc,CAAC,OAAsB;IACjD,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAA2B;IACtD,OAAO,OAAO,CAAC,YAAY,IAAI,UAAU,EAAE,CAAC;AAChD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/path.d.ts b/node_modules/typescript/dist/api/path.d.ts
new file mode 100644
index 000000000..c3e738e98
--- /dev/null
+++ b/node_modules/typescript/dist/api/path.d.ts
@@ -0,0 +1,110 @@
+/**
+ * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
+ *
+ * For example:
+ * ```ts
+ * getRootLength("a") === 0                   // ""
+ * getRootLength("/") === 1                   // "/"
+ * getRootLength("c:") === 2                  // "c:"
+ * getRootLength("c:d") === 0                 // ""
+ * getRootLength("c:/") === 3                 // "c:/"
+ * getRootLength("c:\\") === 3                // "c:\\"
+ * getRootLength("//server") === 7            // "//server"
+ * getRootLength("//server/share") === 8      // "//server/"
+ * getRootLength("\\\\server") === 7          // "\\\\server"
+ * getRootLength("\\\\server\\share") === 8   // "\\\\server\\"
+ * getRootLength("file:///path") === 8        // "file:///"
+ * getRootLength("file:///c:") === 10         // "file:///c:"
+ * getRootLength("file:///c:d") === 8         // "file:///"
+ * getRootLength("file:///c:/path") === 11    // "file:///c:/"
+ * getRootLength("file://server") === 13      // "file://server"
+ * getRootLength("file://server/path") === 14 // "file://server/"
+ * getRootLength("http://server") === 13      // "http://server"
+ * getRootLength("http://server/path") === 14 // "http://server/"
+ * ```
+ *
+ * @internal
+ */
+export declare function getRootLength(path: string): number;
+export declare function getPathComponents(path: string): string[];
+/**
+ * Determines whether a path has a trailing separator (`/` or `\\`).
+ */
+export declare function hasTrailingDirectorySeparator(path: string): boolean;
+/**
+ * Removes a trailing directory separator from a path, if it does not already have one.
+ */
+export declare function removeTrailingDirectorySeparator(path: string): string;
+/**
+ * Adds a trailing directory separator to a path, if it does not already have one.
+ */
+export declare function ensureTrailingDirectorySeparator(path: string): string;
+/**
+ * Normalize path separators, converting `\\` into `/`.
+ */
+export declare function normalizeSlashes(path: string): string;
+/**
+ * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified.
+ */
+export declare function combinePaths(path: string, ...paths: (string | undefined)[]): string;
+/**
+ * Returns the normalized absolute path, resolving `.` and `..` segments.
+ */
+export declare function getNormalizedAbsolutePath(path: string, currentDirectory: string | undefined): string;
+/**
+ * Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes.
+ */
+export declare function normalizePath(path: string): string;
+/**
+ * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path
+ * like `c:`, `c:\\` or `c:/`).
+ */
+export declare function isRootedDiskPath(path: string): boolean;
+/**
+ * Converts a file name to a normalized path.
+ *
+ * @param fileName The file name to convert
+ * @param basePath The base path to use for relative file names
+ * @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems)
+ * @returns The normalized path
+ */
+export declare function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): string;
+/**
+ * Creates a getCanonicalFileName function based on case sensitivity.
+ */
+export declare function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): (fileName: string) => string;
+/**
+ * Returns true if the path refers to a bundled library file.
+ */
+export declare function isBundled(path: string): boolean;
+/**
+ * Returns true if the file name represents a dynamic/virtual file
+ * that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/...").
+ */
+export declare function isDynamicFileName(fileName: string): boolean;
+/**
+ * Splits a Windows volume (e.g., "c:") from the rest of the path.
+ * Returns [volume, rest, ok] where ok is true if a volume was found.
+ */
+export declare function splitVolumePath(path: string): [volume: string, rest: string, ok: boolean];
+/**
+ * Converts a file name to a document URI.
+ *
+ * @example
+ * fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts"
+ * fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts"
+ * fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1"
+ * fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts"
+ */
+export declare function fileNameToDocumentURI(fileName: string): string;
+/**
+ * Converts a document URI to a file name.
+ *
+ * @example
+ * documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts"
+ * documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts"
+ * documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1"
+ * documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts"
+ */
+export declare function documentURIToFileName(uri: string): string;
+//# sourceMappingURL=path.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/path.d.ts.map b/node_modules/typescript/dist/api/path.d.ts.map
new file mode 100644
index 000000000..8a074dff4
--- /dev/null
+++ b/node_modules/typescript/dist/api/path.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/api/path.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGlD;AAgED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD;AAaD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAanF;AAqBD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CA4FpG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAK7H;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,yBAAyB,EAAE,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAE3G;AAYD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,CAKzF;AAkCD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA8C9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAuDzD"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/path.js b/node_modules/typescript/dist/api/path.js
new file mode 100644
index 000000000..e290d8c0c
--- /dev/null
+++ b/node_modules/typescript/dist/api/path.js
@@ -0,0 +1,508 @@
+const CharacterCodesSlash = "/".charCodeAt(0);
+const CharacterCodesBackslash = "\\".charCodeAt(0);
+const CharacterCodesColon = ":".charCodeAt(0);
+const CharacterCodesPercent = "%".charCodeAt(0);
+const CharacterCodes3 = "3".charCodeAt(0);
+const CharacterCodesa = "a".charCodeAt(0);
+const CharacterCodesz = "z".charCodeAt(0);
+const CharacterCodesA = "A".charCodeAt(0);
+const CharacterCodesZ = "Z".charCodeAt(0);
+const CharacterCodesDot = ".".charCodeAt(0);
+const directorySeparator = "/";
+const altDirectorySeparator = "\\";
+const urlSchemeSeparator = "://";
+const backslashRegExp = /\\/g;
+// check path for these segments: '', '.'. '..'
+const relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/;
+/**
+ * Determines whether a charCode corresponds to `/` or `\\`.
+ */
+function isAnyDirectorySeparator(charCode) {
+    return charCode === CharacterCodesSlash || charCode === CharacterCodesBackslash;
+}
+function isVolumeCharacter(charCode) {
+    return (charCode >= CharacterCodesa && charCode <= CharacterCodesz) ||
+        (charCode >= CharacterCodesA && charCode <= CharacterCodesZ);
+}
+function getFileUrlVolumeSeparatorEnd(url, start) {
+    const ch0 = url.charCodeAt(start);
+    if (ch0 === CharacterCodesColon)
+        return start + 1;
+    if (ch0 === CharacterCodesPercent && url.charCodeAt(start + 1) === CharacterCodes3) {
+        const ch2 = url.charCodeAt(start + 2);
+        if (ch2 === CharacterCodesa || ch2 === CharacterCodesA)
+            return start + 3;
+    }
+    return -1;
+}
+/**
+ * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
+ *
+ * For example:
+ * ```ts
+ * getRootLength("a") === 0                   // ""
+ * getRootLength("/") === 1                   // "/"
+ * getRootLength("c:") === 2                  // "c:"
+ * getRootLength("c:d") === 0                 // ""
+ * getRootLength("c:/") === 3                 // "c:/"
+ * getRootLength("c:\\") === 3                // "c:\\"
+ * getRootLength("//server") === 7            // "//server"
+ * getRootLength("//server/share") === 8      // "//server/"
+ * getRootLength("\\\\server") === 7          // "\\\\server"
+ * getRootLength("\\\\server\\share") === 8   // "\\\\server\\"
+ * getRootLength("file:///path") === 8        // "file:///"
+ * getRootLength("file:///c:") === 10         // "file:///c:"
+ * getRootLength("file:///c:d") === 8         // "file:///"
+ * getRootLength("file:///c:/path") === 11    // "file:///c:/"
+ * getRootLength("file://server") === 13      // "file://server"
+ * getRootLength("file://server/path") === 14 // "file://server/"
+ * getRootLength("http://server") === 13      // "http://server"
+ * getRootLength("http://server/path") === 14 // "http://server/"
+ * ```
+ *
+ * @internal
+ */
+export function getRootLength(path) {
+    const rootLength = getEncodedRootLength(path);
+    return rootLength < 0 ? ~rootLength : rootLength;
+}
+/**
+ * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
+ * If the root is part of a URL, the twos-complement of the root length is returned.
+ */
+function getEncodedRootLength(path) {
+    if (!path)
+        return 0;
+    const ch0 = path.charCodeAt(0);
+    // POSIX or UNC
+    if (ch0 === CharacterCodesSlash || ch0 === CharacterCodesBackslash) {
+        if (path.charCodeAt(1) !== ch0)
+            return 1; // POSIX: "/" (or non-normalized "\")
+        const p1 = path.indexOf(ch0 === CharacterCodesSlash ? directorySeparator : altDirectorySeparator, 2);
+        if (p1 < 0)
+            return path.length; // UNC: "//server" or "\\server"
+        return p1 + 1; // UNC: "//server/" or "\\server\"
+    }
+    // DOS
+    if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodesColon) {
+        const ch2 = path.charCodeAt(2);
+        if (ch2 === CharacterCodesSlash || ch2 === CharacterCodesBackslash)
+            return 3; // DOS: "c:/" or "c:\"
+        if (path.length === 2)
+            return 2; // DOS: "c:" (but not "c:d")
+    }
+    // URL
+    const schemeEnd = path.indexOf(urlSchemeSeparator);
+    if (schemeEnd !== -1) {
+        const authorityStart = schemeEnd + urlSchemeSeparator.length;
+        const authorityEnd = path.indexOf(directorySeparator, authorityStart);
+        if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path"
+            // For local "file" URLs, include the leading DOS volume (if present).
+            // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
+            // special case interpreted as "the machine from which the URL is being interpreted".
+            const scheme = path.slice(0, schemeEnd);
+            const authority = path.slice(authorityStart, authorityEnd);
+            if (scheme === "file" && (authority === "" || authority === "localhost") &&
+                isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
+                const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
+                if (volumeSeparatorEnd !== -1) {
+                    if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodesSlash) {
+                        // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
+                        return ~(volumeSeparatorEnd + 1);
+                    }
+                    if (volumeSeparatorEnd === path.length) {
+                        // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
+                        // but not "file:///c:d" or "file:///c%3ad"
+                        return ~volumeSeparatorEnd;
+                    }
+                }
+            }
+            return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
+        }
+        return ~path.length; // URL: "file://server", "http://server"
+    }
+    // relative
+    return 0;
+}
+export function getPathComponents(path) {
+    return pathComponents(path, getRootLength(path));
+}
+function pathComponents(path, rootLength) {
+    const root = path.substring(0, rootLength);
+    const rest = path.substring(rootLength).split("/");
+    if (rest.length && !lastOrUndefined(rest))
+        rest.pop();
+    return [root, ...rest];
+}
+function lastOrUndefined(array) {
+    return array.length ? array[array.length - 1] : undefined;
+}
+/**
+ * Determines whether a path has a trailing separator (`/` or `\\`).
+ */
+export function hasTrailingDirectorySeparator(path) {
+    return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1));
+}
+/**
+ * Removes a trailing directory separator from a path, if it does not already have one.
+ */
+export function removeTrailingDirectorySeparator(path) {
+    if (hasTrailingDirectorySeparator(path)) {
+        return path.substr(0, path.length - 1);
+    }
+    return path;
+}
+/**
+ * Adds a trailing directory separator to a path, if it does not already have one.
+ */
+export function ensureTrailingDirectorySeparator(path) {
+    if (!hasTrailingDirectorySeparator(path)) {
+        return path + directorySeparator;
+    }
+    return path;
+}
+/**
+ * Normalize path separators, converting `\\` into `/`.
+ */
+export function normalizeSlashes(path) {
+    return path.includes("\\")
+        ? path.replace(backslashRegExp, directorySeparator)
+        : path;
+}
+/**
+ * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified.
+ */
+export function combinePaths(path, ...paths) {
+    if (path)
+        path = normalizeSlashes(path);
+    for (let relativePath of paths) {
+        if (!relativePath)
+            continue;
+        relativePath = normalizeSlashes(relativePath);
+        if (!path || getRootLength(relativePath) !== 0) {
+            path = relativePath;
+        }
+        else {
+            path = ensureTrailingDirectorySeparator(path) + relativePath;
+        }
+    }
+    return path;
+}
+function simpleNormalizePath(path) {
+    // Most paths don't require normalization
+    if (!relativePathSegmentRegExp.test(path)) {
+        return path;
+    }
+    // Some paths only require cleanup of `/./` or leading `./`
+    let simplified = path.replace(/\/\.\//g, "/");
+    if (simplified.startsWith("./")) {
+        simplified = simplified.slice(2);
+    }
+    if (simplified !== path) {
+        path = simplified;
+        if (!relativePathSegmentRegExp.test(path)) {
+            return path;
+        }
+    }
+    return undefined;
+}
+/**
+ * Returns the normalized absolute path, resolving `.` and `..` segments.
+ */
+export function getNormalizedAbsolutePath(path, currentDirectory) {
+    let rootLength = getRootLength(path);
+    if (rootLength === 0 && currentDirectory) {
+        path = combinePaths(currentDirectory, path);
+        rootLength = getRootLength(path);
+    }
+    else {
+        // combinePaths normalizes slashes, so not necessary in the other branch
+        path = normalizeSlashes(path);
+    }
+    const simpleNormalized = simpleNormalizePath(path);
+    if (simpleNormalized !== undefined) {
+        return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
+    }
+    const length = path.length;
+    const root = path.substring(0, rootLength);
+    // `normalized` is only initialized once `path` is determined to be non-normalized
+    let normalized;
+    let index = rootLength;
+    let segmentStart = index;
+    let normalizedUpTo = index;
+    let seenNonDotDotSegment = rootLength !== 0;
+    while (index < length) {
+        // At beginning of segment
+        segmentStart = index;
+        let ch = path.charCodeAt(index);
+        while (ch === CharacterCodesSlash && index + 1 < length) {
+            index++;
+            ch = path.charCodeAt(index);
+        }
+        if (index > segmentStart) {
+            // Seen superfluous separator
+            normalized ??= path.substring(0, segmentStart - 1);
+            segmentStart = index;
+        }
+        // Past any superfluous separators
+        let segmentEnd = path.indexOf(directorySeparator, index + 1);
+        if (segmentEnd === -1) {
+            segmentEnd = length;
+        }
+        const segmentLength = segmentEnd - segmentStart;
+        if (segmentLength === 1 && path.charCodeAt(index) === CharacterCodesDot) {
+            // "." segment (skip)
+            normalized ??= path.substring(0, normalizedUpTo);
+        }
+        else if (segmentLength === 2 && path.charCodeAt(index) === CharacterCodesDot && path.charCodeAt(index + 1) === CharacterCodesDot) {
+            // ".." segment
+            if (!seenNonDotDotSegment) {
+                if (normalized !== undefined) {
+                    normalized += normalized.length === rootLength ? ".." : "/..";
+                }
+                else {
+                    normalizedUpTo = index + 2;
+                }
+            }
+            else if (normalized === undefined) {
+                if (normalizedUpTo - 2 >= 0) {
+                    normalized = path.substring(0, Math.max(rootLength, path.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
+                }
+                else {
+                    normalized = path.substring(0, normalizedUpTo);
+                }
+            }
+            else {
+                const lastSlash = normalized.lastIndexOf(directorySeparator);
+                if (lastSlash !== -1) {
+                    normalized = normalized.substring(0, Math.max(rootLength, lastSlash));
+                }
+                else {
+                    normalized = root;
+                }
+                if (normalized.length === rootLength) {
+                    seenNonDotDotSegment = rootLength !== 0;
+                }
+            }
+        }
+        else if (normalized !== undefined) {
+            if (normalized.length !== rootLength) {
+                normalized += directorySeparator;
+            }
+            seenNonDotDotSegment = true;
+            normalized += path.substring(segmentStart, segmentEnd);
+        }
+        else {
+            seenNonDotDotSegment = true;
+            normalizedUpTo = segmentEnd;
+        }
+        index = segmentEnd + 1;
+    }
+    return normalized ?? (length > rootLength ? removeTrailingDirectorySeparator(path) : path);
+}
+/**
+ * Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes.
+ */
+export function normalizePath(path) {
+    path = normalizeSlashes(path);
+    let normalized = simpleNormalizePath(path);
+    if (normalized !== undefined) {
+        return normalized;
+    }
+    normalized = getNormalizedAbsolutePath(path, "");
+    return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized;
+}
+/**
+ * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path
+ * like `c:`, `c:\\` or `c:/`).
+ */
+export function isRootedDiskPath(path) {
+    return getEncodedRootLength(path) > 0;
+}
+/**
+ * Converts a file name to a normalized path.
+ *
+ * @param fileName The file name to convert
+ * @param basePath The base path to use for relative file names
+ * @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems)
+ * @returns The normalized path
+ */
+export function toPath(fileName, basePath, getCanonicalFileName) {
+    const nonCanonicalizedPath = isRootedDiskPath(fileName)
+        ? normalizePath(fileName)
+        : getNormalizedAbsolutePath(fileName, basePath);
+    return getCanonicalFileName(nonCanonicalizedPath);
+}
+/**
+ * Creates a getCanonicalFileName function based on case sensitivity.
+ */
+export function createGetCanonicalFileName(useCaseSensitiveFileNames) {
+    return useCaseSensitiveFileNames ? identity : toLowerCase;
+}
+function identity(x) {
+    return x;
+}
+function toLowerCase(s) {
+    return s.toLowerCase();
+}
+const bundledScheme = "bundled:///";
+/**
+ * Returns true if the path refers to a bundled library file.
+ */
+export function isBundled(path) {
+    return path.startsWith(bundledScheme);
+}
+/**
+ * Returns true if the file name represents a dynamic/virtual file
+ * that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/...").
+ */
+export function isDynamicFileName(fileName) {
+    return fileName.startsWith("^/");
+}
+/**
+ * Splits a Windows volume (e.g., "c:") from the rest of the path.
+ * Returns [volume, rest, ok] where ok is true if a volume was found.
+ */
+export function splitVolumePath(path) {
+    if (path.length >= 2 && isVolumeCharacter(path.charCodeAt(0)) && path.charCodeAt(1) === CharacterCodesColon) {
+        return [path.substring(0, 2).toLowerCase(), path.substring(2), true];
+    }
+    return ["", path, false];
+}
+// Characters that need extra escaping in URI path segments
+// https://github.com/microsoft/vscode-uri/blob/edfdccd976efaf4bb8fdeca87e97c47257721729/src/uri.ts#L455
+const extraEscapeChars = {
+    ":": "%3A",
+    "/": "%2F",
+    "?": "%3F",
+    "#": "%23",
+    "[": "%5B",
+    "]": "%5D",
+    "@": "%40",
+    "!": "%21",
+    "$": "%24",
+    "&": "%26",
+    "'": "%27",
+    "(": "%28",
+    ")": "%29",
+    "*": "%2A",
+    "+": "%2B",
+    ",": "%2C",
+    ";": "%3B",
+    "=": "%3D",
+    " ": "%20",
+};
+function extraEscape(s) {
+    let result = s;
+    for (const [char, escape] of Object.entries(extraEscapeChars)) {
+        result = result.replaceAll(char, escape);
+    }
+    return result;
+}
+/**
+ * Converts a file name to a document URI.
+ *
+ * @example
+ * fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts"
+ * fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts"
+ * fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1"
+ * fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts"
+ */
+export function fileNameToDocumentURI(fileName) {
+    // Bundled files are returned as-is
+    if (isBundled(fileName)) {
+        return fileName;
+    }
+    // Dynamic/virtual files (untitled, vscode-vfs, etc.) need special handling
+    if (isDynamicFileName(fileName)) {
+        // Format: ^/scheme/authority/path
+        const withoutPrefix = fileName.substring(2); // Remove "^/"
+        const firstSlash = withoutPrefix.indexOf("/");
+        if (firstSlash === -1) {
+            throw new Error("invalid file name: " + fileName);
+        }
+        const scheme = withoutPrefix.substring(0, firstSlash);
+        const rest = withoutPrefix.substring(firstSlash + 1);
+        const secondSlash = rest.indexOf("/");
+        if (secondSlash === -1) {
+            throw new Error("invalid file name: " + fileName);
+        }
+        const authority = rest.substring(0, secondSlash);
+        const path = rest.substring(secondSlash + 1);
+        // ts-nul-authority is a placeholder for URIs without an authority
+        if (authority === "ts-nul-authority") {
+            return scheme + ":" + path;
+        }
+        return scheme + "://" + authority + "/" + path;
+    }
+    // Regular file path - convert to file:// URI
+    let [volume, rest] = splitVolumePath(fileName);
+    if (volume !== "") {
+        volume = "/" + extraEscape(volume);
+    }
+    // Remove leading // for UNC paths (already handled by file://)
+    if (rest.startsWith("//")) {
+        rest = rest.substring(2);
+    }
+    const parts = rest.split("/");
+    const encodedParts = parts.map(part => extraEscape(encodeURIComponent(part)));
+    return "file://" + volume + encodedParts.join("/");
+}
+/**
+ * Converts a document URI to a file name.
+ *
+ * @example
+ * documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts"
+ * documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts"
+ * documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1"
+ * documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts"
+ */
+export function documentURIToFileName(uri) {
+    // Bundled files are returned as-is
+    if (isBundled(uri)) {
+        return uri;
+    }
+    // Handle file:// URIs
+    if (uri.startsWith("file://")) {
+        let parsed;
+        try {
+            parsed = new URL(uri);
+        }
+        catch {
+            throw new Error("invalid file URI: " + uri);
+        }
+        // UNC path: file://server/share/...
+        if (parsed.host !== "") {
+            return "//" + parsed.host + parsed.pathname;
+        }
+        // Local file - fix Windows path by removing leading slash before volume
+        const path = decodeURIComponent(parsed.pathname);
+        if (path.length >= 3 && path.charCodeAt(0) === CharacterCodesSlash) {
+            const [volume, rest, ok] = splitVolumePath(path.substring(1));
+            if (ok) {
+                return volume + rest;
+            }
+        }
+        return path;
+    }
+    // Leave all other URIs escaped so we can round-trip them.
+    // Convert to dynamic file name format: ^/scheme/authority/path
+    const colonIndex = uri.indexOf(":");
+    if (colonIndex === -1) {
+        throw new Error("invalid URI: " + uri);
+    }
+    const scheme = uri.substring(0, colonIndex);
+    let path = uri.substring(colonIndex + 1);
+    let authority = "ts-nul-authority";
+    if (path.startsWith("//")) {
+        const rest = path.substring(2);
+        const slashIndex = rest.indexOf("/");
+        if (slashIndex === -1) {
+            throw new Error("invalid URI: " + uri);
+        }
+        authority = rest.substring(0, slashIndex);
+        path = rest.substring(slashIndex + 1);
+    }
+    return "^/" + scheme + "/" + authority + "/" + path;
+}
+//# sourceMappingURL=path.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/path.js.map b/node_modules/typescript/dist/api/path.js.map
new file mode 100644
index 000000000..13b3e8320
--- /dev/null
+++ b/node_modules/typescript/dist/api/path.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/api/path.ts"],"names":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,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/proto.d.ts b/node_modules/typescript/dist/api/proto.d.ts
new file mode 100644
index 000000000..4799f1e6b
--- /dev/null
+++ b/node_modules/typescript/dist/api/proto.d.ts
@@ -0,0 +1,239 @@
+import type { CompletionItemKind } from "#enums/completionItemKind";
+import type { ModuleKind } from "#enums/moduleKind";
+import type { __String, Path } from "../ast/index.ts";
+import type { CompilerOptions } from "./compilerOptions.ts";
+export type { CompilerOptions } from "./compilerOptions.ts";
+/**
+ * A document identifier that can be either a file name (path string) or a document URI object.
+ *
+ * @example
+ * // Using a file name
+ * project.program.getSourceFile("/path/to/file.ts");
+ *
+ * // Using a URI
+ * project.program.getSourceFile({ uri: "file:///path/to/file.ts" });
+ */
+export type DocumentIdentifier = string | {
+    uri: string;
+};
+/**
+ * A position within a document, combining a document identifier with an offset.
+ */
+export interface DocumentPosition {
+    /** The document containing the position */
+    document: DocumentIdentifier;
+    /** The character offset within the document */
+    position: number;
+}
+/**
+ * Resolves a DocumentIdentifier to a file name.
+ * If the identifier contains a URI, it is converted to a file name.
+ */
+export declare function resolveFileName(identifier: DocumentIdentifier): string;
+/**
+ * Resolves a DocumentIdentifier to a document URI.
+ * If the identifier contains a file name, it is converted to a URI.
+ */
+export declare function resolveDocumentURI(identifier: DocumentIdentifier): string;
+/**
+ * Response from the initialize method.
+ */
+export interface InitializeResponse {
+    /** Whether the host file system is case-sensitive */
+    useCaseSensitiveFileNames: boolean;
+    /** The server's current working directory */
+    currentDirectory: string;
+}
+export interface ConfigResponse {
+    options: Record;
+    fileNames: string[];
+}
+export interface LSPUpdateSnapshotParams {
+    /**
+     * @deprecated Use {@link openProjects} instead.
+     * Path to a tsconfig.json file to open in the new snapshot.
+     */
+    openProject?: string;
+    /**
+     * tsconfig.json files to open/load in the new snapshot. Opens are ref-counted
+     * and persist across snapshots until closed via {@link closeProjects}.
+     */
+    openProjects?: DocumentIdentifier[];
+    /**
+     * tsconfig.json files to release in the new snapshot. A project is only unloaded
+     * once every API client that opened it closes it.
+     */
+    closeProjects?: DocumentIdentifier[];
+    /**
+     * Files to keep open for the API client, mirroring LSP's `textDocument/didOpen`.
+     * For each file, ancestor directories are searched for a tsconfig that contains it;
+     * if one is found, that configured project is loaded and becomes the file's default
+     * project. Otherwise the file is loaded into the inferred project (e.g. a d.ts in
+     * node_modules that is not part of any project's import graph). Opens persist across
+     * subsequent snapshots until the file is closed via {@link closeFiles}.
+     * After calling updateSnapshot with openFiles, getDefaultProjectForFile returns the
+     * resolved configured or inferred project.
+     */
+    openFiles?: DocumentIdentifier[];
+    /**
+     * Files to release in the new snapshot. A file is only fully closed once every
+     * API client that opened it closes it.
+     */
+    closeFiles?: DocumentIdentifier[];
+}
+export interface FileChangeSummary {
+    changed?: DocumentIdentifier[];
+    created?: DocumentIdentifier[];
+    deleted?: DocumentIdentifier[];
+}
+export type FileChanges = FileChangeSummary | {
+    invalidateAll: true;
+};
+/**
+ * Parameters for updateSnapshot.
+ */
+export interface UpdateSnapshotParams extends LSPUpdateSnapshotParams {
+    fileChanges?: FileChanges;
+}
+/**
+ * Builds the wire request for updateSnapshot, applying the deprecated `openProject`
+ * compatibility shim: a single `openProject` is folded into `openProjects` and is
+ * never sent on the wire.
+ */
+export declare function toUpdateSnapshotRequest(params?: UpdateSnapshotParams): UpdateSnapshotParams;
+/**
+ * Changes to source files within a single project.
+ */
+export interface ProjectFileChanges {
+    /** Source file paths whose content changed */
+    changedFiles?: string[];
+    /** Source file paths removed from the project's program */
+    deletedFiles?: string[];
+}
+/**
+ * Changes between two consecutive snapshots, reported per-project.
+ */
+export interface SnapshotChanges {
+    /** Project handles mapped to their file changes. Projects not listed are unchanged. */
+    changedProjects?: Record;
+    /** Project handles that were removed from the snapshot */
+    removedProjects?: string[];
+}
+/**
+ * Response from updateSnapshot.
+ */
+export interface UpdateSnapshotResponse {
+    /** Handle for the newly created snapshot */
+    snapshot: number;
+    /** List of projects in the snapshot */
+    projects: ProjectResponse[];
+    /** Changes from the previous snapshot (absent for the first snapshot) */
+    changes?: SnapshotChanges;
+}
+export interface ProjectResponse {
+    id: Path;
+    configFileName: string;
+    compilerOptions: CompilerOptions;
+    rootFiles: string[];
+}
+export interface SourceFileResponse {
+    /** Base64-encoded binary AST data */
+    data: string;
+}
+export interface SourceFileMetadata {
+    isDefaultLibrary: boolean;
+    isFromExternalLibrary: boolean;
+    packageJsonType: string;
+    packageJsonDirectory: string;
+    impliedNodeFormat: ModuleKind;
+}
+export interface SymbolResponse {
+    id: number;
+    /**
+     * The project the symbol was first observed in. Used as the default project for
+     * follow-up lookups that need a project context (e.g. members/exports), since symbols
+     * are shared snapshot-wide and such lookups can vary by project.
+     */
+    project: Path;
+    name: __String;
+    flags: number;
+    checkFlags: number;
+    declarations?: string[];
+    valueDeclaration?: string;
+    parent?: number;
+    exportSymbol?: number;
+}
+export interface TypeResponse {
+    id: number;
+    flags: number;
+    objectFlags?: number;
+    /** Literal value. BigInt literals are encoded as a decimal string (e.g. "-123") since JSON cannot represent bigint. Absent values are serialized as null. */
+    value?: string | number | boolean | null;
+    freshType?: number;
+    regularType?: number;
+    target?: number;
+    typeParameters?: number[];
+    outerTypeParameters?: number[];
+    localTypeParameters?: number[];
+    elementFlags?: number[];
+    fixedLength?: number;
+    readonly?: boolean;
+    objectType?: number;
+    indexType?: number;
+    checkType?: number;
+    extendsType?: number;
+    baseType?: number;
+    substConstraint?: number;
+    texts?: string[];
+    intrinsicName?: string;
+    isThisType?: boolean;
+    aliasTypeArguments?: number[];
+    aliasSymbol?: number;
+    symbol?: number;
+}
+export interface SignatureResponse {
+    id: number;
+    flags: number;
+    declaration?: string;
+    typeParameters?: number[];
+    parameters?: number[];
+    thisParameter?: number;
+    target?: number;
+}
+export interface TypePredicateResponse {
+    kind: number;
+    parameterIndex: number;
+    parameterName?: string;
+    type?: TypeResponse;
+}
+export interface IndexInfoResponse {
+    keyType: TypeResponse;
+    valueType: TypeResponse;
+    isReadonly?: boolean;
+    declaration?: string;
+}
+export interface ProfileParams {
+    dir: string;
+}
+export interface ProfileResult {
+    file: string;
+}
+export interface CompletionEntryLabelDetailsResponse {
+    detail?: string;
+    description?: string;
+}
+export interface CompletionEntryResponse {
+    name: string;
+    kind?: CompletionItemKind;
+    sortText?: string;
+    insertText?: string;
+    filterText?: string;
+    detail?: string;
+    labelDetails?: CompletionEntryLabelDetailsResponse;
+    symbol?: SymbolResponse;
+}
+export interface CompletionInfoResponse {
+    isIncomplete: boolean;
+    entries: CompletionEntryResponse[];
+}
+//# sourceMappingURL=proto.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/proto.d.ts.map b/node_modules/typescript/dist/api/proto.d.ts.map
new file mode 100644
index 000000000..35ac63541
--- /dev/null
+++ b/node_modules/typescript/dist/api/proto.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"proto.d.ts","sourceRoot":"","sources":["../../src/api/proto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EACR,QAAQ,EACR,IAAI,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;CAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2CAA2C;IAC3C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAKtE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,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AAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,YAAY,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mCAAmC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,mCAAmC,CAAC;IACnD,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,uBAAuB,EAAE,CAAC;CACtC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/proto.js b/node_modules/typescript/dist/api/proto.js
new file mode 100644
index 000000000..69808e0f5
--- /dev/null
+++ b/node_modules/typescript/dist/api/proto.js
@@ -0,0 +1,37 @@
+import { documentURIToFileName, fileNameToDocumentURI, } from "./path.js";
+/**
+ * Resolves a DocumentIdentifier to a file name.
+ * If the identifier contains a URI, it is converted to a file name.
+ */
+export function resolveFileName(identifier) {
+    if (typeof identifier === "string") {
+        return identifier;
+    }
+    return documentURIToFileName(identifier.uri);
+}
+/**
+ * Resolves a DocumentIdentifier to a document URI.
+ * If the identifier contains a file name, it is converted to a URI.
+ */
+export function resolveDocumentURI(identifier) {
+    if (typeof identifier === "string") {
+        return fileNameToDocumentURI(identifier);
+    }
+    return identifier.uri;
+}
+/**
+ * Builds the wire request for updateSnapshot, applying the deprecated `openProject`
+ * compatibility shim: a single `openProject` is folded into `openProjects` and is
+ * never sent on the wire.
+ */
+export function toUpdateSnapshotRequest(params) {
+    const { openProject, openProjects, ...rest } = params ?? {};
+    const mergedOpenProjects = openProject !== undefined
+        ? [resolveFileName(openProject), ...(openProjects ?? [])]
+        : openProjects;
+    return {
+        ...rest,
+        ...(mergedOpenProjects !== undefined ? { openProjects: mergedOpenProjects } : {}),
+    };
+}
+//# sourceMappingURL=proto.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/proto.js.map b/node_modules/typescript/dist/api/proto.js.map
new file mode 100644
index 000000000..1311f1c90
--- /dev/null
+++ b/node_modules/typescript/dist/api/proto.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"proto.js","sourceRoot":"","sources":["../../src/api/proto.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,qBAAqB,EACrB,qBAAqB,GACxB,MAAM,WAAW,CAAC;AA0BnB;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,UAA8B;IAC1D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,UAAU,CAAC;IACtB,CAAC;IACD,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA8B;IAC7D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,CAAC;AAC1B,CAAC;AAkED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAA6B;IACjE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAC5D,MAAM,kBAAkB,GAAG,WAAW,KAAK,SAAS;QAChD,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC,CAAC,YAAY,CAAC;IACnB,OAAO;QACH,GAAG,IAAI;QACP,GAAG,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpF,CAAC;AACN,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sourceFileCache.d.ts b/node_modules/typescript/dist/api/sourceFileCache.d.ts
new file mode 100644
index 000000000..3113bcb20
--- /dev/null
+++ b/node_modules/typescript/dist/api/sourceFileCache.d.ts
@@ -0,0 +1,79 @@
+import type { Path, SourceFile } from "../ast/index.ts";
+import type { SnapshotChanges } from "./proto.ts";
+/**
+ * A cached source file entry, identified by content hash.
+ */
+export interface CachedSourceFile {
+    /** The cached source file object */
+    file: SourceFile;
+    /** The content hash from the server */
+    contentHash: string;
+    /** The parse options key that was used to create this file */
+    parseOptionsKey: string;
+    /** Set of (snapshot, project) ref keys that reference this entry */
+    refs: Set;
+}
+/**
+ * Client-side cache for source files keyed by (path, parseOptionsKey, contentHash).
+ *
+ * Supports multiple versions of the same file at the same path (e.g., from
+ * different snapshots with different file contents). Each version is identified
+ * by its content hash and parse options key.
+ *
+ * Entries are ref-counted by (snapshot, project) pairs. When a snapshot is
+ * disposed, all refs for that snapshot across all projects are released,
+ * and entries with no remaining references are evicted.
+ *
+ * When a new snapshot is created, unchanged cache entries from the previous
+ * snapshot are retained per-project. Only files within changed or removed
+ * projects are invalidated.
+ */
+export declare class SourceFileCache {
+    /** Map from path to all cached versions of that file */
+    private cache;
+    /** Map from snapshotId to (projectId → Set of paths fetched through that project) */
+    private snapshotProjectPaths;
+    /**
+     * Get a cached source file already retained for the given (snapshot, project) pair.
+     * This does not require a content hash or parse options key — it returns the entry
+     * if one exists with a matching ref. Used to skip the server request entirely when
+     * retainForSnapshot has already carried over the ref.
+     *
+     * A given (snapshot, project) pair always parses a file the same way, so there is
+     * at most one matching entry per ref.
+     */
+    getRetained(path: Path, snapshotId: number, projectId: string): SourceFile | undefined;
+    /**
+     * Store a source file in the cache and retain it for the given (snapshot, project) pair.
+     * Returns the cached file — which may be an existing entry if the hash matches.
+     */
+    set(path: Path, file: SourceFile, parseOptionsKey: string, contentHash: string, snapshotId: number, projectId: string): SourceFile;
+    /**
+     * Retain cache entries from a previous snapshot for a new snapshot.
+     * For each project in the previous snapshot:
+     *   - Removed projects: skip (don't retain any refs).
+     *   - Changed projects: retain refs for files not listed in changedFiles/deletedFiles.
+     *   - Unchanged projects: retain all refs.
+     */
+    retainForSnapshot(newSnapshotId: number, previousSnapshotId: number, changes: SnapshotChanges | undefined): void;
+    /**
+     * Release all entries retained by the given snapshot across all projects.
+     * Only visits paths that the snapshot actually referenced.
+     * Entries with no remaining refs are evicted.
+     */
+    releaseSnapshot(snapshotId: number): void;
+    private trackPath;
+    /**
+     * Clear all entries from the cache.
+     */
+    clear(): void;
+    /**
+     * Get the number of unique paths in the cache.
+     */
+    get size(): number;
+    /**
+     * Check if a path is in the cache.
+     */
+    has(path: Path): boolean;
+}
+//# sourceMappingURL=sourceFileCache.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sourceFileCache.d.ts.map b/node_modules/typescript/dist/api/sourceFileCache.d.ts.map
new file mode 100644
index 000000000..15f8f9e54
--- /dev/null
+++ b/node_modules/typescript/dist/api/sourceFileCache.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sourceFileCache.d.ts","sourceRoot":"","sources":["../../src/api/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ff --git a/node_modules/typescript/dist/api/sourceFileCache.js b/node_modules/typescript/dist/api/sourceFileCache.js
new file mode 100644
index 000000000..fe44aefbb
--- /dev/null
+++ b/node_modules/typescript/dist/api/sourceFileCache.js
@@ -0,0 +1,169 @@
+/**
+ * Builds a composite ref key from a snapshot ID and project ID.
+ */
+function refKey(snapshotId, projectId) {
+    return `${snapshotId}:${projectId}`;
+}
+/**
+ * Client-side cache for source files keyed by (path, parseOptionsKey, contentHash).
+ *
+ * Supports multiple versions of the same file at the same path (e.g., from
+ * different snapshots with different file contents). Each version is identified
+ * by its content hash and parse options key.
+ *
+ * Entries are ref-counted by (snapshot, project) pairs. When a snapshot is
+ * disposed, all refs for that snapshot across all projects are released,
+ * and entries with no remaining references are evicted.
+ *
+ * When a new snapshot is created, unchanged cache entries from the previous
+ * snapshot are retained per-project. Only files within changed or removed
+ * projects are invalidated.
+ */
+export class SourceFileCache {
+    /** Map from path to all cached versions of that file */
+    cache = new Map();
+    /** Map from snapshotId to (projectId → Set of paths fetched through that project) */
+    snapshotProjectPaths = new Map();
+    /**
+     * Get a cached source file already retained for the given (snapshot, project) pair.
+     * This does not require a content hash or parse options key — it returns the entry
+     * if one exists with a matching ref. Used to skip the server request entirely when
+     * retainForSnapshot has already carried over the ref.
+     *
+     * A given (snapshot, project) pair always parses a file the same way, so there is
+     * at most one matching entry per ref.
+     */
+    getRetained(path, snapshotId, projectId) {
+        const entries = this.cache.get(path);
+        if (!entries)
+            return undefined;
+        const key = refKey(snapshotId, projectId);
+        const entry = entries.find(e => e.refs.has(key));
+        return entry?.file;
+    }
+    /**
+     * Store a source file in the cache and retain it for the given (snapshot, project) pair.
+     * Returns the cached file — which may be an existing entry if the hash matches.
+     */
+    set(path, file, parseOptionsKey, contentHash, snapshotId, projectId) {
+        let entries = this.cache.get(path);
+        if (!entries) {
+            entries = [];
+            this.cache.set(path, entries);
+        }
+        const ref = refKey(snapshotId, projectId);
+        // Check if we already have this exact version
+        const existing = entries.find(e => e.parseOptionsKey === parseOptionsKey && e.contentHash === contentHash);
+        if (existing) {
+            existing.refs.add(ref);
+            this.trackPath(snapshotId, projectId, path);
+            return existing.file;
+        }
+        entries.push({ file, contentHash, parseOptionsKey, refs: new Set([ref]) });
+        this.trackPath(snapshotId, projectId, path);
+        return file;
+    }
+    /**
+     * Retain cache entries from a previous snapshot for a new snapshot.
+     * For each project in the previous snapshot:
+     *   - Removed projects: skip (don't retain any refs).
+     *   - Changed projects: retain refs for files not listed in changedFiles/deletedFiles.
+     *   - Unchanged projects: retain all refs.
+     */
+    retainForSnapshot(newSnapshotId, previousSnapshotId, changes) {
+        const prevProjectMap = this.snapshotProjectPaths.get(previousSnapshotId);
+        if (!prevProjectMap)
+            return;
+        const removedProjects = new Set(changes?.removedProjects ?? []);
+        const changedProjects = changes?.changedProjects ?? {};
+        for (const [projectId, paths] of prevProjectMap) {
+            if (removedProjects.has(projectId))
+                continue;
+            const projectChanges = changedProjects[projectId];
+            let invalidPaths;
+            if (projectChanges) {
+                invalidPaths = new Set();
+                for (const p of projectChanges.changedFiles ?? [])
+                    invalidPaths.add(p);
+                for (const p of projectChanges.deletedFiles ?? [])
+                    invalidPaths.add(p);
+            }
+            const prevRef = refKey(previousSnapshotId, projectId);
+            const newRef = refKey(newSnapshotId, projectId);
+            for (const path of paths) {
+                if (invalidPaths?.has(path))
+                    continue;
+                const entries = this.cache.get(path);
+                if (!entries)
+                    continue;
+                for (const entry of entries) {
+                    if (entry.refs.has(prevRef)) {
+                        entry.refs.add(newRef);
+                        this.trackPath(newSnapshotId, projectId, path);
+                    }
+                }
+            }
+        }
+    }
+    /**
+     * Release all entries retained by the given snapshot across all projects.
+     * Only visits paths that the snapshot actually referenced.
+     * Entries with no remaining refs are evicted.
+     */
+    releaseSnapshot(snapshotId) {
+        const projectMap = this.snapshotProjectPaths.get(snapshotId);
+        if (!projectMap)
+            return;
+        for (const [projectId, paths] of projectMap) {
+            const key = refKey(snapshotId, projectId);
+            for (const path of paths) {
+                const entries = this.cache.get(path);
+                if (!entries)
+                    continue;
+                for (let i = entries.length - 1; i >= 0; i--) {
+                    entries[i].refs.delete(key);
+                    if (entries[i].refs.size === 0) {
+                        entries.splice(i, 1);
+                    }
+                }
+                if (entries.length === 0) {
+                    this.cache.delete(path);
+                }
+            }
+        }
+        this.snapshotProjectPaths.delete(snapshotId);
+    }
+    trackPath(snapshotId, projectId, path) {
+        let projectMap = this.snapshotProjectPaths.get(snapshotId);
+        if (!projectMap) {
+            projectMap = new Map();
+            this.snapshotProjectPaths.set(snapshotId, projectMap);
+        }
+        let paths = projectMap.get(projectId);
+        if (!paths) {
+            paths = new Set();
+            projectMap.set(projectId, paths);
+        }
+        paths.add(path);
+    }
+    /**
+     * Clear all entries from the cache.
+     */
+    clear() {
+        this.cache.clear();
+        this.snapshotProjectPaths.clear();
+    }
+    /**
+     * Get the number of unique paths in the cache.
+     */
+    get size() {
+        return this.cache.size;
+    }
+    /**
+     * Check if a path is in the cache.
+     */
+    has(path) {
+        return this.cache.has(path);
+    }
+}
+//# sourceMappingURL=sourceFileCache.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sourceFileCache.js.map b/node_modules/typescript/dist/api/sourceFileCache.js.map
new file mode 100644
index 000000000..3f858e336
--- /dev/null
+++ b/node_modules/typescript/dist/api/sourceFileCache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sourceFileCache.js","sourceRoot":"","sources":["../../src/api/sourceFileCache.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,SAAS,MAAM,CAAC,UAAkB,EAAE,SAAiB;IACjD,OAAO,GAAG,UAAU,IAAI,SAAS,EAAE,CAAC;AACxC,CAAC;AAgBD;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,eAAe;IACxB,wDAAwD;IAChD,KAAK,GAAkC,IAAI,GAAG,EAAE,CAAC;IACzD,qFAAqF;IAC7E,oBAAoB,GAAwC,IAAI,GAAG,EAAE,CAAC;IAE9E;;;;;;;;OAQG;IACH,WAAW,CAA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AC,CAAC;IAChC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/api.d.ts b/node_modules/typescript/dist/api/sync/api.d.ts
new file mode 100644
index 000000000..12950765b
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/api.d.ts
@@ -0,0 +1,529 @@
+/// 
+import { CompletionItemKind } from "#enums/completionItemKind";
+import { DiagnosticCategory } from "#enums/diagnosticCategory";
+import { ElementFlags } from "#enums/elementFlags";
+import { ModuleKind } from "#enums/moduleKind";
+import { NodeBuilderFlags } from "#enums/nodeBuilderFlags";
+import { ObjectFlags } from "#enums/objectFlags";
+import { SignatureFlags } from "#enums/signatureFlags";
+import { SignatureKind } from "#enums/signatureKind";
+import { SymbolFlags } from "#enums/symbolFlags";
+import { TypeFlags } from "#enums/typeFlags";
+import { TypePredicateKind } from "#enums/typePredicateKind";
+import { type __String, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts";
+import type { APIOptions, LSPConnectionOptions } from "../options.ts";
+import type { CompilerOptions, ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SourceFileMetadata, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts";
+import { SourceFileCache } from "../sourceFileCache.ts";
+import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts";
+import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts";
+import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts";
+export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts";
+export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind };
+export type { APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, DocumentIdentifier, DocumentPosition, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, NumberLiteralType, ObjectType, RequestTiming, SourceFileMetadata, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType };
+export declare class API {
+    private client;
+    private sourceFileCache;
+    private toPath;
+    private initialized;
+    private activeSnapshots;
+    private latestSnapshot;
+    readonly internal: InternalAPI;
+    constructor(options?: APIOptions | LSPConnectionOptions);
+    /**
+     * Create an API instance from an existing LSP connection's API session.
+     * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession.
+     */
+    static fromLSPConnection(options: LSPConnectionOptions): API;
+    private ensureInitialized;
+    parseConfigFile(file: DocumentIdentifier): ConfigResponse;
+    updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Snapshot;
+    close(): void;
+    clearSourceFileCache(): void;
+    /**
+     * Returns a snapshot of collected timing information for requests made
+     * through this API instance: client-measured round-trip latency and bytes
+     * transferred, folded together with the server's own per-request processing
+     * time and an estimated transport overhead (round-trip minus server time).
+     *
+     * Fetching the snapshot issues a lightweight request to the server to
+     * retrieve its timing collection. Collection must be enabled via the
+     * `collectTiming` option; when it is not, the returned snapshot has
+     * `enabled: false` and zeroed totals.
+     */
+    getTimingInfo(): TimingInfo;
+    /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */
+    resetTimingInfo(): void;
+}
+export declare class InternalAPI {
+    private client;
+    private ensureInitialized;
+    /** @internal */
+    constructor(client: Client, ensureInitialized: () => void);
+    startCPUProfile(dir: string): void;
+    stopCPUProfile(): string;
+    saveHeapProfile(dir: string): string;
+}
+export declare class Snapshot {
+    readonly id: number;
+    private projectMap;
+    private toPath;
+    private client;
+    private disposed;
+    private onDispose;
+    private snapshotRegistry;
+    constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void);
+    getProjects(): readonly Project[];
+    getProject(configFileName: string): Project | undefined;
+    getDefaultProjectForFile(file: DocumentIdentifier): Project | undefined;
+    [globalThis.Symbol.dispose](): void;
+    dispose(): void;
+    isDisposed(): boolean;
+    private ensureNotDisposed;
+}
+declare class SnapshotObjectRegistry {
+    private readonly symbols;
+    private readonly client;
+    private readonly snapshotId;
+    private readonly resolveProject;
+    constructor(client: Client, snapshotId: number, resolveProject: (projectId: Path) => Project | undefined);
+    /** Resolve a project id (a config file path) to its Project within this snapshot. */
+    getProject(projectId: Path): Project | undefined;
+    getOrCreateSymbol(data: SymbolResponse): Symbol;
+    getSymbol(id: number): Symbol | undefined;
+    clear(): void;
+    fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined, projectId?: Path): Symbol;
+    fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[], projectId?: Path): readonly Symbol[];
+}
+declare class ProjectObjectRegistry {
+    private client;
+    private snapshotId;
+    private project;
+    private snapshotRegistry;
+    private types;
+    private signatures;
+    constructor(client: Client, snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry);
+    getOrCreateSymbol(data: SymbolResponse): Symbol;
+    getSymbol(id: number): Symbol | undefined;
+    getOrCreateType(data: TypeResponse): TypeObject;
+    getType(id: number): TypeObject | undefined;
+    getOrCreateSignature(data: SignatureResponse): Signature;
+    getSignature(id: number): Signature | undefined;
+    clear(): void;
+    fetchType(source: Symbol | Signature | Type, method: string, handle: number | false | undefined): T;
+    fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Symbol;
+    fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Signature;
+    fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): readonly Type[];
+    fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): readonly Symbol[];
+    fetchBaseTypes(source: Type): readonly Type[];
+}
+export declare class Project {
+    readonly id: Path;
+    readonly configFileName: string;
+    readonly compilerOptions: CompilerOptions;
+    readonly rootFiles: readonly string[];
+    readonly program: Program;
+    readonly checker: Checker;
+    readonly emitter: Emitter;
+    private client;
+    constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, snapshotRegistry: SnapshotObjectRegistry);
+    dispose(): void;
+}
+export declare class Program {
+    private snapshotId;
+    private project;
+    private client;
+    private sourceFileCache;
+    private toPath;
+    private decoder;
+    private sourceFileMetadataCache;
+    constructor(snapshotId: number, project: Project, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path);
+    getCompilerOptions(): CompilerOptions;
+    getSourceFile(file: DocumentIdentifier): SourceFile | undefined;
+    getSourceFileNames(): readonly string[];
+    /**
+     * Returns program-stored metadata for the given source file, or `undefined` if the file
+     * is not part of the program. Metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    getSourceFileMetadata(fileName: string): SourceFileMetadata | undefined;
+    /**
+     * Returns program-stored metadata for the source file at the given path, or `undefined`
+     * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips
+     * the file name to path conversion. Metadata is fetched lazily per file and cached on
+     * this `Program` instance.
+     */
+    getSourceFileMetadataByPath(path: Path): SourceFileMetadata | undefined;
+    private fetchSourceFileMetadata;
+    /**
+     * Returns whether the given source file was loaded as part of an external library
+     * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is
+     * fetched lazily per file and cached on this `Program` instance.
+     */
+    isSourceFileFromExternalLibrary(file: SourceFile): boolean;
+    /**
+     * Returns whether the given source file is a default library file (e.g. `lib.d.ts`).
+     * The underlying program metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    isSourceFileDefaultLibrary(file: SourceFile): boolean;
+    /**
+     * Get syntactic (parse) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSyntacticDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[];
+    /**
+     * Get binder diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getBindDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[];
+    /**
+     * Get semantic (type-check) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSemanticDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[];
+    /**
+     * Get suggestion diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSuggestionDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[];
+    /**
+     * Get declaration emit diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getDeclarationDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[];
+    /**
+     * Get program-wide diagnostics for the project, including compiler options diagnostics.
+     */
+    getProgramDiagnostics(): readonly Diagnostic[];
+    /**
+     * Get global (non-file-specific) semantic diagnostics for the project.
+     */
+    getGlobalDiagnostics(): readonly Diagnostic[];
+    /**
+     * Get config file parsing diagnostics for the project.
+     */
+    getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+}
+export declare class Checker {
+    private snapshotId;
+    private project;
+    private client;
+    private objectRegistry;
+    private wellKnownSymbols;
+    constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry);
+    dispose(): void;
+    getSymbolAtLocation(node: Node): Symbol | undefined;
+    getSymbolAtLocation(nodes: readonly Node[]): (Symbol | undefined)[];
+    getSymbolAtPosition(file: DocumentIdentifier, position: number): Symbol | undefined;
+    getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): (Symbol | undefined)[];
+    getTypeOfSymbol(symbol: Symbol): Type | undefined;
+    getTypeOfSymbol(symbols: readonly Symbol[]): (Type | undefined)[];
+    /**
+     * Get the declared type of a symbol. Always returns a type; for symbols whose
+     * declared type cannot be determined the checker yields the error type (use
+     * {@link Type.isErrorType} to detect it).
+     */
+    getDeclaredTypeOfSymbol(symbol: Symbol): Type;
+    getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): NodeHandle[];
+    getReferencedSymbolsForNode(node: Node, position: number): ReferencedSymbolEntry[];
+    getSignatureUsage(signatureDecl: Node): SignatureUsage[];
+    getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): CompletionInfo | undefined;
+    getTypeAtLocation(node: Node): Type | undefined;
+    getTypeAtLocation(nodes: readonly Node[]): (Type | undefined)[];
+    getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
+    getResolvedSignature(node: Node): Signature | undefined;
+    getTypeAtPosition(file: DocumentIdentifier, position: number): Type | undefined;
+    getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): (Type | undefined)[];
+    resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Symbol | undefined;
+    getResolvedSymbol(node: Identifier): Symbol | undefined;
+    getContextualType(node: Expression): Type | undefined;
+    getBaseTypeOfLiteralType(type: Type): Type | undefined;
+    getNonNullableType(type: Type): Type | undefined;
+    getTypeFromTypeNode(node: TypeNode): Type | undefined;
+    getWidenedType(type: Type): Type | undefined;
+    getParameterType(signature: Signature, index: number): Type | undefined;
+    isArrayLikeType(type: Type): boolean;
+    isTypeAssignableTo(source: Type, target: Type): boolean;
+    getShorthandAssignmentValueSymbol(node: Node): Symbol | undefined;
+    /**
+     * Get the type of a symbol as narrowed at a specific location. Always returns
+     * a type; for symbols whose type cannot be determined the checker yields the
+     * error type (use {@link Type.isErrorType} to detect it).
+     */
+    getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Type;
+    private getIntrinsicType;
+    getAnyType(): Type;
+    getStringType(): Type;
+    getNumberType(): Type;
+    getBooleanType(): Type;
+    getVoidType(): Type;
+    getUndefinedType(): Type;
+    getNullType(): Type;
+    getNeverType(): Type;
+    getUnknownType(): Type;
+    getBigIntType(): Type;
+    getESSymbolType(): Type;
+    typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): TypeNode | undefined;
+    signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Node | undefined;
+    typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): string;
+    isContextSensitive(node: Node): boolean;
+    isArrayType(type: Type): boolean;
+    isTupleType(type: Type): boolean;
+    getReturnTypeOfSignature(signature: Signature): Type | undefined;
+    getRestTypeOfSignature(signature: Signature): Type | undefined;
+    getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined;
+    /**
+     * Get the base types of a class or interface type. A type with no base types
+     * yields an empty array.
+     */
+    getBaseTypes(type: InterfaceType): readonly Type[];
+    getApparentType(type: Type): Type | undefined;
+    getPropertiesOfType(type: Type): readonly Symbol[];
+    getIndexInfosOfType(type: Type): readonly IndexInfo[];
+    /**
+     * Get the constraint of a type parameter (the `T` in ``), or
+     * undefined if it has none.
+     */
+    getConstraintOfTypeParameter(type: TypeParameter): Type | undefined;
+    getBaseConstraintOfType(type: Type): Type | undefined;
+    getPropertyOfType(type: Type, name: string): Symbol | undefined;
+    getConstantValue(node: Node): string | number | undefined;
+    getSignatureFromDeclaration(node: Node): Signature | undefined;
+    getExportSpecifierLocalTargetSymbol(node: Node): Symbol | undefined;
+    /**
+     * Follow all aliases to get the original symbol. Always returns a symbol; for
+     * an unresolved alias the checker yields the unknown symbol (use
+     * {@link Checker.isUnknownSymbol} to detect it).
+     */
+    getAliasedSymbol(symbol: Symbol): Symbol;
+    getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined;
+    /**
+     * Fetch (once, then cache) the handle ids of the per-checker singleton
+     * symbols (unknown, undefined, arguments). These ids are stable for the life
+     * of the project's checker, so identity checks against them are local after
+     * the first call.
+     */
+    private getWellKnownSymbols;
+    /**
+     * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the
+     * result of {@link Checker.getAliasedSymbol} on an unresolved alias).
+     */
+    isUnknownSymbol(symbol: Symbol): boolean;
+    /**
+     * Returns `true` if the symbol is the checker's "undefined" symbol.
+     */
+    isUndefinedSymbol(symbol: Symbol): boolean;
+    /**
+     * Returns `true` if the symbol is the checker's "arguments" symbol.
+     */
+    isArgumentsSymbol(symbol: Symbol): boolean;
+    getExportsOfModule(symbol: Symbol): readonly Symbol[];
+    getMemberInModuleExports(symbol: Symbol, name: string): Symbol | undefined;
+    getJsDocTagsOfSymbol(symbol: Symbol): readonly JSDocTagInfo[];
+    getDocumentationCommentOfSymbol(symbol: Symbol): string;
+    /**
+     * Get the type arguments of a type reference (e.g. the `string` in `Array`).
+     */
+    getTypeArguments(type: TypeReference): readonly Type[];
+}
+export interface PrintNodeOptions {
+    preserveSourceNewlines?: boolean | undefined;
+    neverAsciiEscape?: boolean | undefined;
+    terminateUnterminatedLiterals?: boolean | undefined;
+}
+export declare class Emitter {
+    private client;
+    constructor(client: Client);
+    printNode(node: Node, options?: PrintNodeOptions): string;
+}
+export declare class NodeHandle {
+    /**
+     * The project this handle was produced in, used as the default for {@link resolve}.
+     * Node handles are only meaningful within a project's program, so the producing project
+     * is remembered so callers don't have to pass it explicitly.
+     */
+    private readonly canonicalProject;
+    readonly index: number;
+    readonly kind: SyntaxKind;
+    readonly path: Path;
+    constructor(handle: string, canonicalProject: Project);
+    /**
+     * Resolve this handle to the actual AST node by fetching the source file from a project
+     * and looking up the node by index. If no project is passed, the project that produced
+     * the handle is used.
+     */
+    resolve(project?: Project): Node | undefined;
+}
+/** A symbol definition paired with all of its reference nodes. */
+export interface ReferencedSymbolEntry {
+    /** The node handle for the symbol's definition. */
+    definition: NodeHandle;
+    /** The resolved symbol for the definition, if available. */
+    symbol?: Symbol | undefined;
+    /** The node handles for each reference to the symbol. */
+    references: NodeHandle[];
+}
+/** A single usage of a signature, pairing the reference name with its call expression (if any). */
+export interface SignatureUsage {
+    /** The node handle for the name reference. */
+    name: NodeHandle;
+    /** The node handle for the call expression, if the reference is invoked. */
+    call?: NodeHandle | undefined;
+}
+export declare class Symbol {
+    private objectRegistry;
+    /**
+     * The project this symbol was first observed in, used as the default project for
+     * lookups that need a project context (members/exports/parent). Symbols are shared
+     * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use.
+     */
+    private readonly canonicalProject;
+    readonly id: number;
+    /** The escaped (`__String`) name, used as the key in member/export tables. */
+    readonly escapedName: __String;
+    /** The display name (escaped underscores removed). */
+    readonly name: string;
+    readonly flags: SymbolFlags;
+    readonly checkFlags: number;
+    readonly declarations: readonly NodeHandle[];
+    readonly valueDeclaration: NodeHandle | undefined;
+    private readonly parent;
+    private readonly exportSymbol;
+    private membersCache;
+    private exportsCache;
+    constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry);
+    getParent(): Symbol | undefined;
+    /**
+     * Get this symbol's members keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getMembers(): ReadonlyMap<__String, Symbol>;
+    /**
+     * Get this symbol's exports keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getExports(): ReadonlyMap<__String, Symbol>;
+    private fetchSymbolTable;
+    getExportSymbol(): Symbol;
+    getJsDocTags(checker: Checker): readonly JSDocTagInfo[];
+    getDocumentationComment(checker: Checker): string;
+}
+declare class TypeObject implements Type {
+    private objectRegistry;
+    readonly id: number;
+    readonly flags: TypeFlags;
+    readonly objectFlags: ObjectFlags;
+    readonly symbol: number;
+    readonly value: string | number | boolean | bigint;
+    readonly intrinsicName: string;
+    readonly isThisType: boolean;
+    readonly freshType: number;
+    readonly regularType: number;
+    readonly target: number;
+    readonly typeParameters: readonly number[];
+    readonly outerTypeParameters: readonly number[];
+    readonly localTypeParameters: readonly number[];
+    readonly aliasTypeArguments: readonly number[];
+    readonly aliasSymbol: number;
+    readonly elementFlags: readonly ElementFlags[];
+    readonly fixedLength: number;
+    readonly readonly: boolean;
+    readonly texts: readonly string[];
+    readonly objectType: number;
+    readonly indexType: number;
+    readonly checkType: number;
+    readonly extendsType: number;
+    readonly baseType: number;
+    readonly substConstraint: number;
+    private trueType;
+    private falseType;
+    constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry);
+    getSymbol(): Symbol | undefined;
+    getAliasSymbol(): Symbol | undefined;
+    getTarget(): Type;
+    getFreshType(): FreshableType | undefined;
+    getRegularType(): FreshableType | undefined;
+    getTypes(): readonly Type[] | undefined;
+    getTypeParameters(): readonly TypeParameter[];
+    getOuterTypeParameters(): readonly TypeParameter[];
+    getLocalTypeParameters(): readonly TypeParameter[];
+    getAliasTypeArguments(): readonly Type[];
+    getObjectType(): Type;
+    getIndexType(): Type;
+    getCheckType(): Type;
+    getExtendsType(): Type;
+    getBaseType(): Type;
+    getConstraint(): Type;
+    getTrueType(): Type;
+    getFalseType(): Type;
+    /**
+     * Get the base types of this type. Returns `undefined` for any type that is
+     * not a class or interface.
+     */
+    getBaseTypes(): readonly Type[] | undefined;
+    isClassOrInterface(): this is InterfaceType;
+    isUnionType(): this is UnionType;
+    isIntersectionType(): this is IntersectionType;
+    isObjectType(): this is ObjectType;
+    isIntrinsicType(): this is IntrinsicType;
+    isErrorType(): boolean;
+    isLiteralType(): this is LiteralType;
+    isStringLiteralType(): this is StringLiteralType;
+    isNumberLiteralType(): this is NumberLiteralType;
+    isBigIntLiteralType(): this is BigIntLiteralType;
+    isBooleanLiteralType(): this is BooleanLiteralType;
+    isTypeReference(): this is TypeReference;
+    isTupleType(): this is TupleType;
+    isIndexType(): this is IndexType;
+    isIndexedAccessType(): this is IndexedAccessType;
+    isConditionalType(): this is ConditionalType;
+    isSubstitutionType(): this is SubstitutionType;
+    isTemplateLiteralType(): this is TemplateLiteralType;
+    isStringMappingType(): this is StringMappingType;
+    isTypeParameter(): this is TypeParameter;
+}
+export declare function isUnionType(type: Type): type is UnionType;
+export declare function isIntersectionType(type: Type): type is IntersectionType;
+export declare function isObjectType(type: Type): type is ObjectType;
+export declare function isClassOrInterfaceType(type: Type): type is InterfaceType;
+export declare function isIntrinsicType(type: Type): type is IntrinsicType;
+/**
+ * Whether this is the error type — the placeholder the checker produces when a
+ * type cannot be determined (e.g. an unresolved reference). It is an intrinsic
+ * type named `"error"` (this covers both the singleton error type and the
+ * per-alias error types manufactured for unresolved type alias references).
+ */
+export declare function isErrorType(type: Type): boolean;
+export declare function isLiteralType(type: Type): type is LiteralType;
+export declare function isStringLiteralType(type: Type): type is StringLiteralType;
+export declare function isNumberLiteralType(type: Type): type is NumberLiteralType;
+export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType;
+export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType;
+export declare function isTypeReference(type: Type): type is TypeReference;
+export declare function isTupleType(type: Type): type is TupleType;
+export declare function isIndexType(type: Type): type is IndexType;
+export declare function isIndexedAccessType(type: Type): type is IndexedAccessType;
+export declare function isConditionalType(type: Type): type is ConditionalType;
+export declare function isSubstitutionType(type: Type): type is SubstitutionType;
+export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType;
+export declare function isStringMappingType(type: Type): type is StringMappingType;
+export declare function isTypeParameter(type: Type): type is TypeParameter;
+export declare class Signature {
+    private flags;
+    private objectRegistry;
+    readonly id: number;
+    readonly declaration?: NodeHandle | undefined;
+    readonly typeParameters?: readonly number[] | undefined;
+    readonly parameters: readonly number[];
+    readonly thisParameter?: number | undefined;
+    readonly target?: number | undefined;
+    constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry);
+    getTypeParameters(): readonly TypeParameter[];
+    getParameters(): readonly Symbol[];
+    getThisParameter(): Symbol | undefined;
+    getTarget(): Signature | undefined;
+    get hasRestParameter(): boolean;
+    get isConstruct(): boolean;
+    get isAbstract(): boolean;
+}
+//# sourceMappingURL=api.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/api.d.ts.map b/node_modules/typescript/dist/api/sync/api.d.ts.map
new file mode 100644
index 000000000..578ddf50e
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/api.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api/sync/api.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,aAAa,EACb,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,E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GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEzB,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,qBAAqB;IAW5F,iBAAiB,IAAI,SAAS,aAAa,EAAE;IAI7C,aAAa,IAAI,SAAS,MAAM,EAAE;IAIlC,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAItC,SAAS,IAAI,SAAS,GAAG,SAAS;IAIlC,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/api.js b/node_modules/typescript/dist/api/sync/api.js
new file mode 100644
index 000000000..39a465b79
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/api.js
@@ -0,0 +1,1665 @@
+//
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// !!! THIS FILE IS AUTO-GENERATED - DO NOT EDIT !!!
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//
+// Source: src/api/async/api.ts
+// Regenerate: npm run generate (from _packages/native-preview)
+//
+/// 
+import { CompletionItemKind } from "#enums/completionItemKind";
+import { DiagnosticCategory } from "#enums/diagnosticCategory";
+import { ElementFlags } from "#enums/elementFlags";
+import { ModuleKind } from "#enums/moduleKind";
+import { NodeBuilderFlags } from "#enums/nodeBuilderFlags";
+import { ObjectFlags } from "#enums/objectFlags";
+import { SignatureFlags } from "#enums/signatureFlags";
+import { SignatureKind } from "#enums/signatureKind";
+import { SymbolFlags } from "#enums/symbolFlags";
+import { TypeFlags } from "#enums/typeFlags";
+import { TypePredicateKind } from "#enums/typePredicateKind";
+import { ModifierFlags, unescapeLeadingUnderscores, } from "../../ast/index.js";
+import { encodeNode, uint8ArrayToBase64, } from "../node/encoder.js";
+import { decodeNode, getNodeId, parseNodeHandle, readParseOptionsKey, readSourceFileHash, RemoteSourceFile, } from "../node/node.js";
+import { Wtf8Decoder } from "../node/wtf8.js";
+import { createGetCanonicalFileName, toPath, } from "../path.js";
+import { resolveFileName, toUpdateSnapshotRequest, } from "../proto.js";
+import { SourceFileCache } from "../sourceFileCache.js";
+import { Client, } from "./client.js";
+export { documentURIToFileName, fileNameToDocumentURI } from "../path.js";
+export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind };
+export class API {
+    client;
+    sourceFileCache;
+    toPath;
+    initialized = false;
+    activeSnapshots = new Set();
+    latestSnapshot;
+    internal;
+    constructor(options = {}) {
+        this.client = new Client(options);
+        this.sourceFileCache = new SourceFileCache();
+        this.internal = new InternalAPI(this.client, () => this.ensureInitialized());
+    }
+    /**
+     * Create an API instance from an existing LSP connection's API session.
+     * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession.
+     */
+    static fromLSPConnection(options) {
+        const api = new API(options);
+        api.ensureInitialized();
+        return api;
+    }
+    ensureInitialized() {
+        if (!this.initialized) {
+            const response = this.client.apiRequest("initialize", null);
+            const getCanonicalFileName = createGetCanonicalFileName(response.useCaseSensitiveFileNames);
+            const currentDirectory = response.currentDirectory;
+            this.toPath = (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName);
+            this.initialized = true;
+        }
+    }
+    parseConfigFile(file) {
+        this.ensureInitialized();
+        return this.client.apiRequest("parseConfigFile", { file });
+    }
+    updateSnapshot(params) {
+        this.ensureInitialized();
+        const requestParams = toUpdateSnapshotRequest(params);
+        const data = this.client.apiRequest("updateSnapshot", requestParams);
+        // Retain cached source files from previous snapshot for unchanged files
+        if (this.latestSnapshot) {
+            this.sourceFileCache.retainForSnapshot(data.snapshot, this.latestSnapshot.id, data.changes);
+            if (this.latestSnapshot.isDisposed()) {
+                this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id);
+            }
+        }
+        const snapshot = new Snapshot(data, this.client, this.sourceFileCache, this.toPath, () => {
+            this.activeSnapshots.delete(snapshot);
+            if (snapshot !== this.latestSnapshot) {
+                this.sourceFileCache.releaseSnapshot(snapshot.id);
+            }
+        });
+        this.latestSnapshot = snapshot;
+        this.activeSnapshots.add(snapshot);
+        return snapshot;
+    }
+    close() {
+        // Dispose all active snapshots
+        for (const snapshot of [...this.activeSnapshots]) {
+            snapshot.dispose();
+        }
+        // Release the latest snapshot's cache refs if still held
+        if (this.latestSnapshot) {
+            this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id);
+            this.latestSnapshot = undefined;
+        }
+        this.client.close();
+        this.sourceFileCache.clear();
+    }
+    clearSourceFileCache() {
+        this.sourceFileCache.clear();
+    }
+    /**
+     * Returns a snapshot of collected timing information for requests made
+     * through this API instance: client-measured round-trip latency and bytes
+     * transferred, folded together with the server's own per-request processing
+     * time and an estimated transport overhead (round-trip minus server time).
+     *
+     * Fetching the snapshot issues a lightweight request to the server to
+     * retrieve its timing collection. Collection must be enabled via the
+     * `collectTiming` option; when it is not, the returned snapshot has
+     * `enabled: false` and zeroed totals.
+     */
+    getTimingInfo() {
+        return this.client.getTimingInfo();
+    }
+    /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */
+    resetTimingInfo() {
+        return this.client.resetTimingInfo();
+    }
+}
+export class InternalAPI {
+    client;
+    ensureInitialized;
+    /** @internal */
+    constructor(client, ensureInitialized) {
+        this.client = client;
+        this.ensureInitialized = ensureInitialized;
+    }
+    startCPUProfile(dir) {
+        this.ensureInitialized();
+        this.client.apiRequest("startCPUProfile", { dir });
+    }
+    stopCPUProfile() {
+        this.ensureInitialized();
+        const result = this.client.apiRequest("stopCPUProfile", null);
+        return result.file;
+    }
+    saveHeapProfile(dir) {
+        this.ensureInitialized();
+        const result = this.client.apiRequest("saveHeapProfile", { dir });
+        return result.file;
+    }
+}
+export class Snapshot {
+    id;
+    projectMap;
+    toPath;
+    client;
+    disposed = false;
+    onDispose;
+    snapshotRegistry;
+    constructor(data, client, sourceFileCache, toPath, onDispose) {
+        this.id = data.snapshot;
+        this.client = client;
+        this.toPath = toPath;
+        this.onDispose = onDispose;
+        this.projectMap = new Map();
+        this.snapshotRegistry = new SnapshotObjectRegistry(client, this.id, projectId => this.projectMap.get(projectId));
+        for (const projData of data.projects) {
+            const project = new Project(projData, this.id, client, sourceFileCache, toPath, this.snapshotRegistry);
+            this.projectMap.set(toPath(projData.configFileName), project);
+        }
+    }
+    getProjects() {
+        this.ensureNotDisposed();
+        return [...this.projectMap.values()];
+    }
+    getProject(configFileName) {
+        this.ensureNotDisposed();
+        return this.projectMap.get(this.toPath(configFileName));
+    }
+    getDefaultProjectForFile(file) {
+        this.ensureNotDisposed();
+        const data = this.client.apiRequest("getDefaultProjectForFile", {
+            snapshot: this.id,
+            file,
+        });
+        if (!data)
+            return undefined;
+        return this.projectMap.get(this.toPath(data.configFileName));
+    }
+    [globalThis.Symbol.dispose]() {
+        this.dispose();
+    }
+    dispose() {
+        if (this.disposed)
+            return;
+        this.disposed = true;
+        for (const project of this.projectMap.values()) {
+            project.dispose();
+        }
+        this.projectMap.clear();
+        this.snapshotRegistry.clear();
+        this.onDispose();
+        this.client.apiRequest("release", { snapshot: this.id });
+    }
+    isDisposed() {
+        return this.disposed;
+    }
+    ensureNotDisposed() {
+        if (this.disposed) {
+            throw new Error("Snapshot is disposed");
+        }
+    }
+}
+class SnapshotObjectRegistry {
+    symbols = new Map();
+    client;
+    snapshotId;
+    resolveProject;
+    constructor(client, snapshotId, resolveProject) {
+        this.client = client;
+        this.snapshotId = snapshotId;
+        this.resolveProject = resolveProject;
+    }
+    /** Resolve a project id (a config file path) to its Project within this snapshot. */
+    getProject(projectId) {
+        return this.resolveProject(projectId);
+    }
+    getOrCreateSymbol(data) {
+        let symbol = this.symbols.get(data.id);
+        if (!symbol) {
+            symbol = new Symbol(data, this);
+            this.symbols.set(data.id, symbol);
+        }
+        return symbol;
+    }
+    getSymbol(id) {
+        return this.symbols.get(id);
+    }
+    clear() {
+        this.symbols.clear();
+    }
+    fetchSymbol(source, method, handle, projectId) {
+        if (!handle)
+            return undefined;
+        const cached = this.getSymbol(handle);
+        if (cached)
+            return cached;
+        const data = this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: projectId,
+            objectId: source.id,
+        });
+        if (!data)
+            throw new Error(`${method} returned null symbol for ${source.constructor.name} ${source.id}`);
+        return this.getOrCreateSymbol(data);
+    }
+    fetchSymbols(source, method, handles, projectId) {
+        if (handles) {
+            const result = new Array(handles.length);
+            let allCached = true;
+            for (let i = 0; i < handles.length; i++) {
+                const cached = this.getSymbol(handles[i]);
+                if (!cached) {
+                    allCached = false;
+                    break;
+                }
+                result[i] = cached;
+            }
+            if (allCached)
+                return result;
+        }
+        const symbolData = this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: projectId,
+            objectId: source.id,
+        });
+        if (symbolData == null)
+            return [];
+        else
+            return symbolData.map(data => this.getOrCreateSymbol(data));
+    }
+}
+class ProjectObjectRegistry {
+    client;
+    snapshotId;
+    project;
+    snapshotRegistry;
+    types = new Map();
+    signatures = new Map();
+    constructor(client, snapshotId, project, snapshotRegistry) {
+        this.client = client;
+        this.snapshotId = snapshotId;
+        this.project = project;
+        this.snapshotRegistry = snapshotRegistry;
+    }
+    getOrCreateSymbol(data) {
+        return this.snapshotRegistry.getOrCreateSymbol(data);
+    }
+    getSymbol(id) {
+        return this.snapshotRegistry.getSymbol(id);
+    }
+    getOrCreateType(data) {
+        let type = this.types.get(data.id);
+        if (!type) {
+            type = new TypeObject(data, this);
+            this.types.set(data.id, type);
+        }
+        return type;
+    }
+    getType(id) {
+        return this.types.get(id);
+    }
+    getOrCreateSignature(data) {
+        let sig = this.signatures.get(data.id);
+        if (!sig) {
+            sig = new Signature(data, this.project, this);
+            this.signatures.set(data.id, sig);
+        }
+        return sig;
+    }
+    getSignature(id) {
+        return this.signatures.get(id);
+    }
+    clear() {
+        this.types.clear();
+        this.signatures.clear();
+    }
+    fetchType(source, method, handle) {
+        if (handle !== false) {
+            if (!handle)
+                return undefined;
+            const cached = this.getType(handle);
+            if (cached)
+                return cached;
+        }
+        const data = this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            objectId: source.id,
+        });
+        if (!data)
+            throw new Error(`${method} returned null type for ${source.constructor.name} ${source.id}`);
+        return this.getOrCreateType(data);
+    }
+    fetchSymbol(source, method, handle) {
+        return this.snapshotRegistry.fetchSymbol(source, method, handle, this.project.id);
+    }
+    fetchSignature(source, method, handle) {
+        if (!handle)
+            return undefined;
+        const cached = this.getSignature(handle);
+        if (cached)
+            return cached;
+        const data = this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            objectId: source.id,
+        });
+        if (!data)
+            throw new Error(`${method} returned null signature for ${source.constructor.name} ${source.id}`);
+        return this.getOrCreateSignature(data);
+    }
+    fetchTypes(source, method, handles) {
+        if (handles) {
+            const result = new Array(handles.length);
+            let allCached = true;
+            for (let i = 0; i < handles.length; i++) {
+                const cached = this.getType(handles[i]);
+                if (!cached) {
+                    allCached = false;
+                    break;
+                }
+                result[i] = cached;
+            }
+            if (allCached)
+                return result;
+        }
+        const typesData = this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            objectId: source.id,
+        });
+        if (typesData == null)
+            return [];
+        else
+            return typesData.map(data => this.getOrCreateType(data));
+    }
+    fetchSymbols(source, method, handles) {
+        return this.snapshotRegistry.fetchSymbols(source, method, handles, this.project.id);
+    }
+    // getBaseTypes is a checker-level endpoint keyed by `type` (not `objectId`),
+    // so it cannot go through fetchTypes. This helper reuses that server method.
+    fetchBaseTypes(source) {
+        const typesData = this.client.apiRequest("getBaseTypes", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: source.id,
+        });
+        if (typesData == null)
+            return [];
+        return typesData.map(data => this.getOrCreateType(data));
+    }
+}
+export class Project {
+    id;
+    configFileName;
+    compilerOptions;
+    rootFiles;
+    program;
+    checker;
+    emitter;
+    client;
+    constructor(data, snapshotId, client, sourceFileCache, toPath, snapshotRegistry) {
+        this.id = data.id;
+        this.configFileName = data.configFileName;
+        this.compilerOptions = data.compilerOptions;
+        this.rootFiles = data.rootFiles;
+        this.client = client;
+        this.program = new Program(snapshotId, this, client, sourceFileCache, toPath);
+        const objectRegistry = new ProjectObjectRegistry(client, snapshotId, this, snapshotRegistry);
+        this.checker = new Checker(snapshotId, this, client, objectRegistry);
+        this.emitter = new Emitter(client);
+    }
+    dispose() {
+        this.checker.dispose();
+    }
+}
+export class Program {
+    snapshotId;
+    project;
+    client;
+    sourceFileCache;
+    toPath;
+    decoder = new Wtf8Decoder();
+    sourceFileMetadataCache = new Map();
+    constructor(snapshotId, project, client, sourceFileCache, toPath) {
+        this.snapshotId = snapshotId;
+        this.project = project;
+        this.client = client;
+        this.sourceFileCache = sourceFileCache;
+        this.toPath = toPath;
+    }
+    getCompilerOptions() {
+        return this.project.compilerOptions;
+    }
+    getSourceFile(file) {
+        const fileName = resolveFileName(file);
+        const path = this.toPath(fileName);
+        // Check if we already have a retained cache entry for this (snapshot, project) pair
+        const retained = this.sourceFileCache.getRetained(path, this.snapshotId, this.project.id);
+        if (retained) {
+            return retained;
+        }
+        // Fetch from server
+        const binaryData = this.client.apiRequestBinary("getSourceFile", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+        });
+        if (!binaryData) {
+            return undefined;
+        }
+        const view = new DataView(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength);
+        const contentHash = readSourceFileHash(view);
+        const parseOptionsKey = readParseOptionsKey(view);
+        // Create a new RemoteSourceFile and cache it (set returns existing if hash matches)
+        const sourceFile = new RemoteSourceFile(binaryData, this.decoder, this.client.getTimingCollector());
+        return this.sourceFileCache.set(path, sourceFile, parseOptionsKey, contentHash, this.snapshotId, this.project.id);
+    }
+    getSourceFileNames() {
+        const data = this.client.apiRequest("getSourceFileNames", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+    /**
+     * Returns program-stored metadata for the given source file, or `undefined` if the file
+     * is not part of the program. Metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    getSourceFileMetadata(fileName) {
+        return this.getSourceFileMetadataByPath(this.toPath(fileName));
+    }
+    /**
+     * Returns program-stored metadata for the source file at the given path, or `undefined`
+     * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips
+     * the file name to path conversion. Metadata is fetched lazily per file and cached on
+     * this `Program` instance.
+     */
+    getSourceFileMetadataByPath(path) {
+        let metadata = this.sourceFileMetadataCache.get(path);
+        if (metadata === undefined) {
+            metadata = this.fetchSourceFileMetadata(path);
+            this.sourceFileMetadataCache.set(path, metadata);
+        }
+        return metadata;
+    }
+    fetchSourceFileMetadata(path) {
+        const data = this.client.apiRequest("getSourceFileMetadata", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file: path,
+        });
+        return data ?? undefined;
+    }
+    /**
+     * Returns whether the given source file was loaded as part of an external library
+     * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is
+     * fetched lazily per file and cached on this `Program` instance.
+     */
+    isSourceFileFromExternalLibrary(file) {
+        const metadata = this.getSourceFileMetadataByPath(file.path);
+        return metadata?.isFromExternalLibrary ?? false;
+    }
+    /**
+     * Returns whether the given source file is a default library file (e.g. `lib.d.ts`).
+     * The underlying program metadata is fetched lazily per file and cached on this
+     * `Program` instance.
+     */
+    isSourceFileDefaultLibrary(file) {
+        const metadata = this.getSourceFileMetadataByPath(file.path);
+        return metadata?.isDefaultLibrary ?? false;
+    }
+    /**
+     * Get syntactic (parse) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSyntacticDiagnostics(file) {
+        const data = this.client.apiRequest("getSyntacticDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get binder diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getBindDiagnostics(file) {
+        const data = this.client.apiRequest("getBindDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get semantic (type-check) diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSemanticDiagnostics(file) {
+        const data = this.client.apiRequest("getSemanticDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get suggestion diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getSuggestionDiagnostics(file) {
+        const data = this.client.apiRequest("getSuggestionDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get declaration emit diagnostics for a specific file or all files.
+     * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
+     */
+    getDeclarationDiagnostics(file) {
+        const data = this.client.apiRequest("getDeclarationDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            ...(file !== undefined ? { file } : {}),
+        });
+        return data ?? [];
+    }
+    /**
+     * Get program-wide diagnostics for the project, including compiler options diagnostics.
+     */
+    getProgramDiagnostics() {
+        const data = this.client.apiRequest("getProgramDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+    /**
+     * Get global (non-file-specific) semantic diagnostics for the project.
+     */
+    getGlobalDiagnostics() {
+        const data = this.client.apiRequest("getGlobalDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+    /**
+     * Get config file parsing diagnostics for the project.
+     */
+    getConfigFileParsingDiagnostics() {
+        const data = this.client.apiRequest("getConfigFileParsingDiagnostics", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return data ?? [];
+    }
+}
+export class Checker {
+    snapshotId;
+    project;
+    client;
+    objectRegistry;
+    wellKnownSymbols;
+    constructor(snapshotId, project, client, objectRegistry) {
+        this.snapshotId = snapshotId;
+        this.project = project;
+        this.client = client;
+        this.objectRegistry = objectRegistry;
+    }
+    dispose() {
+        this.objectRegistry.clear();
+    }
+    getSymbolAtLocation(nodeOrNodes) {
+        if (Array.isArray(nodeOrNodes)) {
+            const data = this.client.apiRequest("getSymbolsAtLocations", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                locations: nodeOrNodes.map(node => getNodeId(node)),
+            });
+            return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined);
+        }
+        const data = this.client.apiRequest("getSymbolAtLocation", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(nodeOrNodes),
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    getSymbolAtPosition(file, positionOrPositions) {
+        if (typeof positionOrPositions === "number") {
+            const data = this.client.apiRequest("getSymbolAtPosition", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                file,
+                position: positionOrPositions,
+            });
+            return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+        }
+        const data = this.client.apiRequest("getSymbolsAtPositions", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+            positions: positionOrPositions,
+        });
+        return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined);
+    }
+    getTypeOfSymbol(symbolOrSymbols) {
+        if (Array.isArray(symbolOrSymbols)) {
+            const data = this.client.apiRequest("getTypesOfSymbols", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                symbols: symbolOrSymbols.map(s => s.id),
+            });
+            return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined);
+        }
+        const data = this.client.apiRequest("getTypeOfSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbolOrSymbols.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    /**
+     * Get the declared type of a symbol. Always returns a type; for symbols whose
+     * declared type cannot be determined the checker yields the error type (use
+     * {@link Type.isErrorType} to detect it).
+     */
+    getDeclaredTypeOfSymbol(symbol) {
+        const data = this.client.apiRequest("getDeclaredTypeOfSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        if (!data)
+            throw new Error(`getDeclaredTypeOfSymbol returned no type for symbol ${symbol.id}`);
+        return this.objectRegistry.getOrCreateType(data);
+    }
+    getReferencesToSymbolInFile(file, symbol) {
+        const data = this.client.apiRequest("getReferencesToSymbolInFile", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+            symbol: symbol.id,
+        });
+        return (data ?? []).map(h => new NodeHandle(h, this.project));
+    }
+    getReferencedSymbolsForNode(node, position) {
+        const data = this.client.apiRequest("getReferencedSymbolsForNode", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            node: getNodeId(node),
+            position,
+        });
+        return (data ?? []).map(entry => ({
+            definition: new NodeHandle(entry.definition, this.project),
+            symbol: entry.symbol ? this.objectRegistry.getOrCreateSymbol(entry.symbol) : undefined,
+            references: (entry.references ?? []).map(h => new NodeHandle(h, this.project)),
+        }));
+    }
+    getSignatureUsage(signatureDecl) {
+        const data = this.client.apiRequest("getSignatureUsages", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signatureDecl: getNodeId(signatureDecl),
+        });
+        return (data ?? []).map(entry => ({
+            name: new NodeHandle(entry.name, this.project),
+            call: entry.call ? new NodeHandle(entry.call, this.project) : undefined,
+        }));
+    }
+    getCompletionsAtPosition(document, position, options) {
+        const data = this.client.apiRequest("getCompletionsAtPosition", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file: document,
+            position,
+            triggerCharacter: options?.triggerCharacter,
+            includeSymbol: options?.includeSymbol,
+        });
+        if (!data)
+            return undefined;
+        return {
+            isIncomplete: data.isIncomplete,
+            entries: data.entries.map(e => ({
+                ...e,
+                symbol: e.symbol ? this.objectRegistry.getOrCreateSymbol(e.symbol) : undefined,
+            })),
+        };
+    }
+    getTypeAtLocation(nodeOrNodes) {
+        if (Array.isArray(nodeOrNodes)) {
+            const data = this.client.apiRequest("getTypeAtLocations", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                locations: nodeOrNodes.map(node => getNodeId(node)),
+            });
+            return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined);
+        }
+        const data = this.client.apiRequest("getTypeAtLocation", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(nodeOrNodes),
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getSignaturesOfType(type, kind) {
+        const data = this.client.apiRequest("getSignaturesOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            kind,
+        });
+        return data.map(d => this.objectRegistry.getOrCreateSignature(d));
+    }
+    getResolvedSignature(node) {
+        const data = this.client.apiRequest("getResolvedSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSignature(data) : undefined;
+    }
+    getTypeAtPosition(file, positionOrPositions) {
+        if (typeof positionOrPositions === "number") {
+            const data = this.client.apiRequest("getTypeAtPosition", {
+                snapshot: this.snapshotId,
+                project: this.project.id,
+                file,
+                position: positionOrPositions,
+            });
+            return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+        }
+        const data = this.client.apiRequest("getTypesAtPositions", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            file,
+            positions: positionOrPositions,
+        });
+        return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined);
+    }
+    resolveName(name, meaning, location, excludeGlobals) {
+        // Distinguish Node (has `kind`) from DocumentPosition (has `document` and `position`)
+        const isNode = location && "kind" in location;
+        const data = this.client.apiRequest("resolveName", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            name,
+            meaning,
+            location: isNode ? getNodeId(location) : undefined,
+            file: !isNode && location ? location.document : undefined,
+            position: !isNode && location ? location.position : undefined,
+            excludeGlobals,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    getResolvedSymbol(node) {
+        const text = node.text;
+        if (!text)
+            return undefined;
+        return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node);
+    }
+    getContextualType(node) {
+        const data = this.client.apiRequest("getContextualType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getBaseTypeOfLiteralType(type) {
+        const data = this.client.apiRequest("getBaseTypeOfLiteralType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getNonNullableType(type) {
+        const data = this.client.apiRequest("getNonNullableType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getTypeFromTypeNode(node) {
+        const data = this.client.apiRequest("getTypeFromTypeNode", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getWidenedType(type) {
+        const data = this.client.apiRequest("getWidenedType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getParameterType(signature, index) {
+        const data = this.client.apiRequest("getParameterType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+            index,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    isArrayLikeType(type) {
+        return this.client.apiRequest("isArrayLikeType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+    }
+    isTypeAssignableTo(source, target) {
+        return this.client.apiRequest("isTypeAssignableTo", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            source: source.id,
+            target: target.id,
+        });
+    }
+    getShorthandAssignmentValueSymbol(node) {
+        const data = this.client.apiRequest("getShorthandAssignmentValueSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    /**
+     * Get the type of a symbol as narrowed at a specific location. Always returns
+     * a type; for symbols whose type cannot be determined the checker yields the
+     * error type (use {@link Type.isErrorType} to detect it).
+     */
+    getTypeOfSymbolAtLocation(symbol, location) {
+        const data = this.client.apiRequest("getTypeOfSymbolAtLocation", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+            location: getNodeId(location),
+        });
+        if (!data)
+            throw new Error(`getTypeOfSymbolAtLocation returned no type for symbol ${symbol.id}`);
+        return this.objectRegistry.getOrCreateType(data);
+    }
+    getIntrinsicType(method) {
+        const data = this.client.apiRequest(method, {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+        return this.objectRegistry.getOrCreateType(data);
+    }
+    getAnyType() {
+        return this.getIntrinsicType("getAnyType");
+    }
+    getStringType() {
+        return this.getIntrinsicType("getStringType");
+    }
+    getNumberType() {
+        return this.getIntrinsicType("getNumberType");
+    }
+    getBooleanType() {
+        return this.getIntrinsicType("getBooleanType");
+    }
+    getVoidType() {
+        return this.getIntrinsicType("getVoidType");
+    }
+    getUndefinedType() {
+        return this.getIntrinsicType("getUndefinedType");
+    }
+    getNullType() {
+        return this.getIntrinsicType("getNullType");
+    }
+    getNeverType() {
+        return this.getIntrinsicType("getNeverType");
+    }
+    getUnknownType() {
+        return this.getIntrinsicType("getUnknownType");
+    }
+    getBigIntType() {
+        return this.getIntrinsicType("getBigIntType");
+    }
+    getESSymbolType() {
+        return this.getIntrinsicType("getESSymbolType");
+    }
+    typeToTypeNode(type, enclosingDeclaration, flags) {
+        const binaryData = this.client.apiRequestBinary("typeToTypeNode", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined,
+            flags,
+        });
+        if (!binaryData)
+            return undefined;
+        return decodeNode(binaryData);
+    }
+    signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags) {
+        const binaryData = this.client.apiRequestBinary("signatureToSignatureDeclaration", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+            kind,
+            location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined,
+            flags,
+        });
+        if (!binaryData)
+            return undefined;
+        return decodeNode(binaryData);
+    }
+    typeToString(type, enclosingDeclaration, flags) {
+        return this.client.apiRequest("typeToString", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined,
+            flags,
+        });
+    }
+    isContextSensitive(node) {
+        return this.client.apiRequest("isContextSensitive", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+    }
+    isArrayType(type) {
+        return this.client.apiRequest("isArrayType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+    }
+    isTupleType(type) {
+        return this.client.apiRequest("isTupleType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+    }
+    getReturnTypeOfSignature(signature) {
+        const data = this.client.apiRequest("getReturnTypeOfSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getRestTypeOfSignature(signature) {
+        const data = this.client.apiRequest("getRestTypeOfSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getTypePredicateOfSignature(signature) {
+        const data = this.client.apiRequest("getTypePredicateOfSignature", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            signature: signature.id,
+        });
+        if (!data)
+            return undefined;
+        return {
+            kind: data.kind,
+            parameterIndex: data.parameterIndex,
+            parameterName: data.parameterName,
+            type: data.type ? this.objectRegistry.getOrCreateType(data.type) : undefined,
+        };
+    }
+    /**
+     * Get the base types of a class or interface type. A type with no base types
+     * yields an empty array.
+     */
+    getBaseTypes(type) {
+        const data = this.client.apiRequest("getBaseTypes", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : [];
+    }
+    getApparentType(type) {
+        const data = this.client.apiRequest("getApparentType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getPropertiesOfType(type) {
+        const data = this.client.apiRequest("getPropertiesOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : [];
+    }
+    getIndexInfosOfType(type) {
+        const data = this.client.apiRequest("getIndexInfosOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        if (!data)
+            return [];
+        return data.map(d => ({
+            keyType: this.objectRegistry.getOrCreateType(d.keyType),
+            valueType: this.objectRegistry.getOrCreateType(d.valueType),
+            isReadonly: d.isReadonly ?? false,
+            declaration: d.declaration ? new NodeHandle(d.declaration, this.project) : undefined,
+        }));
+    }
+    /**
+     * Get the constraint of a type parameter (the `T` in ``), or
+     * undefined if it has none.
+     */
+    getConstraintOfTypeParameter(type) {
+        const data = this.client.apiRequest("getConstraintOfTypeParameter", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getBaseConstraintOfType(type) {
+        const data = this.client.apiRequest("getBaseConstraintOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? this.objectRegistry.getOrCreateType(data) : undefined;
+    }
+    getPropertyOfType(type, name) {
+        const data = this.client.apiRequest("getPropertyOfType", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+            name,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    getConstantValue(node) {
+        const data = this.client.apiRequest("getConstantValue", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ?? undefined;
+    }
+    getSignatureFromDeclaration(node) {
+        const data = this.client.apiRequest("getSignatureFromDeclaration", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSignature(data) : undefined;
+    }
+    getExportSpecifierLocalTargetSymbol(node) {
+        const data = this.client.apiRequest("getExportSpecifierLocalTargetSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            location: getNodeId(node),
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    /**
+     * Follow all aliases to get the original symbol. Always returns a symbol; for
+     * an unresolved alias the checker yields the unknown symbol (use
+     * {@link Checker.isUnknownSymbol} to detect it).
+     */
+    getAliasedSymbol(symbol) {
+        const data = this.client.apiRequest("getAliasedSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        if (!data)
+            throw new Error(`getAliasedSymbol returned no symbol for symbol ${symbol.id}`);
+        return this.objectRegistry.getOrCreateSymbol(data);
+    }
+    getImmediateAliasedSymbol(symbol) {
+        const data = this.client.apiRequest("getImmediateAliasedSymbol", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    /**
+     * Fetch (once, then cache) the handle ids of the per-checker singleton
+     * symbols (unknown, undefined, arguments). These ids are stable for the life
+     * of the project's checker, so identity checks against them are local after
+     * the first call.
+     */
+    getWellKnownSymbols() {
+        return this.wellKnownSymbols ??= this.client.apiRequest("getWellKnownSymbols", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+        });
+    }
+    /**
+     * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the
+     * result of {@link Checker.getAliasedSymbol} on an unresolved alias).
+     */
+    isUnknownSymbol(symbol) {
+        return symbol.id === (this.getWellKnownSymbols()).unknown;
+    }
+    /**
+     * Returns `true` if the symbol is the checker's "undefined" symbol.
+     */
+    isUndefinedSymbol(symbol) {
+        return symbol.id === (this.getWellKnownSymbols()).undefined;
+    }
+    /**
+     * Returns `true` if the symbol is the checker's "arguments" symbol.
+     */
+    isArgumentsSymbol(symbol) {
+        return symbol.id === (this.getWellKnownSymbols()).arguments;
+    }
+    getExportsOfModule(symbol) {
+        const data = this.client.apiRequest("getExportsOfModule", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : [];
+    }
+    getMemberInModuleExports(symbol, name) {
+        const data = this.client.apiRequest("getMemberInModuleExports", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+            name,
+        });
+        return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined;
+    }
+    getJsDocTagsOfSymbol(symbol) {
+        const data = this.client.apiRequest("getJsDocTags", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+        return data ?? [];
+    }
+    getDocumentationCommentOfSymbol(symbol) {
+        return this.client.apiRequest("getDocumentationComment", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            symbol: symbol.id,
+        });
+    }
+    /**
+     * Get the type arguments of a type reference (e.g. the `string` in `Array`).
+     */
+    getTypeArguments(type) {
+        const data = this.client.apiRequest("getTypeArguments", {
+            snapshot: this.snapshotId,
+            project: this.project.id,
+            type: type.id,
+        });
+        return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : [];
+    }
+}
+export class Emitter {
+    client;
+    constructor(client) {
+        this.client = client;
+    }
+    printNode(node, options = {}) {
+        const encoded = encodeNode(node);
+        const base64 = uint8ArrayToBase64(encoded);
+        return this.client.apiRequest("printNode", {
+            data: base64,
+            ...options,
+        });
+    }
+}
+export class NodeHandle {
+    /**
+     * The project this handle was produced in, used as the default for {@link resolve}.
+     * Node handles are only meaningful within a project's program, so the producing project
+     * is remembered so callers don't have to pass it explicitly.
+     */
+    canonicalProject;
+    index;
+    kind;
+    path;
+    constructor(handle, canonicalProject) {
+        const parsed = parseNodeHandle(handle);
+        this.index = parsed.index;
+        this.kind = parsed.kind;
+        this.path = parsed.path;
+        this.canonicalProject = canonicalProject;
+    }
+    /**
+     * Resolve this handle to the actual AST node by fetching the source file from a project
+     * and looking up the node by index. If no project is passed, the project that produced
+     * the handle is used.
+     */
+    resolve(project = this.canonicalProject) {
+        const sourceFile = project.program.getSourceFile(this.path);
+        if (!sourceFile) {
+            return undefined;
+        }
+        return sourceFile.getOrCreateNodeAtIndex(this.index);
+    }
+}
+export class Symbol {
+    objectRegistry;
+    /**
+     * The project this symbol was first observed in, used as the default project for
+     * lookups that need a project context (members/exports/parent). Symbols are shared
+     * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use.
+     */
+    canonicalProject;
+    id;
+    /** The escaped (`__String`) name, used as the key in member/export tables. */
+    escapedName;
+    /** The display name (escaped underscores removed). */
+    name;
+    flags;
+    checkFlags;
+    declarations;
+    valueDeclaration;
+    parent;
+    exportSymbol;
+    membersCache;
+    exportsCache;
+    constructor(data, objectRegistry) {
+        this.objectRegistry = objectRegistry;
+        this.id = data.id;
+        this.escapedName = data.name;
+        this.name = unescapeLeadingUnderscores(data.name);
+        this.flags = data.flags;
+        this.checkFlags = data.checkFlags;
+        const canonicalProject = objectRegistry.getProject(data.project);
+        if (!canonicalProject) {
+            throw new Error(`Symbol ${data.id} references unknown canonical project '${data.project}'`);
+        }
+        this.canonicalProject = canonicalProject;
+        this.declarations = (data.declarations ?? []).map(d => new NodeHandle(d, canonicalProject));
+        this.valueDeclaration = data.valueDeclaration ? new NodeHandle(data.valueDeclaration, canonicalProject) : undefined;
+        if (data.parent !== undefined)
+            this.parent = data.parent;
+        if (data.exportSymbol !== undefined)
+            this.exportSymbol = data.exportSymbol;
+    }
+    getParent() {
+        return this.objectRegistry.fetchSymbol(this, "getParentOfSymbol", this.parent, this.canonicalProject.id);
+    }
+    /**
+     * Get this symbol's members keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getMembers() {
+        return this.membersCache ??= this.fetchSymbolTable("getMembersOfSymbol");
+    }
+    /**
+     * Get this symbol's exports keyed by escaped name. The result is cached on
+     * the symbol, so repeated calls do not round-trip to the server.
+     */
+    getExports() {
+        return this.exportsCache ??= this.fetchSymbolTable("getExportsOfSymbol");
+    }
+    fetchSymbolTable(method) {
+        const symbols = this.objectRegistry.fetchSymbols(this, method, undefined, this.canonicalProject.id);
+        const table = new Map();
+        for (const symbol of symbols) {
+            table.set(symbol.escapedName, symbol);
+        }
+        return table;
+    }
+    getExportSymbol() {
+        if (!this.exportSymbol)
+            return this;
+        return this.objectRegistry.fetchSymbol(this, "getExportSymbolOfSymbol", this.exportSymbol, this.canonicalProject.id);
+    }
+    getJsDocTags(checker) {
+        return checker.getJsDocTagsOfSymbol(this);
+    }
+    getDocumentationComment(checker) {
+        return checker.getDocumentationCommentOfSymbol(this);
+    }
+}
+class TypeObject {
+    objectRegistry;
+    id;
+    flags;
+    objectFlags;
+    symbol;
+    value;
+    intrinsicName;
+    isThisType;
+    freshType;
+    regularType;
+    target;
+    typeParameters;
+    outerTypeParameters;
+    localTypeParameters;
+    aliasTypeArguments;
+    aliasSymbol;
+    elementFlags;
+    fixedLength;
+    readonly;
+    texts;
+    objectType;
+    indexType;
+    checkType;
+    extendsType;
+    baseType;
+    substConstraint;
+    trueType; // false if not yet loaded
+    falseType; // false if not yet loaded
+    constructor(data, objectRegistry) {
+        this.objectRegistry = objectRegistry;
+        this.id = data.id;
+        this.flags = data.flags;
+        if (data.objectFlags !== undefined)
+            this.objectFlags = data.objectFlags;
+        if (data.symbol !== undefined)
+            this.symbol = data.symbol;
+        if (data.value != null) {
+            // BigInt literal values are serialized as decimal strings (e.g. "-123") because
+            // JSON cannot represent bigint. Decode them back into a real bigint here.
+            this.value = (data.flags & TypeFlags.BigIntLiteral) ? BigInt(data.value) : data.value;
+        }
+        if (data.intrinsicName !== undefined)
+            this.intrinsicName = data.intrinsicName;
+        if (data.isThisType !== undefined)
+            this.isThisType = data.isThisType;
+        if (data.freshType !== undefined)
+            this.freshType = data.freshType;
+        if (data.regularType !== undefined)
+            this.regularType = data.regularType;
+        if (data.target !== undefined)
+            this.target = data.target;
+        this.typeParameters = data.typeParameters ?? [];
+        this.outerTypeParameters = data.outerTypeParameters ?? [];
+        this.localTypeParameters = data.localTypeParameters ?? [];
+        this.aliasTypeArguments = data.aliasTypeArguments ?? [];
+        if (data.aliasSymbol !== undefined)
+            this.aliasSymbol = data.aliasSymbol;
+        if (data.elementFlags !== undefined)
+            this.elementFlags = data.elementFlags;
+        if (data.fixedLength !== undefined)
+            this.fixedLength = data.fixedLength;
+        if (data.readonly !== undefined)
+            this.readonly = data.readonly;
+        if (data.texts !== undefined)
+            this.texts = data.texts;
+        if (data.objectType !== undefined)
+            this.objectType = data.objectType;
+        if (data.indexType !== undefined)
+            this.indexType = data.indexType;
+        if (data.checkType !== undefined)
+            this.checkType = data.checkType;
+        if (data.extendsType !== undefined)
+            this.extendsType = data.extendsType;
+        if (data.baseType !== undefined)
+            this.baseType = data.baseType;
+        if (data.substConstraint !== undefined)
+            this.substConstraint = data.substConstraint;
+        this.trueType = false;
+        this.falseType = false;
+    }
+    getSymbol() {
+        return this.objectRegistry.fetchSymbol(this, "getSymbolOfType", this.symbol);
+    }
+    getAliasSymbol() {
+        return this.objectRegistry.fetchSymbol(this, "getAliasSymbolOfType", this.aliasSymbol);
+    }
+    getTarget() {
+        return this.objectRegistry.fetchType(this, "getTargetOfType", this.target);
+    }
+    getFreshType() {
+        return this.objectRegistry.fetchType(this, "getFreshTypeOfType", this.freshType);
+    }
+    getRegularType() {
+        return this.objectRegistry.fetchType(this, "getRegularTypeOfType", this.regularType);
+    }
+    getTypes() {
+        // Only union, intersection, and template literal types have constituent
+        // types; any other kind has none, so return undefined rather than sending
+        // a request the server cannot satisfy.
+        if (!(this.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral))) {
+            return undefined;
+        }
+        return this.objectRegistry.fetchTypes(this, "getTypesOfType");
+    }
+    getTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getTypeParametersOfType", this.typeParameters);
+    }
+    getOuterTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getOuterTypeParametersOfType", this.outerTypeParameters);
+    }
+    getLocalTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getLocalTypeParametersOfType", this.localTypeParameters);
+    }
+    getAliasTypeArguments() {
+        return this.objectRegistry.fetchTypes(this, "getAliasTypeArgumentsOfType", this.aliasTypeArguments);
+    }
+    getObjectType() {
+        return this.objectRegistry.fetchType(this, "getObjectTypeOfType", this.objectType);
+    }
+    getIndexType() {
+        return this.objectRegistry.fetchType(this, "getIndexTypeOfType", this.indexType);
+    }
+    getCheckType() {
+        return this.objectRegistry.fetchType(this, "getCheckTypeOfType", this.checkType);
+    }
+    getExtendsType() {
+        return this.objectRegistry.fetchType(this, "getExtendsTypeOfType", this.extendsType);
+    }
+    getBaseType() {
+        return this.objectRegistry.fetchType(this, "getBaseTypeOfType", this.baseType);
+    }
+    getConstraint() {
+        return this.objectRegistry.fetchType(this, "getConstraintOfType", this.substConstraint);
+    }
+    getTrueType() {
+        const result = this.objectRegistry.fetchType(this, "getTrueTypeOfConditionalType", this.trueType);
+        this.trueType = result.id;
+        return result;
+    }
+    getFalseType() {
+        const result = this.objectRegistry.fetchType(this, "getFalseTypeOfConditionalType", this.falseType);
+        this.falseType = result.id;
+        return result;
+    }
+    /**
+     * Get the base types of this type. Returns `undefined` for any type that is
+     * not a class or interface.
+     */
+    getBaseTypes() {
+        if (!this.isClassOrInterface()) {
+            return undefined;
+        }
+        return this.objectRegistry.fetchBaseTypes(this);
+    }
+    isClassOrInterface() {
+        return isClassOrInterfaceType(this);
+    }
+    isUnionType() {
+        return isUnionType(this);
+    }
+    isIntersectionType() {
+        return isIntersectionType(this);
+    }
+    isObjectType() {
+        return isObjectType(this);
+    }
+    isIntrinsicType() {
+        return isIntrinsicType(this);
+    }
+    isErrorType() {
+        return isErrorType(this);
+    }
+    isLiteralType() {
+        return isLiteralType(this);
+    }
+    isStringLiteralType() {
+        return isStringLiteralType(this);
+    }
+    isNumberLiteralType() {
+        return isNumberLiteralType(this);
+    }
+    isBigIntLiteralType() {
+        return isBigIntLiteralType(this);
+    }
+    isBooleanLiteralType() {
+        return isBooleanLiteralType(this);
+    }
+    isTypeReference() {
+        return isTypeReference(this);
+    }
+    isTupleType() {
+        return isTupleType(this);
+    }
+    isIndexType() {
+        return isIndexType(this);
+    }
+    isIndexedAccessType() {
+        return isIndexedAccessType(this);
+    }
+    isConditionalType() {
+        return isConditionalType(this);
+    }
+    isSubstitutionType() {
+        return isSubstitutionType(this);
+    }
+    isTemplateLiteralType() {
+        return isTemplateLiteralType(this);
+    }
+    isStringMappingType() {
+        return isStringMappingType(this);
+    }
+    isTypeParameter() {
+        return isTypeParameter(this);
+    }
+}
+export function isUnionType(type) {
+    return (type.flags & TypeFlags.Union) !== 0;
+}
+export function isIntersectionType(type) {
+    return (type.flags & TypeFlags.Intersection) !== 0;
+}
+export function isObjectType(type) {
+    return (type.flags & TypeFlags.Object) !== 0;
+}
+export function isClassOrInterfaceType(type) {
+    return isObjectType(type) && (type.objectFlags & ObjectFlags.ClassOrInterface) !== 0;
+}
+export function isIntrinsicType(type) {
+    return (type.flags & TypeFlags.Intrinsic) !== 0;
+}
+/**
+ * Whether this is the error type — the placeholder the checker produces when a
+ * type cannot be determined (e.g. an unresolved reference). It is an intrinsic
+ * type named `"error"` (this covers both the singleton error type and the
+ * per-alias error types manufactured for unresolved type alias references).
+ */
+export function isErrorType(type) {
+    return isIntrinsicType(type) && type.intrinsicName === "error";
+}
+export function isLiteralType(type) {
+    return (type.flags & TypeFlags.Literal) !== 0;
+}
+export function isStringLiteralType(type) {
+    return (type.flags & TypeFlags.StringLiteral) !== 0;
+}
+export function isNumberLiteralType(type) {
+    return (type.flags & TypeFlags.NumberLiteral) !== 0;
+}
+export function isBigIntLiteralType(type) {
+    return (type.flags & TypeFlags.BigIntLiteral) !== 0;
+}
+export function isBooleanLiteralType(type) {
+    return (type.flags & TypeFlags.BooleanLiteral) !== 0;
+}
+export function isTypeReference(type) {
+    return isObjectType(type) && (type.objectFlags & ObjectFlags.Reference) !== 0;
+}
+export function isTupleType(type) {
+    return isObjectType(type) && (type.objectFlags & ObjectFlags.Tuple) !== 0;
+}
+export function isIndexType(type) {
+    return (type.flags & TypeFlags.Index) !== 0;
+}
+export function isIndexedAccessType(type) {
+    return (type.flags & TypeFlags.IndexedAccess) !== 0;
+}
+export function isConditionalType(type) {
+    return (type.flags & TypeFlags.Conditional) !== 0;
+}
+export function isSubstitutionType(type) {
+    return (type.flags & TypeFlags.Substitution) !== 0;
+}
+export function isTemplateLiteralType(type) {
+    return (type.flags & TypeFlags.TemplateLiteral) !== 0;
+}
+export function isStringMappingType(type) {
+    return (type.flags & TypeFlags.StringMapping) !== 0;
+}
+export function isTypeParameter(type) {
+    return (type.flags & TypeFlags.TypeParameter) !== 0;
+}
+export class Signature {
+    flags;
+    objectRegistry;
+    id;
+    declaration;
+    typeParameters;
+    parameters;
+    thisParameter;
+    target;
+    constructor(data, project, objectRegistry) {
+        this.id = data.id;
+        this.flags = data.flags;
+        this.objectRegistry = objectRegistry;
+        this.declaration = data.declaration ? new NodeHandle(data.declaration, project) : undefined;
+        this.typeParameters = data.typeParameters ?? [];
+        this.parameters = data.parameters ?? [];
+        this.thisParameter = data.thisParameter;
+        this.target = data.target;
+    }
+    getTypeParameters() {
+        return this.objectRegistry.fetchTypes(this, "getTypeParametersOfSignature", this.typeParameters);
+    }
+    getParameters() {
+        return this.objectRegistry.fetchSymbols(this, "getParametersOfSignature", this.parameters);
+    }
+    getThisParameter() {
+        return this.objectRegistry.fetchSymbol(this, "getThisParameterOfSignature", this.thisParameter);
+    }
+    getTarget() {
+        return this.objectRegistry.fetchSignature(this, "getTargetOfSignature", this.target);
+    }
+    get hasRestParameter() {
+        return (this.flags & SignatureFlags.HasRestParameter) !== 0;
+    }
+    get isConstruct() {
+        return (this.flags & SignatureFlags.Construct) !== 0;
+    }
+    get isAbstract() {
+        return (this.flags & SignatureFlags.Abstract) !== 0;
+    }
+}
+//# sourceMappingURL=api.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/api.js.map b/node_modules/typescript/dist/api/sync/api.js.map
new file mode 100644
index 000000000..225bab119
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/api.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/sync/api.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,oDAAoD;AACpD,oDAAoD;AACpD,oDAAoD;AACpD,EAAE;AACF,+BAA+B;AAC/B,+DAA+D;AAC/D,EAAE;AACF,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D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;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE,8BAA8B,EAAE,IAAI,CAAC,cAAc,CAA6B,CAAC;IACjI,CAAC;IAED,aAAa;QACT,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,0BAA0B,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/F,CAAC;IAED,gBAAgB;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,EAAE,6BAA6B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACpG,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,WAAW;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/client.d.ts b/node_modules/typescript/dist/api/sync/client.d.ts
new file mode 100644
index 000000000..2b3e08fe5
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/client.d.ts
@@ -0,0 +1,30 @@
+import { type ClientOptions, type ClientSocketOptions, type ClientSpawnOptions } from "../options.ts";
+import { TimingCollector, type TimingInfo } from "../timing.ts";
+export type { ClientOptions, ClientSocketOptions, ClientSpawnOptions };
+export declare class Client {
+    private channel;
+    private encoder;
+    private timing;
+    constructor(options: ClientOptions);
+    apiRequest(method: string, params?: unknown): T;
+    apiRequestBinary(method: string, params?: unknown): Uint8Array | undefined;
+    echo(payload: string): string;
+    echoBinary(payload: Uint8Array): Uint8Array;
+    /**
+     * Returns a combined timing snapshot: client-measured round-trip and byte
+     * counts folded together with the server's own per-request processing time
+     * (fetched via a getServerTiming request) and estimated transport overhead.
+     */
+    getTimingInfo(): TimingInfo;
+    resetTimingInfo(): void;
+    /**
+     * Returns the timing collector that per-node materialization is reported
+     * into, or undefined when timing collection is disabled. The returned
+     * collector is the same one folded into {@link getTimingInfo}, so
+     * materialization totals surface alongside request timings.
+     */
+    getTimingCollector(): TimingCollector | undefined;
+    private recordTiming;
+    close(): void;
+}
+//# sourceMappingURL=client.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/client.d.ts.map b/node_modules/typescript/dist/api/sync/client.d.ts.map
new file mode 100644
index 000000000..09b1252c5
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/client.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/sync/client.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAG1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIH,eAAe,EACf,KAAK,UAAU,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAEvE,qBAAa,MAAM;IACf,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,MAAM,CAA8B;gBAEhC,OAAO,EAAE,aAAa;IAmDlC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC;IAWlD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS;IAQ1E,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI7B,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU;IAI3C;;;;OAIG;IACH,aAAa,IAAI,UAAU;IAW3B,eAAe,IAAI,IAAI;IAOvB;;;;;OAKG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD,OAAO,CAAC,YAAY;IAUpB,KAAK,IAAI,IAAI;CAGhB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/client.js b/node_modules/typescript/dist/api/sync/client.js
new file mode 100644
index 000000000..59e4145a0
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/client.js
@@ -0,0 +1,124 @@
+import { fsCallbackNames } from "../fs.js";
+import { isSpawnOptions, resolveExePath, } from "../options.js";
+import { SyncRpcChannel } from "../syncChannel.js";
+import { combineTimingInfo, disabledTimingInfo, TimingCollector, } from "../timing.js";
+export class Client {
+    channel;
+    encoder = new TextEncoder();
+    timing;
+    constructor(options) {
+        if (!isSpawnOptions(options)) {
+            throw new Error("Socket connections are not yet supported in the sync client");
+        }
+        const cwd = options.cwd ?? process.cwd();
+        const args = [
+            "--api",
+            "--cwd",
+            cwd,
+        ];
+        // Enable virtual FS callbacks for each provided FS function
+        const enabledCallbacks = [];
+        if (options.fs) {
+            for (const name of fsCallbackNames) {
+                if (options.fs[name]) {
+                    enabledCallbacks.push(name);
+                }
+            }
+        }
+        if (enabledCallbacks.length > 0) {
+            args.push(`--callbacks=${enabledCallbacks.join(",")}`);
+        }
+        const collectTiming = options.collectTiming ?? false;
+        if (collectTiming) {
+            args.push("--timing");
+            this.timing = new TimingCollector();
+        }
+        const channel = new SyncRpcChannel(resolveExePath(options), args, collectTiming);
+        this.channel = channel;
+        if (options.fs) {
+            for (const name of enabledCallbacks) {
+                const callback = options.fs[name];
+                channel.registerCallback(name, (_, arg) => {
+                    const result = callback(JSON.parse(arg));
+                    if (name === "readFile") {
+                        // readFile has 3 returns: string (content), null (not found), undefined (fall back).
+                        // Wrap in object to preserve null vs undefined distinction.
+                        if (result === undefined)
+                            return "";
+                        return JSON.stringify({ content: result });
+                    }
+                    return JSON.stringify(result) ?? "";
+                });
+            }
+        }
+    }
+    apiRequest(method, params) {
+        const encodedPayload = JSON.stringify(params);
+        const start = performance.now();
+        const result = this.channel.requestSync(method, encodedPayload);
+        this.recordTiming(method, start);
+        if (result.length) {
+            return JSON.parse(result);
+        }
+        return undefined;
+    }
+    apiRequestBinary(method, params) {
+        const start = performance.now();
+        const result = this.channel.requestBinarySync(method, this.encoder.encode(JSON.stringify(params)));
+        this.recordTiming(method, start);
+        if (result.length === 0)
+            return undefined;
+        return result;
+    }
+    echo(payload) {
+        return this.channel.requestSync("echo", payload);
+    }
+    echoBinary(payload) {
+        return this.channel.requestBinarySync("echo", payload);
+    }
+    /**
+     * Returns a combined timing snapshot: client-measured round-trip and byte
+     * counts folded together with the server's own per-request processing time
+     * (fetched via a getServerTiming request) and estimated transport overhead.
+     */
+    getTimingInfo() {
+        if (!this.timing) {
+            return disabledTimingInfo();
+        }
+        const local = this.timing.getInfo();
+        // requestSync bypasses recordTiming, so this query does not pollute the
+        // client-side collector.
+        const result = this.channel.requestSync("getServerTiming", "");
+        return combineTimingInfo(local, JSON.parse(result));
+    }
+    resetTimingInfo() {
+        if (!this.timing)
+            return;
+        this.timing.reset();
+        // Keep the server's collection in sync so combined totals stay meaningful.
+        this.channel.requestSync("resetServerTiming", "");
+    }
+    /**
+     * Returns the timing collector that per-node materialization is reported
+     * into, or undefined when timing collection is disabled. The returned
+     * collector is the same one folded into {@link getTimingInfo}, so
+     * materialization totals surface alongside request timings.
+     */
+    getTimingCollector() {
+        return this.timing;
+    }
+    recordTiming(method, start) {
+        if (!this.timing)
+            return;
+        this.timing.record({
+            method,
+            roundTripMs: performance.now() - start,
+            bytesSent: this.channel.lastBytesSent,
+            bytesReceived: this.channel.lastBytesReceived,
+        });
+    }
+    close() {
+        this.channel.close();
+    }
+}
+//# sourceMappingURL=client.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/client.js.map b/node_modules/typescript/dist/api/sync/client.js.map
new file mode 100644
index 000000000..d436c19ec
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/api/sync/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAIH,cAAc,EACd,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAElB,eAAe,GAElB,MAAM,cAAc,CAAC;AAItB,MAAM,OAAO,MAAM;IACP,OAAO,CAAiB;IACxB,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAC5B,MAAM,CAA8B;IAE5C,YAAY,OAAsB;QAC9B,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG;YACT,OAAO;YACP,OAAO;YACP,GAAG;SACN,CAAC;QAEF,4DAA4D;QAC5D,MAAM,gBAAgB,GAAuC,EAAE,CAAC;QAChE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;YACb,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;gBACjC,IAAI,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;oBACnB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACL,CAAC;QACL,CAAC;QACD,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,eAA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WAAW,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QAC/D,OAAO,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAqB,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe;QACX,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QACzB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,2EAA2E;QAC3E,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACH,kBAAkB;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEO,YAAY,CAAC,MAAc,EAAE,KAAa;QAC9C,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QACzB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;YACf,MAAM;YACN,WAAW,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;YACtC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YACrC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,iBAAiB;SAChD,CAAC,CAAC;IACP,CAAC;IAED,KAAK;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/types.d.ts b/node_modules/typescript/dist/api/sync/types.d.ts
new file mode 100644
index 000000000..8e4720fa3
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/types.d.ts
@@ -0,0 +1,310 @@
+import type { CompletionItemKind } from "#enums/completionItemKind";
+import type { DiagnosticCategory } from "#enums/diagnosticCategory";
+import type { ElementFlags } from "#enums/elementFlags";
+import type { ObjectFlags } from "#enums/objectFlags";
+import type { TypeFlags } from "#enums/typeFlags";
+import type { TypePredicateKind } from "#enums/typePredicateKind";
+import type { NodeHandle, Symbol } from "./api.ts";
+/**
+ * A TypeScript type.
+ *
+ * Use TypeFlags to determine the specific kind of type and access
+ * kind-specific properties. For example:
+ *
+ * ```ts
+ * if (type.flags & TypeFlags.StringLiteral) {
+ *     console.log((type as StringLiteralType).value); // string
+ * }
+ * ```
+ */
+export interface Type {
+    /** Type flags — use to determine the specific kind of type. */
+    readonly flags: TypeFlags;
+    /** Unique identifier for this type */
+    readonly id: number;
+    /** Get the symbol associated with this type, if any */
+    getSymbol(): Symbol | undefined;
+    /** Get the type arguments of the type alias this type was instantiated from, if any */
+    getAliasTypeArguments(): readonly Type[];
+    /** Get the symbol of the type alias this type was instantiated from, if any */
+    getAliasSymbol(): Symbol | undefined;
+    /**
+     * Get the base types of this type, or `undefined` if it is not a class or
+     * interface type.
+     */
+    getBaseTypes(): readonly Type[] | undefined;
+    /** Whether this type is a class or interface type */
+    isClassOrInterface(): this is InterfaceType;
+    /** Whether this type is a union type */
+    isUnionType(): this is UnionType;
+    /** Whether this type is an intersection type */
+    isIntersectionType(): this is IntersectionType;
+    /** Whether this type is an object type */
+    isObjectType(): this is ObjectType;
+    /** Whether this type is an intrinsic primitive type */
+    isIntrinsicType(): this is IntrinsicType;
+    /**
+     * Whether this is the error type — the placeholder produced when a type
+     * cannot be determined (e.g. an unresolved reference).
+     */
+    isErrorType(): boolean;
+    /** Whether this type is a literal type */
+    isLiteralType(): this is LiteralType;
+    /** Whether this type is a string literal type */
+    isStringLiteralType(): this is StringLiteralType;
+    /** Whether this type is a number literal type */
+    isNumberLiteralType(): this is NumberLiteralType;
+    /** Whether this type is a bigint literal type */
+    isBigIntLiteralType(): this is BigIntLiteralType;
+    /** Whether this type is a boolean literal type */
+    isBooleanLiteralType(): this is BooleanLiteralType;
+    /** Whether this type is a type reference */
+    isTypeReference(): this is TypeReference;
+    /** Whether this type is a tuple type */
+    isTupleType(): this is TupleType;
+    /** Whether this type is an index type (`keyof T`) */
+    isIndexType(): this is IndexType;
+    /** Whether this type is an indexed access type (`T[K]`) */
+    isIndexedAccessType(): this is IndexedAccessType;
+    /** Whether this type is a conditional type */
+    isConditionalType(): this is ConditionalType;
+    /** Whether this type is a substitution type */
+    isSubstitutionType(): this is SubstitutionType;
+    /** Whether this type is a template literal type */
+    isTemplateLiteralType(): this is TemplateLiteralType;
+    /** Whether this type is a string mapping type */
+    isStringMappingType(): this is StringMappingType;
+    /** Whether this type is a type parameter */
+    isTypeParameter(): this is TypeParameter;
+}
+/**
+ * Freshable types (TypeFlags.Freshable) - literal types (TypeFlags.Literal) and computed enum types (TypeFlags.Enum).
+ */
+export interface FreshableType extends Type {
+    /** Get the fresh version of this type, if any */
+    getFreshType(): FreshableType | undefined;
+    /** Get the regular (non-fresh) version of this type, if any */
+    getRegularType(): FreshableType | undefined;
+}
+/** Literal types: StringLiteral, NumberLiteral, BigIntLiteral, BooleanLiteral */
+export interface LiteralType extends FreshableType {
+    /** The literal value. Use TypeFlags to narrow to a specific literal subtype with a concrete value type. */
+    readonly value: string | number | boolean | bigint;
+}
+/** String literal types (TypeFlags.StringLiteral) */
+export interface StringLiteralType extends LiteralType {
+    /** The string value of the literal */
+    readonly value: string;
+}
+/** Numeric literal types (TypeFlags.NumberLiteral) */
+export interface NumberLiteralType extends LiteralType {
+    /** The numeric value of the literal */
+    readonly value: number;
+}
+/** BigInt literal types (TypeFlags.BigIntLiteral) */
+export interface BigIntLiteralType extends LiteralType {
+    /** The bigint value of the literal */
+    readonly value: bigint;
+}
+/** Boolean literal types (TypeFlags.BooleanLiteral) */
+export interface BooleanLiteralType extends LiteralType {
+    /** The boolean value of the literal */
+    readonly value: boolean;
+}
+/** Object types (TypeFlags.Object) */
+export interface ObjectType extends Type {
+    /** Object flags — use to determine the specific kind of object type. */
+    readonly objectFlags: ObjectFlags;
+}
+/** Type references (ObjectFlags.Reference) — e.g. Array, Map */
+export interface TypeReference extends ObjectType {
+    /** Get the generic target type (e.g. Array for Array) */
+    getTarget(): Type;
+}
+/** Interface types — classes and interfaces (ObjectFlags.ClassOrInterface) */
+export interface InterfaceType extends TypeReference {
+    /** Get all type parameters (outer + local, excluding thisType) */
+    getTypeParameters(): readonly TypeParameter[];
+    /** Get outer type parameters from enclosing declarations */
+    getOuterTypeParameters(): readonly TypeParameter[];
+    /** Get local type parameters declared on this interface/class */
+    getLocalTypeParameters(): readonly TypeParameter[];
+}
+/** Tuple types (ObjectFlags.Tuple) */
+export interface TupleType extends InterfaceType {
+    /** Per-element flags (Required, Optional, Rest, Variadic) */
+    readonly elementFlags: readonly ElementFlags[];
+    /** Number of initial required or optional elements */
+    readonly fixedLength: number;
+    /** Whether the tuple is readonly */
+    readonly readonly: boolean;
+}
+/** Union or intersection types (TypeFlags.Union | TypeFlags.Intersection) */
+export interface UnionOrIntersectionType extends Type {
+    /** Get the constituent types */
+    getTypes(): readonly Type[];
+}
+/** Union types (TypeFlags.Union) */
+export interface UnionType extends UnionOrIntersectionType {
+}
+/** Intersection types (TypeFlags.Intersection) */
+export interface IntersectionType extends UnionOrIntersectionType {
+}
+/** Type parameters (TypeFlags.TypeParameter) */
+export interface TypeParameter extends Type {
+    /** True if this is the synthetic `this` type of an interface, class, or tuple */
+    readonly isThisType?: boolean | undefined;
+}
+/** Index types — keyof T (TypeFlags.Index) */
+export interface IndexType extends Type {
+    /** Get the target type T in `keyof T` */
+    getTarget(): Type;
+}
+/** Indexed access types — T[K] (TypeFlags.IndexedAccess) */
+export interface IndexedAccessType extends Type {
+    /** Get the object type T in `T[K]` */
+    getObjectType(): Type;
+    /** Get the index type K in `T[K]` */
+    getIndexType(): Type;
+}
+/** Conditional types — T extends U ? X : Y (TypeFlags.Conditional) */
+export interface ConditionalType extends Type {
+    /** Get the check type T in `T extends U ? X : Y` */
+    getCheckType(): Type;
+    /** Get the extends type U in `T extends U ? X : Y` */
+    getExtendsType(): Type;
+    /** Get the true type X in `T extends U ? X : Y` */
+    getTrueType(): Type;
+    /** Get the false type Y in `T extends U ? X : Y` */
+    getFalseType(): Type;
+}
+/** Substitution types (TypeFlags.Substitution) */
+export interface SubstitutionType extends Type {
+    getBaseType(): Type;
+    getConstraint(): Type;
+}
+/** Template literal types (TypeFlags.TemplateLiteral) */
+export interface TemplateLiteralType extends Type {
+    /** Text segments (always one more than the number of type spans) */
+    readonly texts: readonly string[];
+    /** Get the types interspersed between text segments */
+    getTypes(): readonly Type[];
+}
+/** String mapping types — Uppercase, Lowercase, etc. (TypeFlags.StringMapping) */
+export interface StringMappingType extends Type {
+    /** Get the mapped type */
+    getTarget(): Type;
+}
+/** Intrinsic types — any, unknown, string, number, bigint, symbol, void, undefined, null, never, object (TypeFlags.Intrinsic) */
+export interface IntrinsicType extends Type {
+    /** The intrinsic type name (e.g. "any", "string", "never") */
+    readonly intrinsicName: string;
+}
+/** Base for all type predicates */
+export interface TypePredicateBase {
+    readonly kind: TypePredicateKind;
+    readonly type: Type | undefined;
+}
+/** `this is T` */
+export interface ThisTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.This;
+    readonly parameterName: undefined;
+    readonly parameterIndex: undefined;
+    readonly type: Type;
+}
+/** `x is T` */
+export interface IdentifierTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.Identifier;
+    readonly parameterName: string;
+    readonly parameterIndex: number;
+    readonly type: Type;
+}
+/** `asserts this is T` */
+export interface AssertsThisTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.AssertsThis;
+    readonly parameterName: undefined;
+    readonly parameterIndex: undefined;
+    readonly type: Type | undefined;
+}
+/** `asserts x is T` */
+export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
+    readonly kind: TypePredicateKind.AssertsIdentifier;
+    readonly parameterName: string;
+    readonly parameterIndex: number;
+    readonly type: Type | undefined;
+}
+/** A type predicate — e.g. `x is T` or `asserts x is T` */
+export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
+/** An index signature — e.g. `[key: string]: T` */
+export interface IndexInfo {
+    /** The index key type (e.g. string or number) */
+    readonly keyType: Type;
+    /** The index value type */
+    readonly valueType: Type;
+    /** Whether the index signature is readonly */
+    readonly isReadonly: boolean;
+    /** The index signature declaration, if any */
+    readonly declaration?: NodeHandle | undefined;
+}
+/**
+ * A single JSDoc tag attached to a symbol — e.g. `@param`, `@returns`.
+ */
+export interface JSDocTagInfo {
+    /** The tag name, without the leading `@` — e.g. `"param"`. */
+    readonly name: string;
+    /** The rendered tag text, if any — e.g. `"a the first number"` for `@param a the first number`. */
+    readonly text?: string | undefined;
+}
+export interface CompletionEntryLabelDetails {
+    detail?: string | undefined;
+    description?: string | undefined;
+}
+/** Options for {@link Checker.getCompletionsAtPosition}. */
+export interface CompletionOptions {
+    triggerCharacter?: string | undefined;
+    /** Include a `symbol` property on each completion entry. Only populated for symbol-based completions (not keywords or literals). */
+    includeSymbol?: boolean | undefined;
+}
+/** A single completion item returned by {@link Checker.getCompletionsAtPosition}. */
+export interface CompletionEntry {
+    readonly name: string;
+    readonly kind?: CompletionItemKind | undefined;
+    readonly sortText?: string | undefined;
+    readonly insertText?: string | undefined;
+    readonly filterText?: string | undefined;
+    readonly detail?: string | undefined;
+    readonly labelDetails?: CompletionEntryLabelDetails | undefined;
+    /** The symbol associated with this completion entry. Only set when `includeSymbol: true` is passed and a symbol is available. */
+    readonly symbol?: Symbol | undefined;
+}
+/** The result of {@link Checker.getCompletionsAtPosition}. */
+export interface CompletionInfo {
+    readonly isIncomplete: boolean;
+    readonly entries: readonly CompletionEntry[];
+}
+/**
+ * A diagnostic message from the TypeScript compiler.
+ */
+export interface Diagnostic {
+    /** File name of the source file this diagnostic belongs to, if any */
+    readonly fileName?: string | undefined;
+    /** Start position of the diagnostic */
+    readonly pos: number;
+    /** End position of the diagnostic */
+    readonly end: number;
+    /** Diagnostic error code */
+    readonly code: number;
+    /** Diagnostic category (error, warning, suggestion, message) */
+    readonly category: DiagnosticCategory;
+    /** Localized diagnostic message text */
+    readonly text: string;
+    /** Whether this diagnostic highlights unnecessary code */
+    readonly reportsUnnecessary?: boolean | undefined;
+    /** Whether this diagnostic highlights deprecated code */
+    readonly reportsDeprecated?: boolean | undefined;
+    /** Chained diagnostic messages */
+    readonly messageChain?: readonly Diagnostic[] | undefined;
+    /** Related diagnostic information */
+    readonly relatedInformation?: readonly Diagnostic[] | undefined;
+}
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/types.d.ts.map b/node_modules/typescript/dist/api/sync/types.d.ts.map
new file mode 100644
index 000000000..84d615106
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/sync/types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EACR,UAAU,EACV,MAAM,EACT,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,IAAI;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAE1B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,uDAAuD;IACvD,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IAEhC,uFAAuF;IACvF,qBAAqB,IAAI,SAAS,IAAI,EAAE,CAAC;IAEzC,+EAA+E;IAC/E,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,IAAI,SAAS,IAAI,EAAE,GAAG,SAAS,CA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,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1D,qCAAqC;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;CACnE"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/types.js b/node_modules/typescript/dist/api/sync/types.js
new file mode 100644
index 000000000..718fd38ae
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/types.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/sync/types.js.map b/node_modules/typescript/dist/api/sync/types.js.map
new file mode 100644
index 000000000..8f42c24b7
--- /dev/null
+++ b/node_modules/typescript/dist/api/sync/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/sync/types.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/syncChannel.d.ts b/node_modules/typescript/dist/api/syncChannel.d.ts
new file mode 100644
index 000000000..a7eadf3b9
--- /dev/null
+++ b/node_modules/typescript/dist/api/syncChannel.d.ts
@@ -0,0 +1,114 @@
+/**
+ * Pure JS replacement for @typescript/libsyncrpc.
+ *
+ * Spawns a child process and communicates with it synchronously over
+ * stdin/stdout pipes using the same MessagePack-based tuple protocol:
+ *   [MessageType (u8), method (bin), payload (bin)]
+ *
+ * Synchronous I/O is achieved by calling fs.readSync / fs.writeSync
+ * directly on the pipe file descriptors obtained from the spawned
+ * ChildProcess.
+ */
+/**
+ * SyncRpcChannel – drop-in replacement for the native libsyncrpc class.
+ *
+ * API surface intentionally matches the original:
+ *   - constructor(exe, args)
+ *   - requestSync(method, payload): string
+ *   - requestBinarySync(method, payload): Uint8Array
+ *   - registerCallback(name, cb)
+ *   - close()
+ *
+ * The protocol is unversioned; both sides (this JS channel and the Go
+ * child process) must be built from the same tree.
+ *
+ * This class is **not** thread-safe. All calls must originate from a
+ * single thread — do not share an instance across worker threads.
+ */
+export declare class SyncRpcChannel {
+    private child;
+    private readFd;
+    private writeFd;
+    private pipeFd;
+    private callbacks;
+    private methodBufCache;
+    private readonly collectTiming;
+    lastBytesSent: number;
+    lastBytesReceived: number;
+    private _msgType;
+    private _msgName;
+    private _msgPayload;
+    private headerBuf;
+    private readBuf;
+    private readBufPos;
+    private readBufLen;
+    private writeBuf;
+    constructor(exe: string, args: string[], collectTiming?: boolean);
+    /**
+     * Send a request and synchronously wait for the response (string).
+     * Handles Call (callback) messages from the child inline.
+     */
+    requestSync(method: string, payload: string): string;
+    /**
+     * Send a request and synchronously wait for the response (binary).
+     * Handles Call (callback) messages from the child inline.
+     */
+    requestBinarySync(method: string, payload: Uint8Array): Uint8Array;
+    /** Register a string→string callback that the child may invoke. */
+    registerCallback(name: string, callback: (name: string, payload: string) => string): void;
+    /** Kill the child process and release resources. */
+    close(): void;
+    private ensureOpen;
+    private getMethodBuf;
+    private requestBytesSync;
+    /**
+     * Handle an incoming MSG_CALL from the child process.
+     *
+     * After sending the error response back to the child, this method
+     * intentionally re-throws to abort the caller's request loop.
+     * A failed callback is treated as unrecoverable to match the
+     * behavior of the native libsyncrpc addon.
+     */
+    private handleCall;
+    /**
+     * Write a complete [type, name, payload] tuple in as few writeSync
+     * calls as possible.  For messages that fit in the pre-allocated
+     * write buffer (64 KB), everything is assembled and sent in a single
+     * syscall.  Larger messages use two syscalls: one for the header
+     * portion and one for the payload data.
+     */
+    private writeTuple;
+    /**
+     * Read a [type, name, payload] tuple into instance fields
+     * (_msgType, _msgName, _msgPayload) to avoid allocating a
+     * short-lived 3-element array on every call.
+     */
+    private readTuple;
+    /**
+     * Read a MessagePack bin field.
+     */
+    private readBin;
+    /** Build an EOF error with the child's exit code/signal if available. */
+    private eofError;
+    /** Read a single byte from the buffered read-ahead. */
+    private readByte;
+    private readExact;
+    /**
+     * Fill the internal read-ahead buffer from the pipe fd.
+     * Retries on EAGAIN for non-blocking mode compatibility.
+     */
+    private fillReadBuffer;
+    /**
+     * Synchronously read exactly `length` bytes into `buffer`.
+     * Serves from the internal read-ahead buffer first; for large reads
+     * that exceed the buffer size, reads directly from the fd to avoid
+     * an extra copy.
+     */
+    private readExactInto;
+    /**
+     * Synchronously write all bytes from `data` (up to `length`).
+     * Retries on EAGAIN.
+     */
+    private writeAllBuf;
+}
+//# sourceMappingURL=syncChannel.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/syncChannel.d.ts.map b/node_modules/typescript/dist/api/syncChannel.d.ts.map
new file mode 100644
index 000000000..57d212a46
--- /dev/null
+++ b/node_modules/typescript/dist/api/syncChannel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"syncChannel.d.ts","sourceRoot":"","sources":["../../src/api/syncChannel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA8EH;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,cAAc;IACvB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,SAAS,CAAgE;IAEjF,OAAO,CAAC,cAAc,CAA6B;IAMnD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;IAKxC,aAAa,SAAK;IAClB,iBAAiB,SAAK;IAEtB,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,WAAW,CAAqB;IAExC,OAAO,CAAC,SAAS,CAAyB;IAG1C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;IAGvB,OAAO,CAAC,QAAQ,CAA6B;gBAEjC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,aAAa,UAAQ;IAmF9D;;;OAGG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAMpD;;;OAGG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU;IAKlE,mEAAmE;IACnE,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI;IAIzF,oDAAoD;IACpD,KAAK,IAAI,IAAI;IAsBb,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,gBAAgB;IA8CxB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAiClB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IA0DlB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IA2BjB;;OAEG;IACH,OAAO,CAAC,OAAO;IA0Bf,yEAAyE;IACzE,OAAO,CAAC,QAAQ;IAOhB,uDAAuD;IACvD,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IAiBjB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAsBtB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,WAAW;CAiBtB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/syncChannel.js b/node_modules/typescript/dist/api/syncChannel.js
new file mode 100644
index 000000000..7b9cf99d6
--- /dev/null
+++ b/node_modules/typescript/dist/api/syncChannel.js
@@ -0,0 +1,508 @@
+/**
+ * Pure JS replacement for @typescript/libsyncrpc.
+ *
+ * Spawns a child process and communicates with it synchronously over
+ * stdin/stdout pipes using the same MessagePack-based tuple protocol:
+ *   [MessageType (u8), method (bin), payload (bin)]
+ *
+ * Synchronous I/O is achieved by calling fs.readSync / fs.writeSync
+ * directly on the pipe file descriptors obtained from the spawned
+ * ChildProcess.
+ */
+import { spawn, } from "node:child_process";
+import { closeSync, openSync, readSync, writeSync, } from "node:fs";
+import { binHeaderSize, MSGPACK_BIN16, MSGPACK_BIN32, MSGPACK_BIN8, MSGPACK_FIXARRAY3, MSGPACK_UINT8, writeBinHeader, } from "./node/msgpack.js";
+// ── MessageType constants ────────────────────────────────────────────
+// Sent by channel (parent → child)
+const MSG_REQUEST = 1;
+const MSG_CALL_RESPONSE = 2;
+const MSG_CALL_ERROR = 3;
+// Sent by child (child → parent)
+const MSG_RESPONSE = 4;
+const MSG_ERROR = 5;
+const MSG_CALL = 6;
+// Pre-allocated buffer used by Atomics.wait for tiny sleeps when a
+// non-blocking fd returns EAGAIN.
+const sleepBuf = new Int32Array(new SharedArrayBuffer(4));
+// Shared empty buffer – avoids allocating Buffer.alloc(0) on every
+// zero-length bin field.
+const EMPTY_BUF = Buffer.alloc(0);
+// ── Global cleanup tracking ─────────────────────────────────────────
+// Track all live child processes so they can be killed on process exit.
+// This mimics the auto-cleanup behavior of the native libsyncrpc module,
+// whose Rust/C++ destructors would kill children automatically.
+const liveChildren = new Set();
+process.on("exit", () => {
+    for (const child of liveChildren) {
+        try {
+            child.kill();
+        }
+        catch {
+            // swallow – process may already be dead
+        }
+    }
+    liveChildren.clear();
+});
+/**
+ * SyncRpcChannel – drop-in replacement for the native libsyncrpc class.
+ *
+ * API surface intentionally matches the original:
+ *   - constructor(exe, args)
+ *   - requestSync(method, payload): string
+ *   - requestBinarySync(method, payload): Uint8Array
+ *   - registerCallback(name, cb)
+ *   - close()
+ *
+ * The protocol is unversioned; both sides (this JS channel and the Go
+ * child process) must be built from the same tree.
+ *
+ * This class is **not** thread-safe. All calls must originate from a
+ * single thread — do not share an instance across worker threads.
+ */
+export class SyncRpcChannel {
+    child;
+    readFd;
+    writeFd;
+    pipeFd;
+    callbacks = new Map();
+    methodBufCache = new Map();
+    // When true, the payload byte lengths of each request/response are recorded
+    // and exposed via the `last*` fields below. These count only the JSON/binary
+    // payload bytes, not the MessagePack tuple framing (message type, method
+    // name, and length headers).
+    collectTiming;
+    // Per-request payload byte measurements for the most recently completed
+    // request. Only meaningful when `collectTiming` is true. Callers read these
+    // immediately after a request returns (the channel is strictly serial).
+    lastBytesSent = 0;
+    lastBytesReceived = 0;
+    _msgType = 0;
+    _msgName = EMPTY_BUF;
+    _msgPayload = EMPTY_BUF;
+    headerBuf = Buffer.allocUnsafe(4);
+    // Read-ahead buffer – reduces readSync syscalls by buffering data from the pipe.
+    readBuf = Buffer.allocUnsafe(65536);
+    readBufPos = 0;
+    readBufLen = 0;
+    // Write buffer – assembles entire tuples for a single writeSync.
+    writeBuf = Buffer.allocUnsafe(65536);
+    constructor(exe, args, collectTiming = false) {
+        this.collectTiming = collectTiming;
+        const isWindows = process.platform === "win32";
+        if (isWindows) {
+            // On Windows, libuv pipe handles don't expose POSIX fds, so
+            // readSync/writeSync can't be used on stdio pipes. Instead,
+            // we create a Windows named pipe path, pass it to the child
+            // via --pipe, and open it with fs.openSync which returns a
+            // real C-runtime fd backed by a proper HANDLE.
+            const pipePath = `\\\\.\\pipe\\tsgo-sync-${process.pid}-${Date.now()}`;
+            this.child = spawn(exe, [...args, "--pipe", pipePath], {
+                stdio: ["ignore", "ignore", "inherit"],
+            });
+            // Retry openSync until the child creates the named pipe.
+            let fd;
+            for (let i = 0; i < 500; i++) {
+                try {
+                    fd = openSync(pipePath, "r+");
+                    break;
+                }
+                catch {
+                    if (this.child.exitCode !== null) {
+                        throw new Error(`Child process exited with code ${this.child.exitCode} before pipe was ready`);
+                    }
+                    Atomics.wait(sleepBuf, 0, 0, 10);
+                }
+            }
+            if (fd === undefined) {
+                this.child.kill();
+                throw new Error("SyncRpcChannel: timed out connecting to named pipe");
+            }
+            this.readFd = fd;
+            this.writeFd = fd;
+            this.pipeFd = fd;
+        }
+        else {
+            // POSIX: use stdio pipe file descriptors directly.
+            this.child = spawn(exe, args, {
+                stdio: ["pipe", "pipe", "inherit"],
+            });
+            const stdout = this.child.stdout;
+            const stdin = this.child.stdin;
+            this.readFd = stdout._handle.fd;
+            this.writeFd = stdin._handle.fd;
+            if (typeof this.readFd !== "number" || this.readFd < 0 || typeof this.writeFd !== "number" || this.writeFd < 0) {
+                stdout.destroy();
+                stdin.destroy();
+                this.child.kill();
+                throw new Error("SyncRpcChannel: could not obtain pipe file descriptors.");
+            }
+            // Set the pipe handles to blocking mode. Under node --test's
+            // process isolation, pipes are created in non-blocking mode
+            // (for the IPC channel). This causes readSync/writeSync to get
+            // EAGAIN, requiring costly 1ms sleeps per retry. Setting
+            // blocking mode ensures readSync blocks properly until data
+            // arrives, matching the behavior of the native libsyncrpc.
+            stdout._handle.setBlocking?.(true);
+            stdin._handle.setBlocking?.(true);
+            // Prevent Node's event-loop from reading stdout or keeping the
+            // process alive – we will use fs.readSync exclusively.
+            stdout.pause();
+            stdout.unref();
+            stdin.unref();
+        }
+        // Track for auto-cleanup on process exit.
+        liveChildren.add(this.child);
+        this.child.unref();
+    }
+    // ── Public API ──────────────────────────────────────────────────
+    /**
+     * Send a request and synchronously wait for the response (string).
+     * Handles Call (callback) messages from the child inline.
+     */
+    requestSync(method, payload) {
+        this.ensureOpen();
+        const result = this.requestBytesSync(method, payload);
+        return result.toString("utf-8");
+    }
+    /**
+     * Send a request and synchronously wait for the response (binary).
+     * Handles Call (callback) messages from the child inline.
+     */
+    requestBinarySync(method, payload) {
+        this.ensureOpen();
+        return this.requestBytesSync(method, payload);
+    }
+    /** Register a string→string callback that the child may invoke. */
+    registerCallback(name, callback) {
+        this.callbacks.set(name, callback);
+    }
+    /** Kill the child process and release resources. */
+    close() {
+        try {
+            liveChildren.delete(this.child);
+            if (this.pipeFd !== undefined) {
+                closeSync(this.pipeFd);
+                this.pipeFd = undefined;
+            }
+            // Destroy the stdio streams so that their pipe handles are closed
+            // and no longer prevent the event loop from draining.
+            this.child.stdout?.destroy();
+            this.child.stdin?.destroy();
+            this.child.kill();
+            this.readFd = -1;
+            this.writeFd = -1;
+        }
+        catch {
+            // swallow – process may already be dead
+        }
+    }
+    // ── Core request loop ───────────────────────────────────────────
+    ensureOpen() {
+        if (this.readFd < 0) {
+            throw new Error("SyncRpcChannel is closed");
+        }
+    }
+    getMethodBuf(method) {
+        let buf = this.methodBufCache.get(method);
+        if (buf === undefined) {
+            buf = Buffer.from(method, "utf-8");
+            this.methodBufCache.set(method, buf);
+        }
+        return buf;
+    }
+    requestBytesSync(method, payload) {
+        const methodBuf = this.getMethodBuf(method);
+        if (this.collectTiming) {
+            this.lastBytesSent = typeof payload === "string"
+                ? Buffer.byteLength(payload, "utf-8")
+                : payload.length;
+            this.lastBytesReceived = 0;
+        }
+        this.writeTuple(MSG_REQUEST, methodBuf, payload);
+        for (;;) {
+            this.readTuple();
+            switch (this._msgType) {
+                case MSG_RESPONSE: {
+                    // Compare raw bytes instead of decoding to string.
+                    if (!methodBuf.equals(this._msgName)) {
+                        throw new Error(`name mismatch for response: expected \`${method}\`, got \`${this._msgName.toString("utf-8")}\``);
+                    }
+                    if (this.collectTiming) {
+                        this.lastBytesReceived = this._msgPayload.length;
+                    }
+                    return this._msgPayload;
+                }
+                case MSG_ERROR: {
+                    if (methodBuf.equals(this._msgName)) {
+                        throw new Error(this._msgPayload.toString("utf-8"));
+                    }
+                    throw new Error(`name mismatch for response: expected \`${method}\`, got \`${this._msgName.toString("utf-8")}\``);
+                }
+                case MSG_CALL: {
+                    this.handleCall(this._msgName.toString("utf-8"), this._msgPayload);
+                    break;
+                }
+                default:
+                    throw new Error(`Invalid message type from child: ${this._msgType}`);
+            }
+        }
+    }
+    // ── Callback handling ───────────────────────────────────────────
+    /**
+     * Handle an incoming MSG_CALL from the child process.
+     *
+     * After sending the error response back to the child, this method
+     * intentionally re-throws to abort the caller's request loop.
+     * A failed callback is treated as unrecoverable to match the
+     * behavior of the native libsyncrpc addon.
+     */
+    handleCall(name, payload) {
+        const cb = this.callbacks.get(name);
+        if (!cb) {
+            const errMsg = `unknown callback: \`${name}\`. Please make sure to register it on the JavaScript side before invoking it.`;
+            this.writeTuple(MSG_CALL_ERROR, Buffer.from(name, "utf-8"), Buffer.from(errMsg, "utf-8"));
+            throw new Error(`no callback named \`${name}\` found`);
+        }
+        try {
+            const result = cb(name, payload.toString("utf-8"));
+            this.writeTuple(MSG_CALL_RESPONSE, Buffer.from(name, "utf-8"), Buffer.from(result, "utf-8"));
+        }
+        catch (e) {
+            const errMsg = String(e instanceof Error ? e.message : e).trim();
+            this.writeTuple(MSG_CALL_ERROR, Buffer.from(name, "utf-8"), Buffer.from(errMsg, "utf-8"));
+            throw new Error(`Error calling callback \`${name}\`: ${errMsg}`);
+        }
+    }
+    // ── MessagePack tuple write ─────────────────────────────────────
+    /**
+     * Write a complete [type, name, payload] tuple in as few writeSync
+     * calls as possible.  For messages that fit in the pre-allocated
+     * write buffer (64 KB), everything is assembled and sent in a single
+     * syscall.  Larger messages use two syscalls: one for the header
+     * portion and one for the payload data.
+     */
+    writeTuple(type, name, payload) {
+        const nameLen = name.length;
+        const payloadIsString = typeof payload === "string";
+        const payloadLen = payloadIsString ? Buffer.byteLength(payload, "utf-8") : payload.length;
+        const nameHdrSize = binHeaderSize(nameLen);
+        const payloadHdrSize = binHeaderSize(payloadLen);
+        const headerSize = 2 + nameHdrSize + nameLen + payloadHdrSize;
+        const totalSize = headerSize + payloadLen;
+        if (totalSize <= this.writeBuf.length) {
+            // Small message: assemble into write buffer, one syscall
+            let off = 0;
+            this.writeBuf[off++] = MSGPACK_FIXARRAY3;
+            this.writeBuf[off++] = type;
+            off = writeBinHeader(this.writeBuf, off, nameLen);
+            name.copy(this.writeBuf, off);
+            off += nameLen;
+            off = writeBinHeader(this.writeBuf, off, payloadLen);
+            if (payloadLen > 0) {
+                if (payloadIsString) {
+                    // Encode string directly into write buffer — avoids
+                    // Buffer.from(string, 'utf-8') allocation entirely.
+                    this.writeBuf.write(payload, off, payloadLen, "utf-8");
+                }
+                else if (payload instanceof Buffer) {
+                    payload.copy(this.writeBuf, off);
+                }
+                else {
+                    this.writeBuf.set(payload, off);
+                }
+            }
+            this.writeAllBuf(this.writeBuf, totalSize);
+        }
+        else {
+            // Large message: header + name in one call, payload in another
+            let off = 0;
+            this.writeBuf[off++] = MSGPACK_FIXARRAY3;
+            this.writeBuf[off++] = type;
+            off = writeBinHeader(this.writeBuf, off, nameLen);
+            name.copy(this.writeBuf, off);
+            off += nameLen;
+            off = writeBinHeader(this.writeBuf, off, payloadLen);
+            this.writeAllBuf(this.writeBuf, off);
+            if (payloadLen > 0) {
+                if (payloadIsString) {
+                    // Large string: must allocate (can't stream-encode
+                    // across multiple writeSync calls).
+                    this.writeAllBuf(Buffer.from(payload, "utf-8"));
+                }
+                else {
+                    this.writeAllBuf(payload);
+                }
+            }
+        }
+    }
+    // ── MessagePack tuple read ──────────────────────────────────────
+    /**
+     * Read a [type, name, payload] tuple into instance fields
+     * (_msgType, _msgName, _msgPayload) to avoid allocating a
+     * short-lived 3-element array on every call.
+     */
+    readTuple() {
+        // Fixed 3-element array marker
+        const marker = this.readByte();
+        if (marker !== MSGPACK_FIXARRAY3) {
+            throw new Error(`Expected fixed 3-element array (0x93), received: 0x${marker.toString(16)}`);
+        }
+        // Message type – positive fixint or uint8
+        const tb = this.readByte();
+        if (tb <= 0x7f) {
+            this._msgType = tb;
+        }
+        else if (tb === MSGPACK_UINT8) {
+            this._msgType = this.readByte();
+        }
+        else {
+            throw new Error(`Expected positive fixint or uint8 marker, received: 0x${tb.toString(16)}`);
+        }
+        this._msgName = this.readBin();
+        this._msgPayload = this.readBin();
+    }
+    /**
+     * Read a MessagePack bin field.
+     */
+    readBin() {
+        const marker = this.readByte();
+        let size;
+        switch (marker) {
+            case MSGPACK_BIN8:
+                size = this.readByte();
+                break;
+            case MSGPACK_BIN16:
+                this.readExactInto(this.headerBuf, 2);
+                size = (this.headerBuf[0] << 8) | this.headerBuf[1];
+                break;
+            case MSGPACK_BIN32:
+                this.readExactInto(this.headerBuf, 4);
+                size = this.headerBuf.readUInt32BE(0);
+                break;
+            default:
+                throw new Error(`Expected binary data (0xc4-0xc6), received: 0x${marker.toString(16)}`);
+        }
+        if (size === 0)
+            return EMPTY_BUF;
+        return this.readExact(size);
+    }
+    // ── Low-level synchronous I/O ───────────────────────────────────
+    /** Build an EOF error with the child's exit code/signal if available. */
+    eofError() {
+        const code = this.child.exitCode;
+        const signal = this.child.signalCode;
+        const detail = signal ? `killed by signal ${signal}` : code !== null ? `exited with code ${code}` : "unknown reason";
+        return new Error(`Unexpected EOF while reading from child process (${detail})`);
+    }
+    /** Read a single byte from the buffered read-ahead. */
+    readByte() {
+        if (this.readBufPos >= this.readBufLen) {
+            this.fillReadBuffer();
+        }
+        return this.readBuf[this.readBufPos++];
+    }
+    readExact(length) {
+        // Use allocUnsafeSlow (not allocUnsafe) so the buffer has its own
+        // backing ArrayBuffer at byteOffset 0.  This is critical because
+        // callers such as RemoteSourceFile create DataView/Uint8Array over
+        // buffer.buffer with absolute offsets.  Buffer.allocUnsafe returns
+        // slices of a shared pool whose byteOffset is non-zero, corrupting
+        // those downstream views.
+        //
+        // allocUnsafeSlow (vs alloc) skips zero-fill, which matters for
+        // large transfers — e.g. checker.ts at ~57 MB saves ~5 ms of
+        // unnecessary memset.  The buffer is immediately filled by
+        // readExactInto so uninitialized memory is never exposed.
+        const buf = Buffer.allocUnsafeSlow(length);
+        this.readExactInto(buf, length);
+        return buf;
+    }
+    /**
+     * Fill the internal read-ahead buffer from the pipe fd.
+     * Retries on EAGAIN for non-blocking mode compatibility.
+     */
+    fillReadBuffer() {
+        this.readBufPos = 0;
+        this.readBufLen = 0;
+        for (;;) {
+            try {
+                const n = readSync(this.readFd, this.readBuf, 0, this.readBuf.length, null);
+                if (n === 0) {
+                    throw this.eofError();
+                }
+                this.readBufLen = n;
+                return;
+            }
+            catch (e) {
+                if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) {
+                    Atomics.wait(sleepBuf, 0, 0, 1);
+                    continue;
+                }
+                throw e;
+            }
+        }
+    }
+    /**
+     * Synchronously read exactly `length` bytes into `buffer`.
+     * Serves from the internal read-ahead buffer first; for large reads
+     * that exceed the buffer size, reads directly from the fd to avoid
+     * an extra copy.
+     */
+    readExactInto(buffer, length) {
+        let pos = 0;
+        while (pos < length) {
+            const avail = this.readBufLen - this.readBufPos;
+            if (avail > 0) {
+                // Serve from read-ahead buffer
+                const toCopy = Math.min(avail, length - pos);
+                this.readBuf.copy(buffer, pos, this.readBufPos, this.readBufPos + toCopy);
+                this.readBufPos += toCopy;
+                pos += toCopy;
+            }
+            else if (length - pos >= this.readBuf.length) {
+                // Remaining data is larger than read buffer; read directly
+                // into the target to avoid unnecessary copying.
+                try {
+                    const n = readSync(this.readFd, buffer, pos, length - pos, null);
+                    if (n === 0) {
+                        throw this.eofError();
+                    }
+                    pos += n;
+                }
+                catch (e) {
+                    if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) {
+                        Atomics.wait(sleepBuf, 0, 0, 1);
+                        continue;
+                    }
+                    throw e;
+                }
+            }
+            else {
+                // Refill the read-ahead buffer
+                this.fillReadBuffer();
+            }
+        }
+    }
+    /**
+     * Synchronously write all bytes from `data` (up to `length`).
+     * Retries on EAGAIN.
+     */
+    writeAllBuf(data, length) {
+        const total = length ?? data.length;
+        let pos = 0;
+        while (pos < total) {
+            try {
+                const n = writeSync(this.writeFd, data, pos, total - pos);
+                pos += n;
+            }
+            catch (e) {
+                if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) {
+                    Atomics.wait(sleepBuf, 0, 0, 1);
+                    continue;
+                }
+                throw e;
+            }
+        }
+    }
+}
+//# sourceMappingURL=syncChannel.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/syncChannel.js.map b/node_modules/typescript/dist/api/syncChannel.js.map
new file mode 100644
index 000000000..fd7e9754e
--- /dev/null
+++ b/node_modules/typescript/dist/api/syncChannel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"syncChannel.js","sourceRoot":"","sources":["../../src/api/syncChannel.ts"],"names":[],"mappings":"AAA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b/node_modules/typescript/dist/api/timing.d.ts
new file mode 100644
index 000000000..941529bbd
--- /dev/null
+++ b/node_modules/typescript/dist/api/timing.d.ts
@@ -0,0 +1,175 @@
+/**
+ * Client-side collection of per-request timing and transfer measurements.
+ *
+ * When enabled, each request records its round-trip latency and the number of
+ * payload bytes sent and received, accumulated into running totals and a
+ * fixed-size ring buffer of the most recent requests.
+ *
+ * The server measures its own per-request processing time independently. When a
+ * timing snapshot is requested, the client fetches the server's collection via
+ * a `getServerTiming` request and folds it into the returned {@link TimingInfo},
+ * yielding per-request and total server processing time and an estimated
+ * transport overhead (round-trip minus server processing time). Normal response
+ * messages are left unchanged.
+ */
+/** Number of most-recent requests retained in the ring buffer. */
+export declare const RECENT_REQUEST_CAPACITY = 5;
+/** A single request's measured timing and transfer sample. */
+export interface RequestTiming {
+    /** The API method that was invoked. */
+    method: string;
+    /** Wall-clock round-trip time measured by the client, in milliseconds. */
+    roundTripMs: number;
+    /** Number of request payload bytes sent to the server. */
+    bytesSent: number;
+    /** Number of response payload bytes received from the server. */
+    bytesReceived: number;
+    /** Wall-clock timestamp ({@link Date.now}) captured when the request completed. */
+    timestamp: number;
+    /**
+     * Server-side processing time for this request, in milliseconds, as folded
+     * in from the server's own timing collection. Undefined when server timing
+     * for the request could not be matched.
+     */
+    serverTimeMs?: number;
+    /**
+     * Estimated transport overhead for this request, in milliseconds
+     * (`roundTripMs - serverTimeMs`, clamped to be non-negative). Present
+     * exactly when {@link serverTimeMs} is.
+     */
+    transportOverheadMs?: number;
+}
+/** Running totals accumulated across every measured request. */
+export interface TimingAccumulators {
+    /** Number of requests measured. */
+    requestCount: number;
+    /** Sum of round-trip latencies, in milliseconds. */
+    roundTripMs: number;
+    /** Sum of request payload bytes sent. */
+    bytesSent: number;
+    /** Sum of response payload bytes received. */
+    bytesReceived: number;
+    /** Sum of server-side processing time, in milliseconds. */
+    serverTimeMs: number;
+    /**
+     * Estimated total transport overhead, in milliseconds
+     * (`roundTripMs - serverTimeMs`, clamped to be non-negative).
+     */
+    transportOverheadMs: number;
+    /**
+     * Number of AST nodes materialized from binary source-file responses as the
+     * client walked the returned trees. Materialization is lazy and happens on
+     * demand, so this accrues after the originating request completes.
+     */
+    nodesMaterialized: number;
+    /**
+     * Number of source files fetched from the server (each decoded into a
+     * lazily-materialized tree).
+     */
+    sourceFilesFetched: number;
+    /**
+     * Number of AST nodes across all fetched source files that can be
+     * materialized on demand. Each fetched file contributes its full node count
+     * (excluding the pre-materialized source-file node), whether or not those
+     * nodes are ever walked. Serves as the denominator for the share of fetched
+     * nodes that end up materialized (`nodesMaterialized / nodesFetched`).
+     */
+    nodesFetched: number;
+}
+/** A point-in-time snapshot of collected timing information. */
+export interface TimingInfo {
+    /** Whether timing collection is enabled for this API instance. */
+    enabled: boolean;
+    /** Running totals across every measured request. */
+    totals: TimingAccumulators;
+    /**
+     * The most recent requests, up to {@link RECENT_REQUEST_CAPACITY}, ordered
+     * from oldest to newest.
+     */
+    recentRequests: RequestTiming[];
+}
+/** A raw measurement handed to {@link TimingCollector.record}. */
+export interface TimingSample {
+    method: string;
+    roundTripMs: number;
+    bytesSent: number;
+    bytesReceived: number;
+}
+/**
+ * A single server-side request's processing-time sample, as returned by a
+ * `getServerTiming` request. This is an internal wire shape; consumers see the
+ * folded-in {@link RequestTiming.serverTimeMs}.
+ */
+export interface ServerRequestTiming {
+    /** The API method that was handled. */
+    method: string;
+    /** Server-side processing time, in milliseconds. */
+    processingTimeMs: number;
+    /** Unix timestamp in milliseconds captured when the request completed. */
+    timestamp: number;
+}
+/** Running totals accumulated on the server across every handled request. */
+export interface ServerTimingTotals {
+    /** Total number of requests handled. */
+    requestCount: number;
+    /** Sum of server-side processing time, in milliseconds. */
+    totalProcessingTimeMs: number;
+}
+/**
+ * A snapshot of the server's own timing collection, retrieved via a
+ * `getServerTiming` request. This is an internal wire shape used to compute the
+ * server-derived fields of {@link TimingInfo}.
+ */
+export interface ServerTimingInfo {
+    /** Whether server-side timing collection is enabled. */
+    enabled: boolean;
+    /** Running totals across every request the server handled. */
+    totals: ServerTimingTotals;
+    /**
+     * The most recent requests as seen by the server, ordered from oldest to
+     * newest.
+     */
+    recentRequests: ServerRequestTiming[];
+}
+/** Returns a snapshot representing a disabled (never-collecting) timing state. */
+export declare function disabledTimingInfo(): TimingInfo;
+/** Returns a snapshot representing disabled server-side timing collection. */
+export declare function disabledServerTimingInfo(): ServerTimingInfo;
+/**
+ * Folds a server-side timing snapshot into a client-side snapshot, producing a
+ * combined {@link TimingInfo} with per-request and total server processing time
+ * plus estimated transport overhead.
+ *
+ * Recent requests are paired newest-to-newest and only matched when the method
+ * names agree, so that requests recorded by only one side (e.g. the meta
+ * requests used to fetch timing) do not misalign the two ring buffers.
+ */
+export declare function combineTimingInfo(client: TimingInfo, server: ServerTimingInfo): TimingInfo;
+/**
+ * Accumulates request timing samples into running totals and a fixed-size ring
+ * buffer of the most recent requests.
+ */
+export declare class TimingCollector {
+    private totals;
+    private ring;
+    private head;
+    /** Records a single request's measurements. */
+    record(sample: TimingSample): void;
+    /**
+     * Records a single AST node materialization. Called on demand as the consumer
+     * walks a binary source-file response's tree, so it is not tied to any one
+     * request.
+     */
+    recordMaterialization(): void;
+    /**
+     * Records a fetched source file: increments the fetched-file counter and adds
+     * the file's materializable node count to the fetched-node total, which serves
+     * as the denominator for the share of fetched nodes that end up materialized.
+     */
+    recordSourceFileFetched(materializableNodeCount: number): void;
+    /** Returns a snapshot of the collected timing information. */
+    getInfo(): TimingInfo;
+    /** Clears all accumulated totals and recent-request history. */
+    reset(): void;
+}
+//# sourceMappingURL=timing.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/timing.d.ts.map b/node_modules/typescript/dist/api/timing.d.ts.map
new file mode 100644
index 000000000..43c00b272
--- /dev/null
+++ b/node_modules/typescript/dist/api/timing.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../src/api/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;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MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IAC/B,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,qBAAqB,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;;OAGG;IACH,cAAc,EAAE,mBAAmB,EAAE,CAAC;CACzC;AAgBD,kFAAkF;AAClF,wBAAgB,kBAAkB,IAAI,UAAU,CAM/C;AAED,8EAA8E;AAC9E,wBAAgB,wBAAwB,IAAI,gBAAgB,CAM3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAG,UAAU,CA6B1F;AAED;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,MAAM,CAA2C;IAGzD,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,IAAI,CAAK;IAEjB,+CAA+C;IAC/C,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAuBlC;;;;OAIG;IACH,qBAAqB,IAAI,IAAI;IAI7B;;;;OAIG;IACH,uBAAuB,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI;IAK9D,8DAA8D;IAC9D,OAAO,IAAI,UAAU;IAYrB,gEAAgE;IAChE,KAAK,IAAI,IAAI;CAKhB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/timing.js b/node_modules/typescript/dist/api/timing.js
new file mode 100644
index 000000000..cd758a405
--- /dev/null
+++ b/node_modules/typescript/dist/api/timing.js
@@ -0,0 +1,149 @@
+/**
+ * Client-side collection of per-request timing and transfer measurements.
+ *
+ * When enabled, each request records its round-trip latency and the number of
+ * payload bytes sent and received, accumulated into running totals and a
+ * fixed-size ring buffer of the most recent requests.
+ *
+ * The server measures its own per-request processing time independently. When a
+ * timing snapshot is requested, the client fetches the server's collection via
+ * a `getServerTiming` request and folds it into the returned {@link TimingInfo},
+ * yielding per-request and total server processing time and an estimated
+ * transport overhead (round-trip minus server processing time). Normal response
+ * messages are left unchanged.
+ */
+/** Number of most-recent requests retained in the ring buffer. */
+export const RECENT_REQUEST_CAPACITY = 5;
+function emptyAccumulators() {
+    return {
+        requestCount: 0,
+        roundTripMs: 0,
+        bytesSent: 0,
+        bytesReceived: 0,
+        serverTimeMs: 0,
+        transportOverheadMs: 0,
+        nodesMaterialized: 0,
+        sourceFilesFetched: 0,
+        nodesFetched: 0,
+    };
+}
+/** Returns a snapshot representing a disabled (never-collecting) timing state. */
+export function disabledTimingInfo() {
+    return {
+        enabled: false,
+        totals: emptyAccumulators(),
+        recentRequests: [],
+    };
+}
+/** Returns a snapshot representing disabled server-side timing collection. */
+export function disabledServerTimingInfo() {
+    return {
+        enabled: false,
+        totals: { requestCount: 0, totalProcessingTimeMs: 0 },
+        recentRequests: [],
+    };
+}
+/**
+ * Folds a server-side timing snapshot into a client-side snapshot, producing a
+ * combined {@link TimingInfo} with per-request and total server processing time
+ * plus estimated transport overhead.
+ *
+ * Recent requests are paired newest-to-newest and only matched when the method
+ * names agree, so that requests recorded by only one side (e.g. the meta
+ * requests used to fetch timing) do not misalign the two ring buffers.
+ */
+export function combineTimingInfo(client, server) {
+    if (!client.enabled) {
+        return client;
+    }
+    const serverTimeMs = server.totals.totalProcessingTimeMs;
+    const totals = {
+        ...client.totals,
+        serverTimeMs,
+        transportOverheadMs: Math.max(0, client.totals.roundTripMs - serverTimeMs),
+    };
+    const recentRequests = client.recentRequests.map(r => ({ ...r }));
+    const serverRecent = server.recentRequests;
+    const pairs = Math.min(recentRequests.length, serverRecent.length);
+    for (let i = 1; i <= pairs; i++) {
+        const c = recentRequests[recentRequests.length - i];
+        const s = serverRecent[serverRecent.length - i];
+        if (c.method === s.method) {
+            c.serverTimeMs = s.processingTimeMs;
+            c.transportOverheadMs = Math.max(0, c.roundTripMs - s.processingTimeMs);
+        }
+    }
+    return {
+        enabled: true,
+        totals,
+        recentRequests,
+    };
+}
+/**
+ * Accumulates request timing samples into running totals and a fixed-size ring
+ * buffer of the most recent requests.
+ */
+export class TimingCollector {
+    totals = emptyAccumulators();
+    // Ring buffer of the most recent requests. `ring` grows to at most
+    // RECENT_REQUEST_CAPACITY; once full, `head` marks the oldest entry.
+    ring = [];
+    head = 0;
+    /** Records a single request's measurements. */
+    record(sample) {
+        this.totals.requestCount++;
+        this.totals.roundTripMs += sample.roundTripMs;
+        this.totals.bytesSent += sample.bytesSent;
+        this.totals.bytesReceived += sample.bytesReceived;
+        const entry = {
+            method: sample.method,
+            roundTripMs: sample.roundTripMs,
+            bytesSent: sample.bytesSent,
+            bytesReceived: sample.bytesReceived,
+            timestamp: Date.now(),
+        };
+        if (this.ring.length < RECENT_REQUEST_CAPACITY) {
+            this.ring.push(entry);
+        }
+        else {
+            this.ring[this.head] = entry;
+            this.head = (this.head + 1) % RECENT_REQUEST_CAPACITY;
+        }
+    }
+    /**
+     * Records a single AST node materialization. Called on demand as the consumer
+     * walks a binary source-file response's tree, so it is not tied to any one
+     * request.
+     */
+    recordMaterialization() {
+        this.totals.nodesMaterialized++;
+    }
+    /**
+     * Records a fetched source file: increments the fetched-file counter and adds
+     * the file's materializable node count to the fetched-node total, which serves
+     * as the denominator for the share of fetched nodes that end up materialized.
+     */
+    recordSourceFileFetched(materializableNodeCount) {
+        this.totals.sourceFilesFetched++;
+        this.totals.nodesFetched += materializableNodeCount;
+    }
+    /** Returns a snapshot of the collected timing information. */
+    getInfo() {
+        const recentRequests = [];
+        for (let i = 0; i < this.ring.length; i++) {
+            recentRequests.push(this.ring[(this.head + i) % this.ring.length]);
+        }
+        return {
+            enabled: true,
+            totals: { ...this.totals },
+            recentRequests,
+        };
+    }
+    /** Clears all accumulated totals and recent-request history. */
+    reset() {
+        this.totals = emptyAccumulators();
+        this.ring = [];
+        this.head = 0;
+    }
+}
+//# sourceMappingURL=timing.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/api/timing.js.map b/node_modules/typescript/dist/api/timing.js.map
new file mode 100644
index 000000000..4039cf0c8
--- /dev/null
+++ b/node_modules/typescript/dist/api/timing.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/api/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA8HzC,SAAS,iBAAiB;IACtB,OAAO;QACH,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC;QACf,mBAAmB,EAAE,CAAC;QACtB,iBAAiB,EAAE,CAAC;QACpB,kBAAkB,EAAE,CAAC;QACrB,YAAY,EAAE,CAAC;KAClB,CAAC;AACN,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,kBAAkB;IAC9B,OAAO;QACH,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,iBAAiB,EAAE;QAC3B,cAAc,EAAE,EAAE;KACrB,CAAC;AACN,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,wBAAwB;IACpC,OAAO;QACH,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE;QACrD,cAAc,EAAE,EAAE;KACrB,CAAC;AACN,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAkB,EAAE,M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YAAY,IAAI,uBAAuB,CAAC;IACxD,CAAC;IAED,8DAA8D;IAC9D,OAAO;QACH,MAAM,cAAc,GAAoB,EAAE,CAAC;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvE,CAAC;QACD,OAAO;YACH,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;YAC1B,cAAc;SACjB,CAAC;IACN,CAAC;IAED,gEAAgE;IAChE,KAAK;QACD,IAAI,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAClB,CAAC;CACJ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.d.ts b/node_modules/typescript/dist/ast/ast.d.ts
new file mode 100644
index 000000000..be416670e
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.d.ts
@@ -0,0 +1,100 @@
+import type { InternalSymbolName } from "#enums/internalSymbolName";
+import type { LanguageVariant } from "#enums/languageVariant";
+import type { NodeFlags } from "#enums/nodeFlags";
+import type { ScriptKind } from "#enums/scriptKind";
+import { SyntaxKind } from "#enums/syntaxKind";
+import type { EndOfFile, EntityName, Identifier, KeywordSyntaxKind, ModifierSyntaxKind, PropertyAccessExpression, PunctuationSyntaxKind, Statement, ThisExpression, Token } from "./ast.generated.ts";
+export { SyntaxKind } from "#enums/syntaxKind";
+export { TokenFlags } from "#enums/tokenFlags";
+export * from "./ast.generated.ts";
+export type Path = string & {
+    __pathBrand: any;
+};
+/**
+ * The escaped form of a symbol/identifier name. Internal compiler names are
+ * prefixed with `__` (e.g. `__type`, `__call`), and user names that already
+ * begin with `__` carry an extra leading underscore. Use
+ * {@link unescapeLeadingUnderscores} to recover the display name and
+ * {@link escapeLeadingUnderscores} to produce a key from a display name.
+ */
+export type __String = (string & {
+    __escapedIdentifier: void;
+}) | InternalSymbolName;
+export interface TextRange {
+    pos: number;
+    end: number;
+}
+export interface ReadonlyTextRange {
+    readonly pos: number;
+    readonly end: number;
+}
+export interface NodeArray extends ReadonlyArray, ReadonlyTextRange {
+    hasTrailingComma?: boolean;
+    transformFlags: number;
+}
+export interface Node extends ReadonlyTextRange {
+    readonly kind: SyntaxKind;
+    readonly flags: NodeFlags;
+    readonly parent: Node;
+    readonly jsDoc?: readonly Node[] | undefined;
+    forEachChild(visitor: (node: Node) => T, visitArray?: (nodes: NodeArray) => T): T | undefined;
+    getSourceFile(): SourceFile;
+    getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
+    getFullStart(): number;
+    getEnd(): number;
+    getWidth(sourceFile?: SourceFile): number;
+    getFullWidth(): number;
+    getLeadingTriviaWidth(sourceFile?: SourceFile): number;
+    getFullText(sourceFile?: SourceFile): string;
+    getText(sourceFile?: SourceFile): string;
+}
+export interface FileReference extends TextRange {
+    readonly fileName: string;
+    readonly resolutionMode: number;
+    readonly preserve: boolean;
+}
+export interface LineAndCharacter {
+    /** 0-based line number. */
+    readonly line: number;
+    /** 0-based character offset, in UTF-16 code units, from the start of the line. */
+    readonly character: number;
+}
+export interface SourceFile extends Node {
+    readonly kind: SyntaxKind.SourceFile;
+    readonly statements: NodeArray;
+    readonly endOfFileToken: EndOfFile;
+    readonly text: string;
+    readonly fileName: string;
+    readonly path: Path;
+    readonly languageVariant: LanguageVariant;
+    readonly scriptKind: ScriptKind;
+    readonly isDeclarationFile: boolean;
+    readonly referencedFiles: readonly FileReference[];
+    readonly typeReferenceDirectives: readonly FileReference[];
+    readonly libReferenceDirectives: readonly FileReference[];
+    readonly imports: readonly Node[];
+    readonly moduleAugmentations: readonly Node[];
+    readonly ambientModuleNames: readonly string[];
+    readonly externalModuleIndicator: Node | true | undefined;
+    /** Returns the UTF-16 code unit offset of the start of each line. */
+    getLineStarts(): readonly number[];
+    /** Converts a UTF-16 code unit position into a 0-based line and character. */
+    getLineAndCharacterOfPosition(position: number): LineAndCharacter;
+    /** Converts a 0-based line and character into a UTF-16 code unit position. */
+    getPositionOfLineAndCharacter(line: number, character: number): number;
+    /** @internal */
+    tokenCache?: Map;
+}
+export type PunctuationToken = Token;
+export type KeywordToken = Token;
+export type ModifierToken = KeywordToken;
+export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
+    readonly expression: EntityNameExpression;
+    readonly name: Identifier;
+}
+export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
+export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
+export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
+    readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess;
+}
+//# sourceMappingURL=ast.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.d.ts.map b/node_modules/typescript/dist/ast/ast.d.ts.map
new file mode 100644
index 000000000..33fc88aff
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast/ast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,SAAS,EACT,UAAU,EACV,UAAU,EACV,iBAAiB,E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U,GAAG,kCAAkC,CAAC;AACnF,MAAM,MAAM,gCAAgC,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAEjF,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACtE,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,GAAG,wBAAwB,CAAC;CAC/E"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.generated.d.ts b/node_modules/typescript/dist/ast/ast.generated.d.ts
new file mode 100644
index 000000000..1a33d4099
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.generated.d.ts
@@ -0,0 +1,1161 @@
+import type { ModifierFlags } from "#enums/modifierFlags";
+import type { NodeFlags } from "#enums/nodeFlags";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { TokenFlags } from "#enums/tokenFlags";
+import type { JsxTagNamePropertyAccess, Node, NodeArray } from "./ast.ts";
+export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ConflictMarkerTrivia;
+export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
+export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
+export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken;
+export type KeywordSyntaxKind = SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.ImmediateKeyword | SyntaxKind.InferKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.OutKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OfKeyword | SyntaxKind.DeferKeyword;
+export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword;
+export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
+export type KeywordExpressionSyntaxKind = SyntaxKind.NullKeyword | SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword | SyntaxKind.ThisKeyword | SyntaxKind.SuperKeyword | SyntaxKind.ImportKeyword;
+export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFile | SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.NonTextFileMarkerTrivia | SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.Identifier | SyntaxKind.PrivateIdentifier | SyntaxKind.JSDocCommentTextToken | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.ImmediateKeyword | SyntaxKind.InferKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.OutKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OfKeyword | SyntaxKind.DeferKeyword;
+export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFile | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
+export type JSDocNodeSyntaxKind = SyntaxKind.JSDocTypeExpression | SyntaxKind.JSDocNameReference | SyntaxKind.JSDocAllType | SyntaxKind.JSDocNullableType | SyntaxKind.JSDocNonNullableType | SyntaxKind.JSDocOptionalType | SyntaxKind.JSDocVariadicType | SyntaxKind.JSDoc | SyntaxKind.JSDocText | SyntaxKind.JSDocTypeLiteral | SyntaxKind.JSDocSignature | SyntaxKind.JSDocLink | SyntaxKind.JSDocLinkCode | SyntaxKind.JSDocLinkPlain | SyntaxKind.JSDocUnknownTag | SyntaxKind.JSDocAugmentsTag | SyntaxKind.JSDocImplementsTag | SyntaxKind.JSDocDeprecatedTag | SyntaxKind.JSDocPublicTag | SyntaxKind.JSDocPrivateTag | SyntaxKind.JSDocProtectedTag | SyntaxKind.JSDocReadonlyTag | SyntaxKind.JSDocOverrideTag | SyntaxKind.JSDocCallbackTag | SyntaxKind.JSDocOverloadTag | SyntaxKind.JSDocParameterTag | SyntaxKind.JSDocReturnTag | SyntaxKind.JSDocThisTag | SyntaxKind.JSDocTypeTag | SyntaxKind.JSDocTemplateTag | SyntaxKind.JSDocTypedefTag | SyntaxKind.JSDocSeeTag | SyntaxKind.JSDocPropertyTag | SyntaxKind.JSDocThrowsTag | SyntaxKind.JSDocSatisfiesTag | SyntaxKind.JSDocImportTag;
+export type ImportPhaseModifierSyntaxKind = SyntaxKind.TypeKeyword | SyntaxKind.DeferKeyword;
+export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
+export type PrefixUnaryOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
+export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
+export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
+export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
+export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
+export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
+export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
+export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
+export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
+export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
+export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword;
+export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
+export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
+export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
+export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
+export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
+export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
+export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
+export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
+export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator;
+export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
+export interface NodeBase extends Node {
+    readonly flags: NodeFlags;
+}
+export interface StatementBase extends NodeBase {
+    readonly _statementBrand: any;
+}
+export interface IterationStatementBase extends StatementBase {
+    readonly statement: Statement;
+}
+export interface ExpressionBase extends NodeBase {
+    readonly _expressionBrand: any;
+}
+export interface UnaryExpressionBase extends ExpressionBase {
+    readonly _unaryExpressionBrand: any;
+}
+export interface UpdateExpressionBase extends UnaryExpressionBase {
+    readonly _updateExpressionBrand: any;
+}
+export interface LeftHandSideExpressionBase extends UpdateExpressionBase {
+    readonly _leftHandSideExpressionBrand: any;
+}
+export interface MemberExpressionBase extends LeftHandSideExpressionBase {
+    readonly _memberExpressionBrand: any;
+}
+export interface PrimaryExpressionBase extends MemberExpressionBase {
+    readonly _primaryExpressionBrand: any;
+}
+export interface TypeNodeBase extends NodeBase {
+    readonly _typeNodeBrand: any;
+}
+export interface NodeWithTypeArgumentsBase extends TypeNodeBase {
+    readonly typeArguments?: NodeArray;
+}
+export interface JSDocTypeBase extends TypeNodeBase {
+    readonly _jsDocTypeBrand: any;
+}
+export interface DeclarationBase extends Node {
+    readonly _declarationBrand: any;
+}
+export interface ModifiersBase extends Node {
+    readonly modifiers?: NodeArray;
+    readonly modifierFlags: ModifierFlags;
+}
+export interface FunctionLikeBase extends DeclarationBase {
+    readonly typeParameters?: NodeArray;
+    readonly parameters: NodeArray;
+    readonly type?: TypeNode;
+    readonly fullSignature?: TypeNode;
+}
+export interface BodyBase extends Node {
+    readonly asteriskToken?: AsteriskToken;
+    readonly body?: NodeBody;
+}
+export interface FunctionLikeWithBodyBase extends FunctionLikeBase, BodyBase {
+    readonly _functionLikeDeclarationBrand: any;
+    readonly body?: BlockOrExpression;
+}
+export interface ClassLikeBase extends DeclarationBase, ModifiersBase {
+    readonly name?: Identifier;
+    readonly typeParameters?: NodeArray;
+    readonly heritageClauses?: NodeArray;
+    readonly members: NodeArray;
+}
+export interface LiteralLikeNodeBase extends Node {
+    readonly text: string;
+    readonly tokenFlags: TokenFlags;
+}
+export interface LiteralExpressionBase extends LiteralLikeNodeBase, PrimaryExpressionBase {
+    readonly _literalExpressionBrand: any;
+}
+export interface TemplateLiteralLikeNodeBase extends LiteralLikeNodeBase {
+    readonly rawText: string;
+    readonly templateFlags: TokenFlags;
+}
+export interface TypeElementBase extends Node {
+    readonly _typeElementBrand: any;
+}
+export interface ClassElementBase extends Node {
+    readonly _classElementBrand: any;
+}
+export interface NamedMemberBase extends DeclarationBase, ModifiersBase {
+    readonly name: PropertyName;
+    readonly postfixToken?: QuestionToken | ExclamationToken;
+}
+export interface ObjectLiteralElementBase extends Node {
+    readonly _objectLiteralBrand: any;
+}
+export interface UnionOrIntersectionTypeNodeBase extends TypeNodeBase {
+    readonly types: NodeArray;
+}
+export interface JSDocTagBase extends NodeBase {
+    readonly tagName: Identifier;
+    readonly comment?: NodeArray;
+}
+export interface JSDocCommentBase extends NodeBase {
+    readonly text: string;
+}
+export interface Token extends NodeBase {
+    readonly kind: TKind;
+}
+export interface Identifier extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.Identifier;
+    readonly text: string;
+}
+export interface PrivateIdentifier extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.PrivateIdentifier;
+    readonly text: string;
+}
+export interface QualifiedName extends NodeBase {
+    readonly kind: SyntaxKind.QualifiedName;
+    readonly left: EntityName;
+    readonly right: Identifier;
+}
+export interface ComputedPropertyName extends NodeBase {
+    readonly kind: SyntaxKind.ComputedPropertyName;
+    readonly expression: Expression;
+}
+export interface Decorator extends NodeBase {
+    readonly kind: SyntaxKind.Decorator;
+    readonly expression: LeftHandSideExpression;
+}
+export interface EmptyStatement extends StatementBase {
+    readonly kind: SyntaxKind.EmptyStatement;
+}
+export interface IfStatement extends StatementBase {
+    readonly kind: SyntaxKind.IfStatement;
+    readonly expression: Expression;
+    readonly thenStatement: Statement;
+    readonly elseStatement?: Statement;
+}
+export interface DoStatement extends IterationStatementBase {
+    readonly kind: SyntaxKind.DoStatement;
+    readonly expression: Expression;
+}
+export interface WhileStatement extends IterationStatementBase {
+    readonly kind: SyntaxKind.WhileStatement;
+    readonly expression: Expression;
+}
+export interface ForStatement extends IterationStatementBase {
+    readonly kind: SyntaxKind.ForStatement;
+    readonly initializer?: ForInitializer;
+    readonly condition?: Expression;
+    readonly incrementor?: Expression;
+}
+export interface BreakStatement extends StatementBase {
+    readonly kind: SyntaxKind.BreakStatement;
+    readonly label?: Identifier;
+}
+export interface ContinueStatement extends StatementBase {
+    readonly kind: SyntaxKind.ContinueStatement;
+    readonly label?: Identifier;
+}
+export interface ReturnStatement extends StatementBase {
+    readonly kind: SyntaxKind.ReturnStatement;
+    readonly expression?: Expression;
+}
+export interface WithStatement extends StatementBase {
+    readonly kind: SyntaxKind.WithStatement;
+    readonly expression: Expression;
+    readonly statement: Statement;
+}
+export interface SwitchStatement extends StatementBase {
+    readonly kind: SyntaxKind.SwitchStatement;
+    readonly expression: Expression;
+    readonly caseBlock: CaseBlock;
+}
+export interface CaseBlock extends NodeBase {
+    readonly kind: SyntaxKind.CaseBlock;
+    readonly clauses: NodeArray;
+}
+export interface ThrowStatement extends StatementBase {
+    readonly kind: SyntaxKind.ThrowStatement;
+    readonly expression: Expression;
+}
+export interface TryStatement extends StatementBase {
+    readonly kind: SyntaxKind.TryStatement;
+    readonly tryBlock: Block;
+    readonly catchClause?: CatchClause;
+    readonly finallyBlock?: Block;
+}
+export interface CatchClause extends NodeBase {
+    readonly kind: SyntaxKind.CatchClause;
+    readonly variableDeclaration?: VariableDeclaration;
+    readonly block: Block;
+}
+export interface DebuggerStatement extends StatementBase {
+    readonly kind: SyntaxKind.DebuggerStatement;
+}
+export interface LabeledStatement extends StatementBase {
+    readonly kind: SyntaxKind.LabeledStatement;
+    readonly label: Identifier;
+    readonly statement: Statement;
+}
+export interface ExpressionStatement extends StatementBase {
+    readonly kind: SyntaxKind.ExpressionStatement;
+    readonly expression: Expression;
+}
+export interface Block extends StatementBase {
+    readonly kind: SyntaxKind.Block;
+    readonly statements: NodeArray;
+    readonly multiLine: boolean;
+}
+export interface VariableStatement extends StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.VariableStatement;
+    readonly declarationList: VariableDeclarationList;
+}
+export interface VariableDeclaration extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.VariableDeclaration;
+    readonly name: BindingName;
+    readonly exclamationToken?: ExclamationToken;
+    readonly type?: TypeNode;
+    readonly initializer?: Expression;
+}
+export interface VariableDeclarationList extends NodeBase {
+    readonly kind: SyntaxKind.VariableDeclarationList;
+    readonly declarations: NodeArray;
+}
+export interface ParameterDeclaration extends NodeBase, DeclarationBase, ModifiersBase {
+    readonly kind: SyntaxKind.Parameter;
+    readonly dotDotDotToken?: DotDotDotToken;
+    readonly name: BindingName;
+    readonly questionToken?: QuestionToken;
+    readonly type?: TypeNode;
+    readonly initializer?: Expression;
+}
+export interface BindingElement extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.BindingElement;
+    readonly dotDotDotToken?: DotDotDotToken;
+    readonly propertyName?: PropertyName;
+    readonly name?: BindingName;
+    readonly initializer?: Expression;
+}
+export interface MissingDeclaration extends StatementBase, DeclarationBase, ModifiersBase {
+    readonly kind: SyntaxKind.MissingDeclaration;
+}
+export interface FunctionDeclaration extends DeclarationBase, StatementBase, ModifiersBase, FunctionLikeWithBodyBase {
+    readonly kind: SyntaxKind.FunctionDeclaration;
+    readonly name?: Identifier;
+    readonly body?: FunctionBody;
+}
+export interface ClassDeclaration extends DeclarationBase, StatementBase, ClassLikeBase {
+    readonly kind: SyntaxKind.ClassDeclaration;
+}
+export interface ClassExpression extends PrimaryExpressionBase, ClassLikeBase {
+    readonly kind: SyntaxKind.ClassExpression;
+}
+export interface HeritageClause extends NodeBase {
+    readonly kind: SyntaxKind.HeritageClause;
+    readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
+    readonly types: NodeArray;
+}
+export interface InterfaceDeclaration extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.InterfaceDeclaration;
+    readonly name: Identifier;
+    readonly typeParameters?: NodeArray;
+    readonly heritageClauses?: NodeArray;
+    readonly members: NodeArray;
+}
+export interface TypeAliasDeclaration extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.TypeAliasDeclaration;
+    readonly name: Identifier;
+    readonly typeParameters?: NodeArray;
+    readonly type: TypeNode;
+}
+export interface EnumMember extends NodeBase, NamedMemberBase {
+    readonly kind: SyntaxKind.EnumMember;
+    readonly initializer?: Expression;
+}
+export interface EnumDeclaration extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.EnumDeclaration;
+    readonly name: Identifier;
+    readonly members: NodeArray;
+}
+export interface ModuleBlock extends StatementBase {
+    readonly kind: SyntaxKind.ModuleBlock;
+    readonly statements: NodeArray;
+}
+export interface NotEmittedStatement extends StatementBase {
+    readonly kind: SyntaxKind.NotEmittedStatement;
+}
+export interface NotEmittedTypeElement extends NodeBase, TypeElementBase {
+    readonly kind: SyntaxKind.NotEmittedTypeElement;
+}
+export interface ImportDeclaration extends StatementBase, ModifiersBase, DeclarationBase {
+    readonly kind: SyntaxKind.ImportDeclaration;
+    readonly importClause?: ImportClause;
+    readonly moduleSpecifier: Expression;
+    readonly attributes?: ImportAttributes;
+}
+export interface ExternalModuleReference extends NodeBase {
+    readonly kind: SyntaxKind.ExternalModuleReference;
+    readonly expression: Expression;
+}
+export interface NamespaceImport extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.NamespaceImport;
+    readonly name: Identifier;
+}
+export interface NamedImports extends NodeBase {
+    readonly kind: SyntaxKind.NamedImports;
+    readonly elements: NodeArray;
+}
+export interface ExportAssignment extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.ExportAssignment;
+    readonly isExportEquals: boolean;
+    readonly type: TypeNode;
+    readonly expression: Expression;
+}
+export interface NamespaceExportDeclaration extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.NamespaceExportDeclaration;
+    readonly name: Identifier;
+}
+export interface NamespaceExport extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.NamespaceExport;
+    readonly name: ModuleExportName;
+}
+export interface NamedExports extends NodeBase {
+    readonly kind: SyntaxKind.NamedExports;
+    readonly elements: NodeArray;
+}
+export interface ExportSpecifier extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.ExportSpecifier;
+    readonly isTypeOnly: boolean;
+    readonly propertyName?: ModuleExportName;
+    readonly name: ModuleExportName;
+}
+export interface CallSignatureDeclaration extends NodeBase, DeclarationBase, FunctionLikeBase, TypeElementBase {
+    readonly kind: SyntaxKind.CallSignature;
+}
+export interface ConstructSignatureDeclaration extends NodeBase, DeclarationBase, FunctionLikeBase, TypeElementBase {
+    readonly kind: SyntaxKind.ConstructSignature;
+}
+export interface ConstructorDeclaration extends NodeBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase, ClassElementBase {
+    readonly kind: SyntaxKind.Constructor;
+    readonly body?: FunctionBody;
+}
+export interface GetAccessorDeclaration extends NamedMemberBase, FunctionLikeWithBodyBase, TypeElementBase, ClassElementBase, ObjectLiteralElementBase, NodeBase {
+    readonly kind: SyntaxKind.GetAccessor;
+    readonly body?: FunctionBody;
+}
+export interface SetAccessorDeclaration extends NamedMemberBase, FunctionLikeWithBodyBase, TypeElementBase, ClassElementBase, ObjectLiteralElementBase, NodeBase {
+    readonly kind: SyntaxKind.SetAccessor;
+    readonly body?: FunctionBody;
+}
+export interface IndexSignatureDeclaration extends NodeBase, DeclarationBase, ModifiersBase, FunctionLikeBase, TypeElementBase, ClassElementBase {
+    readonly kind: SyntaxKind.IndexSignature;
+    readonly type: TypeNode;
+}
+export interface MethodSignatureDeclaration extends NodeBase, NamedMemberBase, FunctionLikeBase, TypeElementBase {
+    readonly kind: SyntaxKind.MethodSignature;
+}
+export interface MethodDeclaration extends NodeBase, NamedMemberBase, FunctionLikeWithBodyBase, ClassElementBase, ObjectLiteralElementBase {
+    readonly kind: SyntaxKind.MethodDeclaration;
+    readonly body?: FunctionBody;
+}
+export interface PropertySignatureDeclaration extends NodeBase, NamedMemberBase, TypeElementBase {
+    readonly kind: SyntaxKind.PropertySignature;
+    readonly type: TypeNode;
+    readonly initializer: Expression;
+}
+export interface PropertyDeclaration extends NodeBase, NamedMemberBase, ClassElementBase {
+    readonly kind: SyntaxKind.PropertyDeclaration;
+    readonly type?: TypeNode;
+    readonly initializer?: Expression;
+}
+export interface SemicolonClassElement extends NodeBase, DeclarationBase, ClassElementBase {
+    readonly kind: SyntaxKind.SemicolonClassElement;
+}
+export interface ClassStaticBlockDeclaration extends NodeBase, DeclarationBase, ModifiersBase, ClassElementBase {
+    readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
+    readonly body: Block;
+}
+export interface OmittedExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.OmittedExpression;
+}
+export interface KeywordExpression extends ExpressionBase {
+    readonly kind: TKind;
+}
+export interface StringLiteral extends LiteralExpressionBase {
+    readonly kind: SyntaxKind.StringLiteral;
+}
+export interface NumericLiteral extends LiteralExpressionBase {
+    readonly kind: SyntaxKind.NumericLiteral;
+}
+export interface BigIntLiteral extends LiteralExpressionBase {
+    readonly kind: SyntaxKind.BigIntLiteral;
+}
+export interface RegularExpressionLiteral extends LiteralExpressionBase {
+    readonly kind: SyntaxKind.RegularExpressionLiteral;
+}
+export interface NoSubstitutionTemplateLiteral extends ExpressionBase, TemplateLiteralLikeNodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral;
+}
+export interface BinaryExpression extends ExpressionBase, DeclarationBase, ModifiersBase {
+    readonly kind: SyntaxKind.BinaryExpression;
+    readonly left: Expression;
+    readonly type?: TypeNode;
+    readonly operatorToken: BinaryOperatorToken;
+    readonly right: Expression;
+}
+export interface PrefixUnaryExpression extends UpdateExpressionBase {
+    readonly kind: SyntaxKind.PrefixUnaryExpression;
+    readonly operator: SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
+    readonly operand: Expression;
+}
+export interface PostfixUnaryExpression extends UpdateExpressionBase {
+    readonly kind: SyntaxKind.PostfixUnaryExpression;
+    readonly operand: Expression;
+    readonly operator: SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
+}
+export interface YieldExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.YieldExpression;
+    readonly asteriskToken?: AsteriskToken;
+    readonly expression?: Expression;
+}
+export interface ArrowFunction extends ExpressionBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase {
+    readonly kind: SyntaxKind.ArrowFunction;
+    readonly equalsGreaterThanToken: EqualsGreaterThanToken;
+    readonly body: ConciseBody;
+}
+export interface FunctionExpression extends PrimaryExpressionBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase {
+    readonly kind: SyntaxKind.FunctionExpression;
+    readonly name?: Identifier;
+    readonly body: FunctionBody;
+}
+export interface AsExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.AsExpression;
+    readonly expression: Expression;
+    readonly type: TypeNode;
+}
+export interface SatisfiesExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.SatisfiesExpression;
+    readonly expression: Expression;
+    readonly type: TypeNode;
+}
+export interface ConditionalExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.ConditionalExpression;
+    readonly condition: Expression;
+    readonly questionToken: QuestionToken;
+    readonly whenTrue: Expression;
+    readonly colonToken: ColonToken;
+    readonly whenFalse: Expression;
+}
+export interface PropertyAccessExpression extends MemberExpressionBase {
+    readonly kind: SyntaxKind.PropertyAccessExpression;
+    readonly expression: Expression;
+    readonly questionDotToken?: QuestionDotToken;
+    readonly name: MemberName;
+}
+export interface ElementAccessExpression extends MemberExpressionBase {
+    readonly kind: SyntaxKind.ElementAccessExpression;
+    readonly expression: Expression;
+    readonly questionDotToken?: QuestionDotToken;
+    readonly argumentExpression: Expression;
+}
+export interface CallExpression extends LeftHandSideExpressionBase, DeclarationBase {
+    readonly kind: SyntaxKind.CallExpression;
+    readonly expression: Expression;
+    readonly questionDotToken?: QuestionDotToken;
+    readonly typeArguments?: NodeArray;
+    readonly arguments: NodeArray;
+}
+export interface NewExpression extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.NewExpression;
+    readonly expression: Expression;
+    readonly typeArguments?: NodeArray;
+    readonly arguments?: NodeArray;
+}
+export interface MetaProperty extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.MetaProperty;
+    readonly keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword;
+    readonly name: Identifier;
+}
+export interface NonNullExpression extends LeftHandSideExpressionBase {
+    readonly kind: SyntaxKind.NonNullExpression;
+    readonly expression: Expression;
+}
+export interface SpreadElement extends ExpressionBase {
+    readonly kind: SyntaxKind.SpreadElement;
+    readonly expression: Expression;
+}
+export interface TemplateExpression extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.TemplateExpression;
+    readonly head: TemplateHead;
+    readonly templateSpans: NodeArray;
+}
+export interface TemplateSpan extends NodeBase {
+    readonly kind: SyntaxKind.TemplateSpan;
+    readonly expression: Expression;
+    readonly literal: TemplateMiddleOrTail;
+}
+export interface TaggedTemplateExpression extends MemberExpressionBase {
+    readonly kind: SyntaxKind.TaggedTemplateExpression;
+    readonly tag: Expression;
+    readonly questionDotToken: QuestionDotToken;
+    readonly typeArguments?: NodeArray;
+    readonly template: TemplateLiteral;
+}
+export interface ParenthesizedExpression extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.ParenthesizedExpression;
+    readonly expression: Expression;
+}
+export interface ArrayLiteralExpression extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.ArrayLiteralExpression;
+    readonly elements: NodeArray;
+    readonly multiLine: boolean;
+}
+export interface ObjectLiteralExpression extends PrimaryExpressionBase, DeclarationBase {
+    readonly kind: SyntaxKind.ObjectLiteralExpression;
+    readonly properties: NodeArray;
+    readonly multiLine: boolean;
+}
+export interface SpreadAssignment extends NodeBase, DeclarationBase, ObjectLiteralElementBase {
+    readonly kind: SyntaxKind.SpreadAssignment;
+    readonly expression: Expression;
+}
+export interface PropertyAssignment extends NodeBase, NamedMemberBase, ObjectLiteralElementBase {
+    readonly kind: SyntaxKind.PropertyAssignment;
+    readonly type: TypeNode;
+    readonly initializer: Expression;
+}
+export interface ShorthandPropertyAssignment extends NodeBase, NamedMemberBase, ObjectLiteralElementBase {
+    readonly kind: SyntaxKind.ShorthandPropertyAssignment;
+    readonly type: TypeNode;
+    readonly equalsToken?: EqualsToken;
+    readonly objectAssignmentInitializer?: Expression;
+}
+export interface DeleteExpression extends UnaryExpressionBase {
+    readonly kind: SyntaxKind.DeleteExpression;
+    readonly expression: Expression;
+}
+export interface TypeOfExpression extends UnaryExpressionBase {
+    readonly kind: SyntaxKind.TypeOfExpression;
+    readonly expression: Expression;
+}
+export interface VoidExpression extends UnaryExpressionBase {
+    readonly kind: SyntaxKind.VoidExpression;
+    readonly expression: Expression;
+}
+export interface AwaitExpression extends UnaryExpressionBase {
+    readonly kind: SyntaxKind.AwaitExpression;
+    readonly expression: Expression;
+}
+export interface TypeAssertion extends UnaryExpressionBase {
+    readonly kind: SyntaxKind.TypeAssertionExpression;
+    readonly type: TypeNode;
+    readonly expression: Expression;
+}
+export interface KeywordTypeNode extends TypeNodeBase {
+    readonly kind: TKind;
+}
+export interface UnionTypeNode extends TypeNodeBase, UnionOrIntersectionTypeNodeBase {
+    readonly kind: SyntaxKind.UnionType;
+}
+export interface IntersectionTypeNode extends TypeNodeBase, UnionOrIntersectionTypeNodeBase {
+    readonly kind: SyntaxKind.IntersectionType;
+}
+export interface ConditionalTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.ConditionalType;
+    readonly checkType: TypeNode;
+    readonly extendsType: TypeNode;
+    readonly trueType: TypeNode;
+    readonly falseType: TypeNode;
+}
+export interface TypeOperatorNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.TypeOperator;
+    readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword;
+    readonly type: TypeNode;
+}
+export interface InferTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.InferType;
+    readonly typeParameter: TypeParameterDeclaration;
+}
+export interface ArrayTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.ArrayType;
+    readonly elementType: TypeNode;
+}
+export interface IndexedAccessTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.IndexedAccessType;
+    readonly objectType: TypeNode;
+    readonly indexType: TypeNode;
+}
+export interface TypeReferenceNode extends NodeWithTypeArgumentsBase {
+    readonly kind: SyntaxKind.TypeReference;
+    readonly typeName: EntityName;
+}
+export interface ExpressionWithTypeArguments extends MemberExpressionBase {
+    readonly kind: SyntaxKind.ExpressionWithTypeArguments;
+    readonly expression: Expression;
+    readonly typeArguments?: NodeArray;
+}
+export interface LiteralTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.LiteralType;
+    readonly literal: Node;
+}
+export interface ThisTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.ThisType;
+}
+export interface TypePredicateNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.TypePredicate;
+    readonly assertsModifier?: AssertsKeyword;
+    readonly parameterName: TypePredicateParameterName;
+    readonly type?: TypeNode;
+}
+export interface ImportAttribute extends NodeBase {
+    readonly kind: SyntaxKind.ImportAttribute;
+    readonly name: ImportAttributeName;
+    readonly value: Expression;
+}
+export interface ImportAttributes extends NodeBase {
+    readonly kind: SyntaxKind.ImportAttributes;
+    readonly token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword;
+    readonly attributes: NodeArray;
+    readonly multiLine: boolean;
+}
+export interface TypeQueryNode extends NodeWithTypeArgumentsBase {
+    readonly kind: SyntaxKind.TypeQuery;
+    readonly exprName: EntityName;
+}
+export interface MappedTypeNode extends TypeNodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.MappedType;
+    readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
+    readonly typeParameter: TypeParameterDeclaration;
+    readonly nameType?: TypeNode;
+    readonly questionToken?: QuestionToken | PlusToken | MinusToken;
+    readonly type?: TypeNode;
+    readonly members?: NodeArray;
+}
+export interface TypeLiteralNode extends TypeNodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.TypeLiteral;
+    readonly members: NodeArray;
+}
+export interface TupleTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.TupleType;
+    readonly elements: NodeArray;
+}
+export interface NamedTupleMember extends TypeNodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.NamedTupleMember;
+    readonly dotDotDotToken?: DotDotDotToken;
+    readonly name: Identifier;
+    readonly questionToken?: QuestionToken;
+    readonly type: TypeNode;
+}
+export interface OptionalTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.OptionalType;
+    readonly type: TypeNode;
+}
+export interface RestTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.RestType;
+    readonly type: TypeNode;
+}
+export interface ParenthesizedTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.ParenthesizedType;
+    readonly type: TypeNode;
+}
+export interface FunctionTypeNode extends TypeNodeBase, ModifiersBase, FunctionLikeBase {
+    readonly kind: SyntaxKind.FunctionType;
+}
+export interface ConstructorTypeNode extends TypeNodeBase, ModifiersBase, FunctionLikeBase {
+    readonly kind: SyntaxKind.ConstructorType;
+}
+export interface TemplateHead extends NodeBase, TemplateLiteralLikeNodeBase {
+    readonly kind: SyntaxKind.TemplateHead;
+}
+export interface TemplateMiddle extends NodeBase, TemplateLiteralLikeNodeBase {
+    readonly kind: SyntaxKind.TemplateMiddle;
+}
+export interface TemplateTail extends NodeBase, TemplateLiteralLikeNodeBase {
+    readonly kind: SyntaxKind.TemplateTail;
+}
+export interface TemplateLiteralTypeNode extends TypeNodeBase {
+    readonly kind: SyntaxKind.TemplateLiteralType;
+    readonly head: TemplateHead;
+    readonly templateSpans: NodeArray;
+}
+export interface TemplateLiteralTypeSpan extends TypeNodeBase {
+    readonly kind: SyntaxKind.TemplateLiteralTypeSpan;
+    readonly type: TypeNode;
+    readonly literal: TemplateMiddleOrTail;
+}
+export interface SyntheticExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.SyntheticExpression;
+    readonly type: any;
+    readonly isSpread: boolean;
+    readonly tupleNameSource?: Node;
+}
+export interface PartiallyEmittedExpression extends LeftHandSideExpressionBase {
+    readonly kind: SyntaxKind.PartiallyEmittedExpression;
+    readonly expression: Expression;
+}
+export interface JsxElement extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.JsxElement;
+    readonly openingElement: JsxOpeningElement;
+    readonly children: NodeArray;
+    readonly closingElement: JsxClosingElement;
+}
+export interface JsxAttributes extends PrimaryExpressionBase, DeclarationBase {
+    readonly kind: SyntaxKind.JsxAttributes;
+    readonly properties: NodeArray;
+}
+export interface JsxNamespacedName extends ExpressionBase {
+    readonly kind: SyntaxKind.JsxNamespacedName;
+    readonly namespace: Identifier;
+    readonly name: Identifier;
+}
+export interface JsxOpeningElement extends ExpressionBase {
+    readonly kind: SyntaxKind.JsxOpeningElement;
+    readonly tagName: JsxTagNameExpression;
+    readonly typeArguments?: NodeArray;
+    readonly attributes: JsxAttributes;
+}
+export interface JsxSelfClosingElement extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.JsxSelfClosingElement;
+    readonly tagName: JsxTagNameExpression;
+    readonly typeArguments?: NodeArray;
+    readonly attributes: JsxAttributes;
+}
+export interface JsxFragment extends PrimaryExpressionBase {
+    readonly kind: SyntaxKind.JsxFragment;
+    readonly openingFragment: JsxOpeningFragment;
+    readonly children: NodeArray;
+    readonly closingFragment: JsxClosingFragment;
+}
+export interface JsxOpeningFragment extends ExpressionBase {
+    readonly kind: SyntaxKind.JsxOpeningFragment;
+}
+export interface JsxClosingFragment extends ExpressionBase {
+    readonly kind: SyntaxKind.JsxClosingFragment;
+}
+export interface JsxAttribute extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.JsxAttribute;
+    readonly name: JsxAttributeName;
+    readonly initializer?: JsxAttributeValue;
+}
+export interface JsxSpreadAttribute extends ObjectLiteralElementBase, NodeBase {
+    readonly kind: SyntaxKind.JsxSpreadAttribute;
+    readonly expression: Expression;
+}
+export interface JsxClosingElement extends NodeBase {
+    readonly kind: SyntaxKind.JsxClosingElement;
+    readonly tagName: JsxTagNameExpression;
+}
+export interface JsxExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.JsxExpression;
+    readonly dotDotDotToken?: DotDotDotToken;
+    readonly expression?: Expression;
+}
+export interface JsxText extends ExpressionBase, LiteralLikeNodeBase {
+    readonly kind: SyntaxKind.JsxText;
+    readonly containsOnlyTriviaWhiteSpaces: boolean;
+}
+export interface SyntaxList extends NodeBase {
+    readonly kind: SyntaxKind.SyntaxList;
+    readonly children: readonly Node[];
+}
+export interface JSDoc extends NodeBase {
+    readonly kind: SyntaxKind.JSDoc;
+    readonly comment: NodeArray;
+    readonly tags?: NodeArray;
+}
+export interface JSDocTypeExpression extends TypeNodeBase {
+    readonly kind: SyntaxKind.JSDocTypeExpression;
+    readonly type: TypeNode;
+}
+export interface JSDocNonNullableType extends JSDocTypeBase {
+    readonly kind: SyntaxKind.JSDocNonNullableType;
+    readonly type: TypeNode;
+}
+export interface JSDocNullableType extends JSDocTypeBase {
+    readonly kind: SyntaxKind.JSDocNullableType;
+    readonly type: TypeNode;
+}
+export interface JSDocAllType extends JSDocTypeBase {
+    readonly kind: SyntaxKind.JSDocAllType;
+}
+export interface JSDocVariadicType extends JSDocTypeBase {
+    readonly kind: SyntaxKind.JSDocVariadicType;
+    readonly type: TypeNode;
+}
+export interface JSDocOptionalType extends JSDocTypeBase {
+    readonly kind: SyntaxKind.JSDocOptionalType;
+    readonly type: TypeNode;
+}
+export interface JSDocTypeTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocTypeTag;
+    readonly typeExpression: Node;
+}
+export interface JSDocUnknownTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocUnknownTag;
+}
+export interface JSDocTemplateTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocTemplateTag;
+    readonly constraint: Node;
+    readonly typeParameters: NodeArray;
+}
+export interface JSDocReturnTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocReturnTag;
+    readonly typeExpression?: TypeNode;
+}
+export interface JSDocPublicTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocPublicTag;
+}
+export interface JSDocPrivateTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocPrivateTag;
+}
+export interface JSDocProtectedTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocProtectedTag;
+}
+export interface JSDocReadonlyTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocReadonlyTag;
+}
+export interface JSDocOverrideTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocOverrideTag;
+}
+export interface JSDocDeprecatedTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocDeprecatedTag;
+}
+export interface JSDocSeeTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocSeeTag;
+    readonly nameExpression: TypeNode;
+}
+export interface JSDocImplementsTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocImplementsTag;
+    readonly className: ExpressionWithTypeArguments;
+}
+export interface JSDocAugmentsTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocAugmentsTag;
+    readonly className: ExpressionWithTypeArguments;
+}
+export interface JSDocSatisfiesTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocSatisfiesTag;
+    readonly typeExpression: TypeNode;
+}
+export interface JSDocThrowsTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocThrowsTag;
+    readonly typeExpression?: TypeNode;
+}
+export interface JSDocThisTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocThisTag;
+    readonly typeExpression: TypeNode;
+}
+export interface JSDocImportTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocImportTag;
+    readonly importClause?: ImportClause;
+    readonly moduleSpecifier: Expression;
+    readonly attributes?: ImportAttributes;
+}
+export interface JSDocCallbackTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocCallbackTag;
+    readonly typeExpression: TypeNode;
+    readonly name?: JSDocFullName;
+}
+export interface JSDocOverloadTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocOverloadTag;
+    readonly typeExpression: TypeNode;
+}
+export interface JSDocTypedefTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocTypedefTag;
+    readonly typeExpression?: Node;
+    readonly name?: JSDocFullName;
+}
+export interface JSDocSignature extends JSDocTypeBase, FunctionLikeBase {
+    readonly kind: SyntaxKind.JSDocSignature;
+}
+export interface JSDocNameReference extends TypeNodeBase {
+    readonly kind: SyntaxKind.JSDocNameReference;
+    readonly name: EntityName;
+}
+export interface ModuleDeclaration extends DeclarationBase, StatementBase, ModifiersBase, BodyBase {
+    readonly kind: SyntaxKind.ModuleDeclaration;
+    readonly keyword: SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword;
+    readonly name: ModuleName;
+    readonly body?: ModuleBody;
+}
+export interface ImportEqualsDeclaration extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.ImportEqualsDeclaration;
+    readonly isTypeOnly: boolean;
+    readonly name: Identifier;
+    readonly moduleReference: ModuleReference;
+}
+export interface ExportDeclaration extends DeclarationBase, StatementBase, ModifiersBase {
+    readonly kind: SyntaxKind.ExportDeclaration;
+    readonly isTypeOnly: boolean;
+    readonly exportClause?: NamedExportBindings;
+    readonly moduleSpecifier?: Expression;
+    readonly attributes?: ImportAttributes;
+}
+export interface ImportTypeNode extends NodeWithTypeArgumentsBase {
+    readonly kind: SyntaxKind.ImportType;
+    readonly isTypeOf: boolean;
+    readonly argument: TypeNode;
+    readonly attributes?: ImportAttributes;
+    readonly qualifier?: EntityName;
+}
+export interface ImportClause extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.ImportClause;
+    readonly phaseModifier?: ImportPhaseModifierSyntaxKind;
+    readonly name?: Identifier;
+    readonly namedBindings?: NamedImportBindings;
+}
+export interface ImportSpecifier extends NodeBase, DeclarationBase {
+    readonly kind: SyntaxKind.ImportSpecifier;
+    readonly isTypeOnly: boolean;
+    readonly propertyName?: ModuleExportName;
+    readonly name: Identifier;
+}
+export interface JSDocText extends JSDocCommentBase {
+    readonly kind: SyntaxKind.JSDocText;
+}
+export interface JSDocLink extends JSDocCommentBase {
+    readonly kind: SyntaxKind.JSDocLink;
+    readonly name?: EntityName;
+}
+export interface JSDocLinkPlain extends JSDocCommentBase {
+    readonly kind: SyntaxKind.JSDocLinkPlain;
+    readonly name?: EntityName;
+}
+export interface JSDocLinkCode extends JSDocCommentBase {
+    readonly kind: SyntaxKind.JSDocLinkCode;
+    readonly name?: EntityName;
+}
+export interface TypeParameterDeclaration extends NodeBase, DeclarationBase, ModifiersBase {
+    readonly kind: SyntaxKind.TypeParameter;
+    readonly name: Identifier;
+    readonly constraint?: TypeNode;
+    readonly expression?: Expression;
+    readonly defaultType?: TypeNode;
+}
+export interface SyntheticReferenceExpression extends ExpressionBase {
+    readonly kind: SyntaxKind.SyntheticReferenceExpression;
+    readonly expression: Expression;
+    readonly thisArg: Expression;
+}
+export interface JSDocTypeLiteral extends JSDocTypeBase, DeclarationBase {
+    readonly kind: SyntaxKind.JSDocTypeLiteral;
+    readonly jsdocPropertyTags?: readonly JSDocTag[];
+    readonly isArrayType: boolean;
+}
+export type Expression = ExpressionBase;
+export type Statement = StatementBase;
+export type TypeNode = TypeNodeBase;
+export type BlockOrExpression = Block | Expression;
+export type NodeBody = Block | Expression | ModuleBlock | ModuleDeclaration;
+export type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
+export type DeclarationName = Identifier | PrivateIdentifier | StringLiteral | NumericLiteral | BigIntLiteral | NoSubstitutionTemplateLiteral | ComputedPropertyName | BindingPattern | ElementAccessExpression;
+export type ModuleName = Identifier | StringLiteral;
+export type ModuleExportName = Identifier | StringLiteral;
+export type PropertyName = Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | BigIntLiteral;
+export type ModuleBody = ModuleBlock | ModuleDeclaration;
+export type JSDocFullName = Identifier | ModuleDeclaration;
+export type ForInitializer = Expression | MissingDeclaration | VariableDeclarationList;
+export type ModuleReference = Identifier | QualifiedName | ExternalModuleReference;
+export type NamedImportBindings = NamespaceImport | NamedImports;
+export type NamedExportBindings = NamespaceExport | NamedExports;
+export type MemberName = Identifier | PrivateIdentifier;
+export type EntityName = Identifier | QualifiedName;
+export type BindingName = Identifier | BindingPattern;
+export type ModifierLike = Modifier | Decorator;
+export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
+export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
+export type JsxAttributeName = Identifier | JsxNamespacedName;
+export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
+export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName;
+export type ClassLikeDeclaration = ClassDeclaration | ClassExpression;
+export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
+export type LiteralLikeNode = StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | TemplateLiteralLikeNode | JsxText;
+export type LiteralExpression = StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | NoSubstitutionTemplateLiteral;
+export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
+export type TemplateLiteralLikeNode = TemplateHead | TemplateMiddle | TemplateTail;
+export type TemplateMiddleOrTail = TemplateMiddle | TemplateTail;
+export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
+export type TypePredicateParameterName = Identifier | ThisTypeNode;
+export type ImportAttributeName = Identifier | StringLiteral;
+export type LeftHandSideExpression = LeftHandSideExpressionBase;
+export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
+export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignatureDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
+export type StringLiteralLikeNode = StringLiteral | NoSubstitutionTemplateLiteral;
+export type NumericOrStringLikeLiteral = StringLiteralLikeNode | NumericLiteral;
+export type ObjectLiteralLikeNode = ObjectLiteralExpression | ObjectBindingPattern;
+export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
+export type JsxOpeningLikeElement = JsxOpeningElement | JsxSelfClosingElement;
+export type NamedImportsOrExports = NamedImports | NamedExports;
+export type BreakOrContinueStatement = BreakStatement | ContinueStatement;
+export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | BinaryExpression;
+export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
+export type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration;
+export type VariableOrPropertyDeclaration = VariableDeclaration | PropertyDeclaration;
+export type CallOrNewExpression = CallExpression | NewExpression;
+export type ImportClauseOrBindingPattern = ImportClause | BindingPattern;
+export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
+export type Declaration = DeclarationBase;
+export type ClassElement = ClassElementBase;
+export type TypeElement = TypeElementBase;
+export type ObjectLiteralElement = ObjectLiteralElementBase;
+export type JSDocTag = JSDocTagBase;
+export type ArrayBindingElement = BindingElement | OmittedExpression;
+export type AssertionExpression = TypeAssertion | AsExpression;
+export type BooleanLiteral = TrueLiteral | FalseLiteral;
+export type ConciseBody = Block | Expression;
+export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
+export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral;
+export type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | ReadonlyKeyword | OutKeyword | OverrideKeyword | StaticKeyword;
+export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration;
+export type PropertyNameLiteral = Identifier | StringLiteral | NumericLiteral;
+export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail;
+export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken;
+export type ArrayDestructuringAssignment = BinaryExpression;
+export type ObjectDestructuringAssignment = BinaryExpression;
+export type FunctionBody = Block;
+export type IncrementExpression = UpdateExpressionBase;
+export interface ForInStatement extends StatementBase {
+    readonly kind: SyntaxKind.ForInStatement;
+    readonly awaitModifier?: AwaitKeyword;
+    readonly initializer: ForInitializer;
+    readonly expression: Expression;
+    readonly statement: Statement;
+}
+export interface ForOfStatement extends StatementBase {
+    readonly kind: SyntaxKind.ForOfStatement;
+    readonly awaitModifier?: AwaitKeyword;
+    readonly initializer: ForInitializer;
+    readonly expression: Expression;
+    readonly statement: Statement;
+}
+export interface CaseClause extends NodeBase {
+    readonly kind: SyntaxKind.CaseClause;
+    readonly expression: Expression;
+    readonly statements: NodeArray;
+}
+export interface DefaultClause extends NodeBase {
+    readonly kind: SyntaxKind.DefaultClause;
+    readonly expression: Expression;
+    readonly statements: NodeArray;
+}
+export interface ObjectBindingPattern extends NodeBase {
+    readonly kind: SyntaxKind.ObjectBindingPattern;
+    readonly elements: NodeArray;
+}
+export interface ArrayBindingPattern extends NodeBase {
+    readonly kind: SyntaxKind.ArrayBindingPattern;
+    readonly elements: NodeArray;
+}
+export interface JSDocParameterTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocParameterTag;
+    readonly name: EntityName;
+    readonly isBracketed: boolean;
+    readonly typeExpression?: TypeNode;
+    readonly isNameFirst: boolean;
+}
+export interface JSDocPropertyTag extends JSDocTagBase {
+    readonly kind: SyntaxKind.JSDocPropertyTag;
+    readonly name: EntityName;
+    readonly isBracketed: boolean;
+    readonly typeExpression?: TypeNode;
+    readonly isNameFirst: boolean;
+}
+export type ForInOrOfStatement = ForInStatement | ForOfStatement;
+export type CaseOrDefaultClause = CaseClause | DefaultClause;
+export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
+export type JSDocParameterOrPropertyTag = JSDocParameterTag | JSDocPropertyTag;
+export type EndOfFile = Token;
+export type DotToken = Token;
+export type DotDotDotToken = Token;
+export type QuestionToken = Token;
+export type ExclamationToken = Token;
+export type ColonToken = Token;
+export type EqualsToken = Token;
+export type AsteriskToken = Token;
+export type EqualsGreaterThanToken = Token;
+export type PlusToken = Token;
+export type MinusToken = Token;
+export type QuestionDotToken = Token;
+export type AssertsKeyword = Token;
+export type AssertKeyword = Token;
+export type AwaitKeyword = Token;
+export type CaseKeyword = Token;
+export type AbstractKeyword = Token;
+export type AccessorKeyword = Token;
+export type AsyncKeyword = Token;
+export type ConstKeyword = Token;
+export type DeclareKeyword = Token;
+export type DefaultKeyword = Token;
+export type ExportKeyword = Token;
+export type InKeyword = Token;
+export type PrivateKeyword = Token;
+export type ProtectedKeyword = Token;
+export type PublicKeyword = Token;
+export type ReadonlyKeyword = Token;
+export type OutKeyword = Token;
+export type OverrideKeyword = Token;
+export type StaticKeyword = Token;
+export type BinaryOperatorToken = Token;
+export type AssignmentOperatorToken = Token;
+export type NullLiteral = KeywordExpression;
+export type TrueLiteral = KeywordExpression;
+export type FalseLiteral = KeywordExpression;
+export type ThisExpression = KeywordExpression;
+export type SuperExpression = KeywordExpression;
+export type ImportExpression = KeywordExpression;
+export type StatementList = NodeArray;
+export type CaseClausesList = NodeArray;
+export type VariableDeclarationNodeList = NodeArray;
+export type BindingElementList = NodeArray;
+export type TypeParameterList = NodeArray;
+export type ParameterList = NodeArray;
+export type HeritageClauseList = NodeArray;
+export type ClassElementList = NodeArray;
+export type TypeElementList = NodeArray;
+export type ExpressionWithTypeArgumentsList = NodeArray;
+export type EnumMemberList = NodeArray;
+export type ImportSpecifierList = NodeArray;
+export type ExportSpecifierList = NodeArray;
+export type TypeArgumentList = NodeArray;
+export type ArgumentList = NodeArray;
+export type TemplateSpanList = NodeArray;
+export type ElementList = NodeArray;
+export type PropertyDefinitionList = NodeArray;
+export type TypeList = NodeArray;
+export type ImportAttributeList = NodeArray;
+export type TemplateLiteralTypeSpanList = NodeArray;
+export type JsxChildList = NodeArray;
+export type JsxAttributeList = NodeArray;
+//# sourceMappingURL=ast.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.generated.d.ts.map b/node_modules/typescript/dist/ast/ast.generated.d.ts.map
new file mode 100644
index 000000000..de5e12f8d
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.generated.d.ts","sourceRoot":"","sources":["../../src/ast/ast.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,wBAAwB,EACxB,IAAI,EACJ,SAAS,EACZ,MAAM,UAAU,CAAC;AAClB,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,uBAAuB,GAAG,UAAU,CAAC,sBAAsB,GAAG,UAAU,CAAC,aAAa,GAAG,UAA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AG,SAAS,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AACjD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AAChD,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,oBAAoB,CAAC,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,2BAA2B,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.generated.js b/node_modules/typescript/dist/ast/ast.generated.js
new file mode 100644
index 000000000..b71ee9f32
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.generated.js
@@ -0,0 +1,4 @@
+// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT.
+import { SyntaxKind } from "#enums/syntaxKind";
+import { TokenFlags } from "#enums/tokenFlags";
+//# sourceMappingURL=ast.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.generated.js.map b/node_modules/typescript/dist/ast/ast.generated.js.map
new file mode 100644
index 000000000..b3226d780
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.generated.js","sourceRoot":"","sources":["../../src/ast/ast.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.js b/node_modules/typescript/dist/ast/ast.js
new file mode 100644
index 000000000..c6a05807c
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.js
@@ -0,0 +1,7 @@
+// ast.ts — Hand-written AST type definitions
+// Generated types are in ast.generated.ts
+import { SyntaxKind } from "#enums/syntaxKind";
+export { SyntaxKind } from "#enums/syntaxKind";
+export { TokenFlags } from "#enums/tokenFlags";
+export * from "./ast.generated.js";
+//# sourceMappingURL=ast.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/ast.js.map b/node_modules/typescript/dist/ast/ast.js.map
new file mode 100644
index 000000000..d2693b013
--- /dev/null
+++ b/node_modules/typescript/dist/ast/ast.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast/ast.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,0CAA0C;AAM1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,cAAc,oBAAoB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/astnav.d.ts b/node_modules/typescript/dist/ast/astnav.d.ts
new file mode 100644
index 000000000..518f0b691
--- /dev/null
+++ b/node_modules/typescript/dist/ast/astnav.d.ts
@@ -0,0 +1,19 @@
+import type { Node, SourceFile } from "./ast.ts";
+export declare function getTokenAtPosition(sourceFile: SourceFile, position: number): Node;
+export declare function getTouchingPropertyName(sourceFile: SourceFile, position: number): Node;
+export declare function getTouchingToken(sourceFile: SourceFile, position: number): Node;
+/**
+ * Finds the token that starts immediately after `previousToken` ends, searching
+ * within `parent`.  Returns `undefined` if no such token exists.
+ */
+export declare function findNextToken(previousToken: Node, parent: Node, sourceFile: SourceFile): Node | undefined;
+/**
+ * Finds the leftmost token satisfying `position < token.end`.
+ * If the position is in the trivia of that leftmost token, or the token is invalid,
+ * returns the rightmost valid token with `token.end <= position`.
+ * Excludes `JsxText` tokens containing only whitespace.
+ */
+export declare function findPrecedingToken(sourceFile: SourceFile, position: number): Node | undefined;
+/** @internal */
+export declare function getTokenPosOfNode(node: Node, sourceFile: SourceFile, includeJSDoc?: boolean): number;
+//# sourceMappingURL=astnav.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/astnav.d.ts.map b/node_modules/typescript/dist/ast/astnav.d.ts.map
new file mode 100644
index 000000000..fc03e0add
--- /dev/null
+++ b/node_modules/typescript/dist/ast/astnav.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"astnav.d.ts","sourceRoot":"","sources":["../../src/ast/astnav.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,IAAI,EAEJ,UAAU,EACb,MAAM,UAAU,CAAC;AAclB,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEjF;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEtF;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAiEzG;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE7F;AAkMD,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAapG"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/astnav.js b/node_modules/typescript/dist/ast/astnav.js
new file mode 100644
index 000000000..527ab723e
--- /dev/null
+++ b/node_modules/typescript/dist/ast/astnav.js
@@ -0,0 +1,596 @@
+import { NodeFlags } from "#enums/nodeFlags";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { createToken } from "./factory.generated.js";
+import { isJSDocNodeKind, isKeywordKind, isPrivateIdentifier, isPropertyNameLiteral, isTokenKind, } from "./is.js";
+import { createScanner, skipTrivia, } from "./scanner.js";
+export function getTokenAtPosition(sourceFile, position) {
+    return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includePrecedingTokenAtEndPosition*/ undefined);
+}
+export function getTouchingPropertyName(sourceFile, position) {
+    return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, node => isPropertyNameLiteral(node) || isKeywordKind(node.kind) || isPrivateIdentifier(node));
+}
+export function getTouchingToken(sourceFile, position) {
+    return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, /*includePrecedingTokenAtEndPosition*/ undefined);
+}
+/**
+ * Finds the token that starts immediately after `previousToken` ends, searching
+ * within `parent`.  Returns `undefined` if no such token exists.
+ */
+export function findNextToken(previousToken, parent, sourceFile) {
+    return find(parent);
+    function find(n) {
+        if (isTokenKind(n.kind) && n.pos === previousToken.end) {
+            // This is the token that starts at the end of previousToken – return it.
+            return n;
+        }
+        // Find the child node that contains `previousToken` or starts immediately after it.
+        let foundNode;
+        const visitChild = (node) => {
+            if (node.flags & NodeFlags.Reparsed) {
+                return undefined;
+            }
+            if (node.pos <= previousToken.end && node.end > previousToken.end) {
+                foundNode = node;
+            }
+            return undefined;
+        };
+        // Visit JSDoc children first (mirrors Go's VisitEachChildAndJSDoc).
+        if (n.jsDoc) {
+            for (const jsdoc of n.jsDoc) {
+                visitChild(jsdoc);
+            }
+        }
+        n.forEachChild(visitChild, nodes => {
+            if (nodes.length > 0 && foundNode === undefined) {
+                for (const node of nodes) {
+                    if (node.flags & NodeFlags.Reparsed)
+                        continue;
+                    if (node.pos > previousToken.end)
+                        break;
+                    if (node.end > previousToken.end) {
+                        foundNode = node;
+                        break;
+                    }
+                }
+            }
+            return undefined;
+        });
+        // Recurse into the found child.
+        if (foundNode !== undefined) {
+            return find(foundNode);
+        }
+        // No AST child covers the position; use the scanner to find the syntactic token.
+        // The scanner is initialized at `previousToken.end`, so tokenFullStart === previousToken.end.
+        const startPos = previousToken.end;
+        if (startPos >= n.pos && startPos < n.end) {
+            const scanner = getScannerForSourceFile(sourceFile, startPos);
+            const token = scanner.getToken();
+            const tokenFullStart = scanner.getTokenFullStart();
+            const tokenEnd = scanner.getTokenEnd();
+            const flags = scanner.getTokenFlags();
+            return getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, n, flags);
+        }
+        return undefined;
+    }
+}
+/**
+ * Finds the leftmost token satisfying `position < token.end`.
+ * If the position is in the trivia of that leftmost token, or the token is invalid,
+ * returns the rightmost valid token with `token.end <= position`.
+ * Excludes `JsxText` tokens containing only whitespace.
+ */
+export function findPrecedingToken(sourceFile, position) {
+    return findPrecedingTokenImpl(sourceFile, position, sourceFile);
+}
+function getTokenAtPositionImpl(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition) {
+    let current = sourceFile;
+    let nodeAfterLeft;
+    const state = {
+        next: undefined,
+        prevSubtree: undefined,
+        left: 0,
+    };
+    const testNode = (node) => {
+        if (node.kind !== SyntaxKind.EndOfFile && node.end === position && includePrecedingTokenAtEndPosition !== undefined) {
+            state.prevSubtree = node;
+        }
+        // A node "contains" the position if position < end, except nodes at the file end
+        // treat end as inclusive (there's nowhere else to look). This applies to the EOF
+        // token itself, and to JSDoc nodes reaching EOF (e.g. unterminated JSDoc comments).
+        if (node.end < position || node.end === position &&
+            node.kind !== SyntaxKind.EndOfFile &&
+            (!isJSDocNodeKind(node.kind) || node.end !== sourceFile.endOfFileToken.end)) {
+            return -1;
+        }
+        const nodePos = getPosition(node, sourceFile, allowPositionInLeadingTrivia);
+        if (nodePos > position) {
+            return 1;
+        }
+        return 0;
+    };
+    while (true) {
+        // Visit each child of current to find the one containing the position.
+        state.next = undefined;
+        nodeAfterLeft = undefined;
+        // In Strada, JSDoc nodes with a single comment represent that comment as a string
+        // property (not a child node), so forEachChild does not visit it. We replicate this
+        // by detecting single-comment NodeLists in visitList and skipping their elements in visitNode.
+        let skipSingleCommentChildren = false;
+        const visitNode = (node) => {
+            if (node.flags & NodeFlags.Reparsed) {
+                return undefined;
+            }
+            if (skipSingleCommentChildren && isJSDocCommentChildKind(node.kind)) {
+                return undefined;
+            }
+            if (nodeAfterLeft === undefined) {
+                nodeAfterLeft = node;
+            }
+            if (state.next === undefined) {
+                const result = testNode(node);
+                switch (result) {
+                    case -1:
+                        if (!isJSDocNodeKind(node.kind)) {
+                            state.left = node.end;
+                        }
+                        nodeAfterLeft = undefined;
+                        break;
+                    case 0:
+                        state.next = node;
+                        break;
+                }
+            }
+            return undefined;
+        };
+        // Visit JSDoc children first, then regular children (mirrors Go's VisitEachChildAndJSDoc).
+        if (current.jsDoc) {
+            for (const jsdoc of current.jsDoc) {
+                visitNode(jsdoc);
+            }
+        }
+        current.forEachChild(visitNode, nodes => {
+            // Track whether this NodeList is a single-comment list that should be skipped.
+            // The flag affects the subsequent forEachNode(visitNode) calls for this NodeList.
+            skipSingleCommentChildren = isJSDocSingleCommentNodeList(nodes);
+            if (nodes.length === 0 || skipSingleCommentChildren) {
+                return undefined;
+            }
+            if (nodeAfterLeft === undefined) {
+                for (const node of nodes) {
+                    if (!(node.flags & NodeFlags.Reparsed)) {
+                        nodeAfterLeft = node;
+                        break;
+                    }
+                }
+            }
+            if (state.next === undefined) {
+                if (nodes.end === position && includePrecedingTokenAtEndPosition !== undefined) {
+                    state.left = nodes.end;
+                    nodeAfterLeft = undefined;
+                    state.prevSubtree = nodes[nodes.length - 1];
+                }
+                else if (nodes.end <= position) {
+                    state.left = nodes.end;
+                    nodeAfterLeft = undefined;
+                }
+                else if (nodes.pos <= position) {
+                    binarySearchNodeList(nodes, testNode, (node, middle, arr) => {
+                        state.left = node.end;
+                        nodeAfterLeft = undefined;
+                        for (let i = middle + 1; i < arr.length; i++) {
+                            if (!(arr[i].flags & NodeFlags.Reparsed)) {
+                                nodeAfterLeft = arr[i];
+                                break;
+                            }
+                        }
+                    }, found => {
+                        state.next = found;
+                    });
+                }
+            }
+            return undefined;
+        });
+        // If prevSubtree was set, check if the rightmost token of prevSubtree should be returned.
+        if (state.prevSubtree !== undefined) {
+            const child = findPrecedingTokenImpl(sourceFile, position, state.prevSubtree);
+            if (child !== undefined && child.end === position && includePrecedingTokenAtEndPosition(child)) {
+                return child;
+            }
+            state.prevSubtree = undefined;
+        }
+        if (state.next === undefined) {
+            if (isTokenKind(current.kind) || shouldSkipChild(current)) {
+                return current;
+            }
+            // Use the scanner to find a token not stored in the AST.
+            const scanner = getScannerForSourceFile(sourceFile, state.left);
+            let end = current.end;
+            const afterLeft = nodeAfterLeft;
+            if (afterLeft !== undefined) {
+                end = afterLeft.pos;
+            }
+            while (state.left < end) {
+                const token = scanner.getToken();
+                const tokenFullStart = scanner.getTokenFullStart();
+                const tokenStart = allowPositionInLeadingTrivia ? tokenFullStart : scanner.getTokenStart();
+                const tokenEnd = scanner.getTokenEnd();
+                const flags = scanner.getTokenFlags();
+                if (tokenEnd > end) {
+                    break;
+                }
+                if (tokenStart <= position && position < tokenEnd) {
+                    if (token === SyntaxKind.Identifier || !isTokenKind(token)) {
+                        if (isJSDocNodeKind(current.kind)) {
+                            return current;
+                        }
+                        throw new Error(`did not expect ${SyntaxKind[current.kind]} to have ${SyntaxKind[token]} in its trivia`);
+                    }
+                    return getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, current, flags);
+                }
+                if (includePrecedingTokenAtEndPosition !== undefined && tokenEnd === position) {
+                    const prevToken = getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, current, flags);
+                    if (includePrecedingTokenAtEndPosition(prevToken)) {
+                        return prevToken;
+                    }
+                }
+                state.left = tokenEnd;
+                scanner.scan();
+            }
+            return current;
+        }
+        current = state.next;
+        state.left = current.pos;
+        nodeAfterLeft = undefined;
+    }
+}
+function getPosition(node, sourceFile, allowPositionInLeadingTrivia) {
+    if (allowPositionInLeadingTrivia) {
+        return node.pos;
+    }
+    return getTokenPosOfNode(node, sourceFile, /*includeJSDoc*/ true);
+}
+/** @internal */
+export function getTokenPosOfNode(node, sourceFile, includeJSDoc) {
+    // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't*
+    // want to skip trivia because this will launch us forward to the next token.
+    if (nodeIsMissing(node)) {
+        return node.pos;
+    }
+    if (isJSDocNodeKind(node.kind) || node.kind === SyntaxKind.JsxText) {
+        return skipTrivia(sourceFile.text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
+    }
+    if (includeJSDoc && node.jsDoc && node.jsDoc.length > 0) {
+        return getTokenPosOfNode(node.jsDoc[0], sourceFile, /*includeJSDoc*/ false);
+    }
+    return skipTrivia(sourceFile.text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ false, /*inJSDoc*/ !!(node.flags & NodeFlags.JSDoc));
+}
+function nodeIsMissing(node) {
+    return node.pos === node.end && node.pos >= 0 && node.kind !== SyntaxKind.EndOfFile;
+}
+function findPrecedingTokenImpl(sourceFile, position, startNode) {
+    const find = (n) => {
+        if (isTokenKind(n.kind) && n.kind !== SyntaxKind.EndOfFile) {
+            return n;
+        }
+        let foundChild;
+        let prevChild;
+        // Visit JSDoc nodes first (mirrors Go's VisitEachChildAndJSDoc).
+        if (n.jsDoc) {
+            for (const jsdoc of n.jsDoc) {
+                if (jsdoc.flags & NodeFlags.Reparsed)
+                    continue;
+                if (foundChild !== undefined)
+                    break;
+                if (position < jsdoc.end && (prevChild === undefined || prevChild.end <= position)) {
+                    foundChild = jsdoc;
+                }
+                else {
+                    prevChild = jsdoc;
+                }
+            }
+        }
+        let skipSingleCommentChildrenImpl = false;
+        n.forEachChild(node => {
+            if (node.flags & NodeFlags.Reparsed) {
+                return undefined;
+            }
+            if (skipSingleCommentChildrenImpl && isJSDocCommentChildKind(node.kind)) {
+                return undefined;
+            }
+            if (foundChild !== undefined) {
+                return undefined;
+            }
+            if (position < node.end && (prevChild === undefined || prevChild.end <= position)) {
+                foundChild = node;
+            }
+            else {
+                prevChild = node;
+            }
+            return undefined;
+        }, nodes => {
+            skipSingleCommentChildrenImpl = isJSDocSingleCommentNodeList(nodes);
+            if (foundChild !== undefined) {
+                return undefined;
+            }
+            if (nodes.length > 0 && !skipSingleCommentChildrenImpl) {
+                const index = binarySearchForPrecedingToken(nodes, position);
+                if (index >= 0 && !(nodes[index].flags & NodeFlags.Reparsed)) {
+                    foundChild = nodes[index];
+                }
+                const lookupIndex = index >= 0 ? index - 1 : nodes.length - 1;
+                for (let i = lookupIndex; i >= 0; i--) {
+                    if (!(nodes[i].flags & NodeFlags.Reparsed)) {
+                        if (prevChild === undefined) {
+                            prevChild = nodes[i];
+                        }
+                        break;
+                    }
+                }
+            }
+            return undefined;
+        });
+        if (foundChild !== undefined) {
+            const start = getTokenPosOfNode(foundChild, sourceFile, /*includeJSDoc*/ true);
+            if (start >= position) {
+                if (position >= foundChild.pos) {
+                    // We are in the leading trivia of foundChild. Check for JSDoc nodes of n
+                    // preceding foundChild, mirroring Go's findPrecedingToken logic.
+                    let jsDoc;
+                    if (n.jsDoc) {
+                        for (let i = n.jsDoc.length - 1; i >= 0; i--) {
+                            if (n.jsDoc[i].pos >= foundChild.pos) {
+                                jsDoc = n.jsDoc[i];
+                                break;
+                            }
+                        }
+                    }
+                    if (jsDoc !== undefined) {
+                        if (position < jsDoc.end) {
+                            return find(jsDoc);
+                        }
+                        return findRightmostValidToken(sourceFile, jsDoc.end, n, position);
+                    }
+                    return findRightmostValidToken(sourceFile, foundChild.pos, n, -1);
+                }
+                // Answer is in tokens between two visited children.
+                return findRightmostValidToken(sourceFile, foundChild.pos, n, position);
+            }
+            return find(foundChild);
+        }
+        if (position >= n.end) {
+            return findRightmostValidToken(sourceFile, n.end, n, -1);
+        }
+        return findRightmostValidToken(sourceFile, n.end, n, position);
+    };
+    return find(startNode);
+}
+function findRightmostValidToken(sourceFile, endPos, containingNode, position) {
+    if (position === -1) {
+        position = containingNode.end;
+    }
+    const find = (n, endPos) => {
+        if (isTokenKind(n.kind) && n.kind !== SyntaxKind.EndOfFile) {
+            return n;
+        }
+        let rightmostValidNode;
+        let hasChildren = false;
+        // Visit JSDoc nodes first (mirrors Go's VisitEachChildAndJSDoc).
+        if (n.jsDoc) {
+            hasChildren = true;
+            for (const jsdoc of n.jsDoc) {
+                if (jsdoc.flags & NodeFlags.Reparsed)
+                    continue;
+                if (jsdoc.end > endPos || getTokenPosOfNode(jsdoc, sourceFile) >= position)
+                    continue;
+                if (isValidPrecedingNode(jsdoc, sourceFile)) {
+                    rightmostValidNode = jsdoc;
+                }
+            }
+        }
+        let skipSingleCommentChildren = false;
+        n.forEachChild(node => {
+            if (node.flags & NodeFlags.Reparsed) {
+                return undefined;
+            }
+            if (skipSingleCommentChildren && isJSDocCommentChildKind(node.kind)) {
+                return undefined;
+            }
+            hasChildren = true;
+            if (node.end > endPos || getTokenPosOfNode(node, sourceFile) >= position) {
+                return undefined;
+            }
+            if (isValidPrecedingNode(node, sourceFile)) {
+                rightmostValidNode = node;
+            }
+            return undefined;
+        }, nodes => {
+            // Skip single-comment JSDoc NodeLists (e.g. JSDocText children of a JSDoc node):
+            // In Go, these are stored as string properties and are never visited as children.
+            skipSingleCommentChildren = isJSDocSingleCommentNodeList(nodes);
+            if (nodes.length > 0 && !skipSingleCommentChildren) {
+                hasChildren = true;
+                for (let i = nodes.length - 1; i >= 0; i--) {
+                    const node = nodes[i];
+                    if (node.flags & NodeFlags.Reparsed)
+                        continue;
+                    if (node.end > endPos || getTokenPosOfNode(node, sourceFile) >= position)
+                        continue;
+                    if (isValidPrecedingNode(node, sourceFile)) {
+                        rightmostValidNode = node;
+                        break;
+                    }
+                }
+            }
+            return undefined;
+        });
+        // Scan for syntactic tokens (e.g. `{`, `,`) between AST nodes, matching Go's
+        // findRightmostValidToken scanner step.
+        if (!shouldSkipChild(n)) {
+            const startPos = rightmostValidNode !== undefined ? rightmostValidNode.end : n.pos;
+            const targetEnd = Math.min(endPos, position);
+            if (startPos < targetEnd) {
+                const scanner = getScannerForSourceFile(sourceFile, startPos);
+                let pos = startPos;
+                let lastScannedToken;
+                while (pos < targetEnd) {
+                    const tokenStart = scanner.getTokenStart();
+                    if (tokenStart >= position)
+                        break;
+                    const tokenFullStart = scanner.getTokenFullStart();
+                    const tokenEnd = scanner.getTokenEnd();
+                    const token = scanner.getToken();
+                    const flags = scanner.getTokenFlags();
+                    lastScannedToken = getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, n, flags);
+                    pos = tokenEnd;
+                    scanner.scan();
+                }
+                if (lastScannedToken !== undefined) {
+                    return lastScannedToken;
+                }
+            }
+        }
+        if (!hasChildren) {
+            if (n !== containingNode) {
+                return n;
+            }
+            return undefined;
+        }
+        if (rightmostValidNode !== undefined) {
+            return find(rightmostValidNode, rightmostValidNode.end);
+        }
+        return undefined;
+    };
+    return find(containingNode, endPos);
+}
+function isValidPrecedingNode(node, sourceFile) {
+    if (node.kind === SyntaxKind.EndOfFile) {
+        return false;
+    }
+    const start = getTokenPosOfNode(node, sourceFile);
+    const width = node.end - start;
+    return width > 0;
+}
+function shouldSkipChild(node) {
+    return node.kind === SyntaxKind.JSDoc ||
+        node.kind === SyntaxKind.JSDocText ||
+        node.kind === SyntaxKind.JSDocTypeLiteral ||
+        node.kind === SyntaxKind.JSDocSignature ||
+        node.kind === SyntaxKind.JSDocLink ||
+        node.kind === SyntaxKind.JSDocLinkCode ||
+        node.kind === SyntaxKind.JSDocLinkPlain ||
+        isJSDocTag(node);
+}
+function isJSDocTag(node) {
+    return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode;
+}
+// In Strada, if a JSDoc node has a single comment, that comment is represented as a string
+// property as a simplification, and therefore that comment is not visited by forEachChild.
+// To match, we skip single-element comment NodeLists within JSDoc/JSDocTag nodes.
+function isJSDocCommentChildKind(kind) {
+    switch (kind) {
+        case SyntaxKind.JSDocText:
+        case SyntaxKind.JSDocLink:
+        case SyntaxKind.JSDocLinkCode:
+        case SyntaxKind.JSDocLinkPlain:
+            return true;
+        default:
+            return false;
+    }
+}
+function isJSDocSingleCommentNodeList(nodes) {
+    return nodes.length === 1 && isJSDocCommentChildKind(nodes[0].kind);
+}
+function getScannerForSourceFile(sourceFile, pos) {
+    const scanner = createScanner(/*skipTrivia*/ true, sourceFile.languageVariant, sourceFile.text);
+    scanner.resetTokenState(pos);
+    scanner.scan();
+    return scanner;
+}
+function getOrCreateToken(sourceFile, kind, pos, end, parent, _flags) {
+    const key = `${pos}_${end}`;
+    if (!sourceFile.tokenCache) {
+        sourceFile.tokenCache = new Map();
+    }
+    const existing = sourceFile.tokenCache.get(key);
+    if (existing !== undefined) {
+        return existing;
+    }
+    const token = createToken(kind);
+    token.pos = pos;
+    token.end = end;
+    token.parent = parent;
+    sourceFile.tokenCache.set(key, token);
+    return token;
+}
+/** Binary search a node list for the node containing position. */
+function binarySearchNodeList(nodes, testNode, onLeft, onMatch) {
+    let lo = 0;
+    let hi = nodes.length - 1;
+    while (lo <= hi) {
+        const mid = (lo + hi) >>> 1;
+        const node = nodes[mid];
+        if (node.flags & NodeFlags.Reparsed) {
+            // Skip reparsed nodes: try to find a non-reparsed node nearby
+            let found = false;
+            for (let i = mid + 1; i <= hi; i++) {
+                if (!(nodes[i].flags & NodeFlags.Reparsed)) {
+                    const cmp = testNode(nodes[i]);
+                    if (cmp < 0) {
+                        onLeft(nodes[i], i, nodes);
+                        lo = i + 1;
+                    }
+                    else if (cmp > 0) {
+                        hi = i - 1;
+                    }
+                    else {
+                        onMatch(nodes[i]);
+                        return;
+                    }
+                    found = true;
+                    break;
+                }
+            }
+            if (!found) {
+                hi = mid - 1;
+            }
+            continue;
+        }
+        const cmp = testNode(node);
+        if (cmp < 0) {
+            onLeft(node, mid, nodes);
+            lo = mid + 1;
+        }
+        else if (cmp > 0) {
+            hi = mid - 1;
+        }
+        else {
+            onMatch(node);
+            return;
+        }
+    }
+}
+function binarySearchForPrecedingToken(nodes, position) {
+    let lo = 0;
+    let hi = nodes.length - 1;
+    let result = -1;
+    while (lo <= hi) {
+        const mid = (lo + hi) >>> 1;
+        const node = nodes[mid];
+        if (node.flags & NodeFlags.Reparsed) {
+            lo = mid + 1;
+            continue;
+        }
+        if (position < node.end) {
+            if (mid === 0 || position >= nodes[mid - 1].end) {
+                result = mid;
+                break;
+            }
+            hi = mid - 1;
+        }
+        else {
+            lo = mid + 1;
+        }
+    }
+    return result;
+}
+//# sourceMappingURL=astnav.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/astnav.js.map b/node_modules/typescript/dist/ast/astnav.js.map
new file mode 100644
index 000000000..e3cd3d094
--- /dev/null
+++ b/node_modules/typescript/dist/ast/astnav.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"astnav.js","sourceRoot":"","sources":["../../src/ast/astnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACH,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,aAAa,EACb,UAAU,GACb,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,k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C,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YACzB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aACI,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aACI,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC;YACd,OAAO;QACX,CAAC;IACL,CAAC;AACL,CAAC;AAED,SAAS,6BAA6B,CAAC,KAAsB,EAAE,QAAgB;IAC3E,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;IAChB,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QACd,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,IAAI,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;YAClC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;YACb,SAAS;QACb,CAAC;QACD,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACtB,IAAI,GAAG,KAAK,CAAC,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;gBAC9C,MAAM,GAAG,GAAG,CAAC;gBACb,MAAM;YACV,CAAC;YACD,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aACI,CAAC;YACF,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/clone.d.ts b/node_modules/typescript/dist/ast/clone.d.ts
new file mode 100644
index 000000000..f4aad2d39
--- /dev/null
+++ b/node_modules/typescript/dist/ast/clone.d.ts
@@ -0,0 +1,16 @@
+import type { Node, NodeArray } from "./ast.ts";
+/**
+ * Creates a deep clone of a node and its subtree, synthesizing new nodes for every child.
+ * The resulting tree has fully set parent pointers.
+ *
+ * @param node The node to clone.
+ * @param includeTrivia Whether to preserve the text range (pos/end) on the clone.
+ */
+export declare function getSynthesizedDeepClone(node: T, includeTrivia?: boolean): T;
+export declare function getSynthesizedDeepClone(node: T | undefined, includeTrivia?: boolean): T | undefined;
+/**
+ * Creates deep clones of a NodeArray and all its elements.
+ */
+export declare function getSynthesizedDeepClones(nodes: NodeArray, includeTrivia?: boolean): NodeArray;
+export declare function getSynthesizedDeepClones(nodes: NodeArray | undefined, includeTrivia?: boolean): NodeArray | undefined;
+//# sourceMappingURL=clone.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/clone.d.ts.map b/node_modules/typescript/dist/ast/clone.d.ts.map
new file mode 100644
index 000000000..51a7dd33e
--- /dev/null
+++ b/node_modules/typescript/dist/ast/clone.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/ast/clone.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,IAAI,EACJ,SAAS,EAIZ,MAAM,UAAU,CAAC;AAgFlB;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;AAC7F,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC;AAUrH;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/clone.js b/node_modules/typescript/dist/ast/clone.js
new file mode 100644
index 000000000..eaf403f1d
--- /dev/null
+++ b/node_modules/typescript/dist/ast/clone.js
@@ -0,0 +1,104 @@
+import { SyntaxKind } from "#enums/syntaxKind";
+import { cloneNode, createNodeArray, createNumericLiteral, createStringLiteral, } from "./factory.generated.js";
+import { visitEachChild } from "./visitor.js";
+function isArray(value) {
+    // See: https://github.com/microsoft/TypeScript/issues/17002
+    return Array.isArray(value);
+}
+function forEachChildRecursively(rootNode, cbNode, cbNodes) {
+    const queue = gatherPossibleChildren(rootNode);
+    const parents = []; // tracks parent references for elements in queue
+    while (parents.length < queue.length) {
+        parents.push(rootNode);
+    }
+    while (queue.length !== 0) {
+        const current = queue.pop();
+        const parent = parents.pop();
+        if (isArray(current)) {
+            if (cbNodes) {
+                const res = cbNodes(current, parent);
+                if (res) {
+                    if (res === "skip")
+                        continue;
+                    return res;
+                }
+            }
+            for (let i = current.length - 1; i >= 0; --i) {
+                queue.push(current[i]);
+                parents.push(parent);
+            }
+        }
+        else {
+            const res = cbNode(current, parent);
+            if (res) {
+                if (res === "skip")
+                    continue;
+                return res;
+            }
+            if (current.kind >= SyntaxKind.FirstNode) {
+                // add children in reverse order to the queue, so popping gives the first child
+                for (const child of gatherPossibleChildren(current)) {
+                    queue.push(child);
+                    parents.push(current);
+                }
+            }
+        }
+    }
+}
+function gatherPossibleChildren(node) {
+    const children = [];
+    node.forEachChild(addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal
+    return children;
+    function addWorkItem(n) {
+        children.unshift(n);
+    }
+}
+function setParentRecursive(rootNode) {
+    if (rootNode === undefined)
+        return rootNode;
+    forEachChildRecursively(rootNode, (child, parent) => {
+        child.parent = parent;
+        return undefined;
+    });
+    return rootNode;
+}
+function setTextRange(node, range) {
+    if (range) {
+        node.pos = range.pos;
+        node.end = range.end;
+    }
+    return node;
+}
+export function getSynthesizedDeepClone(node, includeTrivia = true) {
+    const clone = node && getSynthesizedDeepCloneWorker(node);
+    if (clone && !includeTrivia) {
+        clone.pos = -1;
+        clone.end = -1;
+    }
+    return setParentRecursive(clone);
+}
+export function getSynthesizedDeepClones(nodes, includeTrivia = true) {
+    if (nodes) {
+        const cloned = createNodeArray(nodes.map(n => getSynthesizedDeepClone(n, includeTrivia)), nodes.pos, nodes.end);
+        return cloned;
+    }
+    return nodes;
+}
+function getSynthesizedDeepCloneWorker(node) {
+    const visited = visitEachChild(node, n => getSynthesizedDeepCloneWorker(n));
+    if (visited === node) {
+        // Leaf node — visitEachChild returned the same node since there are no children.
+        // We need to explicitly clone it.
+        const clone = node.kind === SyntaxKind.StringLiteral
+            ? createStringLiteral(node.text, node.tokenFlags)
+            : node.kind === SyntaxKind.NumericLiteral
+                ? createNumericLiteral(node.text, node.tokenFlags)
+                : cloneNode(node);
+        return setTextRange(clone, node);
+    }
+    // visitEachChild already created a new node with visited children.
+    // Clear the parent since setParentRecursive will set it later.
+    visited.parent = undefined;
+    return visited;
+}
+//# sourceMappingURL=clone.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/clone.js.map b/node_modules/typescript/dist/ast/clone.js.map
new file mode 100644
index 000000000..707bfdd5b
--- /dev/null
+++ b/node_modules/typescript/dist/ast/clone.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../src/ast/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,OAAO,EACH,SAAS,EACT,eAAe,EACf,oBAAo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vH,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,mEAAmE;IACnE,+DAA+D;IAC9D,OAAe,CAAC,MAAM,GAAG,SAAU,CAAC;IACrC,OAAO,OAAO,CAAC;AACnB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/factory.generated.d.ts b/node_modules/typescript/dist/ast/factory.generated.d.ts
new file mode 100644
index 000000000..e9073d993
--- /dev/null
+++ b/node_modules/typescript/dist/ast/factory.generated.d.ts
@@ -0,0 +1,520 @@
+import { NodeFlags } from "#enums/nodeFlags";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { TokenFlags } from "#enums/tokenFlags";
+import type { ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertsKeyword, AsteriskToken, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperatorToken, BindingElement, BindingName, Block, BreakStatement, CallExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, ClassDeclaration, ClassElement, ClassExpression, ClassStaticBlockDeclaration, ColonToken, ComputedPropertyName, ConciseBody, ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, Decorator, DefaultClause, DeleteExpression, DoStatement, DotDotDotToken, ElementAccessExpression, EmptyStatement, EndOfFile, EntityName, EnumDeclaration, EnumMember, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, ForInitializer, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportDeclaration, ImportEqualsDeclaration, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocCallbackTag, JSDocComment, JSDocDeprecatedTag, JSDocFullName, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTag, JSDocTemplateTag, JSDocText, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributes, JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText, KeywordExpression, KeywordExpressionSyntaxKind, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LeftHandSideExpression, LiteralTypeNode, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignatureDeclaration, MinusToken, MissingDeclaration, ModifierLike, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NodeArray, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NotEmittedTypeElement, NumericLiteral, ObjectBindingPattern, ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, OptionalTypeNode, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, Path, PlusToken, PostfixUnaryExpression, PrefixUnaryExpression, PrivateIdentifier, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertySignatureDeclaration, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShorthandPropertyAssignment, SourceFile, SpreadAssignment, SpreadElement, Statement, StringLiteral, SwitchStatement, SyntaxList, SyntheticExpression, SyntheticReferenceExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateMiddleOrTail, TemplateSpan, TemplateTail, ThisTypeNode, ThrowStatement, Token, TokenSyntaxKind, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypePredicateParameterName, TypeQueryNode, TypeReferenceNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "./ast.ts";
+export declare class NodeObject {
+    readonly kind: SyntaxKind;
+    flags: NodeFlags;
+    readonly pos: number;
+    readonly end: number;
+    parent: Node;
+    _data: any;
+    constructor(kind: SyntaxKind, data: any);
+    get ambientModuleNames(): any;
+    get argument(): any;
+    get argumentExpression(): any;
+    get arguments(): any;
+    get assertsModifier(): any;
+    get asteriskToken(): any;
+    get attributes(): any;
+    get awaitModifier(): any;
+    get block(): any;
+    get body(): any;
+    get caseBlock(): any;
+    get catchClause(): any;
+    get checkType(): any;
+    get children(): any;
+    get className(): any;
+    get clauses(): any;
+    get closingElement(): any;
+    get closingFragment(): any;
+    get colonToken(): any;
+    get comment(): any;
+    get condition(): any;
+    get constraint(): any;
+    get containsOnlyTriviaWhiteSpaces(): any;
+    get declarationList(): any;
+    get declarations(): any;
+    get defaultType(): any;
+    get dotDotDotToken(): any;
+    get elementType(): any;
+    get elements(): any;
+    get elseStatement(): any;
+    get endOfFileToken(): any;
+    get equalsGreaterThanToken(): any;
+    get equalsToken(): any;
+    get exclamationToken(): any;
+    get exportClause(): any;
+    get exprName(): any;
+    get expression(): any;
+    get extendsType(): any;
+    get externalModuleIndicator(): any;
+    get falseType(): any;
+    get fileName(): any;
+    get finallyBlock(): any;
+    get head(): any;
+    get heritageClauses(): any;
+    get importClause(): any;
+    get imports(): any;
+    get incrementor(): any;
+    get indexType(): any;
+    get initializer(): any;
+    get isArrayType(): any;
+    get isBracketed(): any;
+    get isDeclarationFile(): any;
+    get isExportEquals(): any;
+    get isNameFirst(): any;
+    get isSpread(): any;
+    get isTypeOf(): any;
+    get isTypeOnly(): any;
+    get jsdocPropertyTags(): any;
+    get keyword(): any;
+    get keywordToken(): any;
+    get label(): any;
+    get languageVariant(): any;
+    get left(): any;
+    get libReferenceDirectives(): any;
+    get literal(): any;
+    get members(): any;
+    get modifiers(): any;
+    get moduleAugmentations(): any;
+    get moduleReference(): any;
+    get moduleSpecifier(): any;
+    get multiLine(): any;
+    get name(): any;
+    get nameExpression(): any;
+    get nameType(): any;
+    get namedBindings(): any;
+    get namespace(): any;
+    get objectAssignmentInitializer(): any;
+    get objectType(): any;
+    get openingElement(): any;
+    get openingFragment(): any;
+    get operand(): any;
+    get operator(): any;
+    get operatorToken(): any;
+    get parameterName(): any;
+    get parameters(): any;
+    get path(): any;
+    get phaseModifier(): any;
+    get postfixToken(): any;
+    get properties(): any;
+    get propertyName(): any;
+    get qualifier(): any;
+    get questionDotToken(): any;
+    get questionToken(): any;
+    get rawText(): any;
+    get readonlyToken(): any;
+    get referencedFiles(): any;
+    get right(): any;
+    get scriptKind(): any;
+    get statement(): any;
+    get statements(): any;
+    get tag(): any;
+    get tagName(): any;
+    get tags(): any;
+    get template(): any;
+    get templateFlags(): any;
+    get templateSpans(): any;
+    get text(): any;
+    get thenStatement(): any;
+    get thisArg(): any;
+    get token(): any;
+    get tokenCache(): any;
+    get tokenFlags(): any;
+    get trueType(): any;
+    get tryBlock(): any;
+    get tupleNameSource(): any;
+    get type(): any;
+    get typeArguments(): any;
+    get typeExpression(): any;
+    get typeName(): any;
+    get typeParameter(): any;
+    get typeParameters(): any;
+    get typeReferenceDirectives(): any;
+    get types(): any;
+    get value(): any;
+    get variableDeclaration(): any;
+    get whenFalse(): any;
+    get whenTrue(): any;
+    forEachChild(visitor: (node: Node) => T, visitArray?: (nodes: NodeArray) => T): T | undefined;
+    getSourceFile(): SourceFile;
+    getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
+    getFullStart(): number;
+    getEnd(): number;
+    getWidth(sourceFile?: SourceFile): number;
+    getFullWidth(): number;
+    getLeadingTriviaWidth(sourceFile?: SourceFile): number;
+    getFullText(sourceFile?: SourceFile): string;
+    getText(sourceFile?: SourceFile): string;
+}
+export declare function createNodeArray(elements: readonly T[], pos?: number, end?: number): NodeArray;
+export declare function cloneNode(node: T): T;
+export declare function createToken(kind: TKind): Token;
+export declare function createIdentifier(text: string): Identifier;
+export declare function createPrivateIdentifier(text: string): PrivateIdentifier;
+export declare function createQualifiedName(left: EntityName, right: Identifier): QualifiedName;
+export declare function createComputedPropertyName(expression: Expression): ComputedPropertyName;
+export declare function createDecorator(expression: LeftHandSideExpression): Decorator;
+export declare function createEmptyStatement(): EmptyStatement;
+export declare function createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+export declare function createDoStatement(statement: Statement, expression: Expression): DoStatement;
+export declare function createWhileStatement(expression: Expression, statement: Statement): WhileStatement;
+export declare function createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+export declare function createBreakStatement(label?: Identifier): BreakStatement;
+export declare function createContinueStatement(label?: Identifier): ContinueStatement;
+export declare function createReturnStatement(expression?: Expression): ReturnStatement;
+export declare function createWithStatement(expression: Expression, statement: Statement): WithStatement;
+export declare function createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+export declare function createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock;
+export declare function createThrowStatement(expression: Expression): ThrowStatement;
+export declare function createTryStatement(tryBlock: Block, catchClause?: CatchClause, finallyBlock?: Block): TryStatement;
+export declare function createCatchClause(variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause;
+export declare function createDebuggerStatement(): DebuggerStatement;
+export declare function createLabeledStatement(label: Identifier, statement: Statement): LabeledStatement;
+export declare function createExpressionStatement(expression: Expression): ExpressionStatement;
+export declare function createBlock(statements: readonly Statement[], multiLine?: boolean): Block;
+export declare function createVariableStatement(modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+export declare function createVariableDeclaration(name: BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+export declare function createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags: NodeFlags): VariableDeclarationList;
+export declare function createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+export declare function createBindingElement(dotDotDotToken?: DotDotDotToken, propertyName?: PropertyName, name?: BindingName, initializer?: Expression): BindingElement;
+export declare function createMissingDeclaration(modifiers?: readonly ModifierLike[]): MissingDeclaration;
+export declare function createFunctionDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): FunctionDeclaration;
+export declare function createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+export declare function createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+export declare function createHeritageClause(token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]): HeritageClause;
+export declare function createInterfaceDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+export declare function createTypeAliasDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+export declare function createEnumMember(name: PropertyName, initializer?: Expression): EnumMember;
+export declare function createEnumDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+export declare function createModuleBlock(statements: readonly Statement[]): ModuleBlock;
+export declare function createNotEmittedStatement(): NotEmittedStatement;
+export declare function createNotEmittedTypeElement(): NotEmittedTypeElement;
+export declare function createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration;
+export declare function createExternalModuleReference(expression: Expression): ExternalModuleReference;
+export declare function createNamespaceImport(name: Identifier): NamespaceImport;
+export declare function createNamedImports(elements: readonly ImportSpecifier[]): NamedImports;
+export declare function createExportAssignment(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, type: TypeNode, expression: Expression): ExportAssignment;
+export declare function createNamespaceExportDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier): NamespaceExportDeclaration;
+export declare function createNamespaceExport(name: ModuleExportName): NamespaceExport;
+export declare function createNamedExports(elements: readonly ExportSpecifier[]): NamedExports;
+export declare function createExportSpecifier(isTypeOnly: boolean | undefined, propertyName: ModuleExportName | undefined, name: ModuleExportName): ExportSpecifier;
+export declare function createCallSignatureDeclaration(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): CallSignatureDeclaration;
+export declare function createConstructSignatureDeclaration(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructSignatureDeclaration;
+export declare function createConstructorDeclaration(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): ConstructorDeclaration;
+export declare function createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): GetAccessorDeclaration;
+export declare function createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): SetAccessorDeclaration;
+export declare function createIndexSignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+export declare function createMethodSignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): MethodSignatureDeclaration;
+export declare function createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): MethodDeclaration;
+export declare function createPropertySignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertySignatureDeclaration;
+export declare function createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken?: QuestionToken | ExclamationToken, type?: TypeNode, initializer?: Expression): PropertyDeclaration;
+export declare function createSemicolonClassElement(): SemicolonClassElement;
+export declare function createClassStaticBlockDeclaration(modifiers: readonly ModifierLike[] | undefined, body: Block): ClassStaticBlockDeclaration;
+export declare function createOmittedExpression(): OmittedExpression;
+export declare function createKeywordExpression(kind: TKind): KeywordExpression;
+export declare function createStringLiteral(text: string, tokenFlags: TokenFlags): StringLiteral;
+export declare function createNumericLiteral(text: string, tokenFlags: TokenFlags): NumericLiteral;
+export declare function createBigIntLiteral(text: string, tokenFlags: TokenFlags): BigIntLiteral;
+export declare function createRegularExpressionLiteral(text: string, tokenFlags: TokenFlags): RegularExpressionLiteral;
+export declare function createNoSubstitutionTemplateLiteral(text: string, templateFlags: TokenFlags): NoSubstitutionTemplateLiteral;
+export declare function createBinaryExpression(modifiers: readonly ModifierLike[] | undefined, left: Expression, type: TypeNode | undefined, operatorToken: BinaryOperatorToken, right: Expression): BinaryExpression;
+export declare function createPrefixUnaryExpression(operator: SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken, operand: Expression): PrefixUnaryExpression;
+export declare function createPostfixUnaryExpression(operand: Expression, operator: SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken): PostfixUnaryExpression;
+export declare function createYieldExpression(asteriskToken?: AsteriskToken, expression?: Expression): YieldExpression;
+export declare function createArrowFunction(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
+export declare function createFunctionExpression(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: FunctionBody): FunctionExpression;
+export declare function createAsExpression(expression: Expression, type: TypeNode): AsExpression;
+export declare function createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression;
+export declare function createConditionalExpression(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+export declare function createPropertyAccessExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName, flags: NodeFlags): PropertyAccessExpression;
+export declare function createElementAccessExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression, flags: NodeFlags): ElementAccessExpression;
+export declare function createCallExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, arguments_: readonly Expression[], flags: NodeFlags): CallExpression;
+export declare function createNewExpression(expression: Expression, typeArguments?: readonly TypeNode[], arguments_?: readonly Expression[]): NewExpression;
+export declare function createMetaProperty(keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier): MetaProperty;
+export declare function createNonNullExpression(expression: Expression, flags: NodeFlags): NonNullExpression;
+export declare function createSpreadElement(expression: Expression): SpreadElement;
+export declare function createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
+export declare function createTemplateSpan(expression: Expression, literal: TemplateMiddleOrTail): TemplateSpan;
+export declare function createTaggedTemplateExpression(tag: Expression, questionDotToken: QuestionDotToken, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral, flags: NodeFlags): TaggedTemplateExpression;
+export declare function createParenthesizedExpression(expression: Expression): ParenthesizedExpression;
+export declare function createArrayLiteralExpression(elements: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression;
+export declare function createObjectLiteralExpression(properties: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
+export declare function createSpreadAssignment(expression: Expression): SpreadAssignment;
+export declare function createPropertyAssignment(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertyAssignment;
+export declare function createShorthandPropertyAssignment(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, equalsToken?: EqualsToken, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+export declare function createDeleteExpression(expression: Expression): DeleteExpression;
+export declare function createTypeOfExpression(expression: Expression): TypeOfExpression;
+export declare function createVoidExpression(expression: Expression): VoidExpression;
+export declare function createAwaitExpression(expression: Expression): AwaitExpression;
+export declare function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
+export declare function createKeywordTypeNode(kind: TKind): KeywordTypeNode;
+export declare function createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode;
+export declare function createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode;
+export declare function createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
+export declare function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode;
+export declare function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
+export declare function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+export declare function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+export declare function createTypeReferenceNode(typeName: EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode;
+export declare function createExpressionWithTypeArguments(expression: Expression, typeArguments?: readonly TypeNode[]): ExpressionWithTypeArguments;
+export declare function createLiteralTypeNode(literal: Node): LiteralTypeNode;
+export declare function createThisTypeNode(): ThisTypeNode;
+export declare function createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: TypePredicateParameterName, type?: TypeNode): TypePredicateNode;
+export declare function createImportAttribute(name: ImportAttributeName, value: Expression): ImportAttribute;
+export declare function createImportAttributes(token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword, attributes: readonly ImportAttribute[], multiLine?: boolean): ImportAttributes;
+export declare function createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
+export declare function createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType?: TypeNode, questionToken?: QuestionToken | PlusToken | MinusToken, type?: TypeNode, members?: readonly TypeElement[]): MappedTypeNode;
+export declare function createTypeLiteralNode(members: readonly TypeElement[]): TypeLiteralNode;
+export declare function createTupleTypeNode(elements: readonly TypeNode[]): TupleTypeNode;
+export declare function createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
+export declare function createOptionalTypeNode(type: TypeNode): OptionalTypeNode;
+export declare function createRestTypeNode(type: TypeNode): RestTypeNode;
+export declare function createParenthesizedTypeNode(type: TypeNode): ParenthesizedTypeNode;
+export declare function createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): FunctionTypeNode;
+export declare function createConstructorTypeNode(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructorTypeNode;
+export declare function createTemplateHead(text: string, rawText: string, templateFlags: TokenFlags): TemplateHead;
+export declare function createTemplateMiddle(text: string, rawText: string, templateFlags: TokenFlags): TemplateMiddle;
+export declare function createTemplateTail(text: string, rawText: string, templateFlags: TokenFlags): TemplateTail;
+export declare function createTemplateLiteralTypeNode(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode;
+export declare function createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddleOrTail): TemplateLiteralTypeSpan;
+export declare function createSyntheticExpression(type: any, isSpread?: boolean, tupleNameSource?: Node): SyntheticExpression;
+export declare function createPartiallyEmittedExpression(expression: Expression): PartiallyEmittedExpression;
+export declare function createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
+export declare function createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
+export declare function createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName;
+export declare function createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
+export declare function createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
+export declare function createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
+export declare function createJsxOpeningFragment(): JsxOpeningFragment;
+export declare function createJsxClosingFragment(): JsxClosingFragment;
+export declare function createJsxAttribute(name: JsxAttributeName, initializer?: JsxAttributeValue): JsxAttribute;
+export declare function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
+export declare function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
+export declare function createJsxExpression(dotDotDotToken?: DotDotDotToken, expression?: Expression): JsxExpression;
+export declare function createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
+export declare function createSyntaxList(children: readonly Node[]): SyntaxList;
+export declare function createJSDoc(comment: readonly JSDocComment[], tags?: readonly JSDocTag[]): JSDoc;
+export declare function createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression;
+export declare function createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType;
+export declare function createJSDocNullableType(type: TypeNode): JSDocNullableType;
+export declare function createJSDocAllType(): JSDocAllType;
+export declare function createJSDocVariadicType(type: TypeNode): JSDocVariadicType;
+export declare function createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
+export declare function createJSDocTypeTag(tagName: Identifier, typeExpression: Node, comment?: readonly JSDocComment[]): JSDocTypeTag;
+export declare function createJSDocUnknownTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocUnknownTag;
+export declare function createJSDocTemplateTag(tagName: Identifier, constraint: Node, typeParameters: readonly TypeParameterDeclaration[], comment?: readonly JSDocComment[]): JSDocTemplateTag;
+export declare function createJSDocReturnTag(tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocReturnTag;
+export declare function createJSDocPublicTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPublicTag;
+export declare function createJSDocPrivateTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPrivateTag;
+export declare function createJSDocProtectedTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocProtectedTag;
+export declare function createJSDocReadonlyTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocReadonlyTag;
+export declare function createJSDocOverrideTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocOverrideTag;
+export declare function createJSDocDeprecatedTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocDeprecatedTag;
+export declare function createJSDocSeeTag(tagName: Identifier, nameExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSeeTag;
+export declare function createJSDocImplementsTag(tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocImplementsTag;
+export declare function createJSDocAugmentsTag(tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocAugmentsTag;
+export declare function createJSDocSatisfiesTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSatisfiesTag;
+export declare function createJSDocThrowsTag(tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocThrowsTag;
+export declare function createJSDocThisTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocThisTag;
+export declare function createJSDocImportTag(tagName: Identifier, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: readonly JSDocComment[]): JSDocImportTag;
+export declare function createJSDocCallbackTag(tagName: Identifier, typeExpression: TypeNode, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocCallbackTag;
+export declare function createJSDocOverloadTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocOverloadTag;
+export declare function createJSDocTypedefTag(tagName: Identifier, typeExpression?: Node, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocTypedefTag;
+export declare function createJSDocSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): JSDocSignature;
+export declare function createJSDocNameReference(name: EntityName): JSDocNameReference;
+export declare function createModuleDeclaration(modifiers: readonly ModifierLike[] | undefined, keyword: SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword, name: ModuleName, body?: ModuleBody): ModuleDeclaration;
+export declare function createImportEqualsDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+export declare function createExportDeclaration(modifiers?: readonly ModifierLike[], isTypeOnly?: boolean, exportClause?: NamedExportBindings, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration;
+export declare function createImportTypeNode(isTypeOf: boolean | undefined, argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[]): ImportTypeNode;
+export declare function createImportClause(phaseModifier?: ImportPhaseModifierSyntaxKind, name?: Identifier, namedBindings?: NamedImportBindings): ImportClause;
+export declare function createImportSpecifier(isTypeOnly: boolean | undefined, propertyName: ModuleExportName | undefined, name: Identifier): ImportSpecifier;
+export declare function createJSDocText(text: string): JSDocText;
+export declare function createJSDocLink(name: EntityName | undefined, text: string): JSDocLink;
+export declare function createJSDocLinkPlain(name: EntityName | undefined, text: string): JSDocLinkPlain;
+export declare function createJSDocLinkCode(name: EntityName | undefined, text: string): JSDocLinkCode;
+export declare function createTypeParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, constraint?: TypeNode, expression?: Expression, defaultType?: TypeNode): TypeParameterDeclaration;
+export declare function createSyntheticReferenceExpression(expression: Expression, thisArg: Expression): SyntheticReferenceExpression;
+export declare function createJSDocTypeLiteral(jsdocPropertyTags?: readonly JSDocTag[], isArrayType?: boolean): JSDocTypeLiteral;
+export declare function createForInStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+export declare function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+export declare function createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
+export declare function createDefaultClause(expression: Expression, statements: readonly Statement[]): DefaultClause;
+export declare function createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern;
+export declare function createArrayBindingPattern(elements: readonly BindingElement[]): ArrayBindingPattern;
+export declare function createJSDocParameterTag(tagName: Identifier, name: EntityName, isBracketed: boolean, typeExpression: TypeNode | undefined, isNameFirst: boolean, comment: readonly JSDocComment[] | undefined): JSDocParameterTag;
+export declare function createJSDocPropertyTag(tagName: Identifier, name: EntityName, isBracketed: boolean, typeExpression: TypeNode | undefined, isNameFirst: boolean, comment: readonly JSDocComment[] | undefined): JSDocPropertyTag;
+export declare function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
+export declare function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
+export declare function updateDecorator(node: Decorator, expression: LeftHandSideExpression): Decorator;
+export declare function updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+export declare function updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
+export declare function updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
+export declare function updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+export declare function updateBreakStatement(node: BreakStatement, label?: Identifier): BreakStatement;
+export declare function updateContinueStatement(node: ContinueStatement, label?: Identifier): ContinueStatement;
+export declare function updateReturnStatement(node: ReturnStatement, expression?: Expression): ReturnStatement;
+export declare function updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
+export declare function updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+export declare function updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock;
+export declare function updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement;
+export declare function updateTryStatement(node: TryStatement, tryBlock: Block, catchClause?: CatchClause, finallyBlock?: Block): TryStatement;
+export declare function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause;
+export declare function updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
+export declare function updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
+export declare function updateBlock(node: Block, statements: readonly Statement[]): Block;
+export declare function updateVariableStatement(node: VariableStatement, modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+export declare function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+export declare function updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList;
+export declare function updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+export declare function updateBindingElement(node: BindingElement, dotDotDotToken?: DotDotDotToken, propertyName?: PropertyName, name?: BindingName, initializer?: Expression): BindingElement;
+export declare function updateMissingDeclaration(node: MissingDeclaration, modifiers?: readonly ModifierLike[]): MissingDeclaration;
+export declare function updateFunctionDeclaration(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): FunctionDeclaration;
+export declare function updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+export declare function updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+export declare function updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause;
+export declare function updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+export declare function updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+export declare function updateEnumMember(node: EnumMember, name: PropertyName, initializer?: Expression): EnumMember;
+export declare function updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+export declare function updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock;
+export declare function updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration;
+export declare function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
+export declare function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
+export declare function updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports;
+export declare function updateExportAssignment(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, type: TypeNode, expression: Expression): ExportAssignment;
+export declare function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier): NamespaceExportDeclaration;
+export declare function updateNamespaceExport(node: NamespaceExport, name: ModuleExportName): NamespaceExport;
+export declare function updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports;
+export declare function updateExportSpecifier(node: ExportSpecifier, propertyName: ModuleExportName | undefined, name: ModuleExportName): ExportSpecifier;
+export declare function updateCallSignatureDeclaration(node: CallSignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): CallSignatureDeclaration;
+export declare function updateConstructSignatureDeclaration(node: ConstructSignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructSignatureDeclaration;
+export declare function updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): ConstructorDeclaration;
+export declare function updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): GetAccessorDeclaration;
+export declare function updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): SetAccessorDeclaration;
+export declare function updateIndexSignatureDeclaration(node: IndexSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+export declare function updateMethodSignatureDeclaration(node: MethodSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): MethodSignatureDeclaration;
+export declare function updateMethodDeclaration(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): MethodDeclaration;
+export declare function updatePropertySignatureDeclaration(node: PropertySignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertySignatureDeclaration;
+export declare function updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken?: QuestionToken | ExclamationToken, type?: TypeNode, initializer?: Expression): PropertyDeclaration;
+export declare function updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, modifiers: readonly ModifierLike[] | undefined, body: Block): ClassStaticBlockDeclaration;
+export declare function updateBinaryExpression(node: BinaryExpression, modifiers: readonly ModifierLike[] | undefined, left: Expression, type: TypeNode | undefined, operatorToken: BinaryOperatorToken, right: Expression): BinaryExpression;
+export declare function updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
+export declare function updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
+export declare function updateYieldExpression(node: YieldExpression, asteriskToken?: AsteriskToken, expression?: Expression): YieldExpression;
+export declare function updateArrowFunction(node: ArrowFunction, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
+export declare function updateFunctionExpression(node: FunctionExpression, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: FunctionBody): FunctionExpression;
+export declare function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
+export declare function updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression;
+export declare function updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+export declare function updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessExpression;
+export declare function updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessExpression;
+export declare function updateCallExpression(node: CallExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, arguments_: readonly Expression[]): CallExpression;
+export declare function updateNewExpression(node: NewExpression, expression: Expression, typeArguments?: readonly TypeNode[], arguments_?: readonly Expression[]): NewExpression;
+export declare function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
+export declare function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+export declare function updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement;
+export declare function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
+export declare function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddleOrTail): TemplateSpan;
+export declare function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, questionDotToken: QuestionDotToken, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+export declare function updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
+export declare function updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression;
+export declare function updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression;
+export declare function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
+export declare function updatePropertyAssignment(node: PropertyAssignment, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertyAssignment;
+export declare function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, equalsToken?: EqualsToken, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+export declare function updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression;
+export declare function updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression;
+export declare function updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression;
+export declare function updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression;
+export declare function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
+export declare function updateUnionTypeNode(node: UnionTypeNode, types: readonly TypeNode[]): UnionTypeNode;
+export declare function updateIntersectionTypeNode(node: IntersectionTypeNode, types: readonly TypeNode[]): IntersectionTypeNode;
+export declare function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
+export declare function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
+export declare function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
+export declare function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
+export declare function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+export declare function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode;
+export declare function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments?: readonly TypeNode[]): ExpressionWithTypeArguments;
+export declare function updateLiteralTypeNode(node: LiteralTypeNode, literal: Node): LiteralTypeNode;
+export declare function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: TypePredicateParameterName, type?: TypeNode): TypePredicateNode;
+export declare function updateImportAttribute(node: ImportAttribute, name: ImportAttributeName, value: Expression): ImportAttribute;
+export declare function updateImportAttributes(node: ImportAttributes, attributes: readonly ImportAttribute[]): ImportAttributes;
+export declare function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
+export declare function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType?: TypeNode, questionToken?: QuestionToken | PlusToken | MinusToken, type?: TypeNode, members?: readonly TypeElement[]): MappedTypeNode;
+export declare function updateTypeLiteralNode(node: TypeLiteralNode, members: readonly TypeElement[]): TypeLiteralNode;
+export declare function updateTupleTypeNode(node: TupleTypeNode, elements: readonly TypeNode[]): TupleTypeNode;
+export declare function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
+export declare function updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode;
+export declare function updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode;
+export declare function updateParenthesizedTypeNode(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
+export declare function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): FunctionTypeNode;
+export declare function updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructorTypeNode;
+export declare function updateTemplateLiteralTypeNode(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode;
+export declare function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddleOrTail): TemplateLiteralTypeSpan;
+export declare function updateSyntheticExpression(node: SyntheticExpression, tupleNameSource?: Node): SyntheticExpression;
+export declare function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+export declare function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
+export declare function updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
+export declare function updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName;
+export declare function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
+export declare function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
+export declare function updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
+export declare function updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer?: JsxAttributeValue): JsxAttribute;
+export declare function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
+export declare function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
+export declare function updateJsxExpression(node: JsxExpression, dotDotDotToken?: DotDotDotToken, expression?: Expression): JsxExpression;
+export declare function updateSyntaxList(node: SyntaxList, children: readonly Node[]): SyntaxList;
+export declare function updateJSDoc(node: JSDoc, comment: readonly JSDocComment[], tags?: readonly JSDocTag[]): JSDoc;
+export declare function updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression;
+export declare function updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType;
+export declare function updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType;
+export declare function updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType;
+export declare function updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType;
+export declare function updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier, typeExpression: Node, comment?: readonly JSDocComment[]): JSDocTypeTag;
+export declare function updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocUnknownTag;
+export declare function updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier, constraint: Node, typeParameters: readonly TypeParameterDeclaration[], comment?: readonly JSDocComment[]): JSDocTemplateTag;
+export declare function updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocReturnTag;
+export declare function updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPublicTag;
+export declare function updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPrivateTag;
+export declare function updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocProtectedTag;
+export declare function updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocReadonlyTag;
+export declare function updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocOverrideTag;
+export declare function updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocDeprecatedTag;
+export declare function updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier, nameExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSeeTag;
+export declare function updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocImplementsTag;
+export declare function updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocAugmentsTag;
+export declare function updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSatisfiesTag;
+export declare function updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocThrowsTag;
+export declare function updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocThisTag;
+export declare function updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: readonly JSDocComment[]): JSDocImportTag;
+export declare function updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier, typeExpression: TypeNode, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocCallbackTag;
+export declare function updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocOverloadTag;
+export declare function updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier, typeExpression?: Node, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocTypedefTag;
+export declare function updateJSDocSignature(node: JSDocSignature, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): JSDocSignature;
+export declare function updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference;
+export declare function updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body?: ModuleBody): ModuleDeclaration;
+export declare function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+export declare function updateExportDeclaration(node: ExportDeclaration, modifiers?: readonly ModifierLike[], exportClause?: NamedExportBindings, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration;
+export declare function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[]): ImportTypeNode;
+export declare function updateImportClause(node: ImportClause, name?: Identifier, namedBindings?: NamedImportBindings): ImportClause;
+export declare function updateImportSpecifier(node: ImportSpecifier, propertyName: ModuleExportName | undefined, name: Identifier): ImportSpecifier;
+export declare function updateJSDocLink(node: JSDocLink, name?: EntityName): JSDocLink;
+export declare function updateJSDocLinkPlain(node: JSDocLinkPlain, name?: EntityName): JSDocLinkPlain;
+export declare function updateJSDocLinkCode(node: JSDocLinkCode, name?: EntityName): JSDocLinkCode;
+export declare function updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, constraint?: TypeNode, expression?: Expression, defaultType?: TypeNode): TypeParameterDeclaration;
+export declare function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, expression: Expression, thisArg: Expression): SyntheticReferenceExpression;
+export declare function updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsdocPropertyTags?: readonly JSDocTag[]): JSDocTypeLiteral;
+export declare function updateForInStatement(node: ForInStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+export declare function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+export declare function updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
+export declare function updateDefaultClause(node: DefaultClause, expression: Expression, statements: readonly Statement[]): DefaultClause;
+export declare function updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern;
+export declare function updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly BindingElement[]): ArrayBindingPattern;
+export declare function updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier, name: EntityName, typeExpression: TypeNode | undefined, comment: readonly JSDocComment[] | undefined): JSDocParameterTag;
+export declare function updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier, name: EntityName, typeExpression: TypeNode | undefined, comment: readonly JSDocComment[] | undefined): JSDocPropertyTag;
+export declare function createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFile, text: string, fileName: string, path: Path): SourceFile;
+export declare function updateSourceFile(node: SourceFile, statements: readonly Statement[], endOfFileToken: EndOfFile): SourceFile;
+//# sourceMappingURL=factory.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/factory.generated.d.ts.map b/node_modules/typescript/dist/ast/factory.generated.d.ts.map
new file mode 100644
index 000000000..2f4f1e68e
--- /dev/null
+++ b/node_modules/typescript/dist/ast/factory.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"factory.generated.d.ts","sourceRoot":"","sources":["../../src/ast/factory.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,mBAAmB,EAC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oB,EAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,oBAAoB,CAEhI;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,mBAAmB,CAE7H;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAAG,iBAAiB,CAE7M;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAAG,gBAAgB,CAE1M;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU,CAQpJ;AAUD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,SAAS,EAAE,EAAE,cAAc,EAAE,SAAS,GAAG,UAAU,CAI1H"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/factory.generated.js b/node_modules/typescript/dist/ast/factory.generated.js
new file mode 100644
index 000000000..40cdd76af
--- /dev/null
+++ b/node_modules/typescript/dist/ast/factory.generated.js
@@ -0,0 +1,3057 @@
+// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT.
+import { NodeFlags } from "#enums/nodeFlags";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { TokenFlags } from "#enums/tokenFlags";
+import { getTokenPosOfNode } from "./astnav.js";
+import { cloneSourceFileData } from "./utils.js";
+import { forEachChildOfJSDocParameterTag, forEachChildOfJSDocPropertyTag, } from "./visitor.js";
+export class NodeObject {
+    kind;
+    flags = 0;
+    pos = -1;
+    end = -1;
+    parent = undefined;
+    _data;
+    constructor(kind, data) {
+        this.kind = kind;
+        this._data = data;
+    }
+    get ambientModuleNames() {
+        return this._data?.ambientModuleNames;
+    }
+    get argument() {
+        return this._data?.argument;
+    }
+    get argumentExpression() {
+        return this._data?.argumentExpression;
+    }
+    get arguments() {
+        return this._data?.arguments;
+    }
+    get assertsModifier() {
+        return this._data?.assertsModifier;
+    }
+    get asteriskToken() {
+        return this._data?.asteriskToken;
+    }
+    get attributes() {
+        return this._data?.attributes;
+    }
+    get awaitModifier() {
+        return this._data?.awaitModifier;
+    }
+    get block() {
+        return this._data?.block;
+    }
+    get body() {
+        return this._data?.body;
+    }
+    get caseBlock() {
+        return this._data?.caseBlock;
+    }
+    get catchClause() {
+        return this._data?.catchClause;
+    }
+    get checkType() {
+        return this._data?.checkType;
+    }
+    get children() {
+        return this._data?.children;
+    }
+    get className() {
+        return this._data?.className;
+    }
+    get clauses() {
+        return this._data?.clauses;
+    }
+    get closingElement() {
+        return this._data?.closingElement;
+    }
+    get closingFragment() {
+        return this._data?.closingFragment;
+    }
+    get colonToken() {
+        return this._data?.colonToken;
+    }
+    get comment() {
+        return this._data?.comment;
+    }
+    get condition() {
+        return this._data?.condition;
+    }
+    get constraint() {
+        return this._data?.constraint;
+    }
+    get containsOnlyTriviaWhiteSpaces() {
+        return this._data?.containsOnlyTriviaWhiteSpaces;
+    }
+    get declarationList() {
+        return this._data?.declarationList;
+    }
+    get declarations() {
+        return this._data?.declarations;
+    }
+    get defaultType() {
+        return this._data?.defaultType;
+    }
+    get dotDotDotToken() {
+        return this._data?.dotDotDotToken;
+    }
+    get elementType() {
+        return this._data?.elementType;
+    }
+    get elements() {
+        return this._data?.elements;
+    }
+    get elseStatement() {
+        return this._data?.elseStatement;
+    }
+    get endOfFileToken() {
+        return this._data?.endOfFileToken;
+    }
+    get equalsGreaterThanToken() {
+        return this._data?.equalsGreaterThanToken;
+    }
+    get equalsToken() {
+        return this._data?.equalsToken;
+    }
+    get exclamationToken() {
+        return this._data?.exclamationToken;
+    }
+    get exportClause() {
+        return this._data?.exportClause;
+    }
+    get exprName() {
+        return this._data?.exprName;
+    }
+    get expression() {
+        return this._data?.expression;
+    }
+    get extendsType() {
+        return this._data?.extendsType;
+    }
+    get externalModuleIndicator() {
+        return this._data?.externalModuleIndicator;
+    }
+    get falseType() {
+        return this._data?.falseType;
+    }
+    get fileName() {
+        return this._data?.fileName;
+    }
+    get finallyBlock() {
+        return this._data?.finallyBlock;
+    }
+    get head() {
+        return this._data?.head;
+    }
+    get heritageClauses() {
+        return this._data?.heritageClauses;
+    }
+    get importClause() {
+        return this._data?.importClause;
+    }
+    get imports() {
+        return this._data?.imports;
+    }
+    get incrementor() {
+        return this._data?.incrementor;
+    }
+    get indexType() {
+        return this._data?.indexType;
+    }
+    get initializer() {
+        return this._data?.initializer;
+    }
+    get isArrayType() {
+        return this._data?.isArrayType;
+    }
+    get isBracketed() {
+        return this._data?.isBracketed;
+    }
+    get isDeclarationFile() {
+        return this._data?.isDeclarationFile;
+    }
+    get isExportEquals() {
+        return this._data?.isExportEquals;
+    }
+    get isNameFirst() {
+        return this._data?.isNameFirst;
+    }
+    get isSpread() {
+        return this._data?.isSpread;
+    }
+    get isTypeOf() {
+        return this._data?.isTypeOf;
+    }
+    get isTypeOnly() {
+        return this._data?.isTypeOnly;
+    }
+    get jsdocPropertyTags() {
+        return this._data?.jsdocPropertyTags;
+    }
+    get keyword() {
+        return this._data?.keyword;
+    }
+    get keywordToken() {
+        return this._data?.keywordToken;
+    }
+    get label() {
+        return this._data?.label;
+    }
+    get languageVariant() {
+        return this._data?.languageVariant;
+    }
+    get left() {
+        return this._data?.left;
+    }
+    get libReferenceDirectives() {
+        return this._data?.libReferenceDirectives;
+    }
+    get literal() {
+        return this._data?.literal;
+    }
+    get members() {
+        return this._data?.members;
+    }
+    get modifiers() {
+        return this._data?.modifiers;
+    }
+    get moduleAugmentations() {
+        return this._data?.moduleAugmentations;
+    }
+    get moduleReference() {
+        return this._data?.moduleReference;
+    }
+    get moduleSpecifier() {
+        return this._data?.moduleSpecifier;
+    }
+    get multiLine() {
+        return this._data?.multiLine;
+    }
+    get name() {
+        return this._data?.name;
+    }
+    get nameExpression() {
+        return this._data?.nameExpression;
+    }
+    get nameType() {
+        return this._data?.nameType;
+    }
+    get namedBindings() {
+        return this._data?.namedBindings;
+    }
+    get namespace() {
+        return this._data?.namespace;
+    }
+    get objectAssignmentInitializer() {
+        return this._data?.objectAssignmentInitializer;
+    }
+    get objectType() {
+        return this._data?.objectType;
+    }
+    get openingElement() {
+        return this._data?.openingElement;
+    }
+    get openingFragment() {
+        return this._data?.openingFragment;
+    }
+    get operand() {
+        return this._data?.operand;
+    }
+    get operator() {
+        return this._data?.operator;
+    }
+    get operatorToken() {
+        return this._data?.operatorToken;
+    }
+    get parameterName() {
+        return this._data?.parameterName;
+    }
+    get parameters() {
+        return this._data?.parameters;
+    }
+    get path() {
+        return this._data?.path;
+    }
+    get phaseModifier() {
+        return this._data?.phaseModifier;
+    }
+    get postfixToken() {
+        return this._data?.postfixToken;
+    }
+    get properties() {
+        return this._data?.properties;
+    }
+    get propertyName() {
+        return this._data?.propertyName;
+    }
+    get qualifier() {
+        return this._data?.qualifier;
+    }
+    get questionDotToken() {
+        return this._data?.questionDotToken;
+    }
+    get questionToken() {
+        return this._data?.questionToken;
+    }
+    get rawText() {
+        return this._data?.rawText;
+    }
+    get readonlyToken() {
+        return this._data?.readonlyToken;
+    }
+    get referencedFiles() {
+        return this._data?.referencedFiles;
+    }
+    get right() {
+        return this._data?.right;
+    }
+    get scriptKind() {
+        return this._data?.scriptKind;
+    }
+    get statement() {
+        return this._data?.statement;
+    }
+    get statements() {
+        return this._data?.statements;
+    }
+    get tag() {
+        return this._data?.tag;
+    }
+    get tagName() {
+        return this._data?.tagName;
+    }
+    get tags() {
+        return this._data?.tags;
+    }
+    get template() {
+        return this._data?.template;
+    }
+    get templateFlags() {
+        return this._data?.templateFlags;
+    }
+    get templateSpans() {
+        return this._data?.templateSpans;
+    }
+    get text() {
+        return this._data?.text;
+    }
+    get thenStatement() {
+        return this._data?.thenStatement;
+    }
+    get thisArg() {
+        return this._data?.thisArg;
+    }
+    get token() {
+        return this._data?.token;
+    }
+    get tokenCache() {
+        return this._data?.tokenCache;
+    }
+    get tokenFlags() {
+        return this._data?.tokenFlags;
+    }
+    get trueType() {
+        return this._data?.trueType;
+    }
+    get tryBlock() {
+        return this._data?.tryBlock;
+    }
+    get tupleNameSource() {
+        return this._data?.tupleNameSource;
+    }
+    get type() {
+        return this._data?.type;
+    }
+    get typeArguments() {
+        return this._data?.typeArguments;
+    }
+    get typeExpression() {
+        return this._data?.typeExpression;
+    }
+    get typeName() {
+        return this._data?.typeName;
+    }
+    get typeParameter() {
+        return this._data?.typeParameter;
+    }
+    get typeParameters() {
+        return this._data?.typeParameters;
+    }
+    get typeReferenceDirectives() {
+        return this._data?.typeReferenceDirectives;
+    }
+    get types() {
+        return this._data?.types;
+    }
+    get value() {
+        return this._data?.value;
+    }
+    get variableDeclaration() {
+        return this._data?.variableDeclaration;
+    }
+    get whenFalse() {
+        return this._data?.whenFalse;
+    }
+    get whenTrue() {
+        return this._data?.whenTrue;
+    }
+    forEachChild(visitor, visitArray) {
+        const fn = forEachChildTable[this.kind];
+        return fn ? fn(this._data, visitor, visitArray) : undefined;
+    }
+    getSourceFile() {
+        let node = this;
+        while (node.parent)
+            node = node.parent;
+        return node;
+    }
+    getStart(sourceFile, includeJsDocComment) {
+        return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment);
+    }
+    getFullStart() {
+        return this.pos;
+    }
+    getEnd() {
+        return this.end;
+    }
+    getWidth(sourceFile) {
+        return this.getEnd() - this.getStart(sourceFile);
+    }
+    getFullWidth() {
+        return this.end - this.pos;
+    }
+    getLeadingTriviaWidth(sourceFile) {
+        return this.getStart(sourceFile) - this.pos;
+    }
+    getFullText(sourceFile) {
+        return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end);
+    }
+    getText(sourceFile) {
+        sourceFile ??= this.getSourceFile();
+        return sourceFile.text.substring(this.getStart(sourceFile), this.end);
+    }
+}
+function isNodeArray(array) {
+    return "pos" in array && "end" in array;
+}
+export function createNodeArray(elements, pos = -1, end = -1) {
+    if (isNodeArray(elements))
+        return elements;
+    const arr = elements.slice();
+    arr.pos = pos;
+    arr.end = end;
+    return arr;
+}
+export function cloneNode(node) {
+    const data = cloneNodeData(node);
+    const clone = new NodeObject(node.kind, data);
+    clone.flags = node.flags;
+    clone.pos = node.pos;
+    clone.end = node.end;
+    return clone;
+}
+function cloneNodeData(node) {
+    const n = node;
+    switch (node.kind) {
+        case SyntaxKind.Identifier:
+            return { text: n.text };
+        case SyntaxKind.PrivateIdentifier:
+            return { text: n.text };
+        case SyntaxKind.QualifiedName:
+            return { left: n.left, right: n.right };
+        case SyntaxKind.ComputedPropertyName:
+            return { expression: n.expression };
+        case SyntaxKind.Decorator:
+            return { expression: n.expression };
+        case SyntaxKind.IfStatement:
+            return { expression: n.expression, thenStatement: n.thenStatement, elseStatement: n.elseStatement };
+        case SyntaxKind.DoStatement:
+            return { statement: n.statement, expression: n.expression };
+        case SyntaxKind.WhileStatement:
+            return { expression: n.expression, statement: n.statement };
+        case SyntaxKind.ForStatement:
+            return { initializer: n.initializer, condition: n.condition, incrementor: n.incrementor, statement: n.statement };
+        case SyntaxKind.BreakStatement:
+            return { label: n.label };
+        case SyntaxKind.ContinueStatement:
+            return { label: n.label };
+        case SyntaxKind.ReturnStatement:
+            return { expression: n.expression };
+        case SyntaxKind.WithStatement:
+            return { expression: n.expression, statement: n.statement };
+        case SyntaxKind.SwitchStatement:
+            return { expression: n.expression, caseBlock: n.caseBlock };
+        case SyntaxKind.CaseBlock:
+            return { clauses: n.clauses };
+        case SyntaxKind.ThrowStatement:
+            return { expression: n.expression };
+        case SyntaxKind.TryStatement:
+            return { tryBlock: n.tryBlock, catchClause: n.catchClause, finallyBlock: n.finallyBlock };
+        case SyntaxKind.CatchClause:
+            return { variableDeclaration: n.variableDeclaration, block: n.block };
+        case SyntaxKind.LabeledStatement:
+            return { label: n.label, statement: n.statement };
+        case SyntaxKind.ExpressionStatement:
+            return { expression: n.expression };
+        case SyntaxKind.Block:
+            return { statements: n.statements, multiLine: n.multiLine };
+        case SyntaxKind.VariableStatement:
+            return { modifiers: n.modifiers, declarationList: n.declarationList };
+        case SyntaxKind.VariableDeclaration:
+            return { name: n.name, exclamationToken: n.exclamationToken, type: n.type, initializer: n.initializer };
+        case SyntaxKind.VariableDeclarationList:
+            return { declarations: n.declarations };
+        case SyntaxKind.Parameter:
+            return { modifiers: n.modifiers, dotDotDotToken: n.dotDotDotToken, name: n.name, questionToken: n.questionToken, type: n.type, initializer: n.initializer };
+        case SyntaxKind.BindingElement:
+            return { dotDotDotToken: n.dotDotDotToken, propertyName: n.propertyName, name: n.name, initializer: n.initializer };
+        case SyntaxKind.MissingDeclaration:
+            return { modifiers: n.modifiers };
+        case SyntaxKind.FunctionDeclaration:
+            return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body };
+        case SyntaxKind.ClassDeclaration:
+            return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members };
+        case SyntaxKind.ClassExpression:
+            return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members };
+        case SyntaxKind.HeritageClause:
+            return { token: n.token, types: n.types };
+        case SyntaxKind.InterfaceDeclaration:
+            return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members };
+        case SyntaxKind.TypeAliasDeclaration:
+        case SyntaxKind.JSTypeAliasDeclaration:
+            return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, type: n.type };
+        case SyntaxKind.EnumMember:
+            return { name: n.name, initializer: n.initializer };
+        case SyntaxKind.EnumDeclaration:
+            return { modifiers: n.modifiers, name: n.name, members: n.members };
+        case SyntaxKind.ModuleBlock:
+            return { statements: n.statements };
+        case SyntaxKind.ImportDeclaration:
+        case SyntaxKind.JSImportDeclaration:
+            return { modifiers: n.modifiers, importClause: n.importClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes };
+        case SyntaxKind.ExternalModuleReference:
+            return { expression: n.expression };
+        case SyntaxKind.NamespaceImport:
+            return { name: n.name };
+        case SyntaxKind.NamedImports:
+            return { elements: n.elements };
+        case SyntaxKind.ExportAssignment:
+            return { modifiers: n.modifiers, isExportEquals: n.isExportEquals, type: n.type, expression: n.expression };
+        case SyntaxKind.NamespaceExportDeclaration:
+            return { modifiers: n.modifiers, name: n.name };
+        case SyntaxKind.NamespaceExport:
+            return { name: n.name };
+        case SyntaxKind.NamedExports:
+            return { elements: n.elements };
+        case SyntaxKind.ExportSpecifier:
+            return { isTypeOnly: n.isTypeOnly, propertyName: n.propertyName, name: n.name };
+        case SyntaxKind.CallSignature:
+            return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type };
+        case SyntaxKind.ConstructSignature:
+            return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type };
+        case SyntaxKind.Constructor:
+            return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body };
+        case SyntaxKind.GetAccessor:
+            return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body };
+        case SyntaxKind.SetAccessor:
+            return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body };
+        case SyntaxKind.IndexSignature:
+            return { modifiers: n.modifiers, parameters: n.parameters, type: n.type };
+        case SyntaxKind.MethodSignature:
+            return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type };
+        case SyntaxKind.MethodDeclaration:
+            return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, postfixToken: n.postfixToken, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body };
+        case SyntaxKind.PropertySignature:
+            return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer };
+        case SyntaxKind.PropertyDeclaration:
+            return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer };
+        case SyntaxKind.ClassStaticBlockDeclaration:
+            return { modifiers: n.modifiers, body: n.body };
+        case SyntaxKind.StringLiteral:
+            return { text: n.text, tokenFlags: n.tokenFlags };
+        case SyntaxKind.NumericLiteral:
+            return { text: n.text, tokenFlags: n.tokenFlags };
+        case SyntaxKind.BigIntLiteral:
+            return { text: n.text, tokenFlags: n.tokenFlags };
+        case SyntaxKind.RegularExpressionLiteral:
+            return { text: n.text, tokenFlags: n.tokenFlags };
+        case SyntaxKind.NoSubstitutionTemplateLiteral:
+            return { text: n.text, templateFlags: n.templateFlags };
+        case SyntaxKind.BinaryExpression:
+            return { modifiers: n.modifiers, left: n.left, type: n.type, operatorToken: n.operatorToken, right: n.right };
+        case SyntaxKind.PrefixUnaryExpression:
+            return { operator: n.operator, operand: n.operand };
+        case SyntaxKind.PostfixUnaryExpression:
+            return { operand: n.operand, operator: n.operator };
+        case SyntaxKind.YieldExpression:
+            return { asteriskToken: n.asteriskToken, expression: n.expression };
+        case SyntaxKind.ArrowFunction:
+            return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, equalsGreaterThanToken: n.equalsGreaterThanToken, body: n.body };
+        case SyntaxKind.FunctionExpression:
+            return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body };
+        case SyntaxKind.AsExpression:
+            return { expression: n.expression, type: n.type };
+        case SyntaxKind.SatisfiesExpression:
+            return { expression: n.expression, type: n.type };
+        case SyntaxKind.ConditionalExpression:
+            return { condition: n.condition, questionToken: n.questionToken, whenTrue: n.whenTrue, colonToken: n.colonToken, whenFalse: n.whenFalse };
+        case SyntaxKind.PropertyAccessExpression:
+            return { expression: n.expression, questionDotToken: n.questionDotToken, name: n.name };
+        case SyntaxKind.ElementAccessExpression:
+            return { expression: n.expression, questionDotToken: n.questionDotToken, argumentExpression: n.argumentExpression };
+        case SyntaxKind.CallExpression:
+            return { expression: n.expression, questionDotToken: n.questionDotToken, typeArguments: n.typeArguments, arguments: n.arguments };
+        case SyntaxKind.NewExpression:
+            return { expression: n.expression, typeArguments: n.typeArguments, arguments: n.arguments };
+        case SyntaxKind.MetaProperty:
+            return { keywordToken: n.keywordToken, name: n.name };
+        case SyntaxKind.NonNullExpression:
+            return { expression: n.expression };
+        case SyntaxKind.SpreadElement:
+            return { expression: n.expression };
+        case SyntaxKind.TemplateExpression:
+            return { head: n.head, templateSpans: n.templateSpans };
+        case SyntaxKind.TemplateSpan:
+            return { expression: n.expression, literal: n.literal };
+        case SyntaxKind.TaggedTemplateExpression:
+            return { tag: n.tag, questionDotToken: n.questionDotToken, typeArguments: n.typeArguments, template: n.template };
+        case SyntaxKind.ParenthesizedExpression:
+            return { expression: n.expression };
+        case SyntaxKind.ArrayLiteralExpression:
+            return { elements: n.elements, multiLine: n.multiLine };
+        case SyntaxKind.ObjectLiteralExpression:
+            return { properties: n.properties, multiLine: n.multiLine };
+        case SyntaxKind.SpreadAssignment:
+            return { expression: n.expression };
+        case SyntaxKind.PropertyAssignment:
+            return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer };
+        case SyntaxKind.ShorthandPropertyAssignment:
+            return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, equalsToken: n.equalsToken, objectAssignmentInitializer: n.objectAssignmentInitializer };
+        case SyntaxKind.DeleteExpression:
+            return { expression: n.expression };
+        case SyntaxKind.TypeOfExpression:
+            return { expression: n.expression };
+        case SyntaxKind.VoidExpression:
+            return { expression: n.expression };
+        case SyntaxKind.AwaitExpression:
+            return { expression: n.expression };
+        case SyntaxKind.TypeAssertionExpression:
+            return { type: n.type, expression: n.expression };
+        case SyntaxKind.UnionType:
+            return { types: n.types };
+        case SyntaxKind.IntersectionType:
+            return { types: n.types };
+        case SyntaxKind.ConditionalType:
+            return { checkType: n.checkType, extendsType: n.extendsType, trueType: n.trueType, falseType: n.falseType };
+        case SyntaxKind.TypeOperator:
+            return { operator: n.operator, type: n.type };
+        case SyntaxKind.InferType:
+            return { typeParameter: n.typeParameter };
+        case SyntaxKind.ArrayType:
+            return { elementType: n.elementType };
+        case SyntaxKind.IndexedAccessType:
+            return { objectType: n.objectType, indexType: n.indexType };
+        case SyntaxKind.TypeReference:
+            return { typeName: n.typeName, typeArguments: n.typeArguments };
+        case SyntaxKind.ExpressionWithTypeArguments:
+            return { expression: n.expression, typeArguments: n.typeArguments };
+        case SyntaxKind.LiteralType:
+            return { literal: n.literal };
+        case SyntaxKind.TypePredicate:
+            return { assertsModifier: n.assertsModifier, parameterName: n.parameterName, type: n.type };
+        case SyntaxKind.ImportAttribute:
+            return { name: n.name, value: n.value };
+        case SyntaxKind.ImportAttributes:
+            return { token: n.token, attributes: n.attributes, multiLine: n.multiLine };
+        case SyntaxKind.TypeQuery:
+            return { exprName: n.exprName, typeArguments: n.typeArguments };
+        case SyntaxKind.MappedType:
+            return { readonlyToken: n.readonlyToken, typeParameter: n.typeParameter, nameType: n.nameType, questionToken: n.questionToken, type: n.type, members: n.members };
+        case SyntaxKind.TypeLiteral:
+            return { members: n.members };
+        case SyntaxKind.TupleType:
+            return { elements: n.elements };
+        case SyntaxKind.NamedTupleMember:
+            return { dotDotDotToken: n.dotDotDotToken, name: n.name, questionToken: n.questionToken, type: n.type };
+        case SyntaxKind.OptionalType:
+            return { type: n.type };
+        case SyntaxKind.RestType:
+            return { type: n.type };
+        case SyntaxKind.ParenthesizedType:
+            return { type: n.type };
+        case SyntaxKind.FunctionType:
+            return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type };
+        case SyntaxKind.ConstructorType:
+            return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type };
+        case SyntaxKind.TemplateHead:
+            return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags };
+        case SyntaxKind.TemplateMiddle:
+            return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags };
+        case SyntaxKind.TemplateTail:
+            return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags };
+        case SyntaxKind.TemplateLiteralType:
+            return { head: n.head, templateSpans: n.templateSpans };
+        case SyntaxKind.TemplateLiteralTypeSpan:
+            return { type: n.type, literal: n.literal };
+        case SyntaxKind.SyntheticExpression:
+            return { type: n.type, isSpread: n.isSpread, tupleNameSource: n.tupleNameSource };
+        case SyntaxKind.PartiallyEmittedExpression:
+            return { expression: n.expression };
+        case SyntaxKind.JsxElement:
+            return { openingElement: n.openingElement, children: n.children, closingElement: n.closingElement };
+        case SyntaxKind.JsxAttributes:
+            return { properties: n.properties };
+        case SyntaxKind.JsxNamespacedName:
+            return { namespace: n.namespace, name: n.name };
+        case SyntaxKind.JsxOpeningElement:
+            return { tagName: n.tagName, typeArguments: n.typeArguments, attributes: n.attributes };
+        case SyntaxKind.JsxSelfClosingElement:
+            return { tagName: n.tagName, typeArguments: n.typeArguments, attributes: n.attributes };
+        case SyntaxKind.JsxFragment:
+            return { openingFragment: n.openingFragment, children: n.children, closingFragment: n.closingFragment };
+        case SyntaxKind.JsxAttribute:
+            return { name: n.name, initializer: n.initializer };
+        case SyntaxKind.JsxSpreadAttribute:
+            return { expression: n.expression };
+        case SyntaxKind.JsxClosingElement:
+            return { tagName: n.tagName };
+        case SyntaxKind.JsxExpression:
+            return { dotDotDotToken: n.dotDotDotToken, expression: n.expression };
+        case SyntaxKind.JsxText:
+            return { text: n.text, containsOnlyTriviaWhiteSpaces: n.containsOnlyTriviaWhiteSpaces };
+        case SyntaxKind.SyntaxList:
+            return { children: n.children };
+        case SyntaxKind.JSDoc:
+            return { comment: n.comment, tags: n.tags };
+        case SyntaxKind.JSDocTypeExpression:
+            return { type: n.type };
+        case SyntaxKind.JSDocNonNullableType:
+            return { type: n.type };
+        case SyntaxKind.JSDocNullableType:
+            return { type: n.type };
+        case SyntaxKind.JSDocVariadicType:
+            return { type: n.type };
+        case SyntaxKind.JSDocOptionalType:
+            return { type: n.type };
+        case SyntaxKind.JSDocTypeTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment };
+        case SyntaxKind.JSDocUnknownTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocTemplateTag:
+            return { tagName: n.tagName, constraint: n.constraint, typeParameters: n.typeParameters, comment: n.comment };
+        case SyntaxKind.JSDocReturnTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment };
+        case SyntaxKind.JSDocPublicTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocPrivateTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocProtectedTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocReadonlyTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocOverrideTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocDeprecatedTag:
+            return { tagName: n.tagName, comment: n.comment };
+        case SyntaxKind.JSDocSeeTag:
+            return { tagName: n.tagName, nameExpression: n.nameExpression, comment: n.comment };
+        case SyntaxKind.JSDocImplementsTag:
+            return { tagName: n.tagName, className: n.className, comment: n.comment };
+        case SyntaxKind.JSDocAugmentsTag:
+            return { tagName: n.tagName, className: n.className, comment: n.comment };
+        case SyntaxKind.JSDocSatisfiesTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment };
+        case SyntaxKind.JSDocThrowsTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment };
+        case SyntaxKind.JSDocThisTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment };
+        case SyntaxKind.JSDocImportTag:
+            return { tagName: n.tagName, importClause: n.importClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes, comment: n.comment };
+        case SyntaxKind.JSDocCallbackTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, name: n.name, comment: n.comment };
+        case SyntaxKind.JSDocOverloadTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment };
+        case SyntaxKind.JSDocTypedefTag:
+            return { tagName: n.tagName, typeExpression: n.typeExpression, name: n.name, comment: n.comment };
+        case SyntaxKind.JSDocSignature:
+            return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type };
+        case SyntaxKind.JSDocNameReference:
+            return { name: n.name };
+        case SyntaxKind.ModuleDeclaration:
+            return { modifiers: n.modifiers, keyword: n.keyword, name: n.name, body: n.body };
+        case SyntaxKind.ImportEqualsDeclaration:
+            return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, name: n.name, moduleReference: n.moduleReference };
+        case SyntaxKind.ExportDeclaration:
+            return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, exportClause: n.exportClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes };
+        case SyntaxKind.ImportType:
+            return { isTypeOf: n.isTypeOf, argument: n.argument, attributes: n.attributes, qualifier: n.qualifier, typeArguments: n.typeArguments };
+        case SyntaxKind.ImportClause:
+            return { phaseModifier: n.phaseModifier, name: n.name, namedBindings: n.namedBindings };
+        case SyntaxKind.ImportSpecifier:
+            return { isTypeOnly: n.isTypeOnly, propertyName: n.propertyName, name: n.name };
+        case SyntaxKind.JSDocText:
+            return { text: n.text };
+        case SyntaxKind.JSDocLink:
+            return { name: n.name, text: n.text };
+        case SyntaxKind.JSDocLinkPlain:
+            return { name: n.name, text: n.text };
+        case SyntaxKind.JSDocLinkCode:
+            return { name: n.name, text: n.text };
+        case SyntaxKind.TypeParameter:
+            return { modifiers: n.modifiers, name: n.name, constraint: n.constraint, expression: n.expression, defaultType: n.defaultType };
+        case SyntaxKind.SyntheticReferenceExpression:
+            return { expression: n.expression, thisArg: n.thisArg };
+        case SyntaxKind.JSDocTypeLiteral:
+            return { jsdocPropertyTags: n.jsdocPropertyTags, isArrayType: n.isArrayType };
+        case SyntaxKind.ForInStatement:
+            return { awaitModifier: n.awaitModifier, initializer: n.initializer, expression: n.expression, statement: n.statement };
+        case SyntaxKind.ForOfStatement:
+            return { awaitModifier: n.awaitModifier, initializer: n.initializer, expression: n.expression, statement: n.statement };
+        case SyntaxKind.CaseClause:
+            return { expression: n.expression, statements: n.statements };
+        case SyntaxKind.DefaultClause:
+            return { expression: n.expression, statements: n.statements };
+        case SyntaxKind.ObjectBindingPattern:
+            return { elements: n.elements };
+        case SyntaxKind.ArrayBindingPattern:
+            return { elements: n.elements };
+        case SyntaxKind.JSDocParameterTag:
+            return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment };
+        case SyntaxKind.JSDocPropertyTag:
+            return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment };
+        case SyntaxKind.SourceFile:
+            return cloneSourceFileData(n);
+        default:
+            return undefined;
+    }
+}
+const forEachChildTable = {
+    [SyntaxKind.QualifiedName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.left) ||
+        visitNode(cbNode, data.right),
+    [SyntaxKind.ComputedPropertyName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.Decorator]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.IfStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.thenStatement) ||
+        visitNode(cbNode, data.elseStatement),
+    [SyntaxKind.DoStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.statement) ||
+        visitNode(cbNode, data.expression),
+    [SyntaxKind.WhileStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.statement),
+    [SyntaxKind.ForStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.initializer) ||
+        visitNode(cbNode, data.condition) ||
+        visitNode(cbNode, data.incrementor) ||
+        visitNode(cbNode, data.statement),
+    [SyntaxKind.BreakStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label),
+    [SyntaxKind.ContinueStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label),
+    [SyntaxKind.ReturnStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.WithStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.statement),
+    [SyntaxKind.SwitchStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.caseBlock),
+    [SyntaxKind.CaseBlock]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.clauses),
+    [SyntaxKind.ThrowStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.TryStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tryBlock) ||
+        visitNode(cbNode, data.catchClause) ||
+        visitNode(cbNode, data.finallyBlock),
+    [SyntaxKind.CatchClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.variableDeclaration) ||
+        visitNode(cbNode, data.block),
+    [SyntaxKind.LabeledStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label) ||
+        visitNode(cbNode, data.statement),
+    [SyntaxKind.ExpressionStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.Block]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements),
+    [SyntaxKind.VariableStatement]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.declarationList),
+    [SyntaxKind.VariableDeclaration]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.exclamationToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.VariableDeclarationList]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.declarations),
+    [SyntaxKind.Parameter]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.dotDotDotToken) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.questionToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.BindingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) ||
+        visitNode(cbNode, data.propertyName) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.MissingDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers),
+    [SyntaxKind.FunctionDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.asteriskToken) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.ClassDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.heritageClauses) ||
+        visitNodes(cbNode, cbNodes, data.members),
+    [SyntaxKind.ClassExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.heritageClauses) ||
+        visitNodes(cbNode, cbNodes, data.members),
+    [SyntaxKind.HeritageClause]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types),
+    [SyntaxKind.InterfaceDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.heritageClauses) ||
+        visitNodes(cbNode, cbNodes, data.members),
+    [SyntaxKind.TypeAliasDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.JSTypeAliasDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.EnumMember]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.EnumDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.members),
+    [SyntaxKind.ModuleBlock]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements),
+    [SyntaxKind.ImportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.importClause) ||
+        visitNode(cbNode, data.moduleSpecifier) ||
+        visitNode(cbNode, data.attributes),
+    [SyntaxKind.JSImportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.importClause) ||
+        visitNode(cbNode, data.moduleSpecifier) ||
+        visitNode(cbNode, data.attributes),
+    [SyntaxKind.ExternalModuleReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.NamespaceImport]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.NamedImports]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements),
+    [SyntaxKind.ExportAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.expression),
+    [SyntaxKind.NamespaceExportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name),
+    [SyntaxKind.NamespaceExport]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.NamedExports]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements),
+    [SyntaxKind.ExportSpecifier]: (data, cbNode, cbNodes) => visitNode(cbNode, data.propertyName) ||
+        visitNode(cbNode, data.name),
+    [SyntaxKind.CallSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.ConstructSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.Constructor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.GetAccessor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.SetAccessor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.IndexSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.MethodSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.postfixToken) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.MethodDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.asteriskToken) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.postfixToken) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.PropertySignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.postfixToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.PropertyDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.postfixToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.ClassStaticBlockDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.BinaryExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.left) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.operatorToken) ||
+        visitNode(cbNode, data.right),
+    [SyntaxKind.PrefixUnaryExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.operand),
+    [SyntaxKind.PostfixUnaryExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.operand),
+    [SyntaxKind.YieldExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.asteriskToken) ||
+        visitNode(cbNode, data.expression),
+    [SyntaxKind.ArrowFunction]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.equalsGreaterThanToken) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.FunctionExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.asteriskToken) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.AsExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.SatisfiesExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.ConditionalExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.condition) ||
+        visitNode(cbNode, data.questionToken) ||
+        visitNode(cbNode, data.whenTrue) ||
+        visitNode(cbNode, data.colonToken) ||
+        visitNode(cbNode, data.whenFalse),
+    [SyntaxKind.PropertyAccessExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.questionDotToken) ||
+        visitNode(cbNode, data.name),
+    [SyntaxKind.ElementAccessExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.questionDotToken) ||
+        visitNode(cbNode, data.argumentExpression),
+    [SyntaxKind.CallExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.questionDotToken) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments) ||
+        visitNodes(cbNode, cbNodes, data.arguments),
+    [SyntaxKind.NewExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments) ||
+        visitNodes(cbNode, cbNodes, data.arguments),
+    [SyntaxKind.MetaProperty]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.NonNullExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.SpreadElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.TemplateExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.head) ||
+        visitNodes(cbNode, cbNodes, data.templateSpans),
+    [SyntaxKind.TemplateSpan]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.literal),
+    [SyntaxKind.TaggedTemplateExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tag) ||
+        visitNode(cbNode, data.questionDotToken) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments) ||
+        visitNode(cbNode, data.template),
+    [SyntaxKind.ParenthesizedExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.ArrayLiteralExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements),
+    [SyntaxKind.ObjectLiteralExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.properties),
+    [SyntaxKind.SpreadAssignment]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.PropertyAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.postfixToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.ShorthandPropertyAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.postfixToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.equalsToken) ||
+        visitNode(cbNode, data.objectAssignmentInitializer),
+    [SyntaxKind.DeleteExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.TypeOfExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.VoidExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.AwaitExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.TypeAssertionExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.expression),
+    [SyntaxKind.UnionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types),
+    [SyntaxKind.IntersectionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types),
+    [SyntaxKind.ConditionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.checkType) ||
+        visitNode(cbNode, data.extendsType) ||
+        visitNode(cbNode, data.trueType) ||
+        visitNode(cbNode, data.falseType),
+    [SyntaxKind.TypeOperator]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.InferType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.typeParameter),
+    [SyntaxKind.ArrayType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.elementType),
+    [SyntaxKind.IndexedAccessType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.objectType) ||
+        visitNode(cbNode, data.indexType),
+    [SyntaxKind.TypeReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.typeName) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments),
+    [SyntaxKind.ExpressionWithTypeArguments]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments),
+    [SyntaxKind.LiteralType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.literal),
+    [SyntaxKind.TypePredicate]: (data, cbNode, cbNodes) => visitNode(cbNode, data.assertsModifier) ||
+        visitNode(cbNode, data.parameterName) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.ImportAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.value),
+    [SyntaxKind.ImportAttributes]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.attributes),
+    [SyntaxKind.TypeQuery]: (data, cbNode, cbNodes) => visitNode(cbNode, data.exprName) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments),
+    [SyntaxKind.MappedType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.readonlyToken) ||
+        visitNode(cbNode, data.typeParameter) ||
+        visitNode(cbNode, data.nameType) ||
+        visitNode(cbNode, data.questionToken) ||
+        visitNode(cbNode, data.type) ||
+        visitNodes(cbNode, cbNodes, data.members),
+    [SyntaxKind.TypeLiteral]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.members),
+    [SyntaxKind.TupleType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements),
+    [SyntaxKind.NamedTupleMember]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.questionToken) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.OptionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.RestType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.ParenthesizedType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.FunctionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.ConstructorType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.TemplateLiteralType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.head) ||
+        visitNodes(cbNode, cbNodes, data.templateSpans),
+    [SyntaxKind.TemplateLiteralTypeSpan]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type) ||
+        visitNode(cbNode, data.literal),
+    [SyntaxKind.SyntheticExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tupleNameSource),
+    [SyntaxKind.PartiallyEmittedExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.JsxElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.openingElement) ||
+        visitNodes(cbNode, cbNodes, data.children) ||
+        visitNode(cbNode, data.closingElement),
+    [SyntaxKind.JsxAttributes]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.properties),
+    [SyntaxKind.JsxNamespacedName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.namespace) ||
+        visitNode(cbNode, data.name),
+    [SyntaxKind.JsxOpeningElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments) ||
+        visitNode(cbNode, data.attributes),
+    [SyntaxKind.JsxSelfClosingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments) ||
+        visitNode(cbNode, data.attributes),
+    [SyntaxKind.JsxFragment]: (data, cbNode, cbNodes) => visitNode(cbNode, data.openingFragment) ||
+        visitNodes(cbNode, cbNodes, data.children) ||
+        visitNode(cbNode, data.closingFragment),
+    [SyntaxKind.JsxAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.initializer),
+    [SyntaxKind.JsxSpreadAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression),
+    [SyntaxKind.JsxClosingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName),
+    [SyntaxKind.JsxExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) ||
+        visitNode(cbNode, data.expression),
+    [SyntaxKind.SyntaxList]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.children),
+    [SyntaxKind.JSDoc]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.comment) ||
+        visitNodes(cbNode, cbNodes, data.tags),
+    [SyntaxKind.JSDocTypeExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.JSDocNonNullableType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.JSDocNullableType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.JSDocVariadicType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.JSDocOptionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type),
+    [SyntaxKind.JSDocTypeTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocUnknownTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocTemplateTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.constraint) ||
+        visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocReturnTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocPublicTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocPrivateTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocProtectedTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocReadonlyTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocOverrideTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocDeprecatedTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocSeeTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.nameExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocImplementsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.className) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocAugmentsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.className) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocSatisfiesTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocThrowsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocThisTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocImportTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.importClause) ||
+        visitNode(cbNode, data.moduleSpecifier) ||
+        visitNode(cbNode, data.attributes) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocCallbackTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocOverloadTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocTypedefTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) ||
+        visitNode(cbNode, data.typeExpression) ||
+        visitNode(cbNode, data.name) ||
+        visitNodes(cbNode, cbNodes, data.comment),
+    [SyntaxKind.JSDocSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) ||
+        visitNodes(cbNode, cbNodes, data.parameters) ||
+        visitNode(cbNode, data.type),
+    [SyntaxKind.JSDocNameReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.ModuleDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.body),
+    [SyntaxKind.ImportEqualsDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.moduleReference),
+    [SyntaxKind.ExportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.exportClause) ||
+        visitNode(cbNode, data.moduleSpecifier) ||
+        visitNode(cbNode, data.attributes),
+    [SyntaxKind.ImportType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.argument) ||
+        visitNode(cbNode, data.attributes) ||
+        visitNode(cbNode, data.qualifier) ||
+        visitNodes(cbNode, cbNodes, data.typeArguments),
+    [SyntaxKind.ImportClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.namedBindings),
+    [SyntaxKind.ImportSpecifier]: (data, cbNode, cbNodes) => visitNode(cbNode, data.propertyName) ||
+        visitNode(cbNode, data.name),
+    [SyntaxKind.JSDocLink]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.JSDocLinkPlain]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.JSDocLinkCode]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name),
+    [SyntaxKind.TypeParameter]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) ||
+        visitNode(cbNode, data.name) ||
+        visitNode(cbNode, data.constraint) ||
+        visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.defaultType),
+    [SyntaxKind.SyntheticReferenceExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.thisArg),
+    [SyntaxKind.JSDocTypeLiteral]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.jsdocPropertyTags),
+    [SyntaxKind.ForInStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.awaitModifier) ||
+        visitNode(cbNode, data.initializer) ||
+        visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.statement),
+    [SyntaxKind.ForOfStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.awaitModifier) ||
+        visitNode(cbNode, data.initializer) ||
+        visitNode(cbNode, data.expression) ||
+        visitNode(cbNode, data.statement),
+    [SyntaxKind.CaseClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNodes(cbNode, cbNodes, data.statements),
+    [SyntaxKind.DefaultClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) ||
+        visitNodes(cbNode, cbNodes, data.statements),
+    [SyntaxKind.ObjectBindingPattern]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements),
+    [SyntaxKind.ArrayBindingPattern]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements),
+    [SyntaxKind.JSDocParameterTag]: forEachChildOfJSDocParameterTag,
+    [SyntaxKind.JSDocPropertyTag]: forEachChildOfJSDocPropertyTag,
+    [SyntaxKind.SourceFile]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements) ||
+        visitNode(cbNode, data.endOfFileToken),
+};
+function visitNode(cbNode, node) {
+    return node ? cbNode(node) : undefined;
+}
+function visitNodes(cbNode, cbNodes, nodes) {
+    if (!nodes)
+        return undefined;
+    if (cbNodes)
+        return cbNodes(nodes);
+    for (const node of nodes) {
+        const result = cbNode(node);
+        if (result)
+            return result;
+    }
+    return undefined;
+}
+export function createToken(kind) {
+    return new NodeObject(kind, undefined);
+}
+export function createIdentifier(text) {
+    return new NodeObject(SyntaxKind.Identifier, {
+        text,
+    });
+}
+export function createPrivateIdentifier(text) {
+    return new NodeObject(SyntaxKind.PrivateIdentifier, {
+        text,
+    });
+}
+export function createQualifiedName(left, right) {
+    return new NodeObject(SyntaxKind.QualifiedName, {
+        left,
+        right,
+    });
+}
+export function createComputedPropertyName(expression) {
+    return new NodeObject(SyntaxKind.ComputedPropertyName, {
+        expression,
+    });
+}
+export function createDecorator(expression) {
+    return new NodeObject(SyntaxKind.Decorator, {
+        expression,
+    });
+}
+export function createEmptyStatement() {
+    return new NodeObject(SyntaxKind.EmptyStatement, undefined);
+}
+export function createIfStatement(expression, thenStatement, elseStatement) {
+    return new NodeObject(SyntaxKind.IfStatement, {
+        expression,
+        thenStatement,
+        elseStatement,
+    });
+}
+export function createDoStatement(statement, expression) {
+    return new NodeObject(SyntaxKind.DoStatement, {
+        statement,
+        expression,
+    });
+}
+export function createWhileStatement(expression, statement) {
+    return new NodeObject(SyntaxKind.WhileStatement, {
+        expression,
+        statement,
+    });
+}
+export function createForStatement(initializer, condition, incrementor, statement) {
+    return new NodeObject(SyntaxKind.ForStatement, {
+        initializer,
+        condition,
+        incrementor,
+        statement,
+    });
+}
+export function createBreakStatement(label) {
+    return new NodeObject(SyntaxKind.BreakStatement, {
+        label,
+    });
+}
+export function createContinueStatement(label) {
+    return new NodeObject(SyntaxKind.ContinueStatement, {
+        label,
+    });
+}
+export function createReturnStatement(expression) {
+    return new NodeObject(SyntaxKind.ReturnStatement, {
+        expression,
+    });
+}
+export function createWithStatement(expression, statement) {
+    return new NodeObject(SyntaxKind.WithStatement, {
+        expression,
+        statement,
+    });
+}
+export function createSwitchStatement(expression, caseBlock) {
+    return new NodeObject(SyntaxKind.SwitchStatement, {
+        expression,
+        caseBlock,
+    });
+}
+export function createCaseBlock(clauses) {
+    return new NodeObject(SyntaxKind.CaseBlock, {
+        clauses: createNodeArray(clauses),
+    });
+}
+export function createThrowStatement(expression) {
+    return new NodeObject(SyntaxKind.ThrowStatement, {
+        expression,
+    });
+}
+export function createTryStatement(tryBlock, catchClause, finallyBlock) {
+    return new NodeObject(SyntaxKind.TryStatement, {
+        tryBlock,
+        catchClause,
+        finallyBlock,
+    });
+}
+export function createCatchClause(variableDeclaration, block) {
+    return new NodeObject(SyntaxKind.CatchClause, {
+        variableDeclaration,
+        block,
+    });
+}
+export function createDebuggerStatement() {
+    return new NodeObject(SyntaxKind.DebuggerStatement, undefined);
+}
+export function createLabeledStatement(label, statement) {
+    return new NodeObject(SyntaxKind.LabeledStatement, {
+        label,
+        statement,
+    });
+}
+export function createExpressionStatement(expression) {
+    return new NodeObject(SyntaxKind.ExpressionStatement, {
+        expression,
+    });
+}
+export function createBlock(statements, multiLine) {
+    return new NodeObject(SyntaxKind.Block, {
+        statements: createNodeArray(statements),
+        multiLine,
+    });
+}
+export function createVariableStatement(modifiers, declarationList) {
+    return new NodeObject(SyntaxKind.VariableStatement, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        declarationList,
+    });
+}
+export function createVariableDeclaration(name, exclamationToken, type, initializer) {
+    return new NodeObject(SyntaxKind.VariableDeclaration, {
+        name,
+        exclamationToken,
+        type,
+        initializer,
+    });
+}
+export function createVariableDeclarationList(declarations, flags) {
+    const node = new NodeObject(SyntaxKind.VariableDeclarationList, {
+        declarations: createNodeArray(declarations),
+    });
+    node.flags = flags;
+    return node;
+}
+export function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+    return new NodeObject(SyntaxKind.Parameter, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        dotDotDotToken,
+        name,
+        questionToken,
+        type,
+        initializer,
+    });
+}
+export function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
+    return new NodeObject(SyntaxKind.BindingElement, {
+        dotDotDotToken,
+        propertyName,
+        name,
+        initializer,
+    });
+}
+export function createMissingDeclaration(modifiers) {
+    return new NodeObject(SyntaxKind.MissingDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+    });
+}
+export function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+    return new NodeObject(SyntaxKind.FunctionDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        asteriskToken,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        body,
+    });
+}
+export function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
+    return new NodeObject(SyntaxKind.ClassDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined,
+        members: createNodeArray(members),
+    });
+}
+export function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
+    return new NodeObject(SyntaxKind.ClassExpression, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined,
+        members: createNodeArray(members),
+    });
+}
+export function createHeritageClause(token, types) {
+    return new NodeObject(SyntaxKind.HeritageClause, {
+        token,
+        types: createNodeArray(types),
+    });
+}
+export function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
+    return new NodeObject(SyntaxKind.InterfaceDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined,
+        members: createNodeArray(members),
+    });
+}
+export function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
+    return new NodeObject(SyntaxKind.TypeAliasDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        type,
+    });
+}
+export function createEnumMember(name, initializer) {
+    return new NodeObject(SyntaxKind.EnumMember, {
+        name,
+        initializer,
+    });
+}
+export function createEnumDeclaration(modifiers, name, members) {
+    return new NodeObject(SyntaxKind.EnumDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        members: createNodeArray(members),
+    });
+}
+export function createModuleBlock(statements) {
+    return new NodeObject(SyntaxKind.ModuleBlock, {
+        statements: createNodeArray(statements),
+    });
+}
+export function createNotEmittedStatement() {
+    return new NodeObject(SyntaxKind.NotEmittedStatement, undefined);
+}
+export function createNotEmittedTypeElement() {
+    return new NodeObject(SyntaxKind.NotEmittedTypeElement, undefined);
+}
+export function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
+    return new NodeObject(SyntaxKind.ImportDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        importClause,
+        moduleSpecifier,
+        attributes,
+    });
+}
+export function createExternalModuleReference(expression) {
+    return new NodeObject(SyntaxKind.ExternalModuleReference, {
+        expression,
+    });
+}
+export function createNamespaceImport(name) {
+    return new NodeObject(SyntaxKind.NamespaceImport, {
+        name,
+    });
+}
+export function createNamedImports(elements) {
+    return new NodeObject(SyntaxKind.NamedImports, {
+        elements: createNodeArray(elements),
+    });
+}
+export function createExportAssignment(modifiers, isExportEquals = false, type, expression) {
+    return new NodeObject(SyntaxKind.ExportAssignment, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        isExportEquals,
+        type,
+        expression,
+    });
+}
+export function createNamespaceExportDeclaration(modifiers, name) {
+    return new NodeObject(SyntaxKind.NamespaceExportDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+    });
+}
+export function createNamespaceExport(name) {
+    return new NodeObject(SyntaxKind.NamespaceExport, {
+        name,
+    });
+}
+export function createNamedExports(elements) {
+    return new NodeObject(SyntaxKind.NamedExports, {
+        elements: createNodeArray(elements),
+    });
+}
+export function createExportSpecifier(isTypeOnly = false, propertyName, name) {
+    return new NodeObject(SyntaxKind.ExportSpecifier, {
+        isTypeOnly,
+        propertyName,
+        name,
+    });
+}
+export function createCallSignatureDeclaration(typeParameters, parameters, type) {
+    return new NodeObject(SyntaxKind.CallSignature, {
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createConstructSignatureDeclaration(typeParameters, parameters, type) {
+    return new NodeObject(SyntaxKind.ConstructSignature, {
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createConstructorDeclaration(modifiers, typeParameters, parameters, type, body) {
+    return new NodeObject(SyntaxKind.Constructor, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        body,
+    });
+}
+export function createGetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) {
+    return new NodeObject(SyntaxKind.GetAccessor, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        body,
+    });
+}
+export function createSetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) {
+    return new NodeObject(SyntaxKind.SetAccessor, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        body,
+    });
+}
+export function createIndexSignatureDeclaration(modifiers, parameters, type) {
+    return new NodeObject(SyntaxKind.IndexSignature, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createMethodSignatureDeclaration(modifiers, name, postfixToken, typeParameters, parameters, type) {
+    return new NodeObject(SyntaxKind.MethodSignature, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        postfixToken,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createMethodDeclaration(modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) {
+    return new NodeObject(SyntaxKind.MethodDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        asteriskToken,
+        name,
+        postfixToken,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        body,
+    });
+}
+export function createPropertySignatureDeclaration(modifiers, name, postfixToken, type, initializer) {
+    return new NodeObject(SyntaxKind.PropertySignature, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        postfixToken,
+        type,
+        initializer,
+    });
+}
+export function createPropertyDeclaration(modifiers, name, postfixToken, type, initializer) {
+    return new NodeObject(SyntaxKind.PropertyDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        postfixToken,
+        type,
+        initializer,
+    });
+}
+export function createSemicolonClassElement() {
+    return new NodeObject(SyntaxKind.SemicolonClassElement, undefined);
+}
+export function createClassStaticBlockDeclaration(modifiers, body) {
+    return new NodeObject(SyntaxKind.ClassStaticBlockDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        body,
+    });
+}
+export function createOmittedExpression() {
+    return new NodeObject(SyntaxKind.OmittedExpression, undefined);
+}
+export function createKeywordExpression(kind) {
+    return new NodeObject(kind, undefined);
+}
+export function createStringLiteral(text, tokenFlags) {
+    return new NodeObject(SyntaxKind.StringLiteral, {
+        text,
+        tokenFlags,
+    });
+}
+export function createNumericLiteral(text, tokenFlags) {
+    return new NodeObject(SyntaxKind.NumericLiteral, {
+        text,
+        tokenFlags,
+    });
+}
+export function createBigIntLiteral(text, tokenFlags) {
+    return new NodeObject(SyntaxKind.BigIntLiteral, {
+        text,
+        tokenFlags,
+    });
+}
+export function createRegularExpressionLiteral(text, tokenFlags) {
+    return new NodeObject(SyntaxKind.RegularExpressionLiteral, {
+        text,
+        tokenFlags,
+    });
+}
+export function createNoSubstitutionTemplateLiteral(text, templateFlags) {
+    return new NodeObject(SyntaxKind.NoSubstitutionTemplateLiteral, {
+        text,
+        templateFlags,
+    });
+}
+export function createBinaryExpression(modifiers, left, type, operatorToken, right) {
+    return new NodeObject(SyntaxKind.BinaryExpression, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        left,
+        type,
+        operatorToken,
+        right,
+    });
+}
+export function createPrefixUnaryExpression(operator, operand) {
+    return new NodeObject(SyntaxKind.PrefixUnaryExpression, {
+        operator,
+        operand,
+    });
+}
+export function createPostfixUnaryExpression(operand, operator) {
+    return new NodeObject(SyntaxKind.PostfixUnaryExpression, {
+        operand,
+        operator,
+    });
+}
+export function createYieldExpression(asteriskToken, expression) {
+    return new NodeObject(SyntaxKind.YieldExpression, {
+        asteriskToken,
+        expression,
+    });
+}
+export function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+    return new NodeObject(SyntaxKind.ArrowFunction, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        equalsGreaterThanToken,
+        body,
+    });
+}
+export function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+    return new NodeObject(SyntaxKind.FunctionExpression, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        asteriskToken,
+        name,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+        body,
+    });
+}
+export function createAsExpression(expression, type) {
+    return new NodeObject(SyntaxKind.AsExpression, {
+        expression,
+        type,
+    });
+}
+export function createSatisfiesExpression(expression, type) {
+    return new NodeObject(SyntaxKind.SatisfiesExpression, {
+        expression,
+        type,
+    });
+}
+export function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) {
+    return new NodeObject(SyntaxKind.ConditionalExpression, {
+        condition,
+        questionToken,
+        whenTrue,
+        colonToken,
+        whenFalse,
+    });
+}
+export function createPropertyAccessExpression(expression, questionDotToken, name, flags) {
+    const node = new NodeObject(SyntaxKind.PropertyAccessExpression, {
+        expression,
+        questionDotToken,
+        name,
+    });
+    node.flags = flags;
+    return node;
+}
+export function createElementAccessExpression(expression, questionDotToken, argumentExpression, flags) {
+    const node = new NodeObject(SyntaxKind.ElementAccessExpression, {
+        expression,
+        questionDotToken,
+        argumentExpression,
+    });
+    node.flags = flags;
+    return node;
+}
+export function createCallExpression(expression, questionDotToken, typeArguments, arguments_, flags) {
+    const node = new NodeObject(SyntaxKind.CallExpression, {
+        expression,
+        questionDotToken,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+        arguments: createNodeArray(arguments_),
+    });
+    node.flags = flags;
+    return node;
+}
+export function createNewExpression(expression, typeArguments, arguments_) {
+    return new NodeObject(SyntaxKind.NewExpression, {
+        expression,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+        arguments: arguments_ ? createNodeArray(arguments_) : undefined,
+    });
+}
+export function createMetaProperty(keywordToken, name) {
+    return new NodeObject(SyntaxKind.MetaProperty, {
+        keywordToken,
+        name,
+    });
+}
+export function createNonNullExpression(expression, flags) {
+    const node = new NodeObject(SyntaxKind.NonNullExpression, {
+        expression,
+    });
+    node.flags = flags;
+    return node;
+}
+export function createSpreadElement(expression) {
+    return new NodeObject(SyntaxKind.SpreadElement, {
+        expression,
+    });
+}
+export function createTemplateExpression(head, templateSpans) {
+    return new NodeObject(SyntaxKind.TemplateExpression, {
+        head,
+        templateSpans: createNodeArray(templateSpans),
+    });
+}
+export function createTemplateSpan(expression, literal) {
+    return new NodeObject(SyntaxKind.TemplateSpan, {
+        expression,
+        literal,
+    });
+}
+export function createTaggedTemplateExpression(tag, questionDotToken, typeArguments, template, flags) {
+    const node = new NodeObject(SyntaxKind.TaggedTemplateExpression, {
+        tag,
+        questionDotToken,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+        template,
+    });
+    node.flags = flags;
+    return node;
+}
+export function createParenthesizedExpression(expression) {
+    return new NodeObject(SyntaxKind.ParenthesizedExpression, {
+        expression,
+    });
+}
+export function createArrayLiteralExpression(elements, multiLine) {
+    return new NodeObject(SyntaxKind.ArrayLiteralExpression, {
+        elements: createNodeArray(elements),
+        multiLine,
+    });
+}
+export function createObjectLiteralExpression(properties, multiLine) {
+    return new NodeObject(SyntaxKind.ObjectLiteralExpression, {
+        properties: createNodeArray(properties),
+        multiLine,
+    });
+}
+export function createSpreadAssignment(expression) {
+    return new NodeObject(SyntaxKind.SpreadAssignment, {
+        expression,
+    });
+}
+export function createPropertyAssignment(modifiers, name, postfixToken, type, initializer) {
+    return new NodeObject(SyntaxKind.PropertyAssignment, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        postfixToken,
+        type,
+        initializer,
+    });
+}
+export function createShorthandPropertyAssignment(modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) {
+    return new NodeObject(SyntaxKind.ShorthandPropertyAssignment, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        postfixToken,
+        type,
+        equalsToken,
+        objectAssignmentInitializer,
+    });
+}
+export function createDeleteExpression(expression) {
+    return new NodeObject(SyntaxKind.DeleteExpression, {
+        expression,
+    });
+}
+export function createTypeOfExpression(expression) {
+    return new NodeObject(SyntaxKind.TypeOfExpression, {
+        expression,
+    });
+}
+export function createVoidExpression(expression) {
+    return new NodeObject(SyntaxKind.VoidExpression, {
+        expression,
+    });
+}
+export function createAwaitExpression(expression) {
+    return new NodeObject(SyntaxKind.AwaitExpression, {
+        expression,
+    });
+}
+export function createTypeAssertion(type, expression) {
+    return new NodeObject(SyntaxKind.TypeAssertionExpression, {
+        type,
+        expression,
+    });
+}
+export function createKeywordTypeNode(kind) {
+    return new NodeObject(kind, undefined);
+}
+export function createUnionTypeNode(types) {
+    return new NodeObject(SyntaxKind.UnionType, {
+        types: createNodeArray(types),
+    });
+}
+export function createIntersectionTypeNode(types) {
+    return new NodeObject(SyntaxKind.IntersectionType, {
+        types: createNodeArray(types),
+    });
+}
+export function createConditionalTypeNode(checkType, extendsType, trueType, falseType) {
+    return new NodeObject(SyntaxKind.ConditionalType, {
+        checkType,
+        extendsType,
+        trueType,
+        falseType,
+    });
+}
+export function createTypeOperatorNode(operator, type) {
+    return new NodeObject(SyntaxKind.TypeOperator, {
+        operator,
+        type,
+    });
+}
+export function createInferTypeNode(typeParameter) {
+    return new NodeObject(SyntaxKind.InferType, {
+        typeParameter,
+    });
+}
+export function createArrayTypeNode(elementType) {
+    return new NodeObject(SyntaxKind.ArrayType, {
+        elementType,
+    });
+}
+export function createIndexedAccessTypeNode(objectType, indexType) {
+    return new NodeObject(SyntaxKind.IndexedAccessType, {
+        objectType,
+        indexType,
+    });
+}
+export function createTypeReferenceNode(typeName, typeArguments) {
+    return new NodeObject(SyntaxKind.TypeReference, {
+        typeName,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+    });
+}
+export function createExpressionWithTypeArguments(expression, typeArguments) {
+    return new NodeObject(SyntaxKind.ExpressionWithTypeArguments, {
+        expression,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+    });
+}
+export function createLiteralTypeNode(literal) {
+    return new NodeObject(SyntaxKind.LiteralType, {
+        literal,
+    });
+}
+export function createThisTypeNode() {
+    return new NodeObject(SyntaxKind.ThisType, undefined);
+}
+export function createTypePredicateNode(assertsModifier, parameterName, type) {
+    return new NodeObject(SyntaxKind.TypePredicate, {
+        assertsModifier,
+        parameterName,
+        type,
+    });
+}
+export function createImportAttribute(name, value) {
+    return new NodeObject(SyntaxKind.ImportAttribute, {
+        name,
+        value,
+    });
+}
+export function createImportAttributes(token, attributes, multiLine) {
+    return new NodeObject(SyntaxKind.ImportAttributes, {
+        token,
+        attributes: createNodeArray(attributes),
+        multiLine,
+    });
+}
+export function createTypeQueryNode(exprName, typeArguments) {
+    return new NodeObject(SyntaxKind.TypeQuery, {
+        exprName,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+    });
+}
+export function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
+    return new NodeObject(SyntaxKind.MappedType, {
+        readonlyToken,
+        typeParameter,
+        nameType,
+        questionToken,
+        type,
+        members: members ? createNodeArray(members) : undefined,
+    });
+}
+export function createTypeLiteralNode(members) {
+    return new NodeObject(SyntaxKind.TypeLiteral, {
+        members: createNodeArray(members),
+    });
+}
+export function createTupleTypeNode(elements) {
+    return new NodeObject(SyntaxKind.TupleType, {
+        elements: createNodeArray(elements),
+    });
+}
+export function createNamedTupleMember(dotDotDotToken, name, questionToken, type) {
+    return new NodeObject(SyntaxKind.NamedTupleMember, {
+        dotDotDotToken,
+        name,
+        questionToken,
+        type,
+    });
+}
+export function createOptionalTypeNode(type) {
+    return new NodeObject(SyntaxKind.OptionalType, {
+        type,
+    });
+}
+export function createRestTypeNode(type) {
+    return new NodeObject(SyntaxKind.RestType, {
+        type,
+    });
+}
+export function createParenthesizedTypeNode(type) {
+    return new NodeObject(SyntaxKind.ParenthesizedType, {
+        type,
+    });
+}
+export function createFunctionTypeNode(typeParameters, parameters, type) {
+    return new NodeObject(SyntaxKind.FunctionType, {
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createConstructorTypeNode(modifiers, typeParameters, parameters, type) {
+    return new NodeObject(SyntaxKind.ConstructorType, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createTemplateHead(text, rawText, templateFlags) {
+    return new NodeObject(SyntaxKind.TemplateHead, {
+        text,
+        rawText,
+        templateFlags,
+    });
+}
+export function createTemplateMiddle(text, rawText, templateFlags) {
+    return new NodeObject(SyntaxKind.TemplateMiddle, {
+        text,
+        rawText,
+        templateFlags,
+    });
+}
+export function createTemplateTail(text, rawText, templateFlags) {
+    return new NodeObject(SyntaxKind.TemplateTail, {
+        text,
+        rawText,
+        templateFlags,
+    });
+}
+export function createTemplateLiteralTypeNode(head, templateSpans) {
+    return new NodeObject(SyntaxKind.TemplateLiteralType, {
+        head,
+        templateSpans: createNodeArray(templateSpans),
+    });
+}
+export function createTemplateLiteralTypeSpan(type, literal) {
+    return new NodeObject(SyntaxKind.TemplateLiteralTypeSpan, {
+        type,
+        literal,
+    });
+}
+export function createSyntheticExpression(type, isSpread, tupleNameSource) {
+    return new NodeObject(SyntaxKind.SyntheticExpression, {
+        type,
+        isSpread,
+        tupleNameSource,
+    });
+}
+export function createPartiallyEmittedExpression(expression) {
+    return new NodeObject(SyntaxKind.PartiallyEmittedExpression, {
+        expression,
+    });
+}
+export function createJsxElement(openingElement, children, closingElement) {
+    return new NodeObject(SyntaxKind.JsxElement, {
+        openingElement,
+        children: createNodeArray(children),
+        closingElement,
+    });
+}
+export function createJsxAttributes(properties) {
+    return new NodeObject(SyntaxKind.JsxAttributes, {
+        properties: createNodeArray(properties),
+    });
+}
+export function createJsxNamespacedName(namespace, name) {
+    return new NodeObject(SyntaxKind.JsxNamespacedName, {
+        namespace,
+        name,
+    });
+}
+export function createJsxOpeningElement(tagName, typeArguments, attributes) {
+    return new NodeObject(SyntaxKind.JsxOpeningElement, {
+        tagName,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+        attributes,
+    });
+}
+export function createJsxSelfClosingElement(tagName, typeArguments, attributes) {
+    return new NodeObject(SyntaxKind.JsxSelfClosingElement, {
+        tagName,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+        attributes,
+    });
+}
+export function createJsxFragment(openingFragment, children, closingFragment) {
+    return new NodeObject(SyntaxKind.JsxFragment, {
+        openingFragment,
+        children: createNodeArray(children),
+        closingFragment,
+    });
+}
+export function createJsxOpeningFragment() {
+    return new NodeObject(SyntaxKind.JsxOpeningFragment, undefined);
+}
+export function createJsxClosingFragment() {
+    return new NodeObject(SyntaxKind.JsxClosingFragment, undefined);
+}
+export function createJsxAttribute(name, initializer) {
+    return new NodeObject(SyntaxKind.JsxAttribute, {
+        name,
+        initializer,
+    });
+}
+export function createJsxSpreadAttribute(expression) {
+    return new NodeObject(SyntaxKind.JsxSpreadAttribute, {
+        expression,
+    });
+}
+export function createJsxClosingElement(tagName) {
+    return new NodeObject(SyntaxKind.JsxClosingElement, {
+        tagName,
+    });
+}
+export function createJsxExpression(dotDotDotToken, expression) {
+    return new NodeObject(SyntaxKind.JsxExpression, {
+        dotDotDotToken,
+        expression,
+    });
+}
+export function createJsxText(text, containsOnlyTriviaWhiteSpaces) {
+    return new NodeObject(SyntaxKind.JsxText, {
+        text,
+        containsOnlyTriviaWhiteSpaces,
+    });
+}
+export function createSyntaxList(children) {
+    return new NodeObject(SyntaxKind.SyntaxList, {
+        children,
+    });
+}
+export function createJSDoc(comment, tags) {
+    return new NodeObject(SyntaxKind.JSDoc, {
+        comment: createNodeArray(comment),
+        tags: tags ? createNodeArray(tags) : undefined,
+    });
+}
+export function createJSDocTypeExpression(type) {
+    return new NodeObject(SyntaxKind.JSDocTypeExpression, {
+        type,
+    });
+}
+export function createJSDocNonNullableType(type) {
+    return new NodeObject(SyntaxKind.JSDocNonNullableType, {
+        type,
+    });
+}
+export function createJSDocNullableType(type) {
+    return new NodeObject(SyntaxKind.JSDocNullableType, {
+        type,
+    });
+}
+export function createJSDocAllType() {
+    return new NodeObject(SyntaxKind.JSDocAllType, undefined);
+}
+export function createJSDocVariadicType(type) {
+    return new NodeObject(SyntaxKind.JSDocVariadicType, {
+        type,
+    });
+}
+export function createJSDocOptionalType(type) {
+    return new NodeObject(SyntaxKind.JSDocOptionalType, {
+        type,
+    });
+}
+export function createJSDocTypeTag(tagName, typeExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocTypeTag, {
+        tagName,
+        typeExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocUnknownTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocUnknownTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
+    return new NodeObject(SyntaxKind.JSDocTemplateTag, {
+        tagName,
+        constraint,
+        typeParameters: createNodeArray(typeParameters),
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocReturnTag(tagName, typeExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocReturnTag, {
+        tagName,
+        typeExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocPublicTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocPublicTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocPrivateTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocPrivateTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocProtectedTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocProtectedTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocReadonlyTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocReadonlyTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocOverrideTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocOverrideTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocDeprecatedTag(tagName, comment) {
+    return new NodeObject(SyntaxKind.JSDocDeprecatedTag, {
+        tagName,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocSeeTag(tagName, nameExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocSeeTag, {
+        tagName,
+        nameExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocImplementsTag(tagName, className, comment) {
+    return new NodeObject(SyntaxKind.JSDocImplementsTag, {
+        tagName,
+        className,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocAugmentsTag(tagName, className, comment) {
+    return new NodeObject(SyntaxKind.JSDocAugmentsTag, {
+        tagName,
+        className,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocSatisfiesTag(tagName, typeExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocSatisfiesTag, {
+        tagName,
+        typeExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocThrowsTag(tagName, typeExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocThrowsTag, {
+        tagName,
+        typeExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocThisTag(tagName, typeExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocThisTag, {
+        tagName,
+        typeExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) {
+    return new NodeObject(SyntaxKind.JSDocImportTag, {
+        tagName,
+        importClause,
+        moduleSpecifier,
+        attributes,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocCallbackTag(tagName, typeExpression, name, comment) {
+    return new NodeObject(SyntaxKind.JSDocCallbackTag, {
+        tagName,
+        typeExpression,
+        name,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocOverloadTag(tagName, typeExpression, comment) {
+    return new NodeObject(SyntaxKind.JSDocOverloadTag, {
+        tagName,
+        typeExpression,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocTypedefTag(tagName, typeExpression, name, comment) {
+    return new NodeObject(SyntaxKind.JSDocTypedefTag, {
+        tagName,
+        typeExpression,
+        name,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocSignature(typeParameters, parameters, type) {
+    return new NodeObject(SyntaxKind.JSDocSignature, {
+        typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined,
+        parameters: createNodeArray(parameters),
+        type,
+    });
+}
+export function createJSDocNameReference(name) {
+    return new NodeObject(SyntaxKind.JSDocNameReference, {
+        name,
+    });
+}
+export function createModuleDeclaration(modifiers, keyword, name, body) {
+    return new NodeObject(SyntaxKind.ModuleDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        keyword,
+        name,
+        body,
+    });
+}
+export function createImportEqualsDeclaration(modifiers, isTypeOnly = false, name, moduleReference) {
+    return new NodeObject(SyntaxKind.ImportEqualsDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        isTypeOnly,
+        name,
+        moduleReference,
+    });
+}
+export function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
+    return new NodeObject(SyntaxKind.ExportDeclaration, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        isTypeOnly,
+        exportClause,
+        moduleSpecifier,
+        attributes,
+    });
+}
+export function createImportTypeNode(isTypeOf = false, argument, attributes, qualifier, typeArguments) {
+    return new NodeObject(SyntaxKind.ImportType, {
+        isTypeOf,
+        argument,
+        attributes,
+        qualifier,
+        typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined,
+    });
+}
+export function createImportClause(phaseModifier, name, namedBindings) {
+    return new NodeObject(SyntaxKind.ImportClause, {
+        phaseModifier,
+        name,
+        namedBindings,
+    });
+}
+export function createImportSpecifier(isTypeOnly = false, propertyName, name) {
+    return new NodeObject(SyntaxKind.ImportSpecifier, {
+        isTypeOnly,
+        propertyName,
+        name,
+    });
+}
+export function createJSDocText(text) {
+    return new NodeObject(SyntaxKind.JSDocText, {
+        text,
+    });
+}
+export function createJSDocLink(name, text) {
+    return new NodeObject(SyntaxKind.JSDocLink, {
+        name,
+        text,
+    });
+}
+export function createJSDocLinkPlain(name, text) {
+    return new NodeObject(SyntaxKind.JSDocLinkPlain, {
+        name,
+        text,
+    });
+}
+export function createJSDocLinkCode(name, text) {
+    return new NodeObject(SyntaxKind.JSDocLinkCode, {
+        name,
+        text,
+    });
+}
+export function createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) {
+    return new NodeObject(SyntaxKind.TypeParameter, {
+        modifiers: modifiers ? createNodeArray(modifiers) : undefined,
+        name,
+        constraint,
+        expression,
+        defaultType,
+    });
+}
+export function createSyntheticReferenceExpression(expression, thisArg) {
+    return new NodeObject(SyntaxKind.SyntheticReferenceExpression, {
+        expression,
+        thisArg,
+    });
+}
+export function createJSDocTypeLiteral(jsdocPropertyTags, isArrayType) {
+    return new NodeObject(SyntaxKind.JSDocTypeLiteral, {
+        jsdocPropertyTags,
+        isArrayType,
+    });
+}
+export function createForInStatement(awaitModifier, initializer, expression, statement) {
+    return new NodeObject(SyntaxKind.ForInStatement, {
+        awaitModifier,
+        initializer,
+        expression,
+        statement,
+    });
+}
+export function createForOfStatement(awaitModifier, initializer, expression, statement) {
+    return new NodeObject(SyntaxKind.ForOfStatement, {
+        awaitModifier,
+        initializer,
+        expression,
+        statement,
+    });
+}
+export function createCaseClause(expression, statements) {
+    return new NodeObject(SyntaxKind.CaseClause, {
+        expression,
+        statements: createNodeArray(statements),
+    });
+}
+export function createDefaultClause(expression, statements) {
+    return new NodeObject(SyntaxKind.DefaultClause, {
+        expression,
+        statements: createNodeArray(statements),
+    });
+}
+export function createObjectBindingPattern(elements) {
+    return new NodeObject(SyntaxKind.ObjectBindingPattern, {
+        elements: createNodeArray(elements),
+    });
+}
+export function createArrayBindingPattern(elements) {
+    return new NodeObject(SyntaxKind.ArrayBindingPattern, {
+        elements: createNodeArray(elements),
+    });
+}
+export function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
+    return new NodeObject(SyntaxKind.JSDocParameterTag, {
+        tagName,
+        name,
+        isBracketed,
+        typeExpression,
+        isNameFirst,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
+    return new NodeObject(SyntaxKind.JSDocPropertyTag, {
+        tagName,
+        name,
+        isBracketed,
+        typeExpression,
+        isNameFirst,
+        comment: comment ? createNodeArray(comment) : undefined,
+    });
+}
+export function updateQualifiedName(node, left, right) {
+    return node.left !== left || node.right !== right ? createQualifiedName(left, right) : node;
+}
+export function updateComputedPropertyName(node, expression) {
+    return node.expression !== expression ? createComputedPropertyName(expression) : node;
+}
+export function updateDecorator(node, expression) {
+    return node.expression !== expression ? createDecorator(expression) : node;
+}
+export function updateIfStatement(node, expression, thenStatement, elseStatement) {
+    return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? createIfStatement(expression, thenStatement, elseStatement) : node;
+}
+export function updateDoStatement(node, statement, expression) {
+    return node.statement !== statement || node.expression !== expression ? createDoStatement(statement, expression) : node;
+}
+export function updateWhileStatement(node, expression, statement) {
+    return node.expression !== expression || node.statement !== statement ? createWhileStatement(expression, statement) : node;
+}
+export function updateForStatement(node, initializer, condition, incrementor, statement) {
+    return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? createForStatement(initializer, condition, incrementor, statement) : node;
+}
+export function updateBreakStatement(node, label) {
+    return node.label !== label ? createBreakStatement(label) : node;
+}
+export function updateContinueStatement(node, label) {
+    return node.label !== label ? createContinueStatement(label) : node;
+}
+export function updateReturnStatement(node, expression) {
+    return node.expression !== expression ? createReturnStatement(expression) : node;
+}
+export function updateWithStatement(node, expression, statement) {
+    return node.expression !== expression || node.statement !== statement ? createWithStatement(expression, statement) : node;
+}
+export function updateSwitchStatement(node, expression, caseBlock) {
+    return node.expression !== expression || node.caseBlock !== caseBlock ? createSwitchStatement(expression, caseBlock) : node;
+}
+export function updateCaseBlock(node, clauses) {
+    return node.clauses !== clauses ? createCaseBlock(clauses) : node;
+}
+export function updateThrowStatement(node, expression) {
+    return node.expression !== expression ? createThrowStatement(expression) : node;
+}
+export function updateTryStatement(node, tryBlock, catchClause, finallyBlock) {
+    return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? createTryStatement(tryBlock, catchClause, finallyBlock) : node;
+}
+export function updateCatchClause(node, variableDeclaration, block) {
+    return node.variableDeclaration !== variableDeclaration || node.block !== block ? createCatchClause(variableDeclaration, block) : node;
+}
+export function updateLabeledStatement(node, label, statement) {
+    return node.label !== label || node.statement !== statement ? createLabeledStatement(label, statement) : node;
+}
+export function updateExpressionStatement(node, expression) {
+    return node.expression !== expression ? createExpressionStatement(expression) : node;
+}
+export function updateBlock(node, statements) {
+    return node.statements !== statements ? createBlock(statements, node.multiLine) : node;
+}
+export function updateVariableStatement(node, modifiers, declarationList) {
+    return node.modifiers !== modifiers || node.declarationList !== declarationList ? createVariableStatement(modifiers, declarationList) : node;
+}
+export function updateVariableDeclaration(node, name, exclamationToken, type, initializer) {
+    return node.name !== name || node.exclamationToken !== exclamationToken || node.type !== type || node.initializer !== initializer ? createVariableDeclaration(name, exclamationToken, type, initializer) : node;
+}
+export function updateVariableDeclarationList(node, declarations) {
+    return node.declarations !== declarations ? createVariableDeclarationList(declarations, node.flags) : node;
+}
+export function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
+    return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) : node;
+}
+export function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
+    return node.dotDotDotToken !== dotDotDotToken || node.propertyName !== propertyName || node.name !== name || node.initializer !== initializer ? createBindingElement(dotDotDotToken, propertyName, name, initializer) : node;
+}
+export function updateMissingDeclaration(node, modifiers) {
+    return node.modifiers !== modifiers ? createMissingDeclaration(modifiers) : node;
+}
+export function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+    return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) : node;
+}
+export function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
+    return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : node;
+}
+export function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
+    return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createClassExpression(modifiers, name, typeParameters, heritageClauses, members) : node;
+}
+export function updateHeritageClause(node, types) {
+    return node.types !== types ? createHeritageClause(node.token, types) : node;
+}
+export function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
+    return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) : node;
+}
+export function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
+    return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? createTypeAliasDeclaration(modifiers, name, typeParameters, type) : node;
+}
+export function updateEnumMember(node, name, initializer) {
+    return node.name !== name || node.initializer !== initializer ? createEnumMember(name, initializer) : node;
+}
+export function updateEnumDeclaration(node, modifiers, name, members) {
+    return node.modifiers !== modifiers || node.name !== name || node.members !== members ? createEnumDeclaration(modifiers, name, members) : node;
+}
+export function updateModuleBlock(node, statements) {
+    return node.statements !== statements ? createModuleBlock(statements) : node;
+}
+export function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
+    return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) : node;
+}
+export function updateExternalModuleReference(node, expression) {
+    return node.expression !== expression ? createExternalModuleReference(expression) : node;
+}
+export function updateNamespaceImport(node, name) {
+    return node.name !== name ? createNamespaceImport(name) : node;
+}
+export function updateNamedImports(node, elements) {
+    return node.elements !== elements ? createNamedImports(elements) : node;
+}
+export function updateExportAssignment(node, modifiers, type, expression) {
+    return node.modifiers !== modifiers || node.type !== type || node.expression !== expression ? createExportAssignment(modifiers, node.isExportEquals, type, expression) : node;
+}
+export function updateNamespaceExportDeclaration(node, modifiers, name) {
+    return node.modifiers !== modifiers || node.name !== name ? createNamespaceExportDeclaration(modifiers, name) : node;
+}
+export function updateNamespaceExport(node, name) {
+    return node.name !== name ? createNamespaceExport(name) : node;
+}
+export function updateNamedExports(node, elements) {
+    return node.elements !== elements ? createNamedExports(elements) : node;
+}
+export function updateExportSpecifier(node, propertyName, name) {
+    return node.propertyName !== propertyName || node.name !== name ? createExportSpecifier(node.isTypeOnly, propertyName, name) : node;
+}
+export function updateCallSignatureDeclaration(node, typeParameters, parameters, type) {
+    return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createCallSignatureDeclaration(typeParameters, parameters, type) : node;
+}
+export function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) {
+    return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createConstructSignatureDeclaration(typeParameters, parameters, type) : node;
+}
+export function updateConstructorDeclaration(node, modifiers, typeParameters, parameters, type, body) {
+    return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createConstructorDeclaration(modifiers, typeParameters, parameters, type, body) : node;
+}
+export function updateGetAccessorDeclaration(node, modifiers, name, typeParameters, parameters, type, body) {
+    return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createGetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) : node;
+}
+export function updateSetAccessorDeclaration(node, modifiers, name, typeParameters, parameters, type, body) {
+    return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createSetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) : node;
+}
+export function updateIndexSignatureDeclaration(node, modifiers, parameters, type) {
+    return node.modifiers !== modifiers || node.parameters !== parameters || node.type !== type ? createIndexSignatureDeclaration(modifiers, parameters, type) : node;
+}
+export function updateMethodSignatureDeclaration(node, modifiers, name, postfixToken, typeParameters, parameters, type) {
+    return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createMethodSignatureDeclaration(modifiers, name, postfixToken, typeParameters, parameters, type) : node;
+}
+export function updateMethodDeclaration(node, modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) {
+    return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.postfixToken !== postfixToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createMethodDeclaration(modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) : node;
+}
+export function updatePropertySignatureDeclaration(node, modifiers, name, postfixToken, type, initializer) {
+    return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertySignatureDeclaration(modifiers, name, postfixToken, type, initializer) : node;
+}
+export function updatePropertyDeclaration(node, modifiers, name, postfixToken, type, initializer) {
+    return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertyDeclaration(modifiers, name, postfixToken, type, initializer) : node;
+}
+export function updateClassStaticBlockDeclaration(node, modifiers, body) {
+    return node.modifiers !== modifiers || node.body !== body ? createClassStaticBlockDeclaration(modifiers, body) : node;
+}
+export function updateBinaryExpression(node, modifiers, left, type, operatorToken, right) {
+    return node.modifiers !== modifiers || node.left !== left || node.type !== type || node.operatorToken !== operatorToken || node.right !== right ? createBinaryExpression(modifiers, left, type, operatorToken, right) : node;
+}
+export function updatePrefixUnaryExpression(node, operand) {
+    return node.operand !== operand ? createPrefixUnaryExpression(node.operator, operand) : node;
+}
+export function updatePostfixUnaryExpression(node, operand) {
+    return node.operand !== operand ? createPostfixUnaryExpression(operand, node.operator) : node;
+}
+export function updateYieldExpression(node, asteriskToken, expression) {
+    return node.asteriskToken !== asteriskToken || node.expression !== expression ? createYieldExpression(asteriskToken, expression) : node;
+}
+export function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
+    return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) : node;
+}
+export function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
+    return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) : node;
+}
+export function updateAsExpression(node, expression, type) {
+    return node.expression !== expression || node.type !== type ? createAsExpression(expression, type) : node;
+}
+export function updateSatisfiesExpression(node, expression, type) {
+    return node.expression !== expression || node.type !== type ? createSatisfiesExpression(expression, type) : node;
+}
+export function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) {
+    return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) : node;
+}
+export function updatePropertyAccessExpression(node, expression, questionDotToken, name) {
+    return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? createPropertyAccessExpression(expression, questionDotToken, name, node.flags) : node;
+}
+export function updateElementAccessExpression(node, expression, questionDotToken, argumentExpression) {
+    return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? createElementAccessExpression(expression, questionDotToken, argumentExpression, node.flags) : node;
+}
+export function updateCallExpression(node, expression, questionDotToken, typeArguments, arguments_) {
+    return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== arguments_ ? createCallExpression(expression, questionDotToken, typeArguments, arguments_, node.flags) : node;
+}
+export function updateNewExpression(node, expression, typeArguments, arguments_) {
+    return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== arguments_ ? createNewExpression(expression, typeArguments, arguments_) : node;
+}
+export function updateMetaProperty(node, name) {
+    return node.name !== name ? createMetaProperty(node.keywordToken, name) : node;
+}
+export function updateNonNullExpression(node, expression) {
+    return node.expression !== expression ? createNonNullExpression(expression, node.flags) : node;
+}
+export function updateSpreadElement(node, expression) {
+    return node.expression !== expression ? createSpreadElement(expression) : node;
+}
+export function updateTemplateExpression(node, head, templateSpans) {
+    return node.head !== head || node.templateSpans !== templateSpans ? createTemplateExpression(head, templateSpans) : node;
+}
+export function updateTemplateSpan(node, expression, literal) {
+    return node.expression !== expression || node.literal !== literal ? createTemplateSpan(expression, literal) : node;
+}
+export function updateTaggedTemplateExpression(node, tag, questionDotToken, typeArguments, template) {
+    return node.tag !== tag || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.template !== template ? createTaggedTemplateExpression(tag, questionDotToken, typeArguments, template, node.flags) : node;
+}
+export function updateParenthesizedExpression(node, expression) {
+    return node.expression !== expression ? createParenthesizedExpression(expression) : node;
+}
+export function updateArrayLiteralExpression(node, elements) {
+    return node.elements !== elements ? createArrayLiteralExpression(elements, node.multiLine) : node;
+}
+export function updateObjectLiteralExpression(node, properties) {
+    return node.properties !== properties ? createObjectLiteralExpression(properties, node.multiLine) : node;
+}
+export function updateSpreadAssignment(node, expression) {
+    return node.expression !== expression ? createSpreadAssignment(expression) : node;
+}
+export function updatePropertyAssignment(node, modifiers, name, postfixToken, type, initializer) {
+    return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertyAssignment(modifiers, name, postfixToken, type, initializer) : node;
+}
+export function updateShorthandPropertyAssignment(node, modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) {
+    return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.equalsToken !== equalsToken || node.objectAssignmentInitializer !== objectAssignmentInitializer ? createShorthandPropertyAssignment(modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) : node;
+}
+export function updateDeleteExpression(node, expression) {
+    return node.expression !== expression ? createDeleteExpression(expression) : node;
+}
+export function updateTypeOfExpression(node, expression) {
+    return node.expression !== expression ? createTypeOfExpression(expression) : node;
+}
+export function updateVoidExpression(node, expression) {
+    return node.expression !== expression ? createVoidExpression(expression) : node;
+}
+export function updateAwaitExpression(node, expression) {
+    return node.expression !== expression ? createAwaitExpression(expression) : node;
+}
+export function updateTypeAssertion(node, type, expression) {
+    return node.type !== type || node.expression !== expression ? createTypeAssertion(type, expression) : node;
+}
+export function updateUnionTypeNode(node, types) {
+    return node.types !== types ? createUnionTypeNode(types) : node;
+}
+export function updateIntersectionTypeNode(node, types) {
+    return node.types !== types ? createIntersectionTypeNode(types) : node;
+}
+export function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) {
+    return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? createConditionalTypeNode(checkType, extendsType, trueType, falseType) : node;
+}
+export function updateTypeOperatorNode(node, type) {
+    return node.type !== type ? createTypeOperatorNode(node.operator, type) : node;
+}
+export function updateInferTypeNode(node, typeParameter) {
+    return node.typeParameter !== typeParameter ? createInferTypeNode(typeParameter) : node;
+}
+export function updateArrayTypeNode(node, elementType) {
+    return node.elementType !== elementType ? createArrayTypeNode(elementType) : node;
+}
+export function updateIndexedAccessTypeNode(node, objectType, indexType) {
+    return node.objectType !== objectType || node.indexType !== indexType ? createIndexedAccessTypeNode(objectType, indexType) : node;
+}
+export function updateTypeReferenceNode(node, typeName, typeArguments) {
+    return node.typeName !== typeName || node.typeArguments !== typeArguments ? createTypeReferenceNode(typeName, typeArguments) : node;
+}
+export function updateExpressionWithTypeArguments(node, expression, typeArguments) {
+    return node.expression !== expression || node.typeArguments !== typeArguments ? createExpressionWithTypeArguments(expression, typeArguments) : node;
+}
+export function updateLiteralTypeNode(node, literal) {
+    return node.literal !== literal ? createLiteralTypeNode(literal) : node;
+}
+export function updateTypePredicateNode(node, assertsModifier, parameterName, type) {
+    return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? createTypePredicateNode(assertsModifier, parameterName, type) : node;
+}
+export function updateImportAttribute(node, name, value) {
+    return node.name !== name || node.value !== value ? createImportAttribute(name, value) : node;
+}
+export function updateImportAttributes(node, attributes) {
+    return node.attributes !== attributes ? createImportAttributes(node.token, attributes, node.multiLine) : node;
+}
+export function updateTypeQueryNode(node, exprName, typeArguments) {
+    return node.exprName !== exprName || node.typeArguments !== typeArguments ? createTypeQueryNode(exprName, typeArguments) : node;
+}
+export function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
+    return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) : node;
+}
+export function updateTypeLiteralNode(node, members) {
+    return node.members !== members ? createTypeLiteralNode(members) : node;
+}
+export function updateTupleTypeNode(node, elements) {
+    return node.elements !== elements ? createTupleTypeNode(elements) : node;
+}
+export function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {
+    return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? createNamedTupleMember(dotDotDotToken, name, questionToken, type) : node;
+}
+export function updateOptionalTypeNode(node, type) {
+    return node.type !== type ? createOptionalTypeNode(type) : node;
+}
+export function updateRestTypeNode(node, type) {
+    return node.type !== type ? createRestTypeNode(type) : node;
+}
+export function updateParenthesizedTypeNode(node, type) {
+    return node.type !== type ? createParenthesizedTypeNode(type) : node;
+}
+export function updateFunctionTypeNode(node, typeParameters, parameters, type) {
+    return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createFunctionTypeNode(typeParameters, parameters, type) : node;
+}
+export function updateConstructorTypeNode(node, modifiers, typeParameters, parameters, type) {
+    return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createConstructorTypeNode(modifiers, typeParameters, parameters, type) : node;
+}
+export function updateTemplateLiteralTypeNode(node, head, templateSpans) {
+    return node.head !== head || node.templateSpans !== templateSpans ? createTemplateLiteralTypeNode(head, templateSpans) : node;
+}
+export function updateTemplateLiteralTypeSpan(node, type, literal) {
+    return node.type !== type || node.literal !== literal ? createTemplateLiteralTypeSpan(type, literal) : node;
+}
+export function updateSyntheticExpression(node, tupleNameSource) {
+    return node.tupleNameSource !== tupleNameSource ? createSyntheticExpression(node.type, node.isSpread, tupleNameSource) : node;
+}
+export function updatePartiallyEmittedExpression(node, expression) {
+    return node.expression !== expression ? createPartiallyEmittedExpression(expression) : node;
+}
+export function updateJsxElement(node, openingElement, children, closingElement) {
+    return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? createJsxElement(openingElement, children, closingElement) : node;
+}
+export function updateJsxAttributes(node, properties) {
+    return node.properties !== properties ? createJsxAttributes(properties) : node;
+}
+export function updateJsxNamespacedName(node, namespace, name) {
+    return node.namespace !== namespace || node.name !== name ? createJsxNamespacedName(namespace, name) : node;
+}
+export function updateJsxOpeningElement(node, tagName, typeArguments, attributes) {
+    return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? createJsxOpeningElement(tagName, typeArguments, attributes) : node;
+}
+export function updateJsxSelfClosingElement(node, tagName, typeArguments, attributes) {
+    return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? createJsxSelfClosingElement(tagName, typeArguments, attributes) : node;
+}
+export function updateJsxFragment(node, openingFragment, children, closingFragment) {
+    return node.openingFragment !== openingFragment || node.children !== children || node.closingFragment !== closingFragment ? createJsxFragment(openingFragment, children, closingFragment) : node;
+}
+export function updateJsxAttribute(node, name, initializer) {
+    return node.name !== name || node.initializer !== initializer ? createJsxAttribute(name, initializer) : node;
+}
+export function updateJsxSpreadAttribute(node, expression) {
+    return node.expression !== expression ? createJsxSpreadAttribute(expression) : node;
+}
+export function updateJsxClosingElement(node, tagName) {
+    return node.tagName !== tagName ? createJsxClosingElement(tagName) : node;
+}
+export function updateJsxExpression(node, dotDotDotToken, expression) {
+    return node.dotDotDotToken !== dotDotDotToken || node.expression !== expression ? createJsxExpression(dotDotDotToken, expression) : node;
+}
+export function updateSyntaxList(node, children) {
+    return node.children !== children ? createSyntaxList(children) : node;
+}
+export function updateJSDoc(node, comment, tags) {
+    return node.comment !== comment || node.tags !== tags ? createJSDoc(comment, tags) : node;
+}
+export function updateJSDocTypeExpression(node, type) {
+    return node.type !== type ? createJSDocTypeExpression(type) : node;
+}
+export function updateJSDocNonNullableType(node, type) {
+    return node.type !== type ? createJSDocNonNullableType(type) : node;
+}
+export function updateJSDocNullableType(node, type) {
+    return node.type !== type ? createJSDocNullableType(type) : node;
+}
+export function updateJSDocVariadicType(node, type) {
+    return node.type !== type ? createJSDocVariadicType(type) : node;
+}
+export function updateJSDocOptionalType(node, type) {
+    return node.type !== type ? createJSDocOptionalType(type) : node;
+}
+export function updateJSDocTypeTag(node, tagName, typeExpression, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocTypeTag(tagName, typeExpression, comment) : node;
+}
+export function updateJSDocUnknownTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocUnknownTag(tagName, comment) : node;
+}
+export function updateJSDocTemplateTag(node, tagName, constraint, typeParameters, comment) {
+    return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? createJSDocTemplateTag(tagName, constraint, typeParameters, comment) : node;
+}
+export function updateJSDocReturnTag(node, tagName, typeExpression, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocReturnTag(tagName, typeExpression, comment) : node;
+}
+export function updateJSDocPublicTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocPublicTag(tagName, comment) : node;
+}
+export function updateJSDocPrivateTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocPrivateTag(tagName, comment) : node;
+}
+export function updateJSDocProtectedTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocProtectedTag(tagName, comment) : node;
+}
+export function updateJSDocReadonlyTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocReadonlyTag(tagName, comment) : node;
+}
+export function updateJSDocOverrideTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocOverrideTag(tagName, comment) : node;
+}
+export function updateJSDocDeprecatedTag(node, tagName, comment) {
+    return node.tagName !== tagName || node.comment !== comment ? createJSDocDeprecatedTag(tagName, comment) : node;
+}
+export function updateJSDocSeeTag(node, tagName, nameExpression, comment) {
+    return node.tagName !== tagName || node.nameExpression !== nameExpression || node.comment !== comment ? createJSDocSeeTag(tagName, nameExpression, comment) : node;
+}
+export function updateJSDocImplementsTag(node, tagName, className, comment) {
+    return node.tagName !== tagName || node.className !== className || node.comment !== comment ? createJSDocImplementsTag(tagName, className, comment) : node;
+}
+export function updateJSDocAugmentsTag(node, tagName, className, comment) {
+    return node.tagName !== tagName || node.className !== className || node.comment !== comment ? createJSDocAugmentsTag(tagName, className, comment) : node;
+}
+export function updateJSDocSatisfiesTag(node, tagName, typeExpression, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocSatisfiesTag(tagName, typeExpression, comment) : node;
+}
+export function updateJSDocThrowsTag(node, tagName, typeExpression, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocThrowsTag(tagName, typeExpression, comment) : node;
+}
+export function updateJSDocThisTag(node, tagName, typeExpression, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocThisTag(tagName, typeExpression, comment) : node;
+}
+export function updateJSDocImportTag(node, tagName, importClause, moduleSpecifier, attributes, comment) {
+    return node.tagName !== tagName || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes || node.comment !== comment ? createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) : node;
+}
+export function updateJSDocCallbackTag(node, tagName, typeExpression, name, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.name !== name || node.comment !== comment ? createJSDocCallbackTag(tagName, typeExpression, name, comment) : node;
+}
+export function updateJSDocOverloadTag(node, tagName, typeExpression, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocOverloadTag(tagName, typeExpression, comment) : node;
+}
+export function updateJSDocTypedefTag(node, tagName, typeExpression, name, comment) {
+    return node.tagName !== tagName || node.typeExpression !== typeExpression || node.name !== name || node.comment !== comment ? createJSDocTypedefTag(tagName, typeExpression, name, comment) : node;
+}
+export function updateJSDocSignature(node, typeParameters, parameters, type) {
+    return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createJSDocSignature(typeParameters, parameters, type) : node;
+}
+export function updateJSDocNameReference(node, name) {
+    return node.name !== name ? createJSDocNameReference(name) : node;
+}
+export function updateModuleDeclaration(node, modifiers, name, body) {
+    return node.modifiers !== modifiers || node.name !== name || node.body !== body ? createModuleDeclaration(modifiers, node.keyword, name, body) : node;
+}
+export function updateImportEqualsDeclaration(node, modifiers, name, moduleReference) {
+    return node.modifiers !== modifiers || node.name !== name || node.moduleReference !== moduleReference ? createImportEqualsDeclaration(modifiers, node.isTypeOnly, name, moduleReference) : node;
+}
+export function updateExportDeclaration(node, modifiers, exportClause, moduleSpecifier, attributes) {
+    return node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? createExportDeclaration(modifiers, node.isTypeOnly, exportClause, moduleSpecifier, attributes) : node;
+}
+export function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments) {
+    return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments ? createImportTypeNode(node.isTypeOf, argument, attributes, qualifier, typeArguments) : node;
+}
+export function updateImportClause(node, name, namedBindings) {
+    return node.name !== name || node.namedBindings !== namedBindings ? createImportClause(node.phaseModifier, name, namedBindings) : node;
+}
+export function updateImportSpecifier(node, propertyName, name) {
+    return node.propertyName !== propertyName || node.name !== name ? createImportSpecifier(node.isTypeOnly, propertyName, name) : node;
+}
+export function updateJSDocLink(node, name) {
+    return node.name !== name ? createJSDocLink(name, node.text) : node;
+}
+export function updateJSDocLinkPlain(node, name) {
+    return node.name !== name ? createJSDocLinkPlain(name, node.text) : node;
+}
+export function updateJSDocLinkCode(node, name) {
+    return node.name !== name ? createJSDocLinkCode(name, node.text) : node;
+}
+export function updateTypeParameterDeclaration(node, modifiers, name, constraint, expression, defaultType) {
+    return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.expression !== expression || node.defaultType !== defaultType ? createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) : node;
+}
+export function updateSyntheticReferenceExpression(node, expression, thisArg) {
+    return node.expression !== expression || node.thisArg !== thisArg ? createSyntheticReferenceExpression(expression, thisArg) : node;
+}
+export function updateJSDocTypeLiteral(node, jsdocPropertyTags) {
+    return node.jsdocPropertyTags !== jsdocPropertyTags ? createJSDocTypeLiteral(jsdocPropertyTags, node.isArrayType) : node;
+}
+export function updateForInStatement(node, awaitModifier, initializer, expression, statement) {
+    return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? createForInStatement(awaitModifier, initializer, expression, statement) : node;
+}
+export function updateForOfStatement(node, awaitModifier, initializer, expression, statement) {
+    return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? createForOfStatement(awaitModifier, initializer, expression, statement) : node;
+}
+export function updateCaseClause(node, expression, statements) {
+    return node.expression !== expression || node.statements !== statements ? createCaseClause(expression, statements) : node;
+}
+export function updateDefaultClause(node, expression, statements) {
+    return node.expression !== expression || node.statements !== statements ? createDefaultClause(expression, statements) : node;
+}
+export function updateObjectBindingPattern(node, elements) {
+    return node.elements !== elements ? createObjectBindingPattern(elements) : node;
+}
+export function updateArrayBindingPattern(node, elements) {
+    return node.elements !== elements ? createArrayBindingPattern(elements) : node;
+}
+export function updateJSDocParameterTag(node, tagName, name, typeExpression, comment) {
+    return node.tagName !== tagName || node.name !== name || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocParameterTag(tagName, name, node.isBracketed, typeExpression, node.isNameFirst, comment) : node;
+}
+export function updateJSDocPropertyTag(node, tagName, name, typeExpression, comment) {
+    return node.tagName !== tagName || node.name !== name || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocPropertyTag(tagName, name, node.isBracketed, typeExpression, node.isNameFirst, comment) : node;
+}
+export function createSourceFile(statements, endOfFileToken, text, fileName, path) {
+    return new NodeObject(SyntaxKind.SourceFile, {
+        statements: createNodeArray(statements),
+        endOfFileToken,
+        text,
+        fileName,
+        path,
+    });
+}
+function cloneSourceFileWithChanges(source, statements, endOfFileToken) {
+    return new NodeObject(SyntaxKind.SourceFile, {
+        ...cloneSourceFileData(source),
+        statements: createNodeArray(statements),
+        endOfFileToken,
+    });
+}
+export function updateSourceFile(node, statements, endOfFileToken) {
+    return node.statements !== statements || node.endOfFileToken !== endOfFileToken
+        ? cloneSourceFileWithChanges(node, statements, endOfFileToken)
+        : node;
+}
+//# sourceMappingURL=factory.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/factory.generated.js.map b/node_modules/typescript/dist/ast/factory.generated.js.map
new file mode 100644
index 000000000..512faca16
--- /dev/null
+++ b/node_modules/typescript/dist/ast/factory.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"factory.generated.js","sourceRoot":"","sources":["../../src/ast/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CAAC,UAAgC,EAAE,cAAyB,EAAE,IAAY,EAAE,QAAgB,EAAE,IAAU;IACpI,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;QACzC,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,cAAc;QACd,IAAI;QACJ,QAAQ;QACR,IAAI;KACP,CAA0B,CAAC;AAChC,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAkB,EAAE,UAAgC,EAAE,cAAyB;IAC/G,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;QACzC,GAAG,mBAAmB,CAAC,MAAM,CAAC;QAC9B,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,cAAc;KACjB,CAA0B,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAgB,EAAE,UAAgC,EAAE,cAAyB;IAC1G,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc;QAC3E,CAAC,CAAC,0BAA0B,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC;QAC9D,CAAC,CAAC,IAAI,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/index.d.ts b/node_modules/typescript/dist/ast/index.d.ts
new file mode 100644
index 000000000..7a74699f0
--- /dev/null
+++ b/node_modules/typescript/dist/ast/index.d.ts
@@ -0,0 +1,20 @@
+export { CharacterCodes } from "#enums/characterCodes";
+export { CommentDirectiveType } from "#enums/commentDirectiveType";
+export { InternalSymbolName } from "#enums/internalSymbolName";
+export { LanguageVariant } from "#enums/languageVariant";
+export { ModifierFlags } from "#enums/modifierFlags";
+export { NodeFlags } from "#enums/nodeFlags";
+export { RegularExpressionFlags } from "#enums/regularExpressionFlags";
+export { ScriptKind } from "#enums/scriptKind";
+export { ScriptTarget } from "#enums/scriptTarget";
+export { SyntaxKind } from "#enums/syntaxKind";
+export { TokenFlags } from "#enums/tokenFlags";
+export * from "./ast.ts";
+export * from "./astnav.ts";
+export * from "./clone.ts";
+export * from "./is.ts";
+export * from "./jsdoc.ts";
+export * from "./scanner.ts";
+export * from "./utils.ts";
+export * from "./visitor.ts";
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/index.d.ts.map b/node_modules/typescript/dist/ast/index.d.ts.map
new file mode 100644
index 000000000..53d889874
--- /dev/null
+++ b/node_modules/typescript/dist/ast/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/index.js b/node_modules/typescript/dist/ast/index.js
new file mode 100644
index 000000000..2621741fc
--- /dev/null
+++ b/node_modules/typescript/dist/ast/index.js
@@ -0,0 +1,20 @@
+export { CharacterCodes } from "#enums/characterCodes";
+export { CommentDirectiveType } from "#enums/commentDirectiveType";
+export { InternalSymbolName } from "#enums/internalSymbolName";
+export { LanguageVariant } from "#enums/languageVariant";
+export { ModifierFlags } from "#enums/modifierFlags";
+export { NodeFlags } from "#enums/nodeFlags";
+export { RegularExpressionFlags } from "#enums/regularExpressionFlags";
+export { ScriptKind } from "#enums/scriptKind";
+export { ScriptTarget } from "#enums/scriptTarget";
+export { SyntaxKind } from "#enums/syntaxKind";
+export { TokenFlags } from "#enums/tokenFlags";
+export * from "./ast.js";
+export * from "./astnav.js";
+export * from "./clone.js";
+export * from "./is.js";
+export * from "./jsdoc.js";
+export * from "./scanner.js";
+export * from "./utils.js";
+export * from "./visitor.js";
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/index.js.map b/node_modules/typescript/dist/ast/index.js.map
new file mode 100644
index 000000000..7017eee99
--- /dev/null
+++ b/node_modules/typescript/dist/ast/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.d.ts b/node_modules/typescript/dist/ast/is.d.ts
new file mode 100644
index 000000000..77d81a1ff
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.d.ts
@@ -0,0 +1,35 @@
+import { OuterExpressionKinds } from "#enums/outerExpressionKinds";
+import type { AsExpression, BindingPattern, BlockOrExpression, BooleanLiteral, ConciseBody, ExclamationToken, Expression, ExpressionWithTypeArguments, ForInitializer, Identifier, JSDocTypeExpression, JSDocTypeLiteral, JsxTagNameExpression, LeftHandSideExpression, LiteralExpression, MinusToken, ModuleDeclaration, Node, NonNullExpression, NullLiteral, ParenthesizedExpression, PartiallyEmittedExpression, PlusToken, PrefixUnaryExpression, QuestionToken, ReadonlyKeyword, SatisfiesExpression, Statement, TemplateMiddle, TemplateTail, ThisTypeNode, TypeAssertion, TypeNode, UnaryExpressionBase } from "./ast.ts";
+export * from "./is.generated.ts";
+type JSDocNamespaceDeclaration = ModuleDeclaration;
+type WrappedExpression = ParenthesizedExpression | TypeAssertion | AsExpression | SatisfiesExpression | ExpressionWithTypeArguments | NonNullExpression | PartiallyEmittedExpression;
+type OuterExpression = WrappedExpression;
+export declare function isTypeNode(node: Node): node is TypeNode;
+export declare function isStatement(node: Node): node is Statement;
+export declare function isExpression(node: Node): node is Expression;
+export declare function isBlockOrExpression(node: Node): node is BlockOrExpression;
+export declare function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression;
+export declare function skipPartiallyEmittedExpressions(node: Expression): Expression;
+export declare function skipPartiallyEmittedExpressions(node: Node): Node;
+export declare function isUnaryExpression(node: Node): node is UnaryExpressionBase;
+/** @internal */
+export declare function isOuterExpression(node: Node, kinds?: OuterExpressionKinds): node is OuterExpression;
+/** @internal */
+export declare function skipOuterExpressions(node: WrappedExpression): T;
+/** @internal */
+export declare function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression;
+/** @internal */
+export declare function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node;
+export declare function isBindingPattern(node: Node): node is BindingPattern;
+export declare function isConciseBody(node: Node): node is ConciseBody;
+export declare function isForInitializer(node: Node): node is ForInitializer;
+export declare function isQuestionOrExclamationToken(node: Node): node is QuestionToken | ExclamationToken;
+export declare function isIdentifierOrThisTypeNode(node: Node): node is Identifier | ThisTypeNode;
+export declare function isReadonlyKeywordOrPlusOrMinusToken(node: Node): node is ReadonlyKeyword | PlusToken | MinusToken;
+export declare function isQuestionOrPlusOrMinusToken(node: Node): node is QuestionToken | PlusToken | MinusToken;
+export declare function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
+export declare function isLiteralTypeLiteral(node: Node): node is NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
+export declare function isIdentifierOrJSDocNamespaceDeclaration(node: Node): node is Identifier | JSDocNamespaceDeclaration;
+export declare function isJSDocTypeExpressionOrJSDocTypeLiteral(node: Node): node is JSDocTypeExpression | JSDocTypeLiteral;
+export declare function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression;
+//# sourceMappingURL=is.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.d.ts.map b/node_modules/typescript/dist/ast/is.d.ts.map
new file mode 100644
index 000000000..4b1975078
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,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vG;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,cAAc,GAAG,YAAY,CAEhG;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,GAAG,cAAc,GAAG,iBAAiB,GAAG,qBAAqB,CAKjI;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,GAAG,yBAAyB,CAElH;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,mBAAmB,GAAG,gBAAgB,CAElH;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,oBAAoB,CAM/E"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.generated.d.ts b/node_modules/typescript/dist/ast/is.generated.d.ts
new file mode 100644
index 000000000..2b785fc4b
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.generated.d.ts
@@ -0,0 +1,329 @@
+import { SyntaxKind } from "#enums/syntaxKind";
+import type { AbstractKeyword, AccessExpression, AccessorDeclaration, AccessorKeyword, AdditiveOperator, AdditiveOperatorOrHigher, AnyImportSyntax, ArrayBindingElement, ArrayBindingPattern, ArrayDestructuringAssignment, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertionExpression, AssertKeyword, AssertsKeyword, AssignmentOperator, AssignmentOperatorOrHigher, AssignmentOperatorToken, AsteriskToken, AsyncKeyword, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperator, BinaryOperatorToken, BindingElement, BindingName, BitwiseOperator, BitwiseOperatorOrHigher, Block, BooleanLiteral, BreakOrContinueStatement, BreakStatement, CallExpression, CallLikeExpression, CallOrNewExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseKeyword, CatchClause, ClassDeclaration, ClassExpression, ClassLikeDeclaration, ClassStaticBlockDeclaration, ColonToken, CompoundAssignmentOperator, ComputedPropertyName, ConditionalExpression, ConditionalTypeNode, ConstKeyword, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, DeclarationName, DeclareKeyword, Decorator, DefaultClause, DefaultKeyword, DeleteExpression, DestructuringAssignment, DoStatement, DotDotDotToken, DotToken, ElementAccessExpression, EmptyStatement, EndOfFile, EntityName, EnumDeclaration, EnumMember, EqualityOperator, EqualityOperatorOrHigher, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExponentiationOperator, ExportAssignment, ExportDeclaration, ExportKeyword, ExportSpecifier, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, FalseLiteral, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionLikeDeclaration, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportClauseOrBindingPattern, ImportDeclaration, ImportEqualsDeclaration, ImportExpression, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InKeyword, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocCallbackTag, JSDocComment, JSDocDeprecatedTag, JSDocFullName, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTemplateTag, JSDocText, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributes, JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxOpeningLikeElement, JsxSelfClosingElement, JsxSpreadAttribute, JsxText, JsxTokenSyntaxKind, KeywordExpression, KeywordExpressionSyntaxKind, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LiteralExpression, LiteralLikeNode, LiteralToken, LiteralTypeNode, LogicalOperator, LogicalOperatorOrHigher, LogicalOrCoalescingAssignmentOperator, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignatureDeclaration, MinusToken, MissingDeclaration, Modifier, ModifierLike, ModifierSyntaxKind, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, MultiplicativeOperator, MultiplicativeOperatorOrHigher, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedImportsOrExports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NotEmittedTypeElement, NullLiteral, NumericLiteral, NumericOrStringLikeLiteral, ObjectBindingPattern, ObjectDestructuringAssignment, ObjectLiteralElementLike, ObjectLiteralExpression, ObjectLiteralLikeNode, ObjectTypeDeclaration, OmittedExpression, OptionalTypeNode, OutKeyword, OverrideKeyword, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, PlusToken, PostfixUnaryExpression, PostfixUnaryOperator, PrefixUnaryExpression, PrefixUnaryOperator, PrivateIdentifier, PrivateKeyword, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertyNameLiteral, PropertySignatureDeclaration, ProtectedKeyword, PseudoLiteralSyntaxKind, PseudoLiteralToken, PublicKeyword, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RelationalOperator, RelationalOperatorOrHigher, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShiftOperator, ShiftOperatorOrHigher, ShorthandPropertyAssignment, SignatureDeclaration, SourceFile, SpreadAssignment, SpreadElement, StaticKeyword, StringLiteral, StringLiteralLikeNode, SuperExpression, SwitchStatement, SyntaxList, SyntheticExpression, SyntheticReferenceExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralLikeNode, TemplateLiteralToken, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateMiddleOrTail, TemplateSpan, TemplateTail, ThisExpression, ThisTypeNode, ThrowStatement, Token, TriviaSyntaxKind, TrueLiteral, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeLiteralNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypePredicateParameterName, TypeQueryNode, TypeReferenceNode, UnionOrIntersectionTypeNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableOrParameterDeclaration, VariableOrPropertyDeclaration, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "./ast.ts";
+export declare function isToken(node: Node): node is Token;
+export declare function isIdentifier(node: Node): node is Identifier;
+export declare function isPrivateIdentifier(node: Node): node is PrivateIdentifier;
+export declare function isQualifiedName(node: Node): node is QualifiedName;
+export declare function isComputedPropertyName(node: Node): node is ComputedPropertyName;
+export declare function isDecorator(node: Node): node is Decorator;
+export declare function isEmptyStatement(node: Node): node is EmptyStatement;
+export declare function isIfStatement(node: Node): node is IfStatement;
+export declare function isDoStatement(node: Node): node is DoStatement;
+export declare function isWhileStatement(node: Node): node is WhileStatement;
+export declare function isForStatement(node: Node): node is ForStatement;
+export declare function isBreakStatement(node: Node): node is BreakStatement;
+export declare function isContinueStatement(node: Node): node is ContinueStatement;
+export declare function isReturnStatement(node: Node): node is ReturnStatement;
+export declare function isWithStatement(node: Node): node is WithStatement;
+export declare function isSwitchStatement(node: Node): node is SwitchStatement;
+export declare function isCaseBlock(node: Node): node is CaseBlock;
+export declare function isThrowStatement(node: Node): node is ThrowStatement;
+export declare function isTryStatement(node: Node): node is TryStatement;
+export declare function isCatchClause(node: Node): node is CatchClause;
+export declare function isDebuggerStatement(node: Node): node is DebuggerStatement;
+export declare function isLabeledStatement(node: Node): node is LabeledStatement;
+export declare function isExpressionStatement(node: Node): node is ExpressionStatement;
+export declare function isBlock(node: Node): node is Block;
+export declare function isVariableStatement(node: Node): node is VariableStatement;
+export declare function isVariableDeclaration(node: Node): node is VariableDeclaration;
+export declare function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
+export declare function isParameterDeclaration(node: Node): node is ParameterDeclaration;
+export declare function isBindingElement(node: Node): node is BindingElement;
+export declare function isMissingDeclaration(node: Node): node is MissingDeclaration;
+export declare function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
+export declare function isClassDeclaration(node: Node): node is ClassDeclaration;
+export declare function isClassExpression(node: Node): node is ClassExpression;
+export declare function isHeritageClause(node: Node): node is HeritageClause;
+export declare function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
+export declare function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
+export declare function isEnumMember(node: Node): node is EnumMember;
+export declare function isEnumDeclaration(node: Node): node is EnumDeclaration;
+export declare function isModuleBlock(node: Node): node is ModuleBlock;
+export declare function isNotEmittedStatement(node: Node): node is NotEmittedStatement;
+export declare function isNotEmittedTypeElement(node: Node): node is NotEmittedTypeElement;
+export declare function isImportDeclaration(node: Node): node is ImportDeclaration;
+export declare function isExternalModuleReference(node: Node): node is ExternalModuleReference;
+export declare function isNamespaceImport(node: Node): node is NamespaceImport;
+export declare function isNamedImports(node: Node): node is NamedImports;
+export declare function isExportAssignment(node: Node): node is ExportAssignment;
+export declare function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
+export declare function isNamespaceExport(node: Node): node is NamespaceExport;
+export declare function isNamedExports(node: Node): node is NamedExports;
+export declare function isExportSpecifier(node: Node): node is ExportSpecifier;
+export declare function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
+export declare function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
+export declare function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
+export declare function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
+export declare function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
+export declare function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
+export declare function isMethodSignatureDeclaration(node: Node): node is MethodSignatureDeclaration;
+export declare function isMethodDeclaration(node: Node): node is MethodDeclaration;
+export declare function isPropertySignatureDeclaration(node: Node): node is PropertySignatureDeclaration;
+export declare function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
+export declare function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
+export declare function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration;
+export declare function isOmittedExpression(node: Node): node is OmittedExpression;
+export declare function isKeywordExpression(node: Node): node is KeywordExpression;
+export declare function isStringLiteral(node: Node): node is StringLiteral;
+export declare function isNumericLiteral(node: Node): node is NumericLiteral;
+export declare function isBigIntLiteral(node: Node): node is BigIntLiteral;
+export declare function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
+export declare function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral;
+export declare function isBinaryExpression(node: Node): node is BinaryExpression;
+export declare function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
+export declare function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
+export declare function isYieldExpression(node: Node): node is YieldExpression;
+export declare function isArrowFunction(node: Node): node is ArrowFunction;
+export declare function isFunctionExpression(node: Node): node is FunctionExpression;
+export declare function isAsExpression(node: Node): node is AsExpression;
+export declare function isSatisfiesExpression(node: Node): node is SatisfiesExpression;
+export declare function isConditionalExpression(node: Node): node is ConditionalExpression;
+export declare function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
+export declare function isElementAccessExpression(node: Node): node is ElementAccessExpression;
+export declare function isCallExpression(node: Node): node is CallExpression;
+export declare function isNewExpression(node: Node): node is NewExpression;
+export declare function isMetaProperty(node: Node): node is MetaProperty;
+export declare function isNonNullExpression(node: Node): node is NonNullExpression;
+export declare function isSpreadElement(node: Node): node is SpreadElement;
+export declare function isTemplateExpression(node: Node): node is TemplateExpression;
+export declare function isTemplateSpan(node: Node): node is TemplateSpan;
+export declare function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
+export declare function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
+export declare function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
+export declare function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
+export declare function isSpreadAssignment(node: Node): node is SpreadAssignment;
+export declare function isPropertyAssignment(node: Node): node is PropertyAssignment;
+export declare function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
+export declare function isDeleteExpression(node: Node): node is DeleteExpression;
+export declare function isTypeOfExpression(node: Node): node is TypeOfExpression;
+export declare function isVoidExpression(node: Node): node is VoidExpression;
+export declare function isAwaitExpression(node: Node): node is AwaitExpression;
+export declare function isTypeAssertion(node: Node): node is TypeAssertion;
+export declare function isKeywordTypeNode(node: Node): node is KeywordTypeNode;
+export declare function isUnionTypeNode(node: Node): node is UnionTypeNode;
+export declare function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
+export declare function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
+export declare function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
+export declare function isInferTypeNode(node: Node): node is InferTypeNode;
+export declare function isArrayTypeNode(node: Node): node is ArrayTypeNode;
+export declare function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
+export declare function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
+export declare function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
+export declare function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
+export declare function isThisTypeNode(node: Node): node is ThisTypeNode;
+export declare function isTypePredicateNode(node: Node): node is TypePredicateNode;
+export declare function isImportAttribute(node: Node): node is ImportAttribute;
+export declare function isImportAttributes(node: Node): node is ImportAttributes;
+export declare function isTypeQueryNode(node: Node): node is TypeQueryNode;
+export declare function isMappedTypeNode(node: Node): node is MappedTypeNode;
+export declare function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
+export declare function isTupleTypeNode(node: Node): node is TupleTypeNode;
+export declare function isNamedTupleMember(node: Node): node is NamedTupleMember;
+export declare function isOptionalTypeNode(node: Node): node is OptionalTypeNode;
+export declare function isRestTypeNode(node: Node): node is RestTypeNode;
+export declare function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
+export declare function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
+export declare function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
+export declare function isTemplateHead(node: Node): node is TemplateHead;
+export declare function isTemplateMiddle(node: Node): node is TemplateMiddle;
+export declare function isTemplateTail(node: Node): node is TemplateTail;
+export declare function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode;
+export declare function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan;
+export declare function isSyntheticExpression(node: Node): node is SyntheticExpression;
+export declare function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression;
+export declare function isJsxElement(node: Node): node is JsxElement;
+export declare function isJsxAttributes(node: Node): node is JsxAttributes;
+export declare function isJsxNamespacedName(node: Node): node is JsxNamespacedName;
+export declare function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
+export declare function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
+export declare function isJsxFragment(node: Node): node is JsxFragment;
+export declare function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
+export declare function isJsxClosingFragment(node: Node): node is JsxClosingFragment;
+export declare function isJsxAttribute(node: Node): node is JsxAttribute;
+export declare function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
+export declare function isJsxClosingElement(node: Node): node is JsxClosingElement;
+export declare function isJsxExpression(node: Node): node is JsxExpression;
+export declare function isJsxText(node: Node): node is JsxText;
+export declare function isSyntaxList(node: Node): node is SyntaxList;
+export declare function isJSDoc(node: Node): node is JSDoc;
+export declare function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
+export declare function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
+export declare function isJSDocNullableType(node: Node): node is JSDocNullableType;
+export declare function isJSDocAllType(node: Node): node is JSDocAllType;
+export declare function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
+export declare function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
+export declare function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
+export declare function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
+export declare function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
+export declare function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
+export declare function isJSDocPublicTag(node: Node): node is JSDocPublicTag;
+export declare function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag;
+export declare function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
+export declare function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
+export declare function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag;
+export declare function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
+export declare function isJSDocSeeTag(node: Node): node is JSDocSeeTag;
+export declare function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
+export declare function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
+export declare function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag;
+export declare function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag;
+export declare function isJSDocThisTag(node: Node): node is JSDocThisTag;
+export declare function isJSDocImportTag(node: Node): node is JSDocImportTag;
+export declare function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
+export declare function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag;
+export declare function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
+export declare function isJSDocSignature(node: Node): node is JSDocSignature;
+export declare function isJSDocNameReference(node: Node): node is JSDocNameReference;
+export declare function isSourceFile(node: Node): node is SourceFile;
+export declare function isModuleDeclaration(node: Node): node is ModuleDeclaration;
+export declare function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
+export declare function isExportDeclaration(node: Node): node is ExportDeclaration;
+export declare function isImportTypeNode(node: Node): node is ImportTypeNode;
+export declare function isImportClause(node: Node): node is ImportClause;
+export declare function isImportSpecifier(node: Node): node is ImportSpecifier;
+export declare function isJSDocText(node: Node): node is JSDocText;
+export declare function isJSDocLink(node: Node): node is JSDocLink;
+export declare function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain;
+export declare function isJSDocLinkCode(node: Node): node is JSDocLinkCode;
+export declare function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
+export declare function isSyntheticReferenceExpression(node: Node): node is SyntheticReferenceExpression;
+export declare function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
+export declare function isForInStatement(node: Node): node is ForInStatement;
+export declare function isForOfStatement(node: Node): node is ForOfStatement;
+export declare function isCaseClause(node: Node): node is CaseClause;
+export declare function isDefaultClause(node: Node): node is DefaultClause;
+export declare function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
+export declare function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
+export declare function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
+export declare function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
+export declare function isAccessExpression(node: Node): node is AccessExpression;
+export declare function isDeclarationName(node: Node): node is DeclarationName;
+export declare function isModuleName(node: Node): node is ModuleName;
+export declare function isModuleExportName(node: Node): node is ModuleExportName;
+export declare function isPropertyName(node: Node): node is PropertyName;
+export declare function isModuleBody(node: Node): node is ModuleBody;
+export declare function isJSDocFullName(node: Node): node is JSDocFullName;
+export declare function isModuleReference(node: Node): node is ModuleReference;
+export declare function isNamedImportBindings(node: Node): node is NamedImportBindings;
+export declare function isNamedExportBindings(node: Node): node is NamedExportBindings;
+export declare function isMemberName(node: Node): node is MemberName;
+export declare function isEntityName(node: Node): node is EntityName;
+export declare function isBindingName(node: Node): node is BindingName;
+export declare function isModifierLike(node: Node): node is ModifierLike;
+export declare function isJsxChild(node: Node): node is JsxChild;
+export declare function isJsxAttributeLike(node: Node): node is JsxAttributeLike;
+export declare function isJsxAttributeName(node: Node): node is JsxAttributeName;
+export declare function isJsxAttributeValue(node: Node): node is JsxAttributeValue;
+export declare function isClassLikeDeclaration(node: Node): node is ClassLikeDeclaration;
+export declare function isAccessorDeclaration(node: Node): node is AccessorDeclaration;
+export declare function isLiteralLikeNode(node: Node): node is LiteralLikeNode;
+export declare function isLiteralExpression(node: Node): node is LiteralExpression;
+export declare function isUnionOrIntersectionTypeNode(node: Node): node is UnionOrIntersectionTypeNode;
+export declare function isTemplateLiteralLikeNode(node: Node): node is TemplateLiteralLikeNode;
+export declare function isTemplateMiddleOrTail(node: Node): node is TemplateMiddleOrTail;
+export declare function isTemplateLiteral(node: Node): node is TemplateLiteral;
+export declare function isTypePredicateParameterName(node: Node): node is TypePredicateParameterName;
+export declare function isImportAttributeName(node: Node): node is ImportAttributeName;
+export declare function isJSDocComment(node: Node): node is JSDocComment;
+export declare function isSignatureDeclaration(node: Node): node is SignatureDeclaration;
+export declare function isStringLiteralLikeNode(node: Node): node is StringLiteralLikeNode;
+export declare function isNumericOrStringLikeLiteral(node: Node): node is NumericOrStringLikeLiteral;
+export declare function isObjectLiteralLikeNode(node: Node): node is ObjectLiteralLikeNode;
+export declare function isObjectTypeDeclaration(node: Node): node is ObjectTypeDeclaration;
+export declare function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
+export declare function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports;
+export declare function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
+export declare function isCallLikeExpression(node: Node): node is CallLikeExpression;
+export declare function isFunctionLikeDeclaration(node: Node): node is FunctionLikeDeclaration;
+export declare function isVariableOrParameterDeclaration(node: Node): node is VariableOrParameterDeclaration;
+export declare function isVariableOrPropertyDeclaration(node: Node): node is VariableOrPropertyDeclaration;
+export declare function isCallOrNewExpression(node: Node): node is CallOrNewExpression;
+export declare function isImportClauseOrBindingPattern(node: Node): node is ImportClauseOrBindingPattern;
+export declare function isAnyImportSyntax(node: Node): node is AnyImportSyntax;
+export declare function isArrayBindingElement(node: Node): node is ArrayBindingElement;
+export declare function isAssertionExpression(node: Node): node is AssertionExpression;
+export declare function isBooleanLiteral(node: Node): node is BooleanLiteral;
+export declare function isDestructuringAssignment(node: Node): node is DestructuringAssignment;
+export declare function isLiteralToken(node: Node): node is LiteralToken;
+export declare function isModifier(node: Node): node is Modifier;
+export declare function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
+export declare function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral;
+export declare function isPseudoLiteralToken(node: Node): node is PseudoLiteralToken;
+export declare function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken;
+export declare function isArrayDestructuringAssignment(node: Node): node is ArrayDestructuringAssignment;
+export declare function isObjectDestructuringAssignment(node: Node): node is ObjectDestructuringAssignment;
+export declare function isFunctionBody(node: Node): node is FunctionBody;
+export declare function isTriviaKind(kind: SyntaxKind): kind is TriviaSyntaxKind;
+export declare function isPseudoLiteralKind(kind: SyntaxKind): kind is PseudoLiteralSyntaxKind;
+export declare function isModifierKind(kind: SyntaxKind): kind is ModifierSyntaxKind;
+export declare function isKeywordTypeKind(kind: SyntaxKind): kind is KeywordTypeSyntaxKind;
+export declare function isKeywordExpressionKind(kind: SyntaxKind): kind is KeywordExpressionSyntaxKind;
+export declare function isJsxTokenKind(kind: SyntaxKind): kind is JsxTokenSyntaxKind;
+export declare function isImportPhaseModifierKind(kind: SyntaxKind): kind is ImportPhaseModifierSyntaxKind;
+export declare function isPostfixUnaryOperator(kind: SyntaxKind): kind is PostfixUnaryOperator;
+export declare function isPrefixUnaryOperator(kind: SyntaxKind): kind is PrefixUnaryOperator;
+export declare function isAssignmentOperator(kind: SyntaxKind): kind is AssignmentOperator;
+export declare function isBinaryOperator(kind: SyntaxKind): kind is BinaryOperator;
+export declare function isExponentiationOperator(kind: SyntaxKind): kind is ExponentiationOperator;
+export declare function isMultiplicativeOperator(kind: SyntaxKind): kind is MultiplicativeOperator;
+export declare function isMultiplicativeOperatorOrHigher(kind: SyntaxKind): kind is MultiplicativeOperatorOrHigher;
+export declare function isAdditiveOperator(kind: SyntaxKind): kind is AdditiveOperator;
+export declare function isAdditiveOperatorOrHigher(kind: SyntaxKind): kind is AdditiveOperatorOrHigher;
+export declare function isShiftOperator(kind: SyntaxKind): kind is ShiftOperator;
+export declare function isShiftOperatorOrHigher(kind: SyntaxKind): kind is ShiftOperatorOrHigher;
+export declare function isRelationalOperator(kind: SyntaxKind): kind is RelationalOperator;
+export declare function isRelationalOperatorOrHigher(kind: SyntaxKind): kind is RelationalOperatorOrHigher;
+export declare function isEqualityOperator(kind: SyntaxKind): kind is EqualityOperator;
+export declare function isEqualityOperatorOrHigher(kind: SyntaxKind): kind is EqualityOperatorOrHigher;
+export declare function isBitwiseOperator(kind: SyntaxKind): kind is BitwiseOperator;
+export declare function isBitwiseOperatorOrHigher(kind: SyntaxKind): kind is BitwiseOperatorOrHigher;
+export declare function isLogicalOperator(kind: SyntaxKind): kind is LogicalOperator;
+export declare function isLogicalOperatorOrHigher(kind: SyntaxKind): kind is LogicalOperatorOrHigher;
+export declare function isCompoundAssignmentOperator(kind: SyntaxKind): kind is CompoundAssignmentOperator;
+export declare function isAssignmentOperatorOrHigher(kind: SyntaxKind): kind is AssignmentOperatorOrHigher;
+export declare function isLogicalOrCoalescingAssignmentOperator(kind: SyntaxKind): kind is LogicalOrCoalescingAssignmentOperator;
+export declare function isLiteralKind(kind: SyntaxKind): boolean;
+export declare function isPunctuationKind(kind: SyntaxKind): boolean;
+export declare function isKeywordKind(kind: SyntaxKind): boolean;
+export declare function isTokenKind(kind: SyntaxKind): boolean;
+export declare function isJSDocNodeKind(kind: SyntaxKind): boolean;
+export declare function isEndOfFile(node: Node): node is EndOfFile;
+export declare function isDotToken(node: Node): node is DotToken;
+export declare function isDotDotDotToken(node: Node): node is DotDotDotToken;
+export declare function isQuestionToken(node: Node): node is QuestionToken;
+export declare function isExclamationToken(node: Node): node is ExclamationToken;
+export declare function isColonToken(node: Node): node is ColonToken;
+export declare function isEqualsToken(node: Node): node is EqualsToken;
+export declare function isAsteriskToken(node: Node): node is AsteriskToken;
+export declare function isEqualsGreaterThanToken(node: Node): node is EqualsGreaterThanToken;
+export declare function isPlusToken(node: Node): node is PlusToken;
+export declare function isMinusToken(node: Node): node is MinusToken;
+export declare function isQuestionDotToken(node: Node): node is QuestionDotToken;
+export declare function isAssertsKeyword(node: Node): node is AssertsKeyword;
+export declare function isAssertKeyword(node: Node): node is AssertKeyword;
+export declare function isAwaitKeyword(node: Node): node is AwaitKeyword;
+export declare function isCaseKeyword(node: Node): node is CaseKeyword;
+export declare function isAbstractKeyword(node: Node): node is AbstractKeyword;
+export declare function isAccessorKeyword(node: Node): node is AccessorKeyword;
+export declare function isAsyncKeyword(node: Node): node is AsyncKeyword;
+export declare function isConstKeyword(node: Node): node is ConstKeyword;
+export declare function isDeclareKeyword(node: Node): node is DeclareKeyword;
+export declare function isDefaultKeyword(node: Node): node is DefaultKeyword;
+export declare function isExportKeyword(node: Node): node is ExportKeyword;
+export declare function isInKeyword(node: Node): node is InKeyword;
+export declare function isPrivateKeyword(node: Node): node is PrivateKeyword;
+export declare function isProtectedKeyword(node: Node): node is ProtectedKeyword;
+export declare function isPublicKeyword(node: Node): node is PublicKeyword;
+export declare function isReadonlyKeyword(node: Node): node is ReadonlyKeyword;
+export declare function isOutKeyword(node: Node): node is OutKeyword;
+export declare function isOverrideKeyword(node: Node): node is OverrideKeyword;
+export declare function isStaticKeyword(node: Node): node is StaticKeyword;
+export declare function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken;
+export declare function isAssignmentOperatorToken(node: Node): node is AssignmentOperatorToken;
+export declare function isNullLiteral(node: Node): node is NullLiteral;
+export declare function isTrueLiteral(node: Node): node is TrueLiteral;
+export declare function isFalseLiteral(node: Node): node is FalseLiteral;
+export declare function isThisExpression(node: Node): node is ThisExpression;
+export declare function isSuperExpression(node: Node): node is SuperExpression;
+export declare function isImportExpression(node: Node): node is ImportExpression;
+//# sourceMappingURL=is.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.generated.d.ts.map b/node_modules/typescript/dist/ast/is.generated.d.ts.map
new file mode 100644
index 000000000..6346fa018
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"is.generated.d.ts","sourceRoot":"","sources":["../../src/ast/is.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,KAAK,EACL,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,UAAU,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;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,CAE7D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,CAE7D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,YAAY,CAE/D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,cAAc,CAEnE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,eAAe,CAErE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,gBAAgB,CAEvE"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.generated.js b/node_modules/typescript/dist/ast/is.generated.js
new file mode 100644
index 000000000..d4204f92d
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.generated.js
@@ -0,0 +1,1103 @@
+// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT.
+import { SyntaxKind } from "#enums/syntaxKind";
+export function isToken(node) {
+    return isTokenKind(node.kind);
+}
+export function isIdentifier(node) {
+    return node.kind === SyntaxKind.Identifier;
+}
+export function isPrivateIdentifier(node) {
+    return node.kind === SyntaxKind.PrivateIdentifier;
+}
+export function isQualifiedName(node) {
+    return node.kind === SyntaxKind.QualifiedName;
+}
+export function isComputedPropertyName(node) {
+    return node.kind === SyntaxKind.ComputedPropertyName;
+}
+export function isDecorator(node) {
+    return node.kind === SyntaxKind.Decorator;
+}
+export function isEmptyStatement(node) {
+    return node.kind === SyntaxKind.EmptyStatement;
+}
+export function isIfStatement(node) {
+    return node.kind === SyntaxKind.IfStatement;
+}
+export function isDoStatement(node) {
+    return node.kind === SyntaxKind.DoStatement;
+}
+export function isWhileStatement(node) {
+    return node.kind === SyntaxKind.WhileStatement;
+}
+export function isForStatement(node) {
+    return node.kind === SyntaxKind.ForStatement;
+}
+export function isBreakStatement(node) {
+    return node.kind === SyntaxKind.BreakStatement;
+}
+export function isContinueStatement(node) {
+    return node.kind === SyntaxKind.ContinueStatement;
+}
+export function isReturnStatement(node) {
+    return node.kind === SyntaxKind.ReturnStatement;
+}
+export function isWithStatement(node) {
+    return node.kind === SyntaxKind.WithStatement;
+}
+export function isSwitchStatement(node) {
+    return node.kind === SyntaxKind.SwitchStatement;
+}
+export function isCaseBlock(node) {
+    return node.kind === SyntaxKind.CaseBlock;
+}
+export function isThrowStatement(node) {
+    return node.kind === SyntaxKind.ThrowStatement;
+}
+export function isTryStatement(node) {
+    return node.kind === SyntaxKind.TryStatement;
+}
+export function isCatchClause(node) {
+    return node.kind === SyntaxKind.CatchClause;
+}
+export function isDebuggerStatement(node) {
+    return node.kind === SyntaxKind.DebuggerStatement;
+}
+export function isLabeledStatement(node) {
+    return node.kind === SyntaxKind.LabeledStatement;
+}
+export function isExpressionStatement(node) {
+    return node.kind === SyntaxKind.ExpressionStatement;
+}
+export function isBlock(node) {
+    return node.kind === SyntaxKind.Block;
+}
+export function isVariableStatement(node) {
+    return node.kind === SyntaxKind.VariableStatement;
+}
+export function isVariableDeclaration(node) {
+    return node.kind === SyntaxKind.VariableDeclaration;
+}
+export function isVariableDeclarationList(node) {
+    return node.kind === SyntaxKind.VariableDeclarationList;
+}
+export function isParameterDeclaration(node) {
+    return node.kind === SyntaxKind.Parameter;
+}
+export function isBindingElement(node) {
+    return node.kind === SyntaxKind.BindingElement;
+}
+export function isMissingDeclaration(node) {
+    return node.kind === SyntaxKind.MissingDeclaration;
+}
+export function isFunctionDeclaration(node) {
+    return node.kind === SyntaxKind.FunctionDeclaration;
+}
+export function isClassDeclaration(node) {
+    return node.kind === SyntaxKind.ClassDeclaration;
+}
+export function isClassExpression(node) {
+    return node.kind === SyntaxKind.ClassExpression;
+}
+export function isHeritageClause(node) {
+    return node.kind === SyntaxKind.HeritageClause;
+}
+export function isInterfaceDeclaration(node) {
+    return node.kind === SyntaxKind.InterfaceDeclaration;
+}
+export function isTypeAliasDeclaration(node) {
+    switch (node.kind) {
+        case SyntaxKind.TypeAliasDeclaration:
+        case SyntaxKind.JSTypeAliasDeclaration:
+            return true;
+        default:
+            return false;
+    }
+}
+export function isEnumMember(node) {
+    return node.kind === SyntaxKind.EnumMember;
+}
+export function isEnumDeclaration(node) {
+    return node.kind === SyntaxKind.EnumDeclaration;
+}
+export function isModuleBlock(node) {
+    return node.kind === SyntaxKind.ModuleBlock;
+}
+export function isNotEmittedStatement(node) {
+    return node.kind === SyntaxKind.NotEmittedStatement;
+}
+export function isNotEmittedTypeElement(node) {
+    return node.kind === SyntaxKind.NotEmittedTypeElement;
+}
+export function isImportDeclaration(node) {
+    switch (node.kind) {
+        case SyntaxKind.ImportDeclaration:
+        case SyntaxKind.JSImportDeclaration:
+            return true;
+        default:
+            return false;
+    }
+}
+export function isExternalModuleReference(node) {
+    return node.kind === SyntaxKind.ExternalModuleReference;
+}
+export function isNamespaceImport(node) {
+    return node.kind === SyntaxKind.NamespaceImport;
+}
+export function isNamedImports(node) {
+    return node.kind === SyntaxKind.NamedImports;
+}
+export function isExportAssignment(node) {
+    return node.kind === SyntaxKind.ExportAssignment;
+}
+export function isNamespaceExportDeclaration(node) {
+    return node.kind === SyntaxKind.NamespaceExportDeclaration;
+}
+export function isNamespaceExport(node) {
+    return node.kind === SyntaxKind.NamespaceExport;
+}
+export function isNamedExports(node) {
+    return node.kind === SyntaxKind.NamedExports;
+}
+export function isExportSpecifier(node) {
+    return node.kind === SyntaxKind.ExportSpecifier;
+}
+export function isCallSignatureDeclaration(node) {
+    return node.kind === SyntaxKind.CallSignature;
+}
+export function isConstructSignatureDeclaration(node) {
+    return node.kind === SyntaxKind.ConstructSignature;
+}
+export function isConstructorDeclaration(node) {
+    return node.kind === SyntaxKind.Constructor;
+}
+export function isGetAccessorDeclaration(node) {
+    return node.kind === SyntaxKind.GetAccessor;
+}
+export function isSetAccessorDeclaration(node) {
+    return node.kind === SyntaxKind.SetAccessor;
+}
+export function isIndexSignatureDeclaration(node) {
+    return node.kind === SyntaxKind.IndexSignature;
+}
+export function isMethodSignatureDeclaration(node) {
+    return node.kind === SyntaxKind.MethodSignature;
+}
+export function isMethodDeclaration(node) {
+    return node.kind === SyntaxKind.MethodDeclaration;
+}
+export function isPropertySignatureDeclaration(node) {
+    return node.kind === SyntaxKind.PropertySignature;
+}
+export function isPropertyDeclaration(node) {
+    return node.kind === SyntaxKind.PropertyDeclaration;
+}
+export function isSemicolonClassElement(node) {
+    return node.kind === SyntaxKind.SemicolonClassElement;
+}
+export function isClassStaticBlockDeclaration(node) {
+    return node.kind === SyntaxKind.ClassStaticBlockDeclaration;
+}
+export function isOmittedExpression(node) {
+    return node.kind === SyntaxKind.OmittedExpression;
+}
+export function isKeywordExpression(node) {
+    return isKeywordExpressionKind(node.kind);
+}
+export function isStringLiteral(node) {
+    return node.kind === SyntaxKind.StringLiteral;
+}
+export function isNumericLiteral(node) {
+    return node.kind === SyntaxKind.NumericLiteral;
+}
+export function isBigIntLiteral(node) {
+    return node.kind === SyntaxKind.BigIntLiteral;
+}
+export function isRegularExpressionLiteral(node) {
+    return node.kind === SyntaxKind.RegularExpressionLiteral;
+}
+export function isNoSubstitutionTemplateLiteral(node) {
+    return node.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
+}
+export function isBinaryExpression(node) {
+    return node.kind === SyntaxKind.BinaryExpression;
+}
+export function isPrefixUnaryExpression(node) {
+    return node.kind === SyntaxKind.PrefixUnaryExpression;
+}
+export function isPostfixUnaryExpression(node) {
+    return node.kind === SyntaxKind.PostfixUnaryExpression;
+}
+export function isYieldExpression(node) {
+    return node.kind === SyntaxKind.YieldExpression;
+}
+export function isArrowFunction(node) {
+    return node.kind === SyntaxKind.ArrowFunction;
+}
+export function isFunctionExpression(node) {
+    return node.kind === SyntaxKind.FunctionExpression;
+}
+export function isAsExpression(node) {
+    return node.kind === SyntaxKind.AsExpression;
+}
+export function isSatisfiesExpression(node) {
+    return node.kind === SyntaxKind.SatisfiesExpression;
+}
+export function isConditionalExpression(node) {
+    return node.kind === SyntaxKind.ConditionalExpression;
+}
+export function isPropertyAccessExpression(node) {
+    return node.kind === SyntaxKind.PropertyAccessExpression;
+}
+export function isElementAccessExpression(node) {
+    return node.kind === SyntaxKind.ElementAccessExpression;
+}
+export function isCallExpression(node) {
+    return node.kind === SyntaxKind.CallExpression;
+}
+export function isNewExpression(node) {
+    return node.kind === SyntaxKind.NewExpression;
+}
+export function isMetaProperty(node) {
+    return node.kind === SyntaxKind.MetaProperty;
+}
+export function isNonNullExpression(node) {
+    return node.kind === SyntaxKind.NonNullExpression;
+}
+export function isSpreadElement(node) {
+    return node.kind === SyntaxKind.SpreadElement;
+}
+export function isTemplateExpression(node) {
+    return node.kind === SyntaxKind.TemplateExpression;
+}
+export function isTemplateSpan(node) {
+    return node.kind === SyntaxKind.TemplateSpan;
+}
+export function isTaggedTemplateExpression(node) {
+    return node.kind === SyntaxKind.TaggedTemplateExpression;
+}
+export function isParenthesizedExpression(node) {
+    return node.kind === SyntaxKind.ParenthesizedExpression;
+}
+export function isArrayLiteralExpression(node) {
+    return node.kind === SyntaxKind.ArrayLiteralExpression;
+}
+export function isObjectLiteralExpression(node) {
+    return node.kind === SyntaxKind.ObjectLiteralExpression;
+}
+export function isSpreadAssignment(node) {
+    return node.kind === SyntaxKind.SpreadAssignment;
+}
+export function isPropertyAssignment(node) {
+    return node.kind === SyntaxKind.PropertyAssignment;
+}
+export function isShorthandPropertyAssignment(node) {
+    return node.kind === SyntaxKind.ShorthandPropertyAssignment;
+}
+export function isDeleteExpression(node) {
+    return node.kind === SyntaxKind.DeleteExpression;
+}
+export function isTypeOfExpression(node) {
+    return node.kind === SyntaxKind.TypeOfExpression;
+}
+export function isVoidExpression(node) {
+    return node.kind === SyntaxKind.VoidExpression;
+}
+export function isAwaitExpression(node) {
+    return node.kind === SyntaxKind.AwaitExpression;
+}
+export function isTypeAssertion(node) {
+    return node.kind === SyntaxKind.TypeAssertionExpression;
+}
+export function isKeywordTypeNode(node) {
+    return isKeywordTypeKind(node.kind);
+}
+export function isUnionTypeNode(node) {
+    return node.kind === SyntaxKind.UnionType;
+}
+export function isIntersectionTypeNode(node) {
+    return node.kind === SyntaxKind.IntersectionType;
+}
+export function isConditionalTypeNode(node) {
+    return node.kind === SyntaxKind.ConditionalType;
+}
+export function isTypeOperatorNode(node) {
+    return node.kind === SyntaxKind.TypeOperator;
+}
+export function isInferTypeNode(node) {
+    return node.kind === SyntaxKind.InferType;
+}
+export function isArrayTypeNode(node) {
+    return node.kind === SyntaxKind.ArrayType;
+}
+export function isIndexedAccessTypeNode(node) {
+    return node.kind === SyntaxKind.IndexedAccessType;
+}
+export function isTypeReferenceNode(node) {
+    return node.kind === SyntaxKind.TypeReference;
+}
+export function isExpressionWithTypeArguments(node) {
+    return node.kind === SyntaxKind.ExpressionWithTypeArguments;
+}
+export function isLiteralTypeNode(node) {
+    return node.kind === SyntaxKind.LiteralType;
+}
+export function isThisTypeNode(node) {
+    return node.kind === SyntaxKind.ThisType;
+}
+export function isTypePredicateNode(node) {
+    return node.kind === SyntaxKind.TypePredicate;
+}
+export function isImportAttribute(node) {
+    return node.kind === SyntaxKind.ImportAttribute;
+}
+export function isImportAttributes(node) {
+    return node.kind === SyntaxKind.ImportAttributes;
+}
+export function isTypeQueryNode(node) {
+    return node.kind === SyntaxKind.TypeQuery;
+}
+export function isMappedTypeNode(node) {
+    return node.kind === SyntaxKind.MappedType;
+}
+export function isTypeLiteralNode(node) {
+    return node.kind === SyntaxKind.TypeLiteral;
+}
+export function isTupleTypeNode(node) {
+    return node.kind === SyntaxKind.TupleType;
+}
+export function isNamedTupleMember(node) {
+    return node.kind === SyntaxKind.NamedTupleMember;
+}
+export function isOptionalTypeNode(node) {
+    return node.kind === SyntaxKind.OptionalType;
+}
+export function isRestTypeNode(node) {
+    return node.kind === SyntaxKind.RestType;
+}
+export function isParenthesizedTypeNode(node) {
+    return node.kind === SyntaxKind.ParenthesizedType;
+}
+export function isFunctionTypeNode(node) {
+    return node.kind === SyntaxKind.FunctionType;
+}
+export function isConstructorTypeNode(node) {
+    return node.kind === SyntaxKind.ConstructorType;
+}
+export function isTemplateHead(node) {
+    return node.kind === SyntaxKind.TemplateHead;
+}
+export function isTemplateMiddle(node) {
+    return node.kind === SyntaxKind.TemplateMiddle;
+}
+export function isTemplateTail(node) {
+    return node.kind === SyntaxKind.TemplateTail;
+}
+export function isTemplateLiteralTypeNode(node) {
+    return node.kind === SyntaxKind.TemplateLiteralType;
+}
+export function isTemplateLiteralTypeSpan(node) {
+    return node.kind === SyntaxKind.TemplateLiteralTypeSpan;
+}
+export function isSyntheticExpression(node) {
+    return node.kind === SyntaxKind.SyntheticExpression;
+}
+export function isPartiallyEmittedExpression(node) {
+    return node.kind === SyntaxKind.PartiallyEmittedExpression;
+}
+export function isJsxElement(node) {
+    return node.kind === SyntaxKind.JsxElement;
+}
+export function isJsxAttributes(node) {
+    return node.kind === SyntaxKind.JsxAttributes;
+}
+export function isJsxNamespacedName(node) {
+    return node.kind === SyntaxKind.JsxNamespacedName;
+}
+export function isJsxOpeningElement(node) {
+    return node.kind === SyntaxKind.JsxOpeningElement;
+}
+export function isJsxSelfClosingElement(node) {
+    return node.kind === SyntaxKind.JsxSelfClosingElement;
+}
+export function isJsxFragment(node) {
+    return node.kind === SyntaxKind.JsxFragment;
+}
+export function isJsxOpeningFragment(node) {
+    return node.kind === SyntaxKind.JsxOpeningFragment;
+}
+export function isJsxClosingFragment(node) {
+    return node.kind === SyntaxKind.JsxClosingFragment;
+}
+export function isJsxAttribute(node) {
+    return node.kind === SyntaxKind.JsxAttribute;
+}
+export function isJsxSpreadAttribute(node) {
+    return node.kind === SyntaxKind.JsxSpreadAttribute;
+}
+export function isJsxClosingElement(node) {
+    return node.kind === SyntaxKind.JsxClosingElement;
+}
+export function isJsxExpression(node) {
+    return node.kind === SyntaxKind.JsxExpression;
+}
+export function isJsxText(node) {
+    return node.kind === SyntaxKind.JsxText;
+}
+export function isSyntaxList(node) {
+    return node.kind === SyntaxKind.SyntaxList;
+}
+export function isJSDoc(node) {
+    return node.kind === SyntaxKind.JSDoc;
+}
+export function isJSDocTypeExpression(node) {
+    return node.kind === SyntaxKind.JSDocTypeExpression;
+}
+export function isJSDocNonNullableType(node) {
+    return node.kind === SyntaxKind.JSDocNonNullableType;
+}
+export function isJSDocNullableType(node) {
+    return node.kind === SyntaxKind.JSDocNullableType;
+}
+export function isJSDocAllType(node) {
+    return node.kind === SyntaxKind.JSDocAllType;
+}
+export function isJSDocVariadicType(node) {
+    return node.kind === SyntaxKind.JSDocVariadicType;
+}
+export function isJSDocOptionalType(node) {
+    return node.kind === SyntaxKind.JSDocOptionalType;
+}
+export function isJSDocTypeTag(node) {
+    return node.kind === SyntaxKind.JSDocTypeTag;
+}
+export function isJSDocUnknownTag(node) {
+    return node.kind === SyntaxKind.JSDocUnknownTag;
+}
+export function isJSDocTemplateTag(node) {
+    return node.kind === SyntaxKind.JSDocTemplateTag;
+}
+export function isJSDocReturnTag(node) {
+    return node.kind === SyntaxKind.JSDocReturnTag;
+}
+export function isJSDocPublicTag(node) {
+    return node.kind === SyntaxKind.JSDocPublicTag;
+}
+export function isJSDocPrivateTag(node) {
+    return node.kind === SyntaxKind.JSDocPrivateTag;
+}
+export function isJSDocProtectedTag(node) {
+    return node.kind === SyntaxKind.JSDocProtectedTag;
+}
+export function isJSDocReadonlyTag(node) {
+    return node.kind === SyntaxKind.JSDocReadonlyTag;
+}
+export function isJSDocOverrideTag(node) {
+    return node.kind === SyntaxKind.JSDocOverrideTag;
+}
+export function isJSDocDeprecatedTag(node) {
+    return node.kind === SyntaxKind.JSDocDeprecatedTag;
+}
+export function isJSDocSeeTag(node) {
+    return node.kind === SyntaxKind.JSDocSeeTag;
+}
+export function isJSDocImplementsTag(node) {
+    return node.kind === SyntaxKind.JSDocImplementsTag;
+}
+export function isJSDocAugmentsTag(node) {
+    return node.kind === SyntaxKind.JSDocAugmentsTag;
+}
+export function isJSDocSatisfiesTag(node) {
+    return node.kind === SyntaxKind.JSDocSatisfiesTag;
+}
+export function isJSDocThrowsTag(node) {
+    return node.kind === SyntaxKind.JSDocThrowsTag;
+}
+export function isJSDocThisTag(node) {
+    return node.kind === SyntaxKind.JSDocThisTag;
+}
+export function isJSDocImportTag(node) {
+    return node.kind === SyntaxKind.JSDocImportTag;
+}
+export function isJSDocCallbackTag(node) {
+    return node.kind === SyntaxKind.JSDocCallbackTag;
+}
+export function isJSDocOverloadTag(node) {
+    return node.kind === SyntaxKind.JSDocOverloadTag;
+}
+export function isJSDocTypedefTag(node) {
+    return node.kind === SyntaxKind.JSDocTypedefTag;
+}
+export function isJSDocSignature(node) {
+    return node.kind === SyntaxKind.JSDocSignature;
+}
+export function isJSDocNameReference(node) {
+    return node.kind === SyntaxKind.JSDocNameReference;
+}
+export function isSourceFile(node) {
+    return node.kind === SyntaxKind.SourceFile;
+}
+export function isModuleDeclaration(node) {
+    return node.kind === SyntaxKind.ModuleDeclaration;
+}
+export function isImportEqualsDeclaration(node) {
+    return node.kind === SyntaxKind.ImportEqualsDeclaration;
+}
+export function isExportDeclaration(node) {
+    return node.kind === SyntaxKind.ExportDeclaration;
+}
+export function isImportTypeNode(node) {
+    return node.kind === SyntaxKind.ImportType;
+}
+export function isImportClause(node) {
+    return node.kind === SyntaxKind.ImportClause;
+}
+export function isImportSpecifier(node) {
+    return node.kind === SyntaxKind.ImportSpecifier;
+}
+export function isJSDocText(node) {
+    return node.kind === SyntaxKind.JSDocText;
+}
+export function isJSDocLink(node) {
+    return node.kind === SyntaxKind.JSDocLink;
+}
+export function isJSDocLinkPlain(node) {
+    return node.kind === SyntaxKind.JSDocLinkPlain;
+}
+export function isJSDocLinkCode(node) {
+    return node.kind === SyntaxKind.JSDocLinkCode;
+}
+export function isTypeParameterDeclaration(node) {
+    return node.kind === SyntaxKind.TypeParameter;
+}
+export function isSyntheticReferenceExpression(node) {
+    return node.kind === SyntaxKind.SyntheticReferenceExpression;
+}
+export function isJSDocTypeLiteral(node) {
+    return node.kind === SyntaxKind.JSDocTypeLiteral;
+}
+export function isForInStatement(node) {
+    return node.kind === SyntaxKind.ForInStatement;
+}
+export function isForOfStatement(node) {
+    return node.kind === SyntaxKind.ForOfStatement;
+}
+export function isCaseClause(node) {
+    return node.kind === SyntaxKind.CaseClause;
+}
+export function isDefaultClause(node) {
+    return node.kind === SyntaxKind.DefaultClause;
+}
+export function isObjectBindingPattern(node) {
+    return node.kind === SyntaxKind.ObjectBindingPattern;
+}
+export function isArrayBindingPattern(node) {
+    return node.kind === SyntaxKind.ArrayBindingPattern;
+}
+export function isJSDocParameterTag(node) {
+    return node.kind === SyntaxKind.JSDocParameterTag;
+}
+export function isJSDocPropertyTag(node) {
+    return node.kind === SyntaxKind.JSDocPropertyTag;
+}
+export function isAccessExpression(node) {
+    return node.kind === SyntaxKind.PropertyAccessExpression || node.kind === SyntaxKind.ElementAccessExpression;
+}
+export function isDeclarationName(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.Identifier || kind === SyntaxKind.PrivateIdentifier || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.ComputedPropertyName || kind === SyntaxKind.ObjectBindingPattern || kind === SyntaxKind.ArrayBindingPattern || kind === SyntaxKind.ElementAccessExpression;
+}
+export function isModuleName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral;
+}
+export function isModuleExportName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral;
+}
+export function isPropertyName(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.Identifier || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.ComputedPropertyName || kind === SyntaxKind.PrivateIdentifier || kind === SyntaxKind.BigIntLiteral;
+}
+export function isModuleBody(node) {
+    return node.kind === SyntaxKind.ModuleBlock || node.kind === SyntaxKind.ModuleDeclaration;
+}
+export function isJSDocFullName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ModuleDeclaration;
+}
+export function isModuleReference(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.ExternalModuleReference;
+}
+export function isNamedImportBindings(node) {
+    return node.kind === SyntaxKind.NamespaceImport || node.kind === SyntaxKind.NamedImports;
+}
+export function isNamedExportBindings(node) {
+    return node.kind === SyntaxKind.NamespaceExport || node.kind === SyntaxKind.NamedExports;
+}
+export function isMemberName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.PrivateIdentifier;
+}
+export function isEntityName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName;
+}
+export function isBindingName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern;
+}
+export function isModifierLike(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.AbstractKeyword || kind === SyntaxKind.AccessorKeyword || kind === SyntaxKind.AsyncKeyword || kind === SyntaxKind.ConstKeyword || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.DefaultKeyword || kind === SyntaxKind.ExportKeyword || kind === SyntaxKind.InKeyword || kind === SyntaxKind.PrivateKeyword || kind === SyntaxKind.ProtectedKeyword || kind === SyntaxKind.PublicKeyword || kind === SyntaxKind.ReadonlyKeyword || kind === SyntaxKind.OutKeyword || kind === SyntaxKind.OverrideKeyword || kind === SyntaxKind.StaticKeyword || kind === SyntaxKind.Decorator;
+}
+export function isJsxChild(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.JsxText || kind === SyntaxKind.JsxExpression || kind === SyntaxKind.JsxElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment;
+}
+export function isJsxAttributeLike(node) {
+    return node.kind === SyntaxKind.JsxAttribute || node.kind === SyntaxKind.JsxSpreadAttribute;
+}
+export function isJsxAttributeName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.JsxNamespacedName;
+}
+export function isJsxAttributeValue(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.JsxExpression || kind === SyntaxKind.JsxElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment;
+}
+export function isClassLikeDeclaration(node) {
+    return node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression;
+}
+export function isAccessorDeclaration(node) {
+    return node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor;
+}
+export function isLiteralLikeNode(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.TemplateHead || kind === SyntaxKind.TemplateMiddle || kind === SyntaxKind.TemplateTail || kind === SyntaxKind.JsxText;
+}
+export function isLiteralExpression(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral;
+}
+export function isUnionOrIntersectionTypeNode(node) {
+    return node.kind === SyntaxKind.UnionType || node.kind === SyntaxKind.IntersectionType;
+}
+export function isTemplateLiteralLikeNode(node) {
+    const kind = node.kind;
+    return isPseudoLiteralKind(kind);
+}
+export function isTemplateMiddleOrTail(node) {
+    return node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail;
+}
+export function isTemplateLiteral(node) {
+    return node.kind === SyntaxKind.TemplateExpression || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
+}
+export function isTypePredicateParameterName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisType;
+}
+export function isImportAttributeName(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral;
+}
+export function isJSDocComment(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.JSDocText || kind === SyntaxKind.JSDocLink || kind === SyntaxKind.JSDocLinkCode || kind === SyntaxKind.JSDocLinkPlain;
+}
+export function isSignatureDeclaration(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.CallSignature || kind === SyntaxKind.ConstructSignature || kind === SyntaxKind.MethodSignature || kind === SyntaxKind.IndexSignature || kind === SyntaxKind.FunctionType || kind === SyntaxKind.ConstructorType || kind === SyntaxKind.FunctionDeclaration || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.Constructor || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction;
+}
+export function isStringLiteralLikeNode(node) {
+    return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
+}
+export function isNumericOrStringLikeLiteral(node) {
+    return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.NumericLiteral;
+}
+export function isObjectLiteralLikeNode(node) {
+    return node.kind === SyntaxKind.ObjectLiteralExpression || node.kind === SyntaxKind.ObjectBindingPattern;
+}
+export function isObjectTypeDeclaration(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.ClassExpression || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeLiteral;
+}
+export function isJsxOpeningLikeElement(node) {
+    return node.kind === SyntaxKind.JsxOpeningElement || node.kind === SyntaxKind.JsxSelfClosingElement;
+}
+export function isNamedImportsOrExports(node) {
+    return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports;
+}
+export function isBreakOrContinueStatement(node) {
+    return node.kind === SyntaxKind.BreakStatement || node.kind === SyntaxKind.ContinueStatement;
+}
+export function isCallLikeExpression(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.CallExpression || kind === SyntaxKind.NewExpression || kind === SyntaxKind.TaggedTemplateExpression || kind === SyntaxKind.Decorator || kind === SyntaxKind.JsxOpeningElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.BinaryExpression;
+}
+export function isFunctionLikeDeclaration(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.FunctionDeclaration || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor || kind === SyntaxKind.Constructor || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction;
+}
+export function isVariableOrParameterDeclaration(node) {
+    return node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.Parameter;
+}
+export function isVariableOrPropertyDeclaration(node) {
+    return node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.PropertyDeclaration;
+}
+export function isCallOrNewExpression(node) {
+    return node.kind === SyntaxKind.CallExpression || node.kind === SyntaxKind.NewExpression;
+}
+export function isImportClauseOrBindingPattern(node) {
+    return node.kind === SyntaxKind.ImportClause || node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern;
+}
+export function isAnyImportSyntax(node) {
+    return node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.JSImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration;
+}
+export function isArrayBindingElement(node) {
+    return node.kind === SyntaxKind.BindingElement || node.kind === SyntaxKind.OmittedExpression;
+}
+export function isAssertionExpression(node) {
+    return node.kind === SyntaxKind.TypeAssertionExpression || node.kind === SyntaxKind.AsExpression;
+}
+export function isBooleanLiteral(node) {
+    return node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword;
+}
+export function isDestructuringAssignment(node) {
+    return node.kind === SyntaxKind.BinaryExpression;
+}
+export function isLiteralToken(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.JsxText || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral;
+}
+export function isModifier(node) {
+    const kind = node.kind;
+    return isModifierKind(kind);
+}
+export function isObjectLiteralElementLike(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.PropertyAssignment || kind === SyntaxKind.ShorthandPropertyAssignment || kind === SyntaxKind.SpreadAssignment || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor;
+}
+export function isPropertyNameLiteral(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral;
+}
+export function isPseudoLiteralToken(node) {
+    const kind = node.kind;
+    return isPseudoLiteralKind(kind);
+}
+export function isTemplateLiteralToken(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.TemplateHead || kind === SyntaxKind.TemplateMiddle || kind === SyntaxKind.TemplateTail;
+}
+export function isArrayDestructuringAssignment(node) {
+    return node.kind === SyntaxKind.BinaryExpression;
+}
+export function isObjectDestructuringAssignment(node) {
+    return node.kind === SyntaxKind.BinaryExpression;
+}
+export function isFunctionBody(node) {
+    return node.kind === SyntaxKind.Block;
+}
+export function isTriviaKind(kind) {
+    return kind === SyntaxKind.SingleLineCommentTrivia
+        || kind === SyntaxKind.MultiLineCommentTrivia
+        || kind === SyntaxKind.NewLineTrivia
+        || kind === SyntaxKind.WhitespaceTrivia
+        || kind === SyntaxKind.ConflictMarkerTrivia;
+}
+export function isPseudoLiteralKind(kind) {
+    return kind === SyntaxKind.TemplateHead
+        || kind === SyntaxKind.TemplateMiddle
+        || kind === SyntaxKind.TemplateTail;
+}
+export function isModifierKind(kind) {
+    return kind === SyntaxKind.AbstractKeyword
+        || kind === SyntaxKind.AccessorKeyword
+        || kind === SyntaxKind.AsyncKeyword
+        || kind === SyntaxKind.ConstKeyword
+        || kind === SyntaxKind.DeclareKeyword
+        || kind === SyntaxKind.DefaultKeyword
+        || kind === SyntaxKind.ExportKeyword
+        || kind === SyntaxKind.InKeyword
+        || kind === SyntaxKind.PrivateKeyword
+        || kind === SyntaxKind.ProtectedKeyword
+        || kind === SyntaxKind.PublicKeyword
+        || kind === SyntaxKind.ReadonlyKeyword
+        || kind === SyntaxKind.OutKeyword
+        || kind === SyntaxKind.OverrideKeyword
+        || kind === SyntaxKind.StaticKeyword;
+}
+export function isKeywordTypeKind(kind) {
+    return kind === SyntaxKind.AnyKeyword
+        || kind === SyntaxKind.BigIntKeyword
+        || kind === SyntaxKind.BooleanKeyword
+        || kind === SyntaxKind.IntrinsicKeyword
+        || kind === SyntaxKind.NeverKeyword
+        || kind === SyntaxKind.NumberKeyword
+        || kind === SyntaxKind.ObjectKeyword
+        || kind === SyntaxKind.StringKeyword
+        || kind === SyntaxKind.SymbolKeyword
+        || kind === SyntaxKind.UndefinedKeyword
+        || kind === SyntaxKind.UnknownKeyword
+        || kind === SyntaxKind.VoidKeyword;
+}
+export function isKeywordExpressionKind(kind) {
+    return kind === SyntaxKind.NullKeyword
+        || kind === SyntaxKind.TrueKeyword
+        || kind === SyntaxKind.FalseKeyword
+        || kind === SyntaxKind.ThisKeyword
+        || kind === SyntaxKind.SuperKeyword
+        || kind === SyntaxKind.ImportKeyword;
+}
+export function isJsxTokenKind(kind) {
+    return kind === SyntaxKind.LessThanSlashToken
+        || kind === SyntaxKind.EndOfFile
+        || kind === SyntaxKind.ConflictMarkerTrivia
+        || kind === SyntaxKind.JsxText
+        || kind === SyntaxKind.JsxTextAllWhiteSpaces
+        || kind === SyntaxKind.OpenBraceToken
+        || kind === SyntaxKind.LessThanToken;
+}
+export function isImportPhaseModifierKind(kind) {
+    return kind === SyntaxKind.TypeKeyword
+        || kind === SyntaxKind.DeferKeyword;
+}
+export function isPostfixUnaryOperator(kind) {
+    return kind === SyntaxKind.PlusPlusToken
+        || kind === SyntaxKind.MinusMinusToken;
+}
+export function isPrefixUnaryOperator(kind) {
+    return kind === SyntaxKind.PlusToken
+        || kind === SyntaxKind.MinusToken
+        || kind === SyntaxKind.TildeToken
+        || kind === SyntaxKind.ExclamationToken
+        || kind === SyntaxKind.PlusPlusToken
+        || kind === SyntaxKind.MinusMinusToken;
+}
+export function isAssignmentOperator(kind) {
+    return kind === SyntaxKind.EqualsToken
+        || isCompoundAssignmentOperator(kind);
+}
+export function isBinaryOperator(kind) {
+    return isAssignmentOperatorOrHigher(kind)
+        || kind === SyntaxKind.CommaToken;
+}
+export function isExponentiationOperator(kind) {
+    return kind === SyntaxKind.AsteriskAsteriskToken;
+}
+export function isMultiplicativeOperator(kind) {
+    return kind === SyntaxKind.AsteriskToken
+        || kind === SyntaxKind.SlashToken
+        || kind === SyntaxKind.PercentToken;
+}
+export function isMultiplicativeOperatorOrHigher(kind) {
+    return isExponentiationOperator(kind)
+        || isMultiplicativeOperator(kind);
+}
+export function isAdditiveOperator(kind) {
+    return kind === SyntaxKind.PlusToken
+        || kind === SyntaxKind.MinusToken;
+}
+export function isAdditiveOperatorOrHigher(kind) {
+    return isMultiplicativeOperatorOrHigher(kind)
+        || isAdditiveOperator(kind);
+}
+export function isShiftOperator(kind) {
+    return kind === SyntaxKind.LessThanLessThanToken
+        || kind === SyntaxKind.GreaterThanGreaterThanToken
+        || kind === SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
+}
+export function isShiftOperatorOrHigher(kind) {
+    return isAdditiveOperatorOrHigher(kind)
+        || isShiftOperator(kind);
+}
+export function isRelationalOperator(kind) {
+    return kind === SyntaxKind.LessThanToken
+        || kind === SyntaxKind.LessThanEqualsToken
+        || kind === SyntaxKind.GreaterThanToken
+        || kind === SyntaxKind.GreaterThanEqualsToken
+        || kind === SyntaxKind.InstanceOfKeyword
+        || kind === SyntaxKind.InKeyword;
+}
+export function isRelationalOperatorOrHigher(kind) {
+    return isShiftOperatorOrHigher(kind)
+        || isRelationalOperator(kind);
+}
+export function isEqualityOperator(kind) {
+    return kind === SyntaxKind.EqualsEqualsToken
+        || kind === SyntaxKind.EqualsEqualsEqualsToken
+        || kind === SyntaxKind.ExclamationEqualsEqualsToken
+        || kind === SyntaxKind.ExclamationEqualsToken;
+}
+export function isEqualityOperatorOrHigher(kind) {
+    return isRelationalOperatorOrHigher(kind)
+        || isEqualityOperator(kind);
+}
+export function isBitwiseOperator(kind) {
+    return kind === SyntaxKind.AmpersandToken
+        || kind === SyntaxKind.BarToken
+        || kind === SyntaxKind.CaretToken;
+}
+export function isBitwiseOperatorOrHigher(kind) {
+    return isEqualityOperatorOrHigher(kind)
+        || isBitwiseOperator(kind);
+}
+export function isLogicalOperator(kind) {
+    return kind === SyntaxKind.AmpersandAmpersandToken
+        || kind === SyntaxKind.BarBarToken;
+}
+export function isLogicalOperatorOrHigher(kind) {
+    return isBitwiseOperatorOrHigher(kind)
+        || isLogicalOperator(kind);
+}
+export function isCompoundAssignmentOperator(kind) {
+    return kind === SyntaxKind.PlusEqualsToken
+        || kind === SyntaxKind.MinusEqualsToken
+        || kind === SyntaxKind.AsteriskAsteriskEqualsToken
+        || kind === SyntaxKind.AsteriskEqualsToken
+        || kind === SyntaxKind.SlashEqualsToken
+        || kind === SyntaxKind.PercentEqualsToken
+        || kind === SyntaxKind.AmpersandEqualsToken
+        || kind === SyntaxKind.BarEqualsToken
+        || kind === SyntaxKind.CaretEqualsToken
+        || kind === SyntaxKind.LessThanLessThanEqualsToken
+        || kind === SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken
+        || kind === SyntaxKind.GreaterThanGreaterThanEqualsToken
+        || kind === SyntaxKind.BarBarEqualsToken
+        || kind === SyntaxKind.AmpersandAmpersandEqualsToken
+        || kind === SyntaxKind.QuestionQuestionEqualsToken;
+}
+export function isAssignmentOperatorOrHigher(kind) {
+    return kind === SyntaxKind.QuestionQuestionToken
+        || isLogicalOperatorOrHigher(kind)
+        || isAssignmentOperator(kind);
+}
+export function isLogicalOrCoalescingAssignmentOperator(kind) {
+    return kind === SyntaxKind.AmpersandAmpersandEqualsToken
+        || kind === SyntaxKind.BarBarEqualsToken
+        || kind === SyntaxKind.QuestionQuestionEqualsToken;
+}
+export function isLiteralKind(kind) {
+    return kind >= SyntaxKind.FirstLiteralToken && kind <= SyntaxKind.LastLiteralToken;
+}
+export function isPunctuationKind(kind) {
+    return kind >= SyntaxKind.FirstPunctuation && kind <= SyntaxKind.LastPunctuation;
+}
+export function isKeywordKind(kind) {
+    return kind >= SyntaxKind.FirstKeyword && kind <= SyntaxKind.LastKeyword;
+}
+export function isTokenKind(kind) {
+    return kind >= SyntaxKind.FirstToken && kind <= SyntaxKind.LastToken;
+}
+export function isJSDocNodeKind(kind) {
+    return kind >= SyntaxKind.FirstJSDocNode && kind <= SyntaxKind.LastJSDocNode;
+}
+export function isEndOfFile(node) {
+    return node.kind === SyntaxKind.EndOfFile;
+}
+export function isDotToken(node) {
+    return node.kind === SyntaxKind.DotToken;
+}
+export function isDotDotDotToken(node) {
+    return node.kind === SyntaxKind.DotDotDotToken;
+}
+export function isQuestionToken(node) {
+    return node.kind === SyntaxKind.QuestionToken;
+}
+export function isExclamationToken(node) {
+    return node.kind === SyntaxKind.ExclamationToken;
+}
+export function isColonToken(node) {
+    return node.kind === SyntaxKind.ColonToken;
+}
+export function isEqualsToken(node) {
+    return node.kind === SyntaxKind.EqualsToken;
+}
+export function isAsteriskToken(node) {
+    return node.kind === SyntaxKind.AsteriskToken;
+}
+export function isEqualsGreaterThanToken(node) {
+    return node.kind === SyntaxKind.EqualsGreaterThanToken;
+}
+export function isPlusToken(node) {
+    return node.kind === SyntaxKind.PlusToken;
+}
+export function isMinusToken(node) {
+    return node.kind === SyntaxKind.MinusToken;
+}
+export function isQuestionDotToken(node) {
+    return node.kind === SyntaxKind.QuestionDotToken;
+}
+export function isAssertsKeyword(node) {
+    return node.kind === SyntaxKind.AssertsKeyword;
+}
+export function isAssertKeyword(node) {
+    return node.kind === SyntaxKind.AssertKeyword;
+}
+export function isAwaitKeyword(node) {
+    return node.kind === SyntaxKind.AwaitKeyword;
+}
+export function isCaseKeyword(node) {
+    return node.kind === SyntaxKind.CaseKeyword;
+}
+export function isAbstractKeyword(node) {
+    return node.kind === SyntaxKind.AbstractKeyword;
+}
+export function isAccessorKeyword(node) {
+    return node.kind === SyntaxKind.AccessorKeyword;
+}
+export function isAsyncKeyword(node) {
+    return node.kind === SyntaxKind.AsyncKeyword;
+}
+export function isConstKeyword(node) {
+    return node.kind === SyntaxKind.ConstKeyword;
+}
+export function isDeclareKeyword(node) {
+    return node.kind === SyntaxKind.DeclareKeyword;
+}
+export function isDefaultKeyword(node) {
+    return node.kind === SyntaxKind.DefaultKeyword;
+}
+export function isExportKeyword(node) {
+    return node.kind === SyntaxKind.ExportKeyword;
+}
+export function isInKeyword(node) {
+    return node.kind === SyntaxKind.InKeyword;
+}
+export function isPrivateKeyword(node) {
+    return node.kind === SyntaxKind.PrivateKeyword;
+}
+export function isProtectedKeyword(node) {
+    return node.kind === SyntaxKind.ProtectedKeyword;
+}
+export function isPublicKeyword(node) {
+    return node.kind === SyntaxKind.PublicKeyword;
+}
+export function isReadonlyKeyword(node) {
+    return node.kind === SyntaxKind.ReadonlyKeyword;
+}
+export function isOutKeyword(node) {
+    return node.kind === SyntaxKind.OutKeyword;
+}
+export function isOverrideKeyword(node) {
+    return node.kind === SyntaxKind.OverrideKeyword;
+}
+export function isStaticKeyword(node) {
+    return node.kind === SyntaxKind.StaticKeyword;
+}
+export function isBinaryOperatorToken(node) {
+    return isBinaryOperator(node.kind);
+}
+export function isAssignmentOperatorToken(node) {
+    return isAssignmentOperator(node.kind);
+}
+export function isNullLiteral(node) {
+    return node.kind === SyntaxKind.NullKeyword;
+}
+export function isTrueLiteral(node) {
+    return node.kind === SyntaxKind.TrueKeyword;
+}
+export function isFalseLiteral(node) {
+    return node.kind === SyntaxKind.FalseKeyword;
+}
+export function isThisExpression(node) {
+    return node.kind === SyntaxKind.ThisKeyword;
+}
+export function isSuperExpression(node) {
+    return node.kind === SyntaxKind.SuperKeyword;
+}
+export function isImportExpression(node) {
+    return node.kind === SyntaxKind.ImportKeyword;
+}
+//# sourceMappingURL=is.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.generated.js.map b/node_modules/typescript/dist/ast/is.generated.js.map
new file mode 100644
index 000000000..ad137f80f
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"is.generated.js","sourceRoot":"","sources":["../../src/ast/is.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAsU/C,MAAM,UAAU,OAAO,CAAC,IAAU;IAC9B,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAU;IACnC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAU;IAC1C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAU;IACtC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC7C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,oBAAoB,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAU;IAClC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACvC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,cA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U,CAAC,YAAY,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACvC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAU;IACzC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,CAAC;AAClD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.js b/node_modules/typescript/dist/ast/is.js
new file mode 100644
index 000000000..10fd05c61
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.js
@@ -0,0 +1,233 @@
+// is.ts — Hand-written type guard functions
+// Generated guards are in is.generated.ts
+import { NodeFlags } from "#enums/nodeFlags";
+import { OuterExpressionKinds } from "#enums/outerExpressionKinds";
+import { ScriptKind } from "#enums/scriptKind";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { isLiteralExpression } from "./is.generated.js";
+export * from "./is.generated.js";
+export function isTypeNode(node) {
+    return isTypeNodeKind(node.kind);
+}
+function isTypeNodeKind(kind) {
+    return kind >= SyntaxKind.FirstTypeNode && kind <= SyntaxKind.LastTypeNode
+        || kind === SyntaxKind.AnyKeyword
+        || kind === SyntaxKind.UnknownKeyword
+        || kind === SyntaxKind.NumberKeyword
+        || kind === SyntaxKind.BigIntKeyword
+        || kind === SyntaxKind.ObjectKeyword
+        || kind === SyntaxKind.BooleanKeyword
+        || kind === SyntaxKind.StringKeyword
+        || kind === SyntaxKind.SymbolKeyword
+        || kind === SyntaxKind.VoidKeyword
+        || kind === SyntaxKind.UndefinedKeyword
+        || kind === SyntaxKind.NeverKeyword
+        || kind === SyntaxKind.IntrinsicKeyword
+        || kind === SyntaxKind.ExpressionWithTypeArguments
+        || kind === SyntaxKind.JSDocAllType
+        || kind === SyntaxKind.JSDocNullableType
+        || kind === SyntaxKind.JSDocNonNullableType
+        || kind === SyntaxKind.JSDocOptionalType
+        || kind === SyntaxKind.JSDocVariadicType
+        || kind === SyntaxKind.JSDocTypeExpression
+        || kind === SyntaxKind.JSDocTypeLiteral
+        || kind === SyntaxKind.JSDocSignature;
+}
+export function isStatement(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.VariableStatement || kind === SyntaxKind.EmptyStatement
+        || kind === SyntaxKind.ExpressionStatement || kind === SyntaxKind.IfStatement
+        || kind === SyntaxKind.DoStatement || kind === SyntaxKind.WhileStatement
+        || kind === SyntaxKind.ForStatement || kind === SyntaxKind.ForInStatement
+        || kind === SyntaxKind.ForOfStatement || kind === SyntaxKind.ContinueStatement
+        || kind === SyntaxKind.BreakStatement || kind === SyntaxKind.ReturnStatement
+        || kind === SyntaxKind.WithStatement || kind === SyntaxKind.SwitchStatement
+        || kind === SyntaxKind.LabeledStatement || kind === SyntaxKind.ThrowStatement
+        || kind === SyntaxKind.TryStatement || kind === SyntaxKind.DebuggerStatement
+        || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeAliasDeclaration
+        || kind === SyntaxKind.EnumDeclaration || kind === SyntaxKind.ModuleDeclaration
+        || kind === SyntaxKind.ImportDeclaration || kind === SyntaxKind.ImportEqualsDeclaration
+        || kind === SyntaxKind.ExportDeclaration || kind === SyntaxKind.ExportAssignment
+        || kind === SyntaxKind.NamespaceExportDeclaration || kind === SyntaxKind.FunctionDeclaration
+        || kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.MissingDeclaration
+        || kind === SyntaxKind.NotEmittedStatement || kind === SyntaxKind.Block;
+}
+export function isExpression(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.ConditionalExpression || kind === SyntaxKind.YieldExpression
+        || kind === SyntaxKind.ArrowFunction || kind === SyntaxKind.BinaryExpression
+        || kind === SyntaxKind.SpreadElement || kind === SyntaxKind.AsExpression
+        || kind === SyntaxKind.OmittedExpression
+        || kind === SyntaxKind.SatisfiesExpression
+        || kind === SyntaxKind.PrefixUnaryExpression || kind === SyntaxKind.PostfixUnaryExpression
+        || kind === SyntaxKind.DeleteExpression || kind === SyntaxKind.TypeOfExpression
+        || kind === SyntaxKind.VoidExpression || kind === SyntaxKind.AwaitExpression
+        || kind === SyntaxKind.TypeAssertionExpression
+        || kind === SyntaxKind.CallExpression || kind === SyntaxKind.NewExpression
+        || kind === SyntaxKind.TaggedTemplateExpression || kind === SyntaxKind.NonNullExpression
+        || kind === SyntaxKind.MetaProperty || kind === SyntaxKind.JsxExpression
+        || kind === SyntaxKind.PropertyAccessExpression || kind === SyntaxKind.ElementAccessExpression
+        || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ClassExpression
+        || kind === SyntaxKind.ParenthesizedExpression || kind === SyntaxKind.ArrayLiteralExpression
+        || kind === SyntaxKind.ObjectLiteralExpression || kind === SyntaxKind.TemplateExpression
+        || kind === SyntaxKind.Identifier
+        || kind === SyntaxKind.PrivateIdentifier
+        || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral
+        || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.RegularExpressionLiteral
+        || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.JsxElement
+        || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment
+        || kind === SyntaxKind.NullKeyword || kind === SyntaxKind.TrueKeyword
+        || kind === SyntaxKind.FalseKeyword || kind === SyntaxKind.ThisKeyword
+        || kind === SyntaxKind.SuperKeyword || kind === SyntaxKind.ImportKeyword
+        || kind === SyntaxKind.ExpressionWithTypeArguments;
+}
+export function isBlockOrExpression(node) {
+    return node.kind === SyntaxKind.Block || isExpression(node);
+}
+export function isLeftHandSideExpression(node) {
+    return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind);
+}
+export function skipPartiallyEmittedExpressions(node) {
+    return skipOuterExpressions(node, OuterExpressionKinds.PartiallyEmittedExpressions);
+}
+function isLeftHandSideExpressionKind(kind) {
+    switch (kind) {
+        case SyntaxKind.PropertyAccessExpression:
+        case SyntaxKind.ElementAccessExpression:
+        case SyntaxKind.NewExpression:
+        case SyntaxKind.CallExpression:
+        case SyntaxKind.JsxElement:
+        case SyntaxKind.JsxSelfClosingElement:
+        case SyntaxKind.JsxFragment:
+        case SyntaxKind.TaggedTemplateExpression:
+        case SyntaxKind.ArrayLiteralExpression:
+        case SyntaxKind.ParenthesizedExpression:
+        case SyntaxKind.ObjectLiteralExpression:
+        case SyntaxKind.ClassExpression:
+        case SyntaxKind.FunctionExpression:
+        case SyntaxKind.Identifier:
+        case SyntaxKind.PrivateIdentifier: // technically this is only an Expression if it's in a `#field in expr` BinaryExpression
+        case SyntaxKind.RegularExpressionLiteral:
+        case SyntaxKind.NumericLiteral:
+        case SyntaxKind.BigIntLiteral:
+        case SyntaxKind.StringLiteral:
+        case SyntaxKind.NoSubstitutionTemplateLiteral:
+        case SyntaxKind.TemplateExpression:
+        case SyntaxKind.FalseKeyword:
+        case SyntaxKind.NullKeyword:
+        case SyntaxKind.ThisKeyword:
+        case SyntaxKind.TrueKeyword:
+        case SyntaxKind.SuperKeyword:
+        case SyntaxKind.NonNullExpression:
+        case SyntaxKind.ExpressionWithTypeArguments:
+        case SyntaxKind.MetaProperty:
+        case SyntaxKind.ImportKeyword: // technically this is only an Expression if it's in a CallExpression
+        case SyntaxKind.MissingDeclaration:
+            return true;
+        default:
+            return false;
+    }
+}
+export function isUnaryExpression(node) {
+    return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node).kind);
+}
+function isUnaryExpressionKind(kind) {
+    switch (kind) {
+        case SyntaxKind.PrefixUnaryExpression:
+        case SyntaxKind.PostfixUnaryExpression:
+        case SyntaxKind.DeleteExpression:
+        case SyntaxKind.TypeOfExpression:
+        case SyntaxKind.VoidExpression:
+        case SyntaxKind.AwaitExpression:
+        case SyntaxKind.TypeAssertionExpression:
+            return true;
+        default:
+            return isLeftHandSideExpressionKind(kind);
+    }
+}
+/** @internal */
+export function isOuterExpression(node, kinds = OuterExpressionKinds.All) {
+    switch (node.kind) {
+        case SyntaxKind.ParenthesizedExpression:
+            if (kinds & OuterExpressionKinds.ExcludeJSDocTypeAssertion && isJSDocTypeAssertion(node)) {
+                return false;
+            }
+            return (kinds & OuterExpressionKinds.Parentheses) !== 0;
+        case SyntaxKind.TypeAssertionExpression:
+        case SyntaxKind.AsExpression:
+            return (kinds & OuterExpressionKinds.TypeAssertions) !== 0;
+        case SyntaxKind.SatisfiesExpression:
+            return (kinds & (OuterExpressionKinds.ExpressionsWithTypeArguments | OuterExpressionKinds.Satisfies)) !== 0;
+        case SyntaxKind.ExpressionWithTypeArguments:
+            return (kinds & OuterExpressionKinds.ExpressionsWithTypeArguments) !== 0;
+        case SyntaxKind.NonNullExpression:
+            return (kinds & OuterExpressionKinds.NonNullAssertions) !== 0;
+        case SyntaxKind.PartiallyEmittedExpression:
+            return (kinds & OuterExpressionKinds.PartiallyEmittedExpressions) !== 0;
+    }
+    return false;
+}
+/** @internal */
+export function skipOuterExpressions(node, kinds = OuterExpressionKinds.All) {
+    while (isOuterExpression(node, kinds)) {
+        node = node.expression;
+    }
+    return node;
+}
+function isJSDocTypeAssertion(node) {
+    const sourceFile = node.getSourceFile();
+    if (sourceFile.scriptKind !== ScriptKind.JS && sourceFile.scriptKind !== ScriptKind.JSX) {
+        return false;
+    }
+    const expression = node.expression;
+    if (expression.kind !== SyntaxKind.AsExpression) {
+        return false;
+    }
+    const asExpression = expression;
+    return !!asExpression.type
+        && (asExpression.type.flags & NodeFlags.Reparsed) !== 0;
+}
+export function isBindingPattern(node) {
+    return node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern;
+}
+export function isConciseBody(node) {
+    return node.kind === SyntaxKind.Block || isExpression(node);
+}
+export function isForInitializer(node) {
+    return node.kind === SyntaxKind.VariableDeclarationList || isExpression(node);
+}
+export function isQuestionOrExclamationToken(node) {
+    return node.kind === SyntaxKind.QuestionToken || node.kind === SyntaxKind.ExclamationToken;
+}
+export function isIdentifierOrThisTypeNode(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisType;
+}
+export function isReadonlyKeywordOrPlusOrMinusToken(node) {
+    return node.kind === SyntaxKind.ReadonlyKeyword || node.kind === SyntaxKind.PlusToken || node.kind === SyntaxKind.MinusToken;
+}
+export function isQuestionOrPlusOrMinusToken(node) {
+    return node.kind === SyntaxKind.QuestionToken || node.kind === SyntaxKind.PlusToken || node.kind === SyntaxKind.MinusToken;
+}
+export function isTemplateMiddleOrTemplateTail(node) {
+    return node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail;
+}
+export function isLiteralTypeLiteral(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.NullKeyword || kind === SyntaxKind.TrueKeyword
+        || kind === SyntaxKind.FalseKeyword || kind === SyntaxKind.PrefixUnaryExpression
+        || isLiteralExpression(node);
+}
+export function isIdentifierOrJSDocNamespaceDeclaration(node) {
+    return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ModuleDeclaration;
+}
+export function isJSDocTypeExpressionOrJSDocTypeLiteral(node) {
+    return node.kind === SyntaxKind.JSDocTypeExpression || node.kind === SyntaxKind.JSDocTypeLiteral;
+}
+export function isJsxTagNameExpression(node) {
+    const kind = node.kind;
+    return kind === SyntaxKind.ThisKeyword
+        || kind === SyntaxKind.Identifier
+        || kind === SyntaxKind.PropertyAccessExpression
+        || kind === SyntaxKind.JsxNamespacedName;
+}
+//# sourceMappingURL=is.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/is.js.map b/node_modules/typescript/dist/ast/is.js.map
new file mode 100644
index 000000000..d72de8bae
--- /dev/null
+++ b/node_modules/typescript/dist/ast/is.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"is.js","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,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AAI,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAU;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACvB,OAAO,IAAI,KAAK,UAAU,CAAC,WAAW,IAAI,IAAI,KAAK,UAAU,CAAC,WAAW;WAClE,IAAI,KAAK,UAAU,CAAC,YAAY,IAAI,IAAI,KAAK,UAAU,CAAC,qBAAqB;WAC7E,mBAAmB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,IAAU;IAC9D,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AAC7F,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,IAAU;IAC9D,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,gBAAgB,CAAC;AACrG,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACvB,OAAO,IAAI,KAAK,UAAU,CAAC,WAAW;WAC/B,IAAI,KAAK,UAAU,CAAC,UAAU;WAC9B,IAAI,KAAK,UAAU,CAAC,wBAAwB;WAC5C,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AACjD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/jsdoc.d.ts b/node_modules/typescript/dist/ast/jsdoc.d.ts
new file mode 100644
index 000000000..81247a438
--- /dev/null
+++ b/node_modules/typescript/dist/ast/jsdoc.d.ts
@@ -0,0 +1,11 @@
+import type { JSDocComment, JSDocTag } from "./ast.generated.ts";
+import { type Node, type NodeArray, SyntaxKind } from "./ast.ts";
+/** Get all JSDoc tags related to a node, including those on parent nodes. */
+export declare function getJSDocTags(node: Node): readonly JSDocTag[];
+/** Gets all JSDoc tags that match a specified predicate */
+export declare function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[];
+/** Gets all JSDoc tags of a specified kind */
+export declare function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
+/** Gets the text of a jsdoc comment, flattening links to their text. */
+export declare function getTextOfJSDocComment(comment?: string | NodeArray): string | undefined;
+//# sourceMappingURL=jsdoc.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/jsdoc.d.ts.map b/node_modules/typescript/dist/ast/jsdoc.d.ts.map
new file mode 100644
index 000000000..378820dac
--- /dev/null
+++ b/node_modules/typescript/dist/ast/jsdoc.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../src/ast/jsdoc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAER,YAAY,EAKZ,QAAQ,EAOX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEH,KAAK,IAAI,EACT,KAAK,SAAS,EACd,UAAU,EACb,MAAM,UAAU,CAAC;AAalB,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,QAAQ,EAAE,CAE5D;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAEpH;AAED,8CAA8C;AAC9C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,QAAQ,EAAE,CAEvF;AAED,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,MAAM,GAAG,SAAS,CAGpG"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/jsdoc.js b/node_modules/typescript/dist/ast/jsdoc.js
new file mode 100644
index 000000000..ae6b7a657
--- /dev/null
+++ b/node_modules/typescript/dist/ast/jsdoc.js
@@ -0,0 +1,202 @@
+import { assertNever } from "../internal/utils.js";
+import { SyntaxKind, } from "./ast.js";
+import { isIdentifier, isJSDoc, isJSDocOverloadTag, isJSDocParameterTag, isJSDocSatisfiesTag, isJSDocTemplateTag, isJSDocTypeTag, isParenthesizedExpression, isPrivateIdentifier, } from "./is.generated.js";
+/** Get all JSDoc tags related to a node, including those on parent nodes. */
+export function getJSDocTags(node) {
+    return getJSDocCommentsAndTags(node);
+}
+/** Gets all JSDoc tags that match a specified predicate */
+export function getAllJSDocTags(node, predicate) {
+    return getJSDocTags(node).filter(predicate);
+}
+/** Gets all JSDoc tags of a specified kind */
+export function getAllJSDocTagsOfKind(node, kind) {
+    return getJSDocTags(node).filter(doc => doc.kind === kind);
+}
+/** Gets the text of a jsdoc comment, flattening links to their text. */
+export function getTextOfJSDocComment(comment) {
+    return typeof comment === "string" ? comment
+        : comment?.map(c => c.kind === SyntaxKind.JSDocText ? c.text : formatJSDocLink(c)).join("");
+}
+function isVariableLike(node) {
+    switch (node.kind) {
+        case SyntaxKind.BindingElement:
+        case SyntaxKind.EnumMember:
+        case SyntaxKind.Parameter:
+        case SyntaxKind.PropertyAssignment:
+        case SyntaxKind.PropertyDeclaration:
+        case SyntaxKind.PropertySignature:
+        case SyntaxKind.ShorthandPropertyAssignment:
+        case SyntaxKind.VariableDeclaration:
+            return true;
+    }
+    return false;
+}
+function getJSDocNodes(node) {
+    const jsDoc = node.jsDoc;
+    if (!jsDoc || jsDoc.length === 0) {
+        return [];
+    }
+    const result = [];
+    for (const j of jsDoc) {
+        if (isJSDoc(j)) {
+            result.push(j);
+        }
+    }
+    return result;
+}
+/**
+ * Determines whether a host node owns a JSDoc tag. A `@type` / `@satisfies` tag
+ * attached to a parenthesized expression belongs only to that expression.
+ */
+function ownsJSDocTag(hostNode, tag) {
+    return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag))
+        || !tag.parent
+        || !isJSDoc(tag.parent)
+        || !tag.parent.parent
+        || !isParenthesizedExpression(tag.parent.parent)
+        || tag.parent.parent === hostNode;
+}
+function filterOwnedJSDocTags(hostNode, comments) {
+    const result = [];
+    const lastJSDoc = comments[comments.length - 1];
+    for (const jsDoc of comments) {
+        if (!jsDoc.tags) {
+            continue;
+        }
+        if (jsDoc === lastJSDoc) {
+            for (const tag of jsDoc.tags) {
+                if (ownsJSDocTag(hostNode, tag)) {
+                    result.push(tag);
+                }
+            }
+        }
+        else {
+            // Tags from earlier comments only contribute their `@overload` tags.
+            for (const tag of jsDoc.tags) {
+                if (isJSDocOverloadTag(tag)) {
+                    result.push(tag);
+                }
+            }
+        }
+    }
+    return result;
+}
+function getJSDocParameterTags(param) {
+    const result = [];
+    const name = param.name;
+    const parentTags = getJSDocTags(param.parent);
+    if (name && isIdentifier(name)) {
+        for (const tag of parentTags) {
+            if (isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.text === name.text) {
+                result.push(tag);
+            }
+        }
+    }
+    else if (name) {
+        // Binding patterns and JSDoc function syntax match parameter tags by position.
+        const parameters = param.parent.parameters;
+        const i = parameters ? [...parameters].indexOf(param) : -1;
+        if (i > -1) {
+            const paramTags = parentTags.filter(isJSDocParameterTag);
+            if (i < paramTags.length) {
+                result.push(paramTags[i]);
+            }
+        }
+    }
+    return result;
+}
+function getJSDocTypeParameterTags(typeParam) {
+    const result = [];
+    const name = typeParam.name.text;
+    for (const tag of getJSDocTags(typeParam.parent)) {
+        if (isJSDocTemplateTag(tag) && [...tag.typeParameters].some(tp => tp.name.text === name)) {
+            result.push(tag);
+        }
+    }
+    return result;
+}
+// Keep in sync with ast.GetNextJSDocCommentLocation.
+function getNextJSDocCommentLocation(node) {
+    const parent = node.parent;
+    if (parent) {
+        switch (parent.kind) {
+            case SyntaxKind.PropertyAssignment:
+            case SyntaxKind.ExportAssignment:
+            case SyntaxKind.PropertyDeclaration:
+            case SyntaxKind.VariableDeclaration:
+            case SyntaxKind.SatisfiesExpression:
+            case SyntaxKind.ReturnStatement:
+            case SyntaxKind.VariableStatement:
+            case SyntaxKind.ExpressionStatement:
+                return parent;
+            case SyntaxKind.VariableDeclarationList:
+                if (parent.declarations[0] === node) {
+                    return parent;
+                }
+                break;
+        }
+    }
+    return undefined;
+}
+function getJSDocCommentsAndTags(hostNode) {
+    const result = [];
+    // Pull parameter comments from a declaring initializer (e.g. `var x = function () {}`).
+    if (isVariableLike(hostNode)) {
+        const initializer = hostNode.initializer;
+        if (initializer) {
+            const initJSDoc = getJSDocNodes(initializer);
+            if (initJSDoc.length) {
+                result.push(...filterOwnedJSDocTags(hostNode, initJSDoc));
+            }
+        }
+    }
+    let node = hostNode;
+    while (node && node.parent) {
+        const jsDocNodes = getJSDocNodes(node);
+        if (jsDocNodes.length) {
+            result.push(...filterOwnedJSDocTags(hostNode, jsDocNodes));
+        }
+        if (node.kind === SyntaxKind.Parameter) {
+            result.push(...getJSDocParameterTags(node));
+            break;
+        }
+        if (node.kind === SyntaxKind.TypeParameter) {
+            result.push(...getJSDocTypeParameterTags(node));
+            break;
+        }
+        node = getNextJSDocCommentLocation(node);
+    }
+    return result;
+}
+function formatJSDocLink(link) {
+    const kind = link.kind === SyntaxKind.JSDocLink ? "link"
+        : link.kind === SyntaxKind.JSDocLinkCode ? "linkcode"
+            : "linkplain";
+    const name = link.name ? entityNameToString(link.name) : "";
+    const space = link.name && (link.text === "" || link.text.startsWith("://")) ? "" : " ";
+    return `{@${kind} ${name}${space}${link.text}}`;
+}
+function entityNameToString(name) {
+    switch (name.kind) {
+        case SyntaxKind.ThisKeyword:
+            return "this";
+        case SyntaxKind.PrivateIdentifier:
+        case SyntaxKind.Identifier:
+            return name.getFullWidth() === 0 ? name.text : name.getText();
+        case SyntaxKind.QualifiedName:
+            return entityNameToString(name.left) + "." + entityNameToString(name.right);
+        case SyntaxKind.PropertyAccessExpression:
+            if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) {
+                return entityNameToString(name.expression) + "." + entityNameToString(name.name);
+            }
+            else {
+                return assertNever(name.name);
+            }
+        case SyntaxKind.JsxNamespacedName:
+            return entityNameToString(name.namespace) + ":" + entityNameToString(name.name);
+        default:
+            return assertNever(name);
+    }
+}
+//# sourceMappingURL=jsdoc.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/jsdoc.js.map b/node_modules/typescript/dist/ast/jsdoc.js.map
new file mode 100644
index 000000000..87f71d731
--- /dev/null
+++ b/node_modules/typescript/dist/ast/jsdoc.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsdoc.js","sourceRoot":"","sources":["../../src/ast/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAgBnD,OAAO,EAIH,UAAU,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,mBAAmB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,MAAM,UAAU,YAAY,CAAC,IAAU;IACnC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,eAAe,CAAqB,IAAU,EAAE,SAAsC;IAClG,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAChD,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,qBAAqB,CAAC,IAAU,EAAE,IAAgB;IAC9D,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED,wEAAwE;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AC,SAAS,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpF;YACI,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;AACL,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/scanner.d.ts b/node_modules/typescript/dist/ast/scanner.d.ts
new file mode 100644
index 000000000..49d87ce81
--- /dev/null
+++ b/node_modules/typescript/dist/ast/scanner.d.ts
@@ -0,0 +1,97 @@
+import { CommentDirectiveType } from "#enums/commentDirectiveType";
+import { LanguageVariant } from "#enums/languageVariant";
+import { RegularExpressionFlags } from "#enums/regularExpressionFlags";
+import { ScriptTarget } from "#enums/scriptTarget";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { TokenFlags } from "#enums/tokenFlags";
+import type { JsxTokenSyntaxKind, KeywordSyntaxKind } from "./ast.ts";
+export type JSDocTokenKind = SyntaxKind.EndOfFile | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind;
+export interface CommentDirective {
+    range: {
+        pos: number;
+        end: number;
+    };
+    type: CommentDirectiveType;
+}
+export declare function tokenIsIdentifierOrKeyword(token: SyntaxKind): boolean;
+export declare function tokenIsIdentifierOrKeywordOrGreaterThan(token: SyntaxKind): boolean;
+export interface Scanner {
+    getTokenFullStart(): number;
+    getToken(): SyntaxKind;
+    getTokenStart(): number;
+    getTokenEnd(): number;
+    getTokenText(): string;
+    getTokenValue(): string;
+    hasUnicodeEscape(): boolean;
+    hasExtendedUnicodeEscape(): boolean;
+    hasPrecedingLineBreak(): boolean;
+    hasPrecedingJSDocComment(): boolean;
+    hasPrecedingJSDocLeadingAsterisks(): boolean;
+    hasPrecedingJSDocWithDeprecatedTag(): boolean;
+    hasPrecedingJSDocWithSeeOrLink(): boolean;
+    isIdentifier(): boolean;
+    isReservedWord(): boolean;
+    isUnterminated(): boolean;
+    getNumericLiteralFlags(): TokenFlags;
+    getCommentDirectives(): CommentDirective[] | undefined;
+    getTokenFlags(): TokenFlags;
+    reScanGreaterToken(): SyntaxKind;
+    reScanSlashToken(): SyntaxKind;
+    reScanAsteriskEqualsToken(): SyntaxKind;
+    reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind;
+    reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind;
+    scanJsxIdentifier(): SyntaxKind;
+    scanJsxAttributeValue(): SyntaxKind;
+    reScanJsxAttributeValue(): SyntaxKind;
+    reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind;
+    reScanLessThanToken(): SyntaxKind;
+    reScanHashToken(): SyntaxKind;
+    reScanQuestionToken(): SyntaxKind;
+    reScanInvalidIdentifier(): SyntaxKind;
+    scanJsxToken(): JsxTokenSyntaxKind;
+    scanJsDocToken(): JSDocTokenKind;
+    scanJSDocCommentTextToken(inBackticks: boolean): JSDocTokenKind | SyntaxKind.JSDocCommentTextToken;
+    scan(): SyntaxKind;
+    getText(): string;
+    clearCommentDirectives(): void;
+    setText(text: string | undefined, start?: number, length?: number): void;
+    setLanguageVariant(variant: LanguageVariant): void;
+    resetTokenState(pos: number): void;
+    setSkipJsDocLeadingAsterisks(skip: boolean): void;
+    lookAhead(callback: () => T): T;
+    scanRange(start: number, length: number, callback: () => T): T;
+    tryScan(callback: () => T): T;
+}
+export declare const textToKeywordObj: Record;
+export declare function isUnicodeIdentifierStart(code: number): boolean;
+export declare function tokenToString(t: SyntaxKind): string | undefined;
+export declare function stringToToken(s: string): SyntaxKind | undefined;
+export declare function characterCodeToRegularExpressionFlag(ch: number): RegularExpressionFlags | undefined;
+export declare function computeLineStarts(text: string): number[];
+export declare function isWhiteSpaceLike(ch: number): boolean;
+export declare function isWhiteSpaceSingleLine(ch: number): boolean;
+export declare function isLineBreak(ch: number): boolean;
+export declare function couldStartTrivia(text: string, pos: number): boolean;
+export declare function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean, stopAtComments?: boolean, inJSDoc?: boolean): number;
+export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
+export interface CommentRange {
+    pos: number;
+    end: number;
+    hasTrailingNewLine?: boolean;
+    kind: CommentKind;
+}
+export declare function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
+export declare function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
+export declare function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
+export declare function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
+export declare function reduceEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined;
+export declare function reduceEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined;
+export declare function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+export declare function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+export declare function getShebang(text: string): string | undefined;
+export declare function isIdentifierStart(ch: number, _languageVersion?: ScriptTarget): boolean;
+export declare function isIdentifierPart(ch: number, _languageVersion?: ScriptTarget, identifierVariant?: LanguageVariant): boolean;
+export declare function isIdentifierText(name: string, _languageVersion?: ScriptTarget, identifierVariant?: LanguageVariant): boolean;
+export declare function utf16EncodeAsString(codePoint: number): string;
+export declare function createScanner(skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, start?: number, length?: number): Scanner;
+//# sourceMappingURL=scanner.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/scanner.d.ts.map b/node_modules/typescript/dist/ast/scanner.d.ts.map
new file mode 100644
index 000000000..3c3142e30
--- /dev/null
+++ b/node_modules/typescript/dist/ast/scanner.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/ast/scanner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,gBAAgB,GAAG,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,eAAe,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,GAAG,UAAU,CAAC,iBAAiB,GAAG,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,eAAe,GAAG,UAAU,CAAC,WAAW,GAAG,UAAU,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ChB,OAAO,CAumDT"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/scanner.js b/node_modules/typescript/dist/ast/scanner.js
new file mode 100644
index 000000000..eec847fb7
--- /dev/null
+++ b/node_modules/typescript/dist/ast/scanner.js
@@ -0,0 +1,2230 @@
+import { CharacterCodes } from "#enums/characterCodes";
+import { CommentDirectiveType } from "#enums/commentDirectiveType";
+import { LanguageVariant } from "#enums/languageVariant";
+import { RegularExpressionFlags } from "#enums/regularExpressionFlags";
+import { ScriptTarget } from "#enums/scriptTarget";
+import { SyntaxKind } from "#enums/syntaxKind";
+import { TokenFlags } from "#enums/tokenFlags";
+// Internal-only, not exported
+const EscapeSequenceScanningFlags = {
+    String: 1 << 0,
+    ReportErrors: 1 << 1,
+    RegularExpression: 1 << 2,
+    AnnexB: 1 << 3,
+    AnyUnicodeMode: 1 << 4,
+    AtomEscape: 1 << 5,
+    ReportInvalidEscapeErrors: (1 << 2) | (1 << 1),
+    AllowExtendedUnicodeEscape: (1 << 0) | (1 << 4),
+};
+export function tokenIsIdentifierOrKeyword(token) {
+    return token >= SyntaxKind.Identifier;
+}
+export function tokenIsIdentifierOrKeywordOrGreaterThan(token) {
+    return token === SyntaxKind.GreaterThanToken || tokenIsIdentifierOrKeyword(token);
+}
+export const textToKeywordObj = {
+    abstract: SyntaxKind.AbstractKeyword,
+    accessor: SyntaxKind.AccessorKeyword,
+    any: SyntaxKind.AnyKeyword,
+    as: SyntaxKind.AsKeyword,
+    asserts: SyntaxKind.AssertsKeyword,
+    assert: SyntaxKind.AssertKeyword,
+    bigint: SyntaxKind.BigIntKeyword,
+    boolean: SyntaxKind.BooleanKeyword,
+    break: SyntaxKind.BreakKeyword,
+    case: SyntaxKind.CaseKeyword,
+    catch: SyntaxKind.CatchKeyword,
+    class: SyntaxKind.ClassKeyword,
+    continue: SyntaxKind.ContinueKeyword,
+    const: SyntaxKind.ConstKeyword,
+    ["" + "constructor"]: SyntaxKind.ConstructorKeyword,
+    debugger: SyntaxKind.DebuggerKeyword,
+    declare: SyntaxKind.DeclareKeyword,
+    default: SyntaxKind.DefaultKeyword,
+    defer: SyntaxKind.DeferKeyword,
+    delete: SyntaxKind.DeleteKeyword,
+    do: SyntaxKind.DoKeyword,
+    else: SyntaxKind.ElseKeyword,
+    enum: SyntaxKind.EnumKeyword,
+    export: SyntaxKind.ExportKeyword,
+    extends: SyntaxKind.ExtendsKeyword,
+    false: SyntaxKind.FalseKeyword,
+    finally: SyntaxKind.FinallyKeyword,
+    for: SyntaxKind.ForKeyword,
+    from: SyntaxKind.FromKeyword,
+    function: SyntaxKind.FunctionKeyword,
+    get: SyntaxKind.GetKeyword,
+    if: SyntaxKind.IfKeyword,
+    implements: SyntaxKind.ImplementsKeyword,
+    import: SyntaxKind.ImportKeyword,
+    in: SyntaxKind.InKeyword,
+    infer: SyntaxKind.InferKeyword,
+    instanceof: SyntaxKind.InstanceOfKeyword,
+    interface: SyntaxKind.InterfaceKeyword,
+    intrinsic: SyntaxKind.IntrinsicKeyword,
+    is: SyntaxKind.IsKeyword,
+    keyof: SyntaxKind.KeyOfKeyword,
+    let: SyntaxKind.LetKeyword,
+    module: SyntaxKind.ModuleKeyword,
+    namespace: SyntaxKind.NamespaceKeyword,
+    never: SyntaxKind.NeverKeyword,
+    new: SyntaxKind.NewKeyword,
+    null: SyntaxKind.NullKeyword,
+    number: SyntaxKind.NumberKeyword,
+    object: SyntaxKind.ObjectKeyword,
+    package: SyntaxKind.PackageKeyword,
+    private: SyntaxKind.PrivateKeyword,
+    protected: SyntaxKind.ProtectedKeyword,
+    public: SyntaxKind.PublicKeyword,
+    override: SyntaxKind.OverrideKeyword,
+    out: SyntaxKind.OutKeyword,
+    readonly: SyntaxKind.ReadonlyKeyword,
+    require: SyntaxKind.RequireKeyword,
+    global: SyntaxKind.GlobalKeyword,
+    return: SyntaxKind.ReturnKeyword,
+    satisfies: SyntaxKind.SatisfiesKeyword,
+    set: SyntaxKind.SetKeyword,
+    static: SyntaxKind.StaticKeyword,
+    string: SyntaxKind.StringKeyword,
+    super: SyntaxKind.SuperKeyword,
+    switch: SyntaxKind.SwitchKeyword,
+    symbol: SyntaxKind.SymbolKeyword,
+    this: SyntaxKind.ThisKeyword,
+    throw: SyntaxKind.ThrowKeyword,
+    true: SyntaxKind.TrueKeyword,
+    try: SyntaxKind.TryKeyword,
+    type: SyntaxKind.TypeKeyword,
+    typeof: SyntaxKind.TypeOfKeyword,
+    undefined: SyntaxKind.UndefinedKeyword,
+    unique: SyntaxKind.UniqueKeyword,
+    unknown: SyntaxKind.UnknownKeyword,
+    using: SyntaxKind.UsingKeyword,
+    var: SyntaxKind.VarKeyword,
+    void: SyntaxKind.VoidKeyword,
+    while: SyntaxKind.WhileKeyword,
+    with: SyntaxKind.WithKeyword,
+    yield: SyntaxKind.YieldKeyword,
+    async: SyntaxKind.AsyncKeyword,
+    await: SyntaxKind.AwaitKeyword,
+    of: SyntaxKind.OfKeyword,
+};
+const textToKeyword = new Map(Object.entries(textToKeywordObj));
+const textToToken = new Map(Object.entries({
+    ...textToKeywordObj,
+    "{": SyntaxKind.OpenBraceToken,
+    "}": SyntaxKind.CloseBraceToken,
+    "(": SyntaxKind.OpenParenToken,
+    ")": SyntaxKind.CloseParenToken,
+    "[": SyntaxKind.OpenBracketToken,
+    "]": SyntaxKind.CloseBracketToken,
+    ".": SyntaxKind.DotToken,
+    "...": SyntaxKind.DotDotDotToken,
+    ";": SyntaxKind.SemicolonToken,
+    ",": SyntaxKind.CommaToken,
+    "<": SyntaxKind.LessThanToken,
+    ">": SyntaxKind.GreaterThanToken,
+    "<=": SyntaxKind.LessThanEqualsToken,
+    ">=": SyntaxKind.GreaterThanEqualsToken,
+    "==": SyntaxKind.EqualsEqualsToken,
+    "!=": SyntaxKind.ExclamationEqualsToken,
+    "===": SyntaxKind.EqualsEqualsEqualsToken,
+    "!==": SyntaxKind.ExclamationEqualsEqualsToken,
+    "=>": SyntaxKind.EqualsGreaterThanToken,
+    "+": SyntaxKind.PlusToken,
+    "-": SyntaxKind.MinusToken,
+    "**": SyntaxKind.AsteriskAsteriskToken,
+    "*": SyntaxKind.AsteriskToken,
+    "/": SyntaxKind.SlashToken,
+    "%": SyntaxKind.PercentToken,
+    "++": SyntaxKind.PlusPlusToken,
+    "--": SyntaxKind.MinusMinusToken,
+    "<<": SyntaxKind.LessThanLessThanToken,
+    ">": SyntaxKind.GreaterThanGreaterThanToken,
+    ">>>": SyntaxKind.GreaterThanGreaterThanGreaterThanToken,
+    "&": SyntaxKind.AmpersandToken,
+    "|": SyntaxKind.BarToken,
+    "^": SyntaxKind.CaretToken,
+    "!": SyntaxKind.ExclamationToken,
+    "~": SyntaxKind.TildeToken,
+    "&&": SyntaxKind.AmpersandAmpersandToken,
+    "||": SyntaxKind.BarBarToken,
+    "?": SyntaxKind.QuestionToken,
+    "??": SyntaxKind.QuestionQuestionToken,
+    "?.": SyntaxKind.QuestionDotToken,
+    ":": SyntaxKind.ColonToken,
+    "=": SyntaxKind.EqualsToken,
+    "+=": SyntaxKind.PlusEqualsToken,
+    "-=": SyntaxKind.MinusEqualsToken,
+    "*=": SyntaxKind.AsteriskEqualsToken,
+    "**=": SyntaxKind.AsteriskAsteriskEqualsToken,
+    "/=": SyntaxKind.SlashEqualsToken,
+    "%=": SyntaxKind.PercentEqualsToken,
+    "<<=": SyntaxKind.LessThanLessThanEqualsToken,
+    ">>=": SyntaxKind.GreaterThanGreaterThanEqualsToken,
+    ">>>=": SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,
+    "&=": SyntaxKind.AmpersandEqualsToken,
+    "|=": SyntaxKind.BarEqualsToken,
+    "^=": SyntaxKind.CaretEqualsToken,
+    "||=": SyntaxKind.BarBarEqualsToken,
+    "&&=": SyntaxKind.AmpersandAmpersandEqualsToken,
+    "??=": SyntaxKind.QuestionQuestionEqualsToken,
+    "@": SyntaxKind.AtToken,
+    "#": SyntaxKind.HashToken,
+    "`": SyntaxKind.BacktickToken,
+}));
+const charCodeToRegExpFlag = new Map([
+    [CharacterCodes.d, RegularExpressionFlags.HasIndices],
+    [CharacterCodes.g, RegularExpressionFlags.Global],
+    [CharacterCodes.i, RegularExpressionFlags.IgnoreCase],
+    [CharacterCodes.m, RegularExpressionFlags.Multiline],
+    [CharacterCodes.s, RegularExpressionFlags.DotAll],
+    [CharacterCodes.u, RegularExpressionFlags.Unicode],
+    [CharacterCodes.v, RegularExpressionFlags.UnicodeSets],
+    [CharacterCodes.y, RegularExpressionFlags.Sticky],
+]);
+/**
+ * Generated by scripts/regenerate-unicode-identifier-parts.mjs on node v22.1.0 with unicode 15.1
+ * based on http://www.unicode.org/reports/tr31/ and https://www.ecma-international.org/ecma-262/6.0/#sec-names-and-keywords
+ * unicodeESNextIdentifierStart corresponds to the ID_Start and Other_ID_Start property, and
+ * unicodeESNextIdentifierPart corresponds to ID_Continue, Other_ID_Continue, plus ID_Start and Other_ID_Start
+ */
+// dprint-ignore
+const unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743];
+// dprint-ignore
+const unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2160, 2183, 2185, 2190, 2200, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3790, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70753, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999];
+const commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
+const commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
+const jsDocTagTerminators = new Set([" ", "\t", "\n", "\r", "}", "*"]);
+function hasJSDocTag(text, offset, ...tags) {
+    for (const tag of tags) {
+        if (text.startsWith(tag, offset)) {
+            if (offset + tag.length === text.length) {
+                return true;
+            }
+            if (jsDocTagTerminators.has(text[offset + tag.length])) {
+                return true;
+            }
+        }
+    }
+    return false;
+}
+function scanJSDocCommentForTags(text, tokenFlags) {
+    let offset = 0;
+    while (true) {
+        const i = text.indexOf("@", offset);
+        if (i < 0) {
+            return tokenFlags;
+        }
+        offset = i + 1;
+        if (!(tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) && hasJSDocTag(text, offset, "deprecated")) {
+            tokenFlags |= TokenFlags.PrecedingJSDocWithDeprecated;
+        }
+        if (!(tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) && hasJSDocTag(text, offset, "see", "link", "linkcode", "linkplain")) {
+            tokenFlags |= TokenFlags.PrecedingJSDocWithSeeOrLink;
+        }
+        if ((tokenFlags & (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) ===
+            (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) {
+            return tokenFlags;
+        }
+    }
+}
+function lookupInUnicodeMap(code, map) {
+    if (code < map[0]) {
+        return false;
+    }
+    let lo = 0;
+    let hi = map.length;
+    let mid;
+    while (lo + 1 < hi) {
+        mid = lo + (hi - lo) / 2;
+        mid -= mid % 2;
+        if (map[mid] <= code && code <= map[mid + 1]) {
+            return true;
+        }
+        if (code < map[mid]) {
+            hi = mid;
+        }
+        else {
+            lo = mid + 2;
+        }
+    }
+    return false;
+}
+export function isUnicodeIdentifierStart(code) {
+    return lookupInUnicodeMap(code, unicodeESNextIdentifierStart);
+}
+function isUnicodeIdentifierPart(code) {
+    return lookupInUnicodeMap(code, unicodeESNextIdentifierPart);
+}
+function makeReverseMap(source) {
+    const result = [];
+    source.forEach((value, name) => {
+        result[value] = name;
+    });
+    return result;
+}
+const tokenStrings = makeReverseMap(textToToken);
+export function tokenToString(t) {
+    return tokenStrings[t];
+}
+export function stringToToken(s) {
+    return textToToken.get(s);
+}
+export function characterCodeToRegularExpressionFlag(ch) {
+    return charCodeToRegExpFlag.get(ch);
+}
+export function computeLineStarts(text) {
+    const result = [];
+    let pos = 0;
+    let lineStart = 0;
+    while (pos < text.length) {
+        const ch = text.charCodeAt(pos);
+        pos++;
+        switch (ch) {
+            case CharacterCodes.carriageReturn:
+                if (text.charCodeAt(pos) === CharacterCodes.lineFeed) {
+                    pos++;
+                }
+            // falls through
+            case CharacterCodes.lineFeed:
+                result.push(lineStart);
+                lineStart = pos;
+                break;
+            default:
+                if (ch > CharacterCodes.maxAsciiCharacter && isLineBreak(ch)) {
+                    result.push(lineStart);
+                    lineStart = pos;
+                }
+                break;
+        }
+    }
+    result.push(lineStart);
+    return result;
+}
+export function isWhiteSpaceLike(ch) {
+    return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
+}
+export function isWhiteSpaceSingleLine(ch) {
+    return ch === CharacterCodes.space ||
+        ch === CharacterCodes.tab ||
+        ch === CharacterCodes.verticalTab ||
+        ch === CharacterCodes.formFeed ||
+        ch === CharacterCodes.nonBreakingSpace ||
+        ch === CharacterCodes.nextLine ||
+        ch === CharacterCodes.ogham ||
+        ch >= CharacterCodes.enQuad && ch <= CharacterCodes.zeroWidthSpace ||
+        ch === CharacterCodes.narrowNoBreakSpace ||
+        ch === CharacterCodes.mathematicalSpace ||
+        ch === CharacterCodes.ideographicSpace ||
+        ch === CharacterCodes.byteOrderMark;
+}
+export function isLineBreak(ch) {
+    return ch === CharacterCodes.lineFeed ||
+        ch === CharacterCodes.carriageReturn ||
+        ch === CharacterCodes.lineSeparator ||
+        ch === CharacterCodes.paragraphSeparator;
+}
+function isDigit(ch) {
+    return ch >= CharacterCodes._0 && ch <= CharacterCodes._9;
+}
+function isHexDigit(ch) {
+    return isDigit(ch) || ch >= CharacterCodes.A && ch <= CharacterCodes.F || ch >= CharacterCodes.a && ch <= CharacterCodes.f;
+}
+function isOctalDigit(ch) {
+    return ch >= CharacterCodes._0 && ch <= CharacterCodes._7;
+}
+export function couldStartTrivia(text, pos) {
+    const ch = text.charCodeAt(pos);
+    switch (ch) {
+        case CharacterCodes.carriageReturn:
+        case CharacterCodes.lineFeed:
+        case CharacterCodes.tab:
+        case CharacterCodes.verticalTab:
+        case CharacterCodes.formFeed:
+        case CharacterCodes.space:
+        case CharacterCodes.slash:
+        case CharacterCodes.lessThan:
+        case CharacterCodes.bar:
+        case CharacterCodes.equals:
+        case CharacterCodes.greaterThan:
+            return true;
+        case CharacterCodes.hash:
+            return pos === 0;
+        default:
+            return ch > CharacterCodes.maxAsciiCharacter;
+    }
+}
+export function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
+    if (pos < 0) {
+        return pos;
+    }
+    let canConsumeStar = false;
+    while (true) {
+        const ch = text.charCodeAt(pos);
+        switch (ch) {
+            case CharacterCodes.carriageReturn:
+                if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) {
+                    pos++;
+                }
+            // falls through
+            case CharacterCodes.lineFeed:
+                pos++;
+                if (stopAfterLineBreak) {
+                    return pos;
+                }
+                canConsumeStar = !!inJSDoc;
+                continue;
+            case CharacterCodes.tab:
+            case CharacterCodes.verticalTab:
+            case CharacterCodes.formFeed:
+            case CharacterCodes.space:
+                pos++;
+                continue;
+            case CharacterCodes.slash:
+                if (stopAtComments) {
+                    break;
+                }
+                if (text.charCodeAt(pos + 1) === CharacterCodes.slash) {
+                    pos += 2;
+                    while (pos < text.length) {
+                        if (isLineBreak(text.charCodeAt(pos))) {
+                            break;
+                        }
+                        pos++;
+                    }
+                    canConsumeStar = false;
+                    continue;
+                }
+                if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) {
+                    pos += 2;
+                    while (pos < text.length) {
+                        if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) {
+                            pos += 2;
+                            break;
+                        }
+                        pos++;
+                    }
+                    canConsumeStar = false;
+                    continue;
+                }
+                break;
+            case CharacterCodes.lessThan:
+            case CharacterCodes.bar:
+            case CharacterCodes.equals:
+            case CharacterCodes.greaterThan:
+                if (isConflictMarkerTrivia(text, pos)) {
+                    pos = scanConflictMarkerTrivia(text, pos);
+                    canConsumeStar = false;
+                    continue;
+                }
+                break;
+            case CharacterCodes.hash:
+                if (pos === 0 && isShebangTrivia(text, pos)) {
+                    pos = scanShebangTrivia(text, pos);
+                    continue;
+                }
+                break;
+            case CharacterCodes.asterisk:
+                if (canConsumeStar) {
+                    pos++;
+                    canConsumeStar = false;
+                    continue;
+                }
+                break;
+            default:
+                if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) {
+                    pos++;
+                    continue;
+                }
+                break;
+        }
+        return pos;
+    }
+}
+function isConflictMarkerTrivia(text, pos) {
+    if (pos >= text.length) {
+        return false;
+    }
+    const ch = text.charCodeAt(pos);
+    if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
+        if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan || ch === CharacterCodes.equals) {
+            if (pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) {
+                return ch === CharacterCodes.equals || text.charCodeAt(pos + 7) === CharacterCodes.space;
+            }
+        }
+        if (ch === CharacterCodes.bar && pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) {
+            return true;
+        }
+    }
+    return false;
+}
+function scanConflictMarkerTrivia(text, pos) {
+    const ch = text.charCodeAt(pos);
+    const len = text.length;
+    if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) {
+        while (pos < len && !isLineBreak(text.charCodeAt(pos))) {
+            pos++;
+        }
+    }
+    else {
+        // Consume everything from the start of a ||||||| or ======= marker to the start
+        // of the next ======= or >>>>>>> marker.
+        pos += 7; // skip marker
+        while (pos < len) {
+            const currentChar = text.charCodeAt(pos);
+            if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && isConflictMarkerTrivia(text, pos)) {
+                break;
+            }
+            pos++;
+        }
+    }
+    return pos;
+}
+function isShebangTrivia(text, pos) {
+    return pos === 0 && text.charCodeAt(0) === CharacterCodes.hash && text.charCodeAt(1) === CharacterCodes.exclamation;
+}
+function scanShebangTrivia(text, pos) {
+    pos += 2;
+    while (pos < text.length) {
+        if (isLineBreak(text.charCodeAt(pos))) {
+            break;
+        }
+        pos++;
+    }
+    return pos;
+}
+function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) {
+    let pendingPos;
+    let pendingEnd;
+    let pendingKind;
+    let pendingHasTrailingNewLine;
+    let hasPendingCommentRange = false;
+    let collecting = trailing;
+    let accumulator = initial;
+    if (pos === 0) {
+        collecting = true;
+        const shebang = getShebang(text);
+        if (shebang) {
+            pos = shebang.length;
+        }
+    }
+    scan: while (pos >= 0 && pos < text.length) {
+        const ch = text.charCodeAt(pos);
+        switch (ch) {
+            case CharacterCodes.carriageReturn:
+                if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) {
+                    pos++;
+                }
+            // falls through
+            case CharacterCodes.lineFeed:
+                pos++;
+                if (trailing) {
+                    break scan;
+                }
+                collecting = true;
+                if (hasPendingCommentRange) {
+                    pendingHasTrailingNewLine = true;
+                }
+                continue;
+            case CharacterCodes.tab:
+            case CharacterCodes.verticalTab:
+            case CharacterCodes.formFeed:
+            case CharacterCodes.space:
+                pos++;
+                continue;
+            case CharacterCodes.slash:
+                const nextChar = text.charCodeAt(pos + 1);
+                let hasTrailingNewLine = false;
+                if (nextChar === CharacterCodes.slash || nextChar === CharacterCodes.asterisk) {
+                    const kind = nextChar === CharacterCodes.slash ? SyntaxKind.SingleLineCommentTrivia : SyntaxKind.MultiLineCommentTrivia;
+                    const startPos = pos;
+                    pos += 2;
+                    if (nextChar === CharacterCodes.slash) {
+                        while (pos < text.length) {
+                            if (isLineBreak(text.charCodeAt(pos))) {
+                                hasTrailingNewLine = true;
+                                break;
+                            }
+                            pos++;
+                        }
+                    }
+                    else {
+                        while (pos < text.length) {
+                            if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) {
+                                pos += 2;
+                                break;
+                            }
+                            pos++;
+                        }
+                    }
+                    if (collecting) {
+                        if (hasPendingCommentRange) {
+                            accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
+                            if (!reduce && accumulator) {
+                                return accumulator;
+                            }
+                        }
+                        pendingPos = startPos;
+                        pendingEnd = pos;
+                        pendingKind = kind;
+                        pendingHasTrailingNewLine = hasTrailingNewLine;
+                        hasPendingCommentRange = true;
+                    }
+                    continue;
+                }
+                break scan;
+            default:
+                if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) {
+                    if (hasPendingCommentRange && isLineBreak(ch)) {
+                        pendingHasTrailingNewLine = true;
+                    }
+                    pos++;
+                    continue;
+                }
+                break scan;
+        }
+    }
+    if (hasPendingCommentRange) {
+        accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
+    }
+    return accumulator;
+}
+function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
+    comments.push({ kind, pos, end, hasTrailingNewLine });
+    return comments;
+}
+export function forEachLeadingCommentRange(text, pos, cb, state) {
+    return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ false, cb, state, /*initial*/ undefined);
+}
+export function forEachTrailingCommentRange(text, pos, cb, state) {
+    return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ true, cb, state, /*initial*/ undefined);
+}
+export function reduceEachLeadingCommentRange(text, pos, cb, state, initial) {
+    return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ false, cb, state, initial);
+}
+export function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
+    return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ true, cb, state, initial);
+}
+export function getLeadingCommentRanges(text, pos) {
+    return reduceEachLeadingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined);
+}
+export function getTrailingCommentRanges(text, pos) {
+    return reduceEachTrailingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined);
+}
+export function getShebang(text) {
+    const shebang = /^#!.*/;
+    if (isShebangTrivia(text, 0)) {
+        const match = shebang.exec(text);
+        if (match) {
+            return match[0];
+        }
+    }
+    return undefined;
+}
+export function isIdentifierStart(ch, _languageVersion) {
+    return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || ch >= CharacterCodes.a && ch <= CharacterCodes.z ||
+        ch === CharacterCodes.$ || ch === CharacterCodes._ ||
+        ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierStart(ch);
+}
+export function isIdentifierPart(ch, _languageVersion, identifierVariant) {
+    return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || ch >= CharacterCodes.a && ch <= CharacterCodes.z ||
+        ch >= CharacterCodes._0 && ch <= CharacterCodes._9 || ch === CharacterCodes.$ || ch === CharacterCodes._ ||
+        // "-" and ":" are valid in JSX Identifiers
+        (identifierVariant === LanguageVariant.JSX ? (ch === CharacterCodes.minus || ch === CharacterCodes.colon) : false) ||
+        ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch);
+}
+export function isIdentifierText(name, _languageVersion, identifierVariant) {
+    let ch = name.codePointAt(0);
+    if (!isIdentifierStart(ch)) {
+        return false;
+    }
+    for (let i = charSize(ch); i < name.length; i += charSize(ch)) {
+        if (!isIdentifierPart(ch = name.codePointAt(i), undefined, identifierVariant)) {
+            return false;
+        }
+    }
+    return true;
+}
+function codePointAt(s, i) {
+    return s.codePointAt(i);
+}
+function charSize(ch) {
+    if (ch >= 0x10000) {
+        return 2;
+    }
+    if (ch === CharacterCodes.EOF) {
+        return 0;
+    }
+    return 1;
+}
+export function utf16EncodeAsString(codePoint) {
+    return String.fromCodePoint(codePoint);
+}
+function parsePseudoBigInt(stringValue) {
+    let log2Base;
+    switch (stringValue.charCodeAt(1)) {
+        case CharacterCodes.b:
+        case CharacterCodes.B:
+            log2Base = 1;
+            break;
+        case CharacterCodes.o:
+        case CharacterCodes.O:
+            log2Base = 3;
+            break;
+        case CharacterCodes.x:
+        case CharacterCodes.X:
+            log2Base = 4;
+            break;
+        default:
+            // decimals for now just peel the trailing "n" and return
+            const nIndex = stringValue.length - 1;
+            let nonZeroStart = 0;
+            while (stringValue.charCodeAt(nonZeroStart) === CharacterCodes._0) {
+                nonZeroStart++;
+            }
+            return stringValue.slice(nonZeroStart, nIndex) || "0";
+    }
+    // exit early for zero
+    const startIndex = 2;
+    const endIndex = stringValue.length - 1;
+    const bitsNeeded = (endIndex - startIndex) * log2Base;
+    // Stores the value specified by the string as a LE array of 16-bit integers
+    // using Uint16 instead of Uint32 so combining steps can use bitwise operators
+    const segments = new Uint16Array((bitsNeeded >>> 4) + (bitsNeeded & 15 ? 1 : 0));
+    // Add the digits, one at a time
+    for (let i = endIndex - 1, bitOffset = 0; i >= startIndex; i--, bitOffset += log2Base) {
+        const segment = bitOffset >>> 4;
+        const digitChar = stringValue.charCodeAt(i);
+        // Find character value
+        const digit = digitChar <= CharacterCodes._9
+            ? digitChar - CharacterCodes._0
+            : 10 + digitChar - (digitChar <= CharacterCodes.F ? CharacterCodes.A : CharacterCodes.a);
+        // Add bits into segment
+        const shiftedDigit = digit << (bitOffset & 15);
+        segments[segment] |= shiftedDigit;
+        // overflow to next segment
+        const residual = shiftedDigit >>> 16;
+        if (residual)
+            segments[segment + 1] |= residual;
+    }
+    // Repeatedly divide by 10 to find each decimal digit
+    let base10Value = "";
+    let firstNonzeroSegment = segments.length - 1;
+    let segmentsRemaining = true;
+    while (segmentsRemaining) {
+        let mod10 = 0;
+        segmentsRemaining = false;
+        for (let segment = firstNonzeroSegment; segment >= 0; segment--) {
+            const newSegment = mod10 << 16 | segments[segment];
+            const segmentValue = (newSegment / 10) | 0;
+            segments[segment] = segmentValue;
+            mod10 = newSegment - segmentValue * 10;
+            if (segmentValue && !segmentsRemaining) {
+                firstNonzeroSegment = segment;
+                segmentsRemaining = true;
+            }
+        }
+        base10Value = mod10 + base10Value;
+    }
+    return base10Value;
+}
+// Creates a scanner over a (possibly unspecified) range of a piece of text.
+export function createScanner(skipTrivia, languageVariant = LanguageVariant.Standard, textInitial, start, length) {
+    // Why var? It avoids TDZ checks in the runtime which can be costly.
+    // See: https://github.com/microsoft/TypeScript/issues/52924
+    /* eslint-disable no-var */
+    var text = textInitial;
+    // Current position (end position of text of current token)
+    var pos;
+    // end of text
+    var end;
+    // Start position of whitespace before current token
+    var fullStartPos;
+    // Start position of text of current token
+    var tokenStart;
+    var token;
+    var tokenValue;
+    var tokenFlags;
+    var commentDirectives;
+    var skipJsDocLeadingAsterisks = 0;
+    setText(text, start, length);
+    var scanner = {
+        getTokenFullStart: () => fullStartPos,
+        getTokenEnd: () => pos,
+        getToken: () => token,
+        getTokenStart: () => tokenStart,
+        getTokenText: () => text.substring(tokenStart, pos),
+        getTokenValue: () => tokenValue,
+        hasUnicodeEscape: () => (tokenFlags & TokenFlags.UnicodeEscape) !== 0,
+        hasExtendedUnicodeEscape: () => (tokenFlags & TokenFlags.ExtendedUnicodeEscape) !== 0,
+        hasPrecedingLineBreak: () => (tokenFlags & TokenFlags.PrecedingLineBreak) !== 0,
+        hasPrecedingJSDocComment: () => (tokenFlags & TokenFlags.PrecedingJSDocComment) !== 0,
+        hasPrecedingJSDocLeadingAsterisks: () => (tokenFlags & TokenFlags.PrecedingJSDocLeadingAsterisks) !== 0,
+        hasPrecedingJSDocWithDeprecatedTag: () => (tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) !== 0,
+        hasPrecedingJSDocWithSeeOrLink: () => (tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) !== 0,
+        isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord,
+        isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord,
+        isUnterminated: () => (tokenFlags & TokenFlags.Unterminated) !== 0,
+        getCommentDirectives: () => commentDirectives,
+        getNumericLiteralFlags: () => tokenFlags & TokenFlags.NumericLiteralFlags,
+        getTokenFlags: () => tokenFlags,
+        reScanGreaterToken,
+        reScanAsteriskEqualsToken,
+        reScanSlashToken,
+        reScanTemplateToken,
+        reScanTemplateHeadOrNoSubstitutionTemplate,
+        scanJsxIdentifier,
+        scanJsxAttributeValue,
+        reScanJsxAttributeValue,
+        reScanJsxToken,
+        reScanLessThanToken,
+        reScanHashToken,
+        reScanQuestionToken,
+        reScanInvalidIdentifier,
+        scanJsxToken,
+        scanJsDocToken,
+        scanJSDocCommentTextToken,
+        scan,
+        getText,
+        clearCommentDirectives,
+        setText,
+        setLanguageVariant,
+        resetTokenState,
+        setSkipJsDocLeadingAsterisks,
+        tryScan,
+        lookAhead,
+        scanRange,
+    };
+    /* eslint-enable no-var */
+    return scanner;
+    function codePointUnchecked(pos) {
+        return codePointAt(text, pos);
+    }
+    function codePointChecked(pos) {
+        return pos >= 0 && pos < end ? codePointUnchecked(pos) : CharacterCodes.EOF;
+    }
+    function charCodeUnchecked(pos) {
+        return text.charCodeAt(pos);
+    }
+    function charCodeChecked(pos) {
+        return pos >= 0 && pos < end ? charCodeUnchecked(pos) : CharacterCodes.EOF;
+    }
+    function scanNumberFragment() {
+        let start = pos;
+        let allowSeparator = false;
+        let isPreviousTokenSeparator = false;
+        let result = "";
+        while (true) {
+            const ch = charCodeUnchecked(pos);
+            if (ch === CharacterCodes._) {
+                tokenFlags |= TokenFlags.ContainsSeparator;
+                if (allowSeparator) {
+                    allowSeparator = false;
+                    isPreviousTokenSeparator = true;
+                    result += text.substring(start, pos);
+                }
+                else {
+                    tokenFlags |= TokenFlags.ContainsInvalidSeparator;
+                }
+                pos++;
+                start = pos;
+                continue;
+            }
+            if (isDigit(ch)) {
+                allowSeparator = true;
+                isPreviousTokenSeparator = false;
+                pos++;
+                continue;
+            }
+            break;
+        }
+        if (charCodeUnchecked(pos - 1) === CharacterCodes._) {
+            tokenFlags |= TokenFlags.ContainsInvalidSeparator;
+        }
+        return result + text.substring(start, pos);
+    }
+    function scanNumber() {
+        let start = pos;
+        let mainFragment;
+        if (charCodeUnchecked(pos) === CharacterCodes._0) {
+            pos++;
+            if (charCodeUnchecked(pos) === CharacterCodes._) {
+                tokenFlags |= TokenFlags.ContainsSeparator | TokenFlags.ContainsInvalidSeparator;
+                pos--;
+                mainFragment = scanNumberFragment();
+            }
+            else if (!scanDigits()) {
+                tokenFlags |= TokenFlags.ContainsLeadingZero;
+                mainFragment = "" + +tokenValue;
+            }
+            else if (!tokenValue) {
+                mainFragment = "0";
+            }
+            else {
+                tokenValue = "" + parseInt(tokenValue, 8);
+                tokenFlags |= TokenFlags.Octal;
+                const withMinus = token === SyntaxKind.MinusToken;
+                const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8);
+                if (withMinus)
+                    start--;
+                return SyntaxKind.NumericLiteral;
+            }
+        }
+        else {
+            mainFragment = scanNumberFragment();
+        }
+        let decimalFragment;
+        let scientificFragment;
+        if (charCodeUnchecked(pos) === CharacterCodes.dot) {
+            pos++;
+            decimalFragment = scanNumberFragment();
+        }
+        let end = pos;
+        if (charCodeUnchecked(pos) === CharacterCodes.E || charCodeUnchecked(pos) === CharacterCodes.e) {
+            pos++;
+            tokenFlags |= TokenFlags.Scientific;
+            if (charCodeUnchecked(pos) === CharacterCodes.plus || charCodeUnchecked(pos) === CharacterCodes.minus)
+                pos++;
+            const preNumericPart = pos;
+            const finalFragment = scanNumberFragment();
+            if (finalFragment) {
+                scientificFragment = text.substring(end, preNumericPart) + finalFragment;
+                end = pos;
+            }
+        }
+        let result;
+        if (tokenFlags & TokenFlags.ContainsSeparator) {
+            result = mainFragment;
+            if (decimalFragment) {
+                result += "." + decimalFragment;
+            }
+            if (scientificFragment) {
+                result += scientificFragment;
+            }
+        }
+        else {
+            result = text.substring(start, end);
+        }
+        if (tokenFlags & TokenFlags.ContainsLeadingZero) {
+            tokenValue = "" + +result;
+            return SyntaxKind.NumericLiteral;
+        }
+        if (decimalFragment !== undefined || tokenFlags & TokenFlags.Scientific) {
+            checkForIdentifierStartAfterNumericLiteral();
+            tokenValue = "" + +result;
+            return SyntaxKind.NumericLiteral;
+        }
+        else {
+            tokenValue = result;
+            const type = checkBigIntSuffix();
+            checkForIdentifierStartAfterNumericLiteral();
+            return type;
+        }
+    }
+    function checkForIdentifierStartAfterNumericLiteral() {
+        if (!isIdentifierStart(codePointUnchecked(pos))) {
+            return;
+        }
+        const identifierStart = pos;
+        const { length } = scanIdentifierParts();
+        if (!(length === 1 && text[identifierStart] === "n")) {
+            pos = identifierStart;
+        }
+    }
+    function scanDigits() {
+        const start = pos;
+        let isOctal = true;
+        while (isDigit(charCodeChecked(pos))) {
+            if (!isOctalDigit(charCodeUnchecked(pos))) {
+                isOctal = false;
+            }
+            pos++;
+        }
+        tokenValue = text.substring(start, pos);
+        return isOctal;
+    }
+    function scanExactNumberOfHexDigits(count, canHaveSeparators) {
+        const valueString = scanHexDigits(count, /*scanAsManyAsPossible*/ false, canHaveSeparators);
+        return valueString ? parseInt(valueString, 16) : -1;
+    }
+    function scanMinimumNumberOfHexDigits(count, canHaveSeparators) {
+        return scanHexDigits(count, /*scanAsManyAsPossible*/ true, canHaveSeparators);
+    }
+    function scanHexDigits(minCount, scanAsManyAsPossible, canHaveSeparators) {
+        let valueChars = [];
+        let allowSeparator = false;
+        while (valueChars.length < minCount || scanAsManyAsPossible) {
+            let ch = charCodeUnchecked(pos);
+            if (canHaveSeparators && ch === CharacterCodes._) {
+                tokenFlags |= TokenFlags.ContainsSeparator;
+                if (allowSeparator) {
+                    allowSeparator = false;
+                }
+                pos++;
+                continue;
+            }
+            allowSeparator = canHaveSeparators;
+            if (ch >= CharacterCodes.A && ch <= CharacterCodes.F) {
+                ch += CharacterCodes.a - CharacterCodes.A;
+            }
+            else if (!((ch >= CharacterCodes._0 && ch <= CharacterCodes._9) ||
+                (ch >= CharacterCodes.a && ch <= CharacterCodes.f))) {
+                break;
+            }
+            valueChars.push(ch);
+            pos++;
+        }
+        if (valueChars.length < minCount) {
+            valueChars = [];
+        }
+        return String.fromCharCode(...valueChars);
+    }
+    function scanString(jsxAttributeString = false) {
+        const quote = charCodeUnchecked(pos);
+        pos++;
+        let result = "";
+        let start = pos;
+        while (true) {
+            if (pos >= end) {
+                result += text.substring(start, pos);
+                tokenFlags |= TokenFlags.Unterminated;
+                break;
+            }
+            const ch = charCodeUnchecked(pos);
+            if (ch === quote) {
+                result += text.substring(start, pos);
+                pos++;
+                break;
+            }
+            if (ch === CharacterCodes.backslash && !jsxAttributeString) {
+                result += text.substring(start, pos);
+                result += scanEscapeSequence(EscapeSequenceScanningFlags.String | EscapeSequenceScanningFlags.ReportErrors);
+                start = pos;
+                continue;
+            }
+            if ((ch === CharacterCodes.lineFeed || ch === CharacterCodes.carriageReturn) && !jsxAttributeString) {
+                result += text.substring(start, pos);
+                tokenFlags |= TokenFlags.Unterminated;
+                break;
+            }
+            pos++;
+        }
+        return result;
+    }
+    function scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError) {
+        const startedWithBacktick = charCodeUnchecked(pos) === CharacterCodes.backtick;
+        pos++;
+        let start = pos;
+        let contents = "";
+        let resultingToken;
+        while (true) {
+            if (pos >= end) {
+                contents += text.substring(start, pos);
+                tokenFlags |= TokenFlags.Unterminated;
+                resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail;
+                break;
+            }
+            const currChar = charCodeUnchecked(pos);
+            if (currChar === CharacterCodes.backtick) {
+                contents += text.substring(start, pos);
+                pos++;
+                resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail;
+                break;
+            }
+            if (currChar === CharacterCodes.$ && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.openBrace) {
+                contents += text.substring(start, pos);
+                pos += 2;
+                resultingToken = startedWithBacktick ? SyntaxKind.TemplateHead : SyntaxKind.TemplateMiddle;
+                break;
+            }
+            if (currChar === CharacterCodes.backslash) {
+                contents += text.substring(start, pos);
+                contents += scanEscapeSequence(EscapeSequenceScanningFlags.String | (shouldEmitInvalidEscapeError ? EscapeSequenceScanningFlags.ReportErrors : 0));
+                start = pos;
+                continue;
+            }
+            if (currChar === CharacterCodes.carriageReturn) {
+                contents += text.substring(start, pos);
+                pos++;
+                if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) {
+                    pos++;
+                }
+                contents += "\n";
+                start = pos;
+                continue;
+            }
+            pos++;
+        }
+        tokenValue = contents;
+        return resultingToken;
+    }
+    function scanEscapeSequence(flags) {
+        const start = pos;
+        pos++;
+        if (pos >= end) {
+            return "";
+        }
+        const ch = charCodeUnchecked(pos);
+        pos++;
+        switch (ch) {
+            case CharacterCodes._0:
+                if (pos >= end || !isDigit(charCodeUnchecked(pos))) {
+                    return "\0";
+                }
+            // falls through
+            case CharacterCodes._1:
+            case CharacterCodes._2:
+            case CharacterCodes._3:
+                if (pos < end && isOctalDigit(charCodeUnchecked(pos))) {
+                    pos++;
+                }
+            // falls through
+            case CharacterCodes._4:
+            case CharacterCodes._5:
+            case CharacterCodes._6:
+            case CharacterCodes._7:
+                if (pos < end && isOctalDigit(charCodeUnchecked(pos))) {
+                    pos++;
+                }
+                tokenFlags |= TokenFlags.ContainsInvalidEscape;
+                if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) {
+                    const code = parseInt(text.substring(start + 1, pos), 8);
+                    return String.fromCharCode(code);
+                }
+                return text.substring(start, pos);
+            case CharacterCodes._8:
+            case CharacterCodes._9:
+                tokenFlags |= TokenFlags.ContainsInvalidEscape;
+                if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) {
+                    return String.fromCharCode(ch);
+                }
+                return text.substring(start, pos);
+            case CharacterCodes.b:
+                return "\b";
+            case CharacterCodes.t:
+                return "\t";
+            case CharacterCodes.n:
+                return "\n";
+            case CharacterCodes.v:
+                return "\v";
+            case CharacterCodes.f:
+                return "\f";
+            case CharacterCodes.r:
+                return "\r";
+            case CharacterCodes.singleQuote:
+                return "'";
+            case CharacterCodes.doubleQuote:
+                return '"';
+            case CharacterCodes.u:
+                if (pos < end && charCodeUnchecked(pos) === CharacterCodes.openBrace) {
+                    pos -= 2;
+                    const result = scanExtendedUnicodeEscape();
+                    if (!(flags & EscapeSequenceScanningFlags.AllowExtendedUnicodeEscape)) {
+                        tokenFlags |= TokenFlags.ContainsInvalidEscape;
+                    }
+                    return result;
+                }
+                // '\uDDDD'
+                for (; pos < start + 6; pos++) {
+                    if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) {
+                        tokenFlags |= TokenFlags.ContainsInvalidEscape;
+                        return text.substring(start, pos);
+                    }
+                }
+                tokenFlags |= TokenFlags.UnicodeEscape;
+                {
+                    const escapedValue = parseInt(text.substring(start + 2, pos), 16);
+                    const escapedValueString = String.fromCharCode(escapedValue);
+                    if (flags & EscapeSequenceScanningFlags.AnyUnicodeMode && escapedValue >= 0xD800 && escapedValue <= 0xDBFF &&
+                        pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && charCodeUnchecked(pos + 2) !== CharacterCodes.openBrace) {
+                        const nextStart = pos;
+                        let nextPos = pos + 2;
+                        for (; nextPos < nextStart + 6; nextPos++) {
+                            if (!isHexDigit(charCodeUnchecked(nextPos))) {
+                                return escapedValueString;
+                            }
+                        }
+                        const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16);
+                        if (nextEscapedValue >= 0xDC00 && nextEscapedValue <= 0xDFFF) {
+                            pos = nextPos;
+                            return escapedValueString + String.fromCharCode(nextEscapedValue);
+                        }
+                    }
+                    return escapedValueString;
+                }
+            case CharacterCodes.x:
+                for (; pos < start + 4; pos++) {
+                    if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) {
+                        tokenFlags |= TokenFlags.ContainsInvalidEscape;
+                        return text.substring(start, pos);
+                    }
+                }
+                tokenFlags |= TokenFlags.HexEscape;
+                return String.fromCharCode(parseInt(text.substring(start + 2, pos), 16));
+            case CharacterCodes.carriageReturn:
+                if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) {
+                    pos++;
+                }
+            // falls through
+            case CharacterCodes.lineFeed:
+            case CharacterCodes.lineSeparator:
+            case CharacterCodes.paragraphSeparator:
+                return "";
+            default:
+                return String.fromCharCode(ch);
+        }
+    }
+    function scanExtendedUnicodeEscape() {
+        const start = pos;
+        pos += 3;
+        const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false);
+        const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
+        let isInvalidExtendedEscape = false;
+        if (escapedValue < 0) {
+            isInvalidExtendedEscape = true;
+        }
+        else if (escapedValue > 0x10FFFF) {
+            isInvalidExtendedEscape = true;
+        }
+        if (pos >= end) {
+            isInvalidExtendedEscape = true;
+        }
+        else if (charCodeUnchecked(pos) === CharacterCodes.closeBrace) {
+            pos++;
+        }
+        else {
+            isInvalidExtendedEscape = true;
+        }
+        if (isInvalidExtendedEscape) {
+            tokenFlags |= TokenFlags.ContainsInvalidEscape;
+            return text.substring(start, pos);
+        }
+        tokenFlags |= TokenFlags.ExtendedUnicodeEscape;
+        return utf16EncodeAsString(escapedValue);
+    }
+    function peekUnicodeEscape() {
+        if (pos + 5 < end && charCodeUnchecked(pos + 1) === CharacterCodes.u) {
+            const start = pos;
+            pos += 2;
+            const value = scanExactNumberOfHexDigits(4, /*canHaveSeparators*/ false);
+            pos = start;
+            return value;
+        }
+        return -1;
+    }
+    function peekExtendedUnicodeEscape() {
+        if (codePointUnchecked(pos + 1) === CharacterCodes.u && codePointUnchecked(pos + 2) === CharacterCodes.openBrace) {
+            const start = pos;
+            pos += 3;
+            const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false);
+            const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
+            pos = start;
+            return escapedValue;
+        }
+        return -1;
+    }
+    function scanIdentifierParts() {
+        let result = "";
+        let start = pos;
+        while (pos < end) {
+            let ch = codePointUnchecked(pos);
+            if (isIdentifierPart(ch)) {
+                pos += charSize(ch);
+            }
+            else if (ch === CharacterCodes.backslash) {
+                ch = peekExtendedUnicodeEscape();
+                if (ch >= 0 && isIdentifierPart(ch)) {
+                    result += scanExtendedUnicodeEscape();
+                    start = pos;
+                    continue;
+                }
+                ch = peekUnicodeEscape();
+                if (!(ch >= 0 && isIdentifierPart(ch))) {
+                    break;
+                }
+                tokenFlags |= TokenFlags.UnicodeEscape;
+                result += text.substring(start, pos);
+                result += utf16EncodeAsString(ch);
+                pos += 6;
+                start = pos;
+            }
+            else {
+                break;
+            }
+        }
+        result += text.substring(start, pos);
+        return result;
+    }
+    function getIdentifierToken() {
+        const len = tokenValue.length;
+        if (len >= 2 && len <= 12) {
+            const ch = tokenValue.charCodeAt(0);
+            if (ch >= CharacterCodes.a && ch <= CharacterCodes.z) {
+                const keyword = textToKeyword.get(tokenValue);
+                if (keyword !== undefined) {
+                    return token = keyword;
+                }
+            }
+        }
+        return token = SyntaxKind.Identifier;
+    }
+    function scanBinaryOrOctalDigits(base) {
+        let value = "";
+        let separatorAllowed = false;
+        let isPreviousTokenSeparator = false;
+        while (true) {
+            const ch = charCodeUnchecked(pos);
+            if (ch === CharacterCodes._) {
+                tokenFlags |= TokenFlags.ContainsSeparator;
+                if (separatorAllowed) {
+                    separatorAllowed = false;
+                    isPreviousTokenSeparator = true;
+                }
+                pos++;
+                continue;
+            }
+            separatorAllowed = true;
+            if (!isDigit(ch) || ch - CharacterCodes._0 >= base) {
+                break;
+            }
+            value += text[pos];
+            pos++;
+            isPreviousTokenSeparator = false;
+        }
+        return value;
+    }
+    function checkBigIntSuffix() {
+        if (charCodeUnchecked(pos) === CharacterCodes.n) {
+            tokenValue += "n";
+            if (tokenFlags & TokenFlags.BinaryOrOctalSpecifier) {
+                tokenValue = parsePseudoBigInt(tokenValue) + "n";
+            }
+            pos++;
+            return SyntaxKind.BigIntLiteral;
+        }
+        else {
+            const numericValue = tokenFlags & TokenFlags.BinarySpecifier
+                ? parseInt(tokenValue.slice(2), 2)
+                : tokenFlags & TokenFlags.OctalSpecifier
+                    ? parseInt(tokenValue.slice(2), 8)
+                    : +tokenValue;
+            tokenValue = "" + numericValue;
+            return SyntaxKind.NumericLiteral;
+        }
+    }
+    function scan() {
+        fullStartPos = pos;
+        tokenFlags = TokenFlags.None;
+        while (true) {
+            tokenStart = pos;
+            if (pos >= end) {
+                return token = SyntaxKind.EndOfFile;
+            }
+            const ch = codePointUnchecked(pos);
+            if (pos === 0) {
+                if (ch === CharacterCodes.hash && isShebangTrivia(text, pos)) {
+                    pos = scanShebangTrivia(text, pos);
+                    if (skipTrivia) {
+                        continue;
+                    }
+                    else {
+                        return token = SyntaxKind.Unknown;
+                    }
+                }
+            }
+            switch (ch) {
+                case CharacterCodes.lineFeed:
+                case CharacterCodes.carriageReturn:
+                    tokenFlags |= TokenFlags.PrecedingLineBreak;
+                    if (skipTrivia) {
+                        pos++;
+                        continue;
+                    }
+                    else {
+                        if (ch === CharacterCodes.carriageReturn && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.lineFeed) {
+                            pos += 2;
+                        }
+                        else {
+                            pos++;
+                        }
+                        return token = SyntaxKind.NewLineTrivia;
+                    }
+                case CharacterCodes.tab:
+                case CharacterCodes.verticalTab:
+                case CharacterCodes.formFeed:
+                case CharacterCodes.space:
+                case CharacterCodes.nonBreakingSpace:
+                case CharacterCodes.ogham:
+                case CharacterCodes.enQuad:
+                case CharacterCodes.emQuad:
+                case CharacterCodes.enSpace:
+                case CharacterCodes.emSpace:
+                case CharacterCodes.threePerEmSpace:
+                case CharacterCodes.fourPerEmSpace:
+                case CharacterCodes.sixPerEmSpace:
+                case CharacterCodes.figureSpace:
+                case CharacterCodes.punctuationSpace:
+                case CharacterCodes.thinSpace:
+                case CharacterCodes.hairSpace:
+                case CharacterCodes.zeroWidthSpace:
+                case CharacterCodes.narrowNoBreakSpace:
+                case CharacterCodes.mathematicalSpace:
+                case CharacterCodes.ideographicSpace:
+                case CharacterCodes.byteOrderMark:
+                    if (skipTrivia) {
+                        pos++;
+                        continue;
+                    }
+                    else {
+                        while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
+                            pos++;
+                        }
+                        return token = SyntaxKind.WhitespaceTrivia;
+                    }
+                case CharacterCodes.exclamation:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.ExclamationEqualsEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.ExclamationEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.ExclamationToken;
+                case CharacterCodes.doubleQuote:
+                case CharacterCodes.singleQuote:
+                    tokenValue = scanString();
+                    return token = SyntaxKind.StringLiteral;
+                case CharacterCodes.backtick:
+                    return token = scanTemplateAndSetTokenValue(/*shouldEmitInvalidEscapeError*/ false);
+                case CharacterCodes.percent:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.PercentEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.PercentToken;
+                case CharacterCodes.ampersand:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.ampersand) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.AmpersandAmpersandEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.AmpersandAmpersandToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.AmpersandEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.AmpersandToken;
+                case CharacterCodes.openParen:
+                    pos++;
+                    return token = SyntaxKind.OpenParenToken;
+                case CharacterCodes.closeParen:
+                    pos++;
+                    return token = SyntaxKind.CloseParenToken;
+                case CharacterCodes.asterisk:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.AsteriskEqualsToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.asterisk) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.AsteriskAsteriskEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.AsteriskAsteriskToken;
+                    }
+                    pos++;
+                    if (skipJsDocLeadingAsterisks &&
+                        (tokenFlags & TokenFlags.PrecedingJSDocLeadingAsterisks) === 0 &&
+                        (tokenFlags & TokenFlags.PrecedingLineBreak)) {
+                        tokenFlags |= TokenFlags.PrecedingJSDocLeadingAsterisks;
+                        continue;
+                    }
+                    return token = SyntaxKind.AsteriskToken;
+                case CharacterCodes.plus:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.plus) {
+                        return pos += 2, token = SyntaxKind.PlusPlusToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.PlusEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.PlusToken;
+                case CharacterCodes.comma:
+                    pos++;
+                    return token = SyntaxKind.CommaToken;
+                case CharacterCodes.minus:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.minus) {
+                        return pos += 2, token = SyntaxKind.MinusMinusToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.MinusEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.MinusToken;
+                case CharacterCodes.dot:
+                    if (isDigit(charCodeUnchecked(pos + 1))) {
+                        scanNumber();
+                        return token = SyntaxKind.NumericLiteral;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.dot && charCodeUnchecked(pos + 2) === CharacterCodes.dot) {
+                        return pos += 3, token = SyntaxKind.DotDotDotToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.DotToken;
+                case CharacterCodes.slash:
+                    // Single-line comment
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) {
+                        pos += 2;
+                        while (pos < end) {
+                            if (isLineBreak(charCodeUnchecked(pos))) {
+                                break;
+                            }
+                            pos++;
+                        }
+                        commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, tokenStart);
+                        if (skipTrivia) {
+                            continue;
+                        }
+                        else {
+                            return token = SyntaxKind.SingleLineCommentTrivia;
+                        }
+                    }
+                    // Multi-line comment
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.asterisk) {
+                        pos += 2;
+                        const isJSDoc = charCodeUnchecked(pos) === CharacterCodes.asterisk && charCodeUnchecked(pos + 1) !== CharacterCodes.slash;
+                        let commentClosed = false;
+                        let lastLineStart = tokenStart;
+                        while (pos < end) {
+                            const ch = charCodeUnchecked(pos);
+                            if (ch === CharacterCodes.asterisk && charCodeUnchecked(pos + 1) === CharacterCodes.slash) {
+                                pos += 2;
+                                commentClosed = true;
+                                break;
+                            }
+                            pos++;
+                            if (isLineBreak(ch)) {
+                                lastLineStart = pos;
+                                tokenFlags |= TokenFlags.PrecedingLineBreak;
+                            }
+                        }
+                        if (isJSDoc) {
+                            tokenFlags |= TokenFlags.PrecedingJSDocComment;
+                            tokenFlags = scanJSDocCommentForTags(text.slice(tokenStart, pos), tokenFlags);
+                        }
+                        commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
+                        if (skipTrivia) {
+                            continue;
+                        }
+                        else {
+                            if (!commentClosed) {
+                                tokenFlags |= TokenFlags.Unterminated;
+                            }
+                            return token = SyntaxKind.MultiLineCommentTrivia;
+                        }
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.SlashEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.SlashToken;
+                case CharacterCodes._0:
+                    if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.X || charCodeUnchecked(pos + 1) === CharacterCodes.x)) {
+                        pos += 2;
+                        tokenValue = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ true);
+                        if (!tokenValue) {
+                            tokenValue = "0";
+                        }
+                        tokenValue = "0x" + tokenValue;
+                        tokenFlags |= TokenFlags.HexSpecifier;
+                        return token = checkBigIntSuffix();
+                    }
+                    else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.B || charCodeUnchecked(pos + 1) === CharacterCodes.b)) {
+                        pos += 2;
+                        tokenValue = scanBinaryOrOctalDigits(2);
+                        if (!tokenValue) {
+                            tokenValue = "0";
+                        }
+                        tokenValue = "0b" + tokenValue;
+                        tokenFlags |= TokenFlags.BinarySpecifier;
+                        return token = checkBigIntSuffix();
+                    }
+                    else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.O || charCodeUnchecked(pos + 1) === CharacterCodes.o)) {
+                        pos += 2;
+                        tokenValue = scanBinaryOrOctalDigits(8);
+                        if (!tokenValue) {
+                            tokenValue = "0";
+                        }
+                        tokenValue = "0o" + tokenValue;
+                        tokenFlags |= TokenFlags.OctalSpecifier;
+                        return token = checkBigIntSuffix();
+                    }
+                // falls through
+                case CharacterCodes._1:
+                case CharacterCodes._2:
+                case CharacterCodes._3:
+                case CharacterCodes._4:
+                case CharacterCodes._5:
+                case CharacterCodes._6:
+                case CharacterCodes._7:
+                case CharacterCodes._8:
+                case CharacterCodes._9:
+                    return token = scanNumber();
+                case CharacterCodes.colon:
+                    pos++;
+                    return token = SyntaxKind.ColonToken;
+                case CharacterCodes.semicolon:
+                    pos++;
+                    return token = SyntaxKind.SemicolonToken;
+                case CharacterCodes.lessThan:
+                    if (isConflictMarkerTrivia(text, pos)) {
+                        pos = scanConflictMarkerTrivia(text, pos);
+                        if (skipTrivia) {
+                            continue;
+                        }
+                        else {
+                            return token = SyntaxKind.ConflictMarkerTrivia;
+                        }
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.lessThan) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.LessThanLessThanEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.LessThanLessThanToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.LessThanEqualsToken;
+                    }
+                    if (languageVariant === LanguageVariant.JSX &&
+                        charCodeUnchecked(pos + 1) === CharacterCodes.slash &&
+                        charCodeUnchecked(pos + 2) !== CharacterCodes.asterisk) {
+                        return pos += 2, token = SyntaxKind.LessThanSlashToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.LessThanToken;
+                case CharacterCodes.equals:
+                    if (isConflictMarkerTrivia(text, pos)) {
+                        pos = scanConflictMarkerTrivia(text, pos);
+                        if (skipTrivia) {
+                            continue;
+                        }
+                        else {
+                            return token = SyntaxKind.ConflictMarkerTrivia;
+                        }
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.EqualsEqualsEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.EqualsEqualsToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) {
+                        return pos += 2, token = SyntaxKind.EqualsGreaterThanToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.EqualsToken;
+                case CharacterCodes.greaterThan:
+                    if (isConflictMarkerTrivia(text, pos)) {
+                        pos = scanConflictMarkerTrivia(text, pos);
+                        if (skipTrivia) {
+                            continue;
+                        }
+                        else {
+                            return token = SyntaxKind.ConflictMarkerTrivia;
+                        }
+                    }
+                    pos++;
+                    return token = SyntaxKind.GreaterThanToken;
+                case CharacterCodes.question:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.dot && !isDigit(charCodeUnchecked(pos + 2))) {
+                        return pos += 2, token = SyntaxKind.QuestionDotToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.question) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.QuestionQuestionEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.QuestionQuestionToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.QuestionToken;
+                case CharacterCodes.openBracket:
+                    pos++;
+                    return token = SyntaxKind.OpenBracketToken;
+                case CharacterCodes.closeBracket:
+                    pos++;
+                    return token = SyntaxKind.CloseBracketToken;
+                case CharacterCodes.caret:
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.CaretEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.CaretToken;
+                case CharacterCodes.openBrace:
+                    pos++;
+                    return token = SyntaxKind.OpenBraceToken;
+                case CharacterCodes.bar:
+                    if (isConflictMarkerTrivia(text, pos)) {
+                        pos = scanConflictMarkerTrivia(text, pos);
+                        if (skipTrivia) {
+                            continue;
+                        }
+                        else {
+                            return token = SyntaxKind.ConflictMarkerTrivia;
+                        }
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.bar) {
+                        if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                            return pos += 3, token = SyntaxKind.BarBarEqualsToken;
+                        }
+                        return pos += 2, token = SyntaxKind.BarBarToken;
+                    }
+                    if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                        return pos += 2, token = SyntaxKind.BarEqualsToken;
+                    }
+                    pos++;
+                    return token = SyntaxKind.BarToken;
+                case CharacterCodes.closeBrace:
+                    pos++;
+                    return token = SyntaxKind.CloseBraceToken;
+                case CharacterCodes.tilde:
+                    pos++;
+                    return token = SyntaxKind.TildeToken;
+                case CharacterCodes.at:
+                    pos++;
+                    return token = SyntaxKind.AtToken;
+                case CharacterCodes.backslash: {
+                    const extendedCookedChar = peekExtendedUnicodeEscape();
+                    if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) {
+                        tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
+                        return token = getIdentifierToken();
+                    }
+                    const cookedChar = peekUnicodeEscape();
+                    if (cookedChar >= 0 && isIdentifierStart(cookedChar)) {
+                        pos += 6;
+                        tokenFlags |= TokenFlags.UnicodeEscape;
+                        tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();
+                        return token = getIdentifierToken();
+                    }
+                    pos++;
+                    return token = SyntaxKind.Unknown;
+                }
+                case CharacterCodes.hash:
+                    if (pos !== 0 && text[pos + 1] === "!") {
+                        pos++;
+                        return token = SyntaxKind.Unknown;
+                    }
+                    {
+                        const charAfterHash = codePointUnchecked(pos + 1);
+                        if (charAfterHash === CharacterCodes.backslash) {
+                            pos++;
+                            const extendedCookedChar = peekExtendedUnicodeEscape();
+                            if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) {
+                                tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
+                                return token = SyntaxKind.PrivateIdentifier;
+                            }
+                            const cookedChar = peekUnicodeEscape();
+                            if (cookedChar >= 0 && isIdentifierStart(cookedChar)) {
+                                pos += 6;
+                                tokenFlags |= TokenFlags.UnicodeEscape;
+                                tokenValue = "#" + String.fromCharCode(cookedChar) + scanIdentifierParts();
+                                return token = SyntaxKind.PrivateIdentifier;
+                            }
+                            pos--;
+                        }
+                        if (isIdentifierStart(charAfterHash)) {
+                            pos++;
+                            scanIdentifier(charAfterHash);
+                        }
+                        else {
+                            tokenValue = "#";
+                        }
+                        return token = SyntaxKind.PrivateIdentifier;
+                    }
+                case CharacterCodes.replacementCharacter:
+                    pos = end;
+                    return token = SyntaxKind.NonTextFileMarkerTrivia;
+                default: {
+                    const identifierKind = scanIdentifier(ch);
+                    if (identifierKind) {
+                        return token = identifierKind;
+                    }
+                    else if (isWhiteSpaceSingleLine(ch)) {
+                        pos += charSize(ch);
+                        continue;
+                    }
+                    else if (isLineBreak(ch)) {
+                        tokenFlags |= TokenFlags.PrecedingLineBreak;
+                        pos += charSize(ch);
+                        continue;
+                    }
+                    const size = charSize(ch);
+                    pos += size;
+                    return token = SyntaxKind.Unknown;
+                }
+            }
+        }
+    }
+    function reScanInvalidIdentifier() {
+        pos = tokenStart = fullStartPos;
+        tokenFlags = 0;
+        const ch = codePointUnchecked(pos);
+        const identifierKind = scanIdentifier(ch);
+        if (identifierKind) {
+            return token = identifierKind;
+        }
+        pos += charSize(ch);
+        return token; // Still `SyntaxKind.Unknown`
+    }
+    function scanIdentifier(startCharacter) {
+        let ch = startCharacter;
+        if (isIdentifierStart(ch)) {
+            pos += charSize(ch);
+            while (pos < end && isIdentifierPart(ch = codePointUnchecked(pos)))
+                pos += charSize(ch);
+            tokenValue = text.substring(tokenStart, pos);
+            if (ch === CharacterCodes.backslash) {
+                tokenValue += scanIdentifierParts();
+            }
+            return getIdentifierToken();
+        }
+    }
+    function reScanGreaterToken() {
+        if (token === SyntaxKind.GreaterThanToken) {
+            if (charCodeUnchecked(pos) === CharacterCodes.greaterThan) {
+                if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) {
+                    if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) {
+                        return pos += 3, token = SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken;
+                    }
+                    return pos += 2, token = SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
+                }
+                if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
+                    return pos += 2, token = SyntaxKind.GreaterThanGreaterThanEqualsToken;
+                }
+                pos++;
+                return token = SyntaxKind.GreaterThanGreaterThanToken;
+            }
+            if (charCodeUnchecked(pos) === CharacterCodes.equals) {
+                pos++;
+                return token = SyntaxKind.GreaterThanEqualsToken;
+            }
+        }
+        return token;
+    }
+    function reScanAsteriskEqualsToken() {
+        pos = tokenStart + 1;
+        return token = SyntaxKind.EqualsToken;
+    }
+    function reScanSlashToken() {
+        if (token === SyntaxKind.SlashToken || token === SyntaxKind.SlashEqualsToken) {
+            const startOfRegExpBody = tokenStart + 1;
+            pos = startOfRegExpBody;
+            let inEscape = false;
+            let inCharacterClass = false;
+            while (true) {
+                const ch = charCodeChecked(pos);
+                if (ch === CharacterCodes.EOF || isLineBreak(ch)) {
+                    tokenFlags |= TokenFlags.Unterminated;
+                    break;
+                }
+                if (inEscape) {
+                    inEscape = false;
+                }
+                else if (ch === CharacterCodes.slash && !inCharacterClass) {
+                    break;
+                }
+                else if (ch === CharacterCodes.openBracket) {
+                    inCharacterClass = true;
+                }
+                else if (ch === CharacterCodes.backslash) {
+                    inEscape = true;
+                }
+                else if (ch === CharacterCodes.closeBracket) {
+                    inCharacterClass = false;
+                }
+                pos++;
+            }
+            if (tokenFlags & TokenFlags.Unterminated) {
+                // Find best recovery position
+                pos = startOfRegExpBody;
+                inEscape = false;
+                let characterClassDepth = 0;
+                let inDecimalQuantifier = false;
+                let groupDepth = 0;
+                while (pos < end && !isLineBreak(charCodeUnchecked(pos))) {
+                    const ch = charCodeUnchecked(pos);
+                    if (inEscape) {
+                        inEscape = false;
+                    }
+                    else if (ch === CharacterCodes.backslash) {
+                        inEscape = true;
+                    }
+                    else if (ch === CharacterCodes.openBracket) {
+                        characterClassDepth++;
+                    }
+                    else if (ch === CharacterCodes.closeBracket && characterClassDepth) {
+                        characterClassDepth--;
+                    }
+                    else if (!characterClassDepth) {
+                        if (ch === CharacterCodes.openBrace) {
+                            inDecimalQuantifier = true;
+                        }
+                        else if (ch === CharacterCodes.closeBrace && inDecimalQuantifier) {
+                            inDecimalQuantifier = false;
+                        }
+                        else if (!inDecimalQuantifier) {
+                            if (ch === CharacterCodes.openParen) {
+                                groupDepth++;
+                            }
+                            else if (ch === CharacterCodes.closeParen && groupDepth) {
+                                groupDepth--;
+                            }
+                            else if (ch === CharacterCodes.closeParen || ch === CharacterCodes.closeBracket || ch === CharacterCodes.closeBrace) {
+                                break;
+                            }
+                        }
+                    }
+                    pos++;
+                }
+                while (isWhiteSpaceLike(charCodeChecked(pos - 1)) || charCodeChecked(pos - 1) === CharacterCodes.semicolon)
+                    pos--;
+            }
+            else {
+                pos++;
+                let regExpFlags = RegularExpressionFlags.None;
+                while (true) {
+                    const ch = codePointChecked(pos);
+                    if (ch === CharacterCodes.EOF || !isIdentifierPart(ch)) {
+                        break;
+                    }
+                    const size = charSize(ch);
+                    const flag = characterCodeToRegularExpressionFlag(ch);
+                    if (flag !== undefined) {
+                        regExpFlags |= flag;
+                    }
+                    pos += size;
+                }
+            }
+            tokenValue = text.substring(tokenStart, pos);
+            token = SyntaxKind.RegularExpressionLiteral;
+        }
+        return token;
+    }
+    function appendIfCommentDirective(commentDirectives, text, commentDirectiveRegEx, lineStart) {
+        const type = getDirectiveFromComment(text.trimStart(), commentDirectiveRegEx);
+        if (type === undefined) {
+            return commentDirectives;
+        }
+        if (!commentDirectives) {
+            commentDirectives = [];
+        }
+        commentDirectives.push({
+            range: { pos: lineStart, end: pos },
+            type,
+        });
+        return commentDirectives;
+    }
+    function getDirectiveFromComment(text, commentDirectiveRegEx) {
+        const match = commentDirectiveRegEx.exec(text);
+        if (!match) {
+            return undefined;
+        }
+        switch (match[1]) {
+            case "ts-expect-error":
+                return CommentDirectiveType.ExpectError;
+            case "ts-ignore":
+                return CommentDirectiveType.Ignore;
+        }
+        return undefined;
+    }
+    function reScanTemplateToken(isTaggedTemplate) {
+        pos = tokenStart;
+        return token = scanTemplateAndSetTokenValue(!isTaggedTemplate);
+    }
+    function reScanTemplateHeadOrNoSubstitutionTemplate() {
+        pos = tokenStart;
+        return token = scanTemplateAndSetTokenValue(/*shouldEmitInvalidEscapeError*/ true);
+    }
+    function reScanJsxToken(allowMultilineJsxText = true) {
+        pos = tokenStart = fullStartPos;
+        return token = scanJsxToken(allowMultilineJsxText);
+    }
+    function reScanLessThanToken() {
+        if (token === SyntaxKind.LessThanLessThanToken) {
+            pos = tokenStart + 1;
+            return token = SyntaxKind.LessThanToken;
+        }
+        return token;
+    }
+    function reScanHashToken() {
+        if (token === SyntaxKind.PrivateIdentifier) {
+            pos = tokenStart + 1;
+            return token = SyntaxKind.HashToken;
+        }
+        return token;
+    }
+    function reScanQuestionToken() {
+        pos = tokenStart + 1;
+        return token = SyntaxKind.QuestionToken;
+    }
+    function scanJsxToken(allowMultilineJsxText = true) {
+        fullStartPos = tokenStart = pos;
+        if (pos >= end) {
+            return token = SyntaxKind.EndOfFile;
+        }
+        let char = charCodeUnchecked(pos);
+        if (char === CharacterCodes.lessThan) {
+            if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) {
+                pos += 2;
+                return token = SyntaxKind.LessThanSlashToken;
+            }
+            pos++;
+            return token = SyntaxKind.LessThanToken;
+        }
+        if (char === CharacterCodes.openBrace) {
+            pos++;
+            return token = SyntaxKind.OpenBraceToken;
+        }
+        let firstNonWhitespace = 0;
+        while (pos < end) {
+            char = charCodeUnchecked(pos);
+            if (char === CharacterCodes.openBrace) {
+                break;
+            }
+            if (char === CharacterCodes.lessThan) {
+                if (isConflictMarkerTrivia(text, pos)) {
+                    pos = scanConflictMarkerTrivia(text, pos);
+                    return token = SyntaxKind.ConflictMarkerTrivia;
+                }
+                break;
+            }
+            if (isLineBreak(char) && firstNonWhitespace === 0) {
+                firstNonWhitespace = -1;
+            }
+            else if (!allowMultilineJsxText && isLineBreak(char) && firstNonWhitespace > 0) {
+                break;
+            }
+            else if (!isWhiteSpaceLike(char)) {
+                firstNonWhitespace = pos;
+            }
+            pos++;
+        }
+        tokenValue = text.substring(fullStartPos, pos);
+        return firstNonWhitespace === -1 ? SyntaxKind.JsxTextAllWhiteSpaces : SyntaxKind.JsxText;
+    }
+    function scanJsxIdentifier() {
+        if (tokenIsIdentifierOrKeyword(token)) {
+            while (pos < end) {
+                const ch = charCodeUnchecked(pos);
+                if (ch === CharacterCodes.minus) {
+                    tokenValue += "-";
+                    pos++;
+                    continue;
+                }
+                const oldPos = pos;
+                tokenValue += scanIdentifierParts();
+                if (pos === oldPos) {
+                    break;
+                }
+            }
+            return getIdentifierToken();
+        }
+        return token;
+    }
+    function scanJsxAttributeValue() {
+        fullStartPos = pos;
+        switch (charCodeUnchecked(pos)) {
+            case CharacterCodes.doubleQuote:
+            case CharacterCodes.singleQuote:
+                tokenValue = scanString(/*jsxAttributeString*/ true);
+                return token = SyntaxKind.StringLiteral;
+            default:
+                return scan();
+        }
+    }
+    function reScanJsxAttributeValue() {
+        pos = tokenStart = fullStartPos;
+        return scanJsxAttributeValue();
+    }
+    function scanJSDocCommentTextToken(inBackticks) {
+        fullStartPos = tokenStart = pos;
+        tokenFlags = TokenFlags.None;
+        if (pos >= end) {
+            return token = SyntaxKind.EndOfFile;
+        }
+        for (let ch = charCodeUnchecked(pos); pos < end && (!isLineBreak(ch) && ch !== CharacterCodes.backtick); ch = codePointUnchecked(++pos)) {
+            if (!inBackticks) {
+                if (ch === CharacterCodes.openBrace) {
+                    break;
+                }
+                else if (ch === CharacterCodes.at
+                    && pos - 1 >= 0 && isWhiteSpaceSingleLine(charCodeUnchecked(pos - 1))
+                    && pos + 1 < end && isIdentifierStart(charCodeUnchecked(pos + 1))) {
+                    break;
+                }
+            }
+        }
+        if (pos === tokenStart) {
+            return scanJsDocToken();
+        }
+        tokenValue = text.substring(tokenStart, pos);
+        return token = SyntaxKind.JSDocCommentTextToken;
+    }
+    function scanJsDocToken() {
+        fullStartPos = tokenStart = pos;
+        tokenFlags = TokenFlags.None;
+        if (pos >= end) {
+            return token = SyntaxKind.EndOfFile;
+        }
+        const ch = codePointUnchecked(pos);
+        pos += charSize(ch);
+        switch (ch) {
+            case CharacterCodes.tab:
+            case CharacterCodes.verticalTab:
+            case CharacterCodes.formFeed:
+            case CharacterCodes.space:
+                while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
+                    pos++;
+                }
+                return token = SyntaxKind.WhitespaceTrivia;
+            case CharacterCodes.at:
+                return token = SyntaxKind.AtToken;
+            case CharacterCodes.carriageReturn:
+                if (charCodeUnchecked(pos) === CharacterCodes.lineFeed) {
+                    pos++;
+                }
+            // falls through
+            case CharacterCodes.lineFeed:
+                tokenFlags |= TokenFlags.PrecedingLineBreak;
+                return token = SyntaxKind.NewLineTrivia;
+            case CharacterCodes.asterisk:
+                return token = SyntaxKind.AsteriskToken;
+            case CharacterCodes.openBrace:
+                return token = SyntaxKind.OpenBraceToken;
+            case CharacterCodes.closeBrace:
+                return token = SyntaxKind.CloseBraceToken;
+            case CharacterCodes.openBracket:
+                return token = SyntaxKind.OpenBracketToken;
+            case CharacterCodes.closeBracket:
+                return token = SyntaxKind.CloseBracketToken;
+            case CharacterCodes.openParen:
+                return token = SyntaxKind.OpenParenToken;
+            case CharacterCodes.closeParen:
+                return token = SyntaxKind.CloseParenToken;
+            case CharacterCodes.lessThan:
+                return token = SyntaxKind.LessThanToken;
+            case CharacterCodes.greaterThan:
+                return token = SyntaxKind.GreaterThanToken;
+            case CharacterCodes.equals:
+                return token = SyntaxKind.EqualsToken;
+            case CharacterCodes.comma:
+                return token = SyntaxKind.CommaToken;
+            case CharacterCodes.dot:
+                return token = SyntaxKind.DotToken;
+            case CharacterCodes.backtick:
+                return token = SyntaxKind.BacktickToken;
+            case CharacterCodes.hash:
+                return token = SyntaxKind.HashToken;
+            case CharacterCodes.backslash:
+                pos--;
+                {
+                    const extendedCookedChar = peekExtendedUnicodeEscape();
+                    if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) {
+                        tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
+                        return token = getIdentifierToken();
+                    }
+                    const cookedChar = peekUnicodeEscape();
+                    if (cookedChar >= 0 && isIdentifierStart(cookedChar)) {
+                        pos += 6;
+                        tokenFlags |= TokenFlags.UnicodeEscape;
+                        tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();
+                        return token = getIdentifierToken();
+                    }
+                }
+                pos++;
+                return token = SyntaxKind.Unknown;
+        }
+        if (isIdentifierStart(ch)) {
+            let char = ch;
+            while (pos < end && isIdentifierPart(char = codePointUnchecked(pos)) || char === CharacterCodes.minus)
+                pos += charSize(char);
+            tokenValue = text.substring(tokenStart, pos);
+            if (char === CharacterCodes.backslash) {
+                tokenValue += scanIdentifierParts();
+            }
+            return token = getIdentifierToken();
+        }
+        else {
+            return token = SyntaxKind.Unknown;
+        }
+    }
+    function speculationHelper(callback, isLookahead) {
+        const savePos = pos;
+        const saveStartPos = fullStartPos;
+        const saveTokenPos = tokenStart;
+        const saveToken = token;
+        const saveTokenValue = tokenValue;
+        const saveTokenFlags = tokenFlags;
+        const result = callback();
+        if (!result || isLookahead) {
+            pos = savePos;
+            fullStartPos = saveStartPos;
+            tokenStart = saveTokenPos;
+            token = saveToken;
+            tokenValue = saveTokenValue;
+            tokenFlags = saveTokenFlags;
+        }
+        return result;
+    }
+    function scanRange(start, length, callback) {
+        const saveEnd = end;
+        const savePos = pos;
+        const saveStartPos = fullStartPos;
+        const saveTokenPos = tokenStart;
+        const saveToken = token;
+        const saveTokenValue = tokenValue;
+        const saveTokenFlags = tokenFlags;
+        const saveErrorExpectations = commentDirectives;
+        setText(text, start, length);
+        const result = callback();
+        end = saveEnd;
+        pos = savePos;
+        fullStartPos = saveStartPos;
+        tokenStart = saveTokenPos;
+        token = saveToken;
+        tokenValue = saveTokenValue;
+        tokenFlags = saveTokenFlags;
+        commentDirectives = saveErrorExpectations;
+        return result;
+    }
+    function lookAhead(callback) {
+        return speculationHelper(callback, /*isLookahead*/ true);
+    }
+    function tryScan(callback) {
+        return speculationHelper(callback, /*isLookahead*/ false);
+    }
+    function getText() {
+        return text;
+    }
+    function clearCommentDirectives() {
+        commentDirectives = undefined;
+    }
+    function setText(newText, start, length) {
+        text = newText || "";
+        end = length === undefined ? text.length : start + length;
+        resetTokenState(start || 0);
+    }
+    function setLanguageVariant(variant) {
+        languageVariant = variant;
+    }
+    function resetTokenState(position) {
+        pos = position;
+        fullStartPos = position;
+        tokenStart = position;
+        token = SyntaxKind.Unknown;
+        tokenValue = undefined;
+        tokenFlags = TokenFlags.None;
+    }
+    function setSkipJsDocLeadingAsterisks(skip) {
+        skipJsDocLeadingAsterisks += skip ? 1 : -1;
+    }
+}
+//# sourceMappingURL=scanner.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/scanner.js.map b/node_modules/typescript/dist/ast/scanner.js.map
new file mode 100644
index 000000000..cbb1999be
--- /dev/null
+++ b/node_modules/typescript/dist/ast/scanner.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/ast/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAa/C,8BAA8B;AAC9B,MAAM,2BAA2B,GAAG;IAChC,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,CAAC;IACpB,iBAAiB,EAAE,CAAC,IAAI,CAAC;IACzB,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,cAAc,EAAE,CAAC,IAAI,CAAC;IACtB,UAAU,EAAE,CAAC,IAAI,CAAC;IAClB,yBAAyB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9C,0BAA0B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;CACzC,CAAC;AAGX,MAAM,UAAU,0BAA0B,CAAC,KAAiB;IACxD,OAAO,KAAK,IAAI,UAAU,CAAC,UAAU,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,KAAiB;IACrE,OAAO,KAAK,KAAK,UAAU,CAAC,gBAAgB,IAAI,0BAA0B,CAAC,KAAK,CAAC,CAA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Ae,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,SAAS,OAAO,CAAI,QAAiB;QACjC,OAAO,iBAAiB,CAAC,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;IAED,SAAS,OAAO;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,SAAS,sBAAsB;QAC3B,iBAAiB,GAAG,SAAS,CAAC;IAClC,CAAC;IAED,SAAS,OAAO,CAAC,OAA2B,EAAE,KAAyB,EAAE,MAA0B;QAC/F,IAAI,GAAG,OAAO,IAAI,EAAE,CAAC;QACrB,GAAG,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAM,GAAG,MAAM,CAAC;QAC3D,eAAe,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,kBAAkB,CAAC,OAAwB;QAChD,eAAe,GAAG,OAAO,CAAC;IAC9B,CAAC;IAED,SAAS,eAAe,CAAC,QAAgB;QACrC,GAAG,GAAG,QAAQ,CAAC;QACf,YAAY,GAAG,QAAQ,CAAC;QACxB,UAAU,GAAG,QAAQ,CAAC;QACtB,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;QAC3B,UAAU,GAAG,SAAU,CAAC;QACxB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,SAAS,4BAA4B,CAAC,IAAa;QAC/C,yBAAyB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/utils.d.ts b/node_modules/typescript/dist/ast/utils.d.ts
new file mode 100644
index 000000000..75e4cabd0
--- /dev/null
+++ b/node_modules/typescript/dist/ast/utils.d.ts
@@ -0,0 +1,17 @@
+import { SyntaxKind } from "#enums/syntaxKind";
+import type { __String, SourceFile } from "./ast.ts";
+export declare function formatSyntaxKind(kind: SyntaxKind): string;
+/**
+ * Remove one extra leading underscore from an identifier name, recovering the
+ * display form from its escaped {@link __String} key.
+ */
+export declare function unescapeLeadingUnderscores(identifier: __String): string;
+/**
+ * Add an extra leading underscore to a display name that already begins with
+ * `__`, producing its escaped {@link __String} key.
+ */
+export declare function escapeLeadingUnderscores(identifier: string): __String;
+export declare function tryCast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut | undefined;
+export declare function cast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut;
+export declare function cloneSourceFileData(sourceFile: SourceFile): Record;
+//# sourceMappingURL=utils.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/utils.d.ts.map b/node_modules/typescript/dist/ast/utils.d.ts.map
new file mode 100644
index 000000000..875319b98
--- /dev/null
+++ b/node_modules/typescript/dist/ast/utils.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,QAAQ,EACR,UAAU,EACb,MAAM,UAAU,CAAC;AAiBlB,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,QAAQ,GAAG,MAAM,CAKvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAIrE;AAED,wBAAgB,OAAO,CAAC,IAAI,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,SAAS,CAElI;AAED,wBAAgB,IAAI,CAAC,IAAI,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,IAAI,IAAI,GAAG,IAAI,CAInH;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBnF"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/utils.js b/node_modules/typescript/dist/ast/utils.js
new file mode 100644
index 000000000..e0bd1ea62
--- /dev/null
+++ b/node_modules/typescript/dist/ast/utils.js
@@ -0,0 +1,67 @@
+import { CharacterCodes } from "#enums/characterCodes";
+import { SyntaxKind } from "#enums/syntaxKind";
+let syntaxKindNames;
+function getSyntaxKindNames() {
+    if (!syntaxKindNames) {
+        syntaxKindNames = new Map();
+        for (const name of Object.keys(SyntaxKind)) {
+            const val = SyntaxKind[name];
+            if (typeof val === "number" && !syntaxKindNames.has(val)) {
+                syntaxKindNames.set(val, name);
+            }
+        }
+        syntaxKindNames.set(SyntaxKind.EndOfFile, "EndOfFileToken");
+    }
+    return syntaxKindNames;
+}
+export function formatSyntaxKind(kind) {
+    return getSyntaxKindNames().get(kind) ?? `Unknown(${kind})`;
+}
+/**
+ * Remove one extra leading underscore from an identifier name, recovering the
+ * display form from its escaped {@link __String} key.
+ */
+export function unescapeLeadingUnderscores(identifier) {
+    const id = identifier;
+    return id.length >= 3 && id.charCodeAt(0) === CharacterCodes._ && id.charCodeAt(1) === CharacterCodes._ && id.charCodeAt(2) === CharacterCodes._
+        ? id.slice(1)
+        : id;
+}
+/**
+ * Add an extra leading underscore to a display name that already begins with
+ * `__`, producing its escaped {@link __String} key.
+ */
+export function escapeLeadingUnderscores(identifier) {
+    return (identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._
+        ? "_" + identifier
+        : identifier);
+}
+export function tryCast(value, test) {
+    return value !== undefined && test(value) ? value : undefined;
+}
+export function cast(value, test) {
+    if (value !== undefined && test(value))
+        return value;
+    throw new Error(`Invalid cast. The supplied value ${value} did not pass the test '${test.name}'.`);
+}
+export function cloneSourceFileData(sourceFile) {
+    return {
+        statements: sourceFile.statements,
+        endOfFileToken: sourceFile.endOfFileToken,
+        text: sourceFile.text,
+        fileName: sourceFile.fileName,
+        path: sourceFile.path,
+        languageVariant: sourceFile.languageVariant,
+        scriptKind: sourceFile.scriptKind,
+        isDeclarationFile: sourceFile.isDeclarationFile,
+        referencedFiles: sourceFile.referencedFiles,
+        typeReferenceDirectives: sourceFile.typeReferenceDirectives,
+        libReferenceDirectives: sourceFile.libReferenceDirectives,
+        imports: sourceFile.imports,
+        moduleAugmentations: sourceFile.moduleAugmentations,
+        ambientModuleNames: sourceFile.ambientModuleNames,
+        externalModuleIndicator: sourceFile.externalModuleIndicator,
+        tokenCache: undefined,
+    };
+}
+//# sourceMappingURL=utils.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/utils.js.map b/node_modules/typescript/dist/ast/utils.js.map
new file mode 100644
index 000000000..0206293c9
--- /dev/null
+++ b/node_modules/typescript/dist/ast/utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,IAAI,eAAgD,CAAC;AACrD,SAAS,kBAAkB;IACvB,IAAI,CAAC,eAAe,EAAE,CAAC;QACnB,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC5C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YACzC,MAAM,GAAG,GAAG,UAAU,CAAC,IAA+B,CAAC,CAAC;YACxD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,eAAe,CAAC,GAAG,CA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,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,IAAI,CAA8B,KAAsB,EAAE,IAAmC;IACzG,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAErD,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,2BAA2B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AACvG,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,UAAsB;IACtD,OAAO;QACH,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,cAAc,EAAE,UAAU,CAAC,cAAc;QACzC,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,eAAe,EAAE,UAAU,CAAC,eAAe;QAC3C,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB;QAC/C,eAAe,EAAE,UAAU,CAAC,eAAe;QAC3C,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;QAC3D,sBAAsB,EAAE,UAAU,CAAC,sBAAsB;QACzD,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,mBAAmB,EAAE,UAAU,CAAC,mBAAmB;QACnD,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;QACjD,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;QAC3D,UAAU,EAAE,SAAS;KACxB,CAAC;AACN,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.d.ts b/node_modules/typescript/dist/ast/visitor.d.ts
new file mode 100644
index 000000000..4f8f35189
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.d.ts
@@ -0,0 +1,14 @@
+/**
+ * Hand-written visitor implementations for nodes with runtime-dependent
+ * child ordering. Generated code in visitor.generated.ts and factory.generated.ts
+ * delegates to these functions.
+ */
+import type { JSDocParameterOrPropertyTag, Node, NodeArray } from "./ast.ts";
+import type { Visitor } from "./visitor.generated.ts";
+export type { Visitor };
+export { visitEachChild, visitNode, visitNodes, visitNodesArray } from "./visitor.generated.ts";
+declare function forEachChildOfJSDocParameterOrPropertyTag(data: any, cbNode: (node: Node) => T, cbNodes: ((nodes: NodeArray) => T) | undefined): T | undefined;
+export { forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocParameterTag, forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocPropertyTag };
+declare function visitEachChildOfJSDocParameterOrPropertyTag(node: JSDocParameterOrPropertyTag, visitor: Visitor): JSDocParameterOrPropertyTag;
+export { visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocPropertyTag };
+//# sourceMappingURL=visitor.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.d.ts.map b/node_modules/typescript/dist/ast/visitor.d.ts.map
new file mode 100644
index 000000000..05cba32e5
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../../src/ast/visitor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAER,2BAA2B,EAG3B,IAAI,EACJ,SAAS,EACZ,MAAM,UAAU,CAAC;AAUlB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAMtD,YAAY,EAAE,OAAO,EAAE,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAoBhG,iBAAS,yCAAyC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAM/J;AAED,OAAO,EAAE,yCAAyC,IAAI,+BAA+B,EAAE,yCAAyC,IAAI,8BAA8B,EAAE,CAAC;AAIrK,iBAAS,2CAA2C,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,OAAO,GAAG,2BAA2B,CAQrI;AAED,OAAO,EAAE,2CAA2C,IAAI,iCAAiC,EAAE,2CAA2C,IAAI,gCAAgC,EAAE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.generated.d.ts b/node_modules/typescript/dist/ast/visitor.generated.d.ts
new file mode 100644
index 000000000..67313e5ba
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.generated.d.ts
@@ -0,0 +1,50 @@
+import type { Node, NodeArray } from "./ast.ts";
+/**
+ * A callback that receives a node and returns a visited node (or undefined to remove it).
+ */
+export type Visitor = (node: Node) => Node | undefined;
+/**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * - If the input node is undefined, then the output is undefined.
+ * - If the visitor returns undefined, then the output is undefined.
+ * - If the output node is not undefined, then it will satisfy the test function.
+ * - In order to obtain a return type that is more specific than `Node`, a test
+ *   function must be provided, and that function must be a type predicate.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ */
+export declare function visitNode(node: TIn, visitor: Visitor, test: (node: Node) => node is TOut): TOut | (TIn & undefined);
+/**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * - If the input node is undefined, then the output is undefined.
+ * - If the visitor returns undefined, then the output is undefined.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test An optional callback to execute to verify the Node is valid.
+ */
+export declare function visitNode(node: TIn, visitor: Visitor, test?: (node: Node) => boolean): Node | (TIn & undefined);
+/**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * - If the input node array is undefined, the output is undefined.
+ * - If the visitor returns undefined for a node, that node is dropped from the result.
+ */
+export declare function visitNodes(nodes: NodeArray, visitor: Visitor): NodeArray;
+export declare function visitNodes(nodes: NodeArray | undefined, visitor: Visitor): NodeArray | undefined;
+export declare function visitNodesArray(nodes: readonly T[], visitor: Visitor): readonly T[];
+export declare function visitNodesArray(nodes: readonly T[] | undefined, visitor: Visitor): readonly T[] | undefined;
+/**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @returns The original node if no children changed, or a new node with visited children.
+ */
+export declare function visitEachChild(node: T, visitor: Visitor): T;
+export declare function visitEachChild(node: T | undefined, visitor: Visitor): T | undefined;
+//# sourceMappingURL=visitor.generated.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.generated.d.ts.map b/node_modules/typescript/dist/ast/visitor.generated.d.ts.map
new file mode 100644
index 000000000..d7f4d4407
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.generated.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"visitor.generated.d.ts","sourceRoot":"","sources":["../../src/ast/visitor.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAwHR,IAAI,EACJ,SAAS,EAqDZ,MAAM,UAAU,CAAC;AA4OlB;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,GAAG,SAAS,IAAI,GAAG,SAAS,EAAE,IAAI,SAAS,IAAI,EACrE,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI,IAAI,GACnC,IAAI,GAAG,CAAC,GAAG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or.generated.js
new file mode 100644
index 000000000..ad6528f32
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.generated.js
@@ -0,0 +1,978 @@
+// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT.
+import { SyntaxKind } from "#enums/syntaxKind";
+import { createNodeArray, updateArrayBindingPattern, updateArrayLiteralExpression, updateArrayTypeNode, updateArrowFunction, updateAsExpression, updateAwaitExpression, updateBinaryExpression, updateBindingElement, updateBlock, updateBreakStatement, updateCallExpression, updateCallSignatureDeclaration, updateCaseBlock, updateCaseClause, updateCatchClause, updateClassDeclaration, updateClassExpression, updateClassStaticBlockDeclaration, updateComputedPropertyName, updateConditionalExpression, updateConditionalTypeNode, updateConstructorDeclaration, updateConstructorTypeNode, updateConstructSignatureDeclaration, updateContinueStatement, updateDecorator, updateDefaultClause, updateDeleteExpression, updateDoStatement, updateElementAccessExpression, updateEnumDeclaration, updateEnumMember, updateExportAssignment, updateExportDeclaration, updateExportSpecifier, updateExpressionStatement, updateExpressionWithTypeArguments, updateExternalModuleReference, updateForInStatement, updateForOfStatement, updateForStatement, updateFunctionDeclaration, updateFunctionExpression, updateFunctionTypeNode, updateGetAccessorDeclaration, updateHeritageClause, updateIfStatement, updateImportAttribute, updateImportAttributes, updateImportClause, updateImportDeclaration, updateImportEqualsDeclaration, updateImportSpecifier, updateImportTypeNode, updateIndexedAccessTypeNode, updateIndexSignatureDeclaration, updateInferTypeNode, updateInterfaceDeclaration, updateIntersectionTypeNode, updateJSDoc, updateJSDocAugmentsTag, updateJSDocCallbackTag, updateJSDocDeprecatedTag, updateJSDocImplementsTag, updateJSDocImportTag, updateJSDocLink, updateJSDocLinkCode, updateJSDocLinkPlain, updateJSDocNameReference, updateJSDocNonNullableType, updateJSDocNullableType, updateJSDocOptionalType, updateJSDocOverloadTag, updateJSDocOverrideTag, updateJSDocPrivateTag, updateJSDocProtectedTag, updateJSDocPublicTag, updateJSDocReadonlyTag, updateJSDocReturnTag, updateJSDocSatisfiesTag, updateJSDocSeeTag, updateJSDocSignature, updateJSDocTemplateTag, updateJSDocThisTag, updateJSDocThrowsTag, updateJSDocTypedefTag, updateJSDocTypeExpression, updateJSDocTypeLiteral, updateJSDocTypeTag, updateJSDocUnknownTag, updateJSDocVariadicType, updateJsxAttribute, updateJsxAttributes, updateJsxClosingElement, updateJsxElement, updateJsxExpression, updateJsxFragment, updateJsxNamespacedName, updateJsxOpeningElement, updateJsxSelfClosingElement, updateJsxSpreadAttribute, updateLabeledStatement, updateLiteralTypeNode, updateMappedTypeNode, updateMetaProperty, updateMethodDeclaration, updateMethodSignatureDeclaration, updateMissingDeclaration, updateModuleBlock, updateModuleDeclaration, updateNamedExports, updateNamedImports, updateNamedTupleMember, updateNamespaceExport, updateNamespaceExportDeclaration, updateNamespaceImport, updateNewExpression, updateNonNullExpression, updateObjectBindingPattern, updateObjectLiteralExpression, updateOptionalTypeNode, updateParameterDeclaration, updateParenthesizedExpression, updateParenthesizedTypeNode, updatePartiallyEmittedExpression, updatePostfixUnaryExpression, updatePrefixUnaryExpression, updatePropertyAccessExpression, updatePropertyAssignment, updatePropertyDeclaration, updatePropertySignatureDeclaration, updateQualifiedName, updateRestTypeNode, updateReturnStatement, updateSatisfiesExpression, updateSetAccessorDeclaration, updateShorthandPropertyAssignment, updateSourceFile, updateSpreadAssignment, updateSpreadElement, updateSwitchStatement, updateSyntaxList, updateSyntheticExpression, updateSyntheticReferenceExpression, updateTaggedTemplateExpression, updateTemplateExpression, updateTemplateLiteralTypeNode, updateTemplateLiteralTypeSpan, updateTemplateSpan, updateThrowStatement, updateTryStatement, updateTupleTypeNode, updateTypeAliasDeclaration, updateTypeAssertion, updateTypeLiteralNode, updateTypeOfExpression, updateTypeOperatorNode, updateTypeParameterDeclaration, updateTypePredicateNode, updateTypeQueryNode, updateTypeReferenceNode, updateUnionTypeNode, updateVariableDeclaration, updateVariableDeclarationList, updateVariableStatement, updateVoidExpression, updateWhileStatement, updateWithStatement, updateYieldExpression, } from "./factory.generated.js";
+import { isAssertsKeyword, isAsteriskToken, isAwaitKeyword, isBinaryOperatorToken, isBindingName, isBlock, isCaseBlock, isCatchClause, isColonToken, isConciseBody, isDotDotDotToken, isEndOfFile, isEntityName, isEqualsGreaterThanToken, isEqualsToken, isExclamationToken, isExpression, isExpressionWithTypeArguments, isForInitializer, isFunctionBody, isIdentifier, isImportAttributeName, isImportAttributes, isImportClause, isJSDocFullName, isJsxAttributeName, isJsxAttributes, isJsxAttributeValue, isJsxClosingElement, isJsxClosingFragment, isJsxOpeningElement, isJsxOpeningFragment, isJsxTagNameExpression, isLeftHandSideExpression, isMemberName, isModuleBody, isModuleExportName, isModuleName, isModuleReference, isNamedExportBindings, isNamedImportBindings, isPropertyName, isQuestionDotToken, isQuestionOrExclamationToken, isQuestionOrPlusOrMinusToken, isQuestionToken, isReadonlyKeywordOrPlusOrMinusToken, isStatement, isTemplateHead, isTemplateLiteral, isTemplateMiddleOrTail, isTypeNode, isTypeParameterDeclaration, isTypePredicateParameterName, isVariableDeclaration, isVariableDeclarationList, } from "./is.js";
+import { visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocPropertyTag, } from "./visitor.js";
+export function visitNode(node, visitor, test) {
+    if (node === undefined)
+        return undefined;
+    const visited = visitor(node);
+    if (visited !== undefined && test !== undefined && !test(visited)) {
+        throw new Error("Visited node failed test assertion.");
+    }
+    return visited;
+}
+export function visitNodes(nodes, visitor) {
+    if (nodes === undefined)
+        return undefined;
+    const updated = visitNodesArray(nodes, visitor);
+    if (updated === nodes) {
+        return nodes;
+    }
+    return createNodeArray(updated, nodes.pos, nodes.end);
+}
+export function visitNodesArray(nodes, visitor) {
+    if (nodes === undefined)
+        return undefined;
+    let updated;
+    for (let i = 0; i < nodes.length; i++) {
+        const node = nodes[i];
+        const visited = visitor(node);
+        if (updated) {
+            if (visited)
+                updated.push(visited);
+        }
+        else if (visited !== node) {
+            updated = [];
+            for (let j = 0; j < i; j++)
+                updated.push(nodes[j]);
+            if (visited)
+                updated.push(visited);
+        }
+    }
+    return updated ?? nodes;
+}
+export function visitEachChild(node, visitor) {
+    if (node === undefined)
+        return undefined;
+    const fn = visitEachChildTable[node.kind];
+    return fn ? fn(node, visitor) : node;
+}
+const visitEachChildTable = {
+    [SyntaxKind.QualifiedName]: (node, visitor) => {
+        const _left = visitNode(node.left, visitor, isEntityName);
+        const _right = visitNode(node.right, visitor, isIdentifier);
+        return updateQualifiedName(node, _left, _right);
+    },
+    [SyntaxKind.ComputedPropertyName]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateComputedPropertyName(node, _expression);
+    },
+    [SyntaxKind.Decorator]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
+        return updateDecorator(node, _expression);
+    },
+    [SyntaxKind.IfStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _thenStatement = visitNode(node.thenStatement, visitor, isStatement);
+        const _elseStatement = visitNode(node.elseStatement, visitor, isStatement);
+        return updateIfStatement(node, _expression, _thenStatement, _elseStatement);
+    },
+    [SyntaxKind.DoStatement]: (node, visitor) => {
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateDoStatement(node, _statement, _expression);
+    },
+    [SyntaxKind.WhileStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        return updateWhileStatement(node, _expression, _statement);
+    },
+    [SyntaxKind.ForStatement]: (node, visitor) => {
+        const _initializer = visitNode(node.initializer, visitor, isForInitializer);
+        const _condition = visitNode(node.condition, visitor, isExpression);
+        const _incrementor = visitNode(node.incrementor, visitor, isExpression);
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        return updateForStatement(node, _initializer, _condition, _incrementor, _statement);
+    },
+    [SyntaxKind.BreakStatement]: (node, visitor) => {
+        const _label = visitNode(node.label, visitor, isIdentifier);
+        return updateBreakStatement(node, _label);
+    },
+    [SyntaxKind.ContinueStatement]: (node, visitor) => {
+        const _label = visitNode(node.label, visitor, isIdentifier);
+        return updateContinueStatement(node, _label);
+    },
+    [SyntaxKind.ReturnStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateReturnStatement(node, _expression);
+    },
+    [SyntaxKind.WithStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        return updateWithStatement(node, _expression, _statement);
+    },
+    [SyntaxKind.SwitchStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _caseBlock = visitNode(node.caseBlock, visitor, isCaseBlock);
+        return updateSwitchStatement(node, _expression, _caseBlock);
+    },
+    [SyntaxKind.CaseBlock]: (node, visitor) => {
+        const _clauses = visitNodes(node.clauses, visitor);
+        return updateCaseBlock(node, _clauses);
+    },
+    [SyntaxKind.ThrowStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateThrowStatement(node, _expression);
+    },
+    [SyntaxKind.TryStatement]: (node, visitor) => {
+        const _tryBlock = visitNode(node.tryBlock, visitor, isBlock);
+        const _catchClause = visitNode(node.catchClause, visitor, isCatchClause);
+        const _finallyBlock = visitNode(node.finallyBlock, visitor, isBlock);
+        return updateTryStatement(node, _tryBlock, _catchClause, _finallyBlock);
+    },
+    [SyntaxKind.CatchClause]: (node, visitor) => {
+        const _variableDeclaration = visitNode(node.variableDeclaration, visitor, isVariableDeclaration);
+        const _block = visitNode(node.block, visitor, isBlock);
+        return updateCatchClause(node, _variableDeclaration, _block);
+    },
+    [SyntaxKind.LabeledStatement]: (node, visitor) => {
+        const _label = visitNode(node.label, visitor, isIdentifier);
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        return updateLabeledStatement(node, _label, _statement);
+    },
+    [SyntaxKind.ExpressionStatement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateExpressionStatement(node, _expression);
+    },
+    [SyntaxKind.Block]: (node, visitor) => {
+        const _statements = visitNodes(node.statements, visitor);
+        return updateBlock(node, _statements);
+    },
+    [SyntaxKind.VariableStatement]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _declarationList = visitNode(node.declarationList, visitor, isVariableDeclarationList);
+        return updateVariableStatement(node, _modifiers, _declarationList);
+    },
+    [SyntaxKind.VariableDeclaration]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isBindingName);
+        const _exclamationToken = visitNode(node.exclamationToken, visitor, isExclamationToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updateVariableDeclaration(node, _name, _exclamationToken, _type, _initializer);
+    },
+    [SyntaxKind.VariableDeclarationList]: (node, visitor) => {
+        const _declarations = visitNodes(node.declarations, visitor);
+        return updateVariableDeclarationList(node, _declarations);
+    },
+    [SyntaxKind.Parameter]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken);
+        const _name = visitNode(node.name, visitor, isBindingName);
+        const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updateParameterDeclaration(node, _modifiers, _dotDotDotToken, _name, _questionToken, _type, _initializer);
+    },
+    [SyntaxKind.BindingElement]: (node, visitor) => {
+        const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken);
+        const _propertyName = visitNode(node.propertyName, visitor, isPropertyName);
+        const _name = visitNode(node.name, visitor, isBindingName);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updateBindingElement(node, _dotDotDotToken, _propertyName, _name, _initializer);
+    },
+    [SyntaxKind.MissingDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        return updateMissingDeclaration(node, _modifiers);
+    },
+    [SyntaxKind.FunctionDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _body = visitNode(node.body, visitor, isFunctionBody);
+        return updateFunctionDeclaration(node, _modifiers, _asteriskToken, _name, _typeParameters, _parameters, _type, _body);
+    },
+    [SyntaxKind.ClassDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _heritageClauses = visitNodes(node.heritageClauses, visitor);
+        const _members = visitNodes(node.members, visitor);
+        return updateClassDeclaration(node, _modifiers, _name, _typeParameters, _heritageClauses, _members);
+    },
+    [SyntaxKind.ClassExpression]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _heritageClauses = visitNodes(node.heritageClauses, visitor);
+        const _members = visitNodes(node.members, visitor);
+        return updateClassExpression(node, _modifiers, _name, _typeParameters, _heritageClauses, _members);
+    },
+    [SyntaxKind.HeritageClause]: (node, visitor) => {
+        const _types = visitNodes(node.types, visitor);
+        return updateHeritageClause(node, _types);
+    },
+    [SyntaxKind.InterfaceDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _heritageClauses = visitNodes(node.heritageClauses, visitor);
+        const _members = visitNodes(node.members, visitor);
+        return updateInterfaceDeclaration(node, _modifiers, _name, _typeParameters, _heritageClauses, _members);
+    },
+    [SyntaxKind.TypeAliasDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateTypeAliasDeclaration(node, _modifiers, _name, _typeParameters, _type);
+    },
+    [SyntaxKind.EnumMember]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updateEnumMember(node, _name, _initializer);
+    },
+    [SyntaxKind.EnumDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _members = visitNodes(node.members, visitor);
+        return updateEnumDeclaration(node, _modifiers, _name, _members);
+    },
+    [SyntaxKind.ModuleBlock]: (node, visitor) => {
+        const _statements = visitNodes(node.statements, visitor);
+        return updateModuleBlock(node, _statements);
+    },
+    [SyntaxKind.ImportDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _importClause = visitNode(node.importClause, visitor, isImportClause);
+        const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression);
+        const _attributes = visitNode(node.attributes, visitor, isImportAttributes);
+        return updateImportDeclaration(node, _modifiers, _importClause, _moduleSpecifier, _attributes);
+    },
+    [SyntaxKind.ExternalModuleReference]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateExternalModuleReference(node, _expression);
+    },
+    [SyntaxKind.NamespaceImport]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        return updateNamespaceImport(node, _name);
+    },
+    [SyntaxKind.NamedImports]: (node, visitor) => {
+        const _elements = visitNodes(node.elements, visitor);
+        return updateNamedImports(node, _elements);
+    },
+    [SyntaxKind.ExportAssignment]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateExportAssignment(node, _modifiers, _type, _expression);
+    },
+    [SyntaxKind.NamespaceExportDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        return updateNamespaceExportDeclaration(node, _modifiers, _name);
+    },
+    [SyntaxKind.NamespaceExport]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isModuleExportName);
+        return updateNamespaceExport(node, _name);
+    },
+    [SyntaxKind.NamedExports]: (node, visitor) => {
+        const _elements = visitNodes(node.elements, visitor);
+        return updateNamedExports(node, _elements);
+    },
+    [SyntaxKind.ExportSpecifier]: (node, visitor) => {
+        const _propertyName = visitNode(node.propertyName, visitor, isModuleExportName);
+        const _name = visitNode(node.name, visitor, isModuleExportName);
+        return updateExportSpecifier(node, _propertyName, _name);
+    },
+    [SyntaxKind.CallSignature]: (node, visitor) => {
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateCallSignatureDeclaration(node, _typeParameters, _parameters, _type);
+    },
+    [SyntaxKind.ConstructSignature]: (node, visitor) => {
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateConstructSignatureDeclaration(node, _typeParameters, _parameters, _type);
+    },
+    [SyntaxKind.Constructor]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _body = visitNode(node.body, visitor, isFunctionBody);
+        return updateConstructorDeclaration(node, _modifiers, _typeParameters, _parameters, _type, _body);
+    },
+    [SyntaxKind.GetAccessor]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _body = visitNode(node.body, visitor, isFunctionBody);
+        return updateGetAccessorDeclaration(node, _modifiers, _name, _typeParameters, _parameters, _type, _body);
+    },
+    [SyntaxKind.SetAccessor]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _body = visitNode(node.body, visitor, isFunctionBody);
+        return updateSetAccessorDeclaration(node, _modifiers, _name, _typeParameters, _parameters, _type, _body);
+    },
+    [SyntaxKind.IndexSignature]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateIndexSignatureDeclaration(node, _modifiers, _parameters, _type);
+    },
+    [SyntaxKind.MethodSignature]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateMethodSignatureDeclaration(node, _modifiers, _name, _postfixToken, _typeParameters, _parameters, _type);
+    },
+    [SyntaxKind.MethodDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _body = visitNode(node.body, visitor, isFunctionBody);
+        return updateMethodDeclaration(node, _modifiers, _asteriskToken, _name, _postfixToken, _typeParameters, _parameters, _type, _body);
+    },
+    [SyntaxKind.PropertySignature]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updatePropertySignatureDeclaration(node, _modifiers, _name, _postfixToken, _type, _initializer);
+    },
+    [SyntaxKind.PropertyDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updatePropertyDeclaration(node, _modifiers, _name, _postfixToken, _type, _initializer);
+    },
+    [SyntaxKind.ClassStaticBlockDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _body = visitNode(node.body, visitor, isBlock);
+        return updateClassStaticBlockDeclaration(node, _modifiers, _body);
+    },
+    [SyntaxKind.BinaryExpression]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _left = visitNode(node.left, visitor, isExpression);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _operatorToken = visitNode(node.operatorToken, visitor, isBinaryOperatorToken);
+        const _right = visitNode(node.right, visitor, isExpression);
+        return updateBinaryExpression(node, _modifiers, _left, _type, _operatorToken, _right);
+    },
+    [SyntaxKind.PrefixUnaryExpression]: (node, visitor) => {
+        const _operand = visitNode(node.operand, visitor, isExpression);
+        return updatePrefixUnaryExpression(node, _operand);
+    },
+    [SyntaxKind.PostfixUnaryExpression]: (node, visitor) => {
+        const _operand = visitNode(node.operand, visitor, isExpression);
+        return updatePostfixUnaryExpression(node, _operand);
+    },
+    [SyntaxKind.YieldExpression]: (node, visitor) => {
+        const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateYieldExpression(node, _asteriskToken, _expression);
+    },
+    [SyntaxKind.ArrowFunction]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _equalsGreaterThanToken = visitNode(node.equalsGreaterThanToken, visitor, isEqualsGreaterThanToken);
+        const _body = visitNode(node.body, visitor, isConciseBody);
+        return updateArrowFunction(node, _modifiers, _typeParameters, _parameters, _type, _equalsGreaterThanToken, _body);
+    },
+    [SyntaxKind.FunctionExpression]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _body = visitNode(node.body, visitor, isFunctionBody);
+        return updateFunctionExpression(node, _modifiers, _asteriskToken, _name, _typeParameters, _parameters, _type, _body);
+    },
+    [SyntaxKind.AsExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateAsExpression(node, _expression, _type);
+    },
+    [SyntaxKind.SatisfiesExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateSatisfiesExpression(node, _expression, _type);
+    },
+    [SyntaxKind.ConditionalExpression]: (node, visitor) => {
+        const _condition = visitNode(node.condition, visitor, isExpression);
+        const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken);
+        const _whenTrue = visitNode(node.whenTrue, visitor, isExpression);
+        const _colonToken = visitNode(node.colonToken, visitor, isColonToken);
+        const _whenFalse = visitNode(node.whenFalse, visitor, isExpression);
+        return updateConditionalExpression(node, _condition, _questionToken, _whenTrue, _colonToken, _whenFalse);
+    },
+    [SyntaxKind.PropertyAccessExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken);
+        const _name = visitNode(node.name, visitor, isMemberName);
+        return updatePropertyAccessExpression(node, _expression, _questionDotToken, _name);
+    },
+    [SyntaxKind.ElementAccessExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken);
+        const _argumentExpression = visitNode(node.argumentExpression, visitor, isExpression);
+        return updateElementAccessExpression(node, _expression, _questionDotToken, _argumentExpression);
+    },
+    [SyntaxKind.CallExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        const _arguments = visitNodes(node.arguments, visitor);
+        return updateCallExpression(node, _expression, _questionDotToken, _typeArguments, _arguments);
+    },
+    [SyntaxKind.NewExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        const _arguments = visitNodes(node.arguments, visitor);
+        return updateNewExpression(node, _expression, _typeArguments, _arguments);
+    },
+    [SyntaxKind.MetaProperty]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        return updateMetaProperty(node, _name);
+    },
+    [SyntaxKind.NonNullExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateNonNullExpression(node, _expression);
+    },
+    [SyntaxKind.SpreadElement]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateSpreadElement(node, _expression);
+    },
+    [SyntaxKind.TemplateExpression]: (node, visitor) => {
+        const _head = visitNode(node.head, visitor, isTemplateHead);
+        const _templateSpans = visitNodes(node.templateSpans, visitor);
+        return updateTemplateExpression(node, _head, _templateSpans);
+    },
+    [SyntaxKind.TemplateSpan]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _literal = visitNode(node.literal, visitor, isTemplateMiddleOrTail);
+        return updateTemplateSpan(node, _expression, _literal);
+    },
+    [SyntaxKind.TaggedTemplateExpression]: (node, visitor) => {
+        const _tag = visitNode(node.tag, visitor, isExpression);
+        const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        const _template = visitNode(node.template, visitor, isTemplateLiteral);
+        return updateTaggedTemplateExpression(node, _tag, _questionDotToken, _typeArguments, _template);
+    },
+    [SyntaxKind.ParenthesizedExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateParenthesizedExpression(node, _expression);
+    },
+    [SyntaxKind.ArrayLiteralExpression]: (node, visitor) => {
+        const _elements = visitNodes(node.elements, visitor);
+        return updateArrayLiteralExpression(node, _elements);
+    },
+    [SyntaxKind.ObjectLiteralExpression]: (node, visitor) => {
+        const _properties = visitNodes(node.properties, visitor);
+        return updateObjectLiteralExpression(node, _properties);
+    },
+    [SyntaxKind.SpreadAssignment]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateSpreadAssignment(node, _expression);
+    },
+    [SyntaxKind.PropertyAssignment]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _initializer = visitNode(node.initializer, visitor, isExpression);
+        return updatePropertyAssignment(node, _modifiers, _name, _postfixToken, _type, _initializer);
+    },
+    [SyntaxKind.ShorthandPropertyAssignment]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isPropertyName);
+        const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _equalsToken = visitNode(node.equalsToken, visitor, isEqualsToken);
+        const _objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, visitor, isExpression);
+        return updateShorthandPropertyAssignment(node, _modifiers, _name, _postfixToken, _type, _equalsToken, _objectAssignmentInitializer);
+    },
+    [SyntaxKind.DeleteExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateDeleteExpression(node, _expression);
+    },
+    [SyntaxKind.TypeOfExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateTypeOfExpression(node, _expression);
+    },
+    [SyntaxKind.VoidExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateVoidExpression(node, _expression);
+    },
+    [SyntaxKind.AwaitExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateAwaitExpression(node, _expression);
+    },
+    [SyntaxKind.TypeAssertionExpression]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateTypeAssertion(node, _type, _expression);
+    },
+    [SyntaxKind.UnionType]: (node, visitor) => {
+        const _types = visitNodes(node.types, visitor);
+        return updateUnionTypeNode(node, _types);
+    },
+    [SyntaxKind.IntersectionType]: (node, visitor) => {
+        const _types = visitNodes(node.types, visitor);
+        return updateIntersectionTypeNode(node, _types);
+    },
+    [SyntaxKind.ConditionalType]: (node, visitor) => {
+        const _checkType = visitNode(node.checkType, visitor, isTypeNode);
+        const _extendsType = visitNode(node.extendsType, visitor, isTypeNode);
+        const _trueType = visitNode(node.trueType, visitor, isTypeNode);
+        const _falseType = visitNode(node.falseType, visitor, isTypeNode);
+        return updateConditionalTypeNode(node, _checkType, _extendsType, _trueType, _falseType);
+    },
+    [SyntaxKind.TypeOperator]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateTypeOperatorNode(node, _type);
+    },
+    [SyntaxKind.InferType]: (node, visitor) => {
+        const _typeParameter = visitNode(node.typeParameter, visitor, isTypeParameterDeclaration);
+        return updateInferTypeNode(node, _typeParameter);
+    },
+    [SyntaxKind.ArrayType]: (node, visitor) => {
+        const _elementType = visitNode(node.elementType, visitor, isTypeNode);
+        return updateArrayTypeNode(node, _elementType);
+    },
+    [SyntaxKind.IndexedAccessType]: (node, visitor) => {
+        const _objectType = visitNode(node.objectType, visitor, isTypeNode);
+        const _indexType = visitNode(node.indexType, visitor, isTypeNode);
+        return updateIndexedAccessTypeNode(node, _objectType, _indexType);
+    },
+    [SyntaxKind.TypeReference]: (node, visitor) => {
+        const _typeName = visitNode(node.typeName, visitor, isEntityName);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        return updateTypeReferenceNode(node, _typeName, _typeArguments);
+    },
+    [SyntaxKind.ExpressionWithTypeArguments]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        return updateExpressionWithTypeArguments(node, _expression, _typeArguments);
+    },
+    [SyntaxKind.LiteralType]: (node, visitor) => {
+        const _literal = visitNode(node.literal, visitor);
+        return updateLiteralTypeNode(node, _literal);
+    },
+    [SyntaxKind.TypePredicate]: (node, visitor) => {
+        const _assertsModifier = visitNode(node.assertsModifier, visitor, isAssertsKeyword);
+        const _parameterName = visitNode(node.parameterName, visitor, isTypePredicateParameterName);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateTypePredicateNode(node, _assertsModifier, _parameterName, _type);
+    },
+    [SyntaxKind.ImportAttribute]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isImportAttributeName);
+        const _value = visitNode(node.value, visitor, isExpression);
+        return updateImportAttribute(node, _name, _value);
+    },
+    [SyntaxKind.ImportAttributes]: (node, visitor) => {
+        const _attributes = visitNodes(node.attributes, visitor);
+        return updateImportAttributes(node, _attributes);
+    },
+    [SyntaxKind.TypeQuery]: (node, visitor) => {
+        const _exprName = visitNode(node.exprName, visitor, isEntityName);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        return updateTypeQueryNode(node, _exprName, _typeArguments);
+    },
+    [SyntaxKind.MappedType]: (node, visitor) => {
+        const _readonlyToken = visitNode(node.readonlyToken, visitor, isReadonlyKeywordOrPlusOrMinusToken);
+        const _typeParameter = visitNode(node.typeParameter, visitor, isTypeParameterDeclaration);
+        const _nameType = visitNode(node.nameType, visitor, isTypeNode);
+        const _questionToken = visitNode(node.questionToken, visitor, isQuestionOrPlusOrMinusToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _members = visitNodes(node.members, visitor);
+        return updateMappedTypeNode(node, _readonlyToken, _typeParameter, _nameType, _questionToken, _type, _members);
+    },
+    [SyntaxKind.TypeLiteral]: (node, visitor) => {
+        const _members = visitNodes(node.members, visitor);
+        return updateTypeLiteralNode(node, _members);
+    },
+    [SyntaxKind.TupleType]: (node, visitor) => {
+        const _elements = visitNodes(node.elements, visitor);
+        return updateTupleTypeNode(node, _elements);
+    },
+    [SyntaxKind.NamedTupleMember]: (node, visitor) => {
+        const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateNamedTupleMember(node, _dotDotDotToken, _name, _questionToken, _type);
+    },
+    [SyntaxKind.OptionalType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateOptionalTypeNode(node, _type);
+    },
+    [SyntaxKind.RestType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateRestTypeNode(node, _type);
+    },
+    [SyntaxKind.ParenthesizedType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateParenthesizedTypeNode(node, _type);
+    },
+    [SyntaxKind.FunctionType]: (node, visitor) => {
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateFunctionTypeNode(node, _typeParameters, _parameters, _type);
+    },
+    [SyntaxKind.ConstructorType]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateConstructorTypeNode(node, _modifiers, _typeParameters, _parameters, _type);
+    },
+    [SyntaxKind.TemplateLiteralType]: (node, visitor) => {
+        const _head = visitNode(node.head, visitor, isTemplateHead);
+        const _templateSpans = visitNodes(node.templateSpans, visitor);
+        return updateTemplateLiteralTypeNode(node, _head, _templateSpans);
+    },
+    [SyntaxKind.TemplateLiteralTypeSpan]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        const _literal = visitNode(node.literal, visitor, isTemplateMiddleOrTail);
+        return updateTemplateLiteralTypeSpan(node, _type, _literal);
+    },
+    [SyntaxKind.SyntheticExpression]: (node, visitor) => {
+        const _tupleNameSource = visitNode(node.tupleNameSource, visitor);
+        return updateSyntheticExpression(node, _tupleNameSource);
+    },
+    [SyntaxKind.PartiallyEmittedExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updatePartiallyEmittedExpression(node, _expression);
+    },
+    [SyntaxKind.JsxElement]: (node, visitor) => {
+        const _openingElement = visitNode(node.openingElement, visitor, isJsxOpeningElement);
+        const _children = visitNodes(node.children, visitor);
+        const _closingElement = visitNode(node.closingElement, visitor, isJsxClosingElement);
+        return updateJsxElement(node, _openingElement, _children, _closingElement);
+    },
+    [SyntaxKind.JsxAttributes]: (node, visitor) => {
+        const _properties = visitNodes(node.properties, visitor);
+        return updateJsxAttributes(node, _properties);
+    },
+    [SyntaxKind.JsxNamespacedName]: (node, visitor) => {
+        const _namespace = visitNode(node.namespace, visitor, isIdentifier);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        return updateJsxNamespacedName(node, _namespace, _name);
+    },
+    [SyntaxKind.JsxOpeningElement]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        const _attributes = visitNode(node.attributes, visitor, isJsxAttributes);
+        return updateJsxOpeningElement(node, _tagName, _typeArguments, _attributes);
+    },
+    [SyntaxKind.JsxSelfClosingElement]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        const _attributes = visitNode(node.attributes, visitor, isJsxAttributes);
+        return updateJsxSelfClosingElement(node, _tagName, _typeArguments, _attributes);
+    },
+    [SyntaxKind.JsxFragment]: (node, visitor) => {
+        const _openingFragment = visitNode(node.openingFragment, visitor, isJsxOpeningFragment);
+        const _children = visitNodes(node.children, visitor);
+        const _closingFragment = visitNode(node.closingFragment, visitor, isJsxClosingFragment);
+        return updateJsxFragment(node, _openingFragment, _children, _closingFragment);
+    },
+    [SyntaxKind.JsxAttribute]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isJsxAttributeName);
+        const _initializer = visitNode(node.initializer, visitor, isJsxAttributeValue);
+        return updateJsxAttribute(node, _name, _initializer);
+    },
+    [SyntaxKind.JsxSpreadAttribute]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateJsxSpreadAttribute(node, _expression);
+    },
+    [SyntaxKind.JsxClosingElement]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression);
+        return updateJsxClosingElement(node, _tagName);
+    },
+    [SyntaxKind.JsxExpression]: (node, visitor) => {
+        const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        return updateJsxExpression(node, _dotDotDotToken, _expression);
+    },
+    [SyntaxKind.SyntaxList]: (node, visitor) => {
+        const _children = visitNodesArray(node.children, visitor);
+        return updateSyntaxList(node, _children);
+    },
+    [SyntaxKind.JSDoc]: (node, visitor) => {
+        const _comment = visitNodes(node.comment, visitor);
+        const _tags = visitNodes(node.tags, visitor);
+        return updateJSDoc(node, _comment, _tags);
+    },
+    [SyntaxKind.JSDocTypeExpression]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateJSDocTypeExpression(node, _type);
+    },
+    [SyntaxKind.JSDocNonNullableType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateJSDocNonNullableType(node, _type);
+    },
+    [SyntaxKind.JSDocNullableType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateJSDocNullableType(node, _type);
+    },
+    [SyntaxKind.JSDocVariadicType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateJSDocVariadicType(node, _type);
+    },
+    [SyntaxKind.JSDocOptionalType]: (node, visitor) => {
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateJSDocOptionalType(node, _type);
+    },
+    [SyntaxKind.JSDocTypeTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocTypeTag(node, _tagName, _typeExpression, _comment);
+    },
+    [SyntaxKind.JSDocUnknownTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocUnknownTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocTemplateTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _constraint = visitNode(node.constraint, visitor);
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocTemplateTag(node, _tagName, _constraint, _typeParameters, _comment);
+    },
+    [SyntaxKind.JSDocReturnTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocReturnTag(node, _tagName, _typeExpression, _comment);
+    },
+    [SyntaxKind.JSDocPublicTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocPublicTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocPrivateTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocPrivateTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocProtectedTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocProtectedTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocReadonlyTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocReadonlyTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocOverrideTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocOverrideTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocDeprecatedTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocDeprecatedTag(node, _tagName, _comment);
+    },
+    [SyntaxKind.JSDocSeeTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _nameExpression = visitNode(node.nameExpression, visitor, isTypeNode);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocSeeTag(node, _tagName, _nameExpression, _comment);
+    },
+    [SyntaxKind.JSDocImplementsTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _className = visitNode(node.className, visitor, isExpressionWithTypeArguments);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocImplementsTag(node, _tagName, _className, _comment);
+    },
+    [SyntaxKind.JSDocAugmentsTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _className = visitNode(node.className, visitor, isExpressionWithTypeArguments);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocAugmentsTag(node, _tagName, _className, _comment);
+    },
+    [SyntaxKind.JSDocSatisfiesTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocSatisfiesTag(node, _tagName, _typeExpression, _comment);
+    },
+    [SyntaxKind.JSDocThrowsTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocThrowsTag(node, _tagName, _typeExpression, _comment);
+    },
+    [SyntaxKind.JSDocThisTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocThisTag(node, _tagName, _typeExpression, _comment);
+    },
+    [SyntaxKind.JSDocImportTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _importClause = visitNode(node.importClause, visitor, isImportClause);
+        const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression);
+        const _attributes = visitNode(node.attributes, visitor, isImportAttributes);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocImportTag(node, _tagName, _importClause, _moduleSpecifier, _attributes, _comment);
+    },
+    [SyntaxKind.JSDocCallbackTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+        const _name = visitNode(node.name, visitor, isJSDocFullName);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocCallbackTag(node, _tagName, _typeExpression, _name, _comment);
+    },
+    [SyntaxKind.JSDocOverloadTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocOverloadTag(node, _tagName, _typeExpression, _comment);
+    },
+    [SyntaxKind.JSDocTypedefTag]: (node, visitor) => {
+        const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+        const _typeExpression = visitNode(node.typeExpression, visitor);
+        const _name = visitNode(node.name, visitor, isJSDocFullName);
+        const _comment = visitNodes(node.comment, visitor);
+        return updateJSDocTypedefTag(node, _tagName, _typeExpression, _name, _comment);
+    },
+    [SyntaxKind.JSDocSignature]: (node, visitor) => {
+        const _typeParameters = visitNodes(node.typeParameters, visitor);
+        const _parameters = visitNodes(node.parameters, visitor);
+        const _type = visitNode(node.type, visitor, isTypeNode);
+        return updateJSDocSignature(node, _typeParameters, _parameters, _type);
+    },
+    [SyntaxKind.JSDocNameReference]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isEntityName);
+        return updateJSDocNameReference(node, _name);
+    },
+    [SyntaxKind.SourceFile]: (node, visitor) => {
+        const _statements = visitNodes(node.statements, visitor);
+        const _endOfFileToken = visitNode(node.endOfFileToken, visitor, isEndOfFile);
+        return updateSourceFile(node, _statements, _endOfFileToken);
+    },
+    [SyntaxKind.ModuleDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isModuleName);
+        const _body = visitNode(node.body, visitor, isModuleBody);
+        return updateModuleDeclaration(node, _modifiers, _name, _body);
+    },
+    [SyntaxKind.ImportEqualsDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _moduleReference = visitNode(node.moduleReference, visitor, isModuleReference);
+        return updateImportEqualsDeclaration(node, _modifiers, _name, _moduleReference);
+    },
+    [SyntaxKind.ExportDeclaration]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _exportClause = visitNode(node.exportClause, visitor, isNamedExportBindings);
+        const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression);
+        const _attributes = visitNode(node.attributes, visitor, isImportAttributes);
+        return updateExportDeclaration(node, _modifiers, _exportClause, _moduleSpecifier, _attributes);
+    },
+    [SyntaxKind.ImportType]: (node, visitor) => {
+        const _argument = visitNode(node.argument, visitor, isTypeNode);
+        const _attributes = visitNode(node.attributes, visitor, isImportAttributes);
+        const _qualifier = visitNode(node.qualifier, visitor, isEntityName);
+        const _typeArguments = visitNodes(node.typeArguments, visitor);
+        return updateImportTypeNode(node, _argument, _attributes, _qualifier, _typeArguments);
+    },
+    [SyntaxKind.ImportClause]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _namedBindings = visitNode(node.namedBindings, visitor, isNamedImportBindings);
+        return updateImportClause(node, _name, _namedBindings);
+    },
+    [SyntaxKind.ImportSpecifier]: (node, visitor) => {
+        const _propertyName = visitNode(node.propertyName, visitor, isModuleExportName);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        return updateImportSpecifier(node, _propertyName, _name);
+    },
+    [SyntaxKind.JSDocLink]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isEntityName);
+        return updateJSDocLink(node, _name);
+    },
+    [SyntaxKind.JSDocLinkPlain]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isEntityName);
+        return updateJSDocLinkPlain(node, _name);
+    },
+    [SyntaxKind.JSDocLinkCode]: (node, visitor) => {
+        const _name = visitNode(node.name, visitor, isEntityName);
+        return updateJSDocLinkCode(node, _name);
+    },
+    [SyntaxKind.TypeParameter]: (node, visitor) => {
+        const _modifiers = visitNodes(node.modifiers, visitor);
+        const _name = visitNode(node.name, visitor, isIdentifier);
+        const _constraint = visitNode(node.constraint, visitor, isTypeNode);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _defaultType = visitNode(node.defaultType, visitor, isTypeNode);
+        return updateTypeParameterDeclaration(node, _modifiers, _name, _constraint, _expression, _defaultType);
+    },
+    [SyntaxKind.SyntheticReferenceExpression]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _thisArg = visitNode(node.thisArg, visitor, isExpression);
+        return updateSyntheticReferenceExpression(node, _expression, _thisArg);
+    },
+    [SyntaxKind.JSDocTypeLiteral]: (node, visitor) => {
+        const _jsdocPropertyTags = visitNodesArray(node.jsdocPropertyTags, visitor);
+        return updateJSDocTypeLiteral(node, _jsdocPropertyTags);
+    },
+    [SyntaxKind.ForInStatement]: (node, visitor) => {
+        const _awaitModifier = visitNode(node.awaitModifier, visitor, isAwaitKeyword);
+        const _initializer = visitNode(node.initializer, visitor, isForInitializer);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        return updateForInStatement(node, _awaitModifier, _initializer, _expression, _statement);
+    },
+    [SyntaxKind.ForOfStatement]: (node, visitor) => {
+        const _awaitModifier = visitNode(node.awaitModifier, visitor, isAwaitKeyword);
+        const _initializer = visitNode(node.initializer, visitor, isForInitializer);
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _statement = visitNode(node.statement, visitor, isStatement);
+        return updateForOfStatement(node, _awaitModifier, _initializer, _expression, _statement);
+    },
+    [SyntaxKind.CaseClause]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _statements = visitNodes(node.statements, visitor);
+        return updateCaseClause(node, _expression, _statements);
+    },
+    [SyntaxKind.DefaultClause]: (node, visitor) => {
+        const _expression = visitNode(node.expression, visitor, isExpression);
+        const _statements = visitNodes(node.statements, visitor);
+        return updateDefaultClause(node, _expression, _statements);
+    },
+    [SyntaxKind.ObjectBindingPattern]: (node, visitor) => {
+        const _elements = visitNodes(node.elements, visitor);
+        return updateObjectBindingPattern(node, _elements);
+    },
+    [SyntaxKind.ArrayBindingPattern]: (node, visitor) => {
+        const _elements = visitNodes(node.elements, visitor);
+        return updateArrayBindingPattern(node, _elements);
+    },
+    [SyntaxKind.JSDocParameterTag]: visitEachChildOfJSDocParameterTag,
+    [SyntaxKind.JSDocPropertyTag]: visitEachChildOfJSDocPropertyTag,
+};
+//# sourceMappingURL=visitor.generated.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.generated.js.map b/node_modules/typescript/dist/ast/visitor.generated.js.map
new file mode 100644
index 000000000..708004b91
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.generated.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"visitor.generated.js","sourceRoot":"","sources":["../../src/ast/visitor.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgL/C,OAAO,EACH,eAAe,EACf,yBAAyB,EACzB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EAC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AAG,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QACtE,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IACD,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,IAAmB,EAAE,OAAgB,EAAiB,EAAE;QACjF,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QACtE,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IACD,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAA0B,EAAE,OAAgB,EAAwB,EAAE;QACtG,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,0BAA0B,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IACD,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC,IAAyB,EAAE,OAAgB,EAAuB,EAAE;QACnG,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,yBAAyB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IACD,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,iCAAiC;IACjE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,gCAAgC;CAClE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.js b/node_modules/typescript/dist/ast/visitor.js
new file mode 100644
index 000000000..f1495d5aa
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.js
@@ -0,0 +1,47 @@
+/**
+ * Hand-written visitor implementations for nodes with runtime-dependent
+ * child ordering. Generated code in visitor.generated.ts and factory.generated.ts
+ * delegates to these functions.
+ */
+import { SyntaxKind } from "#enums/syntaxKind";
+import { updateJSDocParameterTag, updateJSDocPropertyTag, } from "./factory.generated.js";
+import { isEntityName, isIdentifier, isTypeNode, } from "./is.js";
+import { visitNode, visitNodes, } from "./visitor.generated.js";
+export { visitEachChild, visitNode, visitNodes, visitNodesArray } from "./visitor.generated.js";
+// ── forEachChild helpers (same signature as forEachChildTable entries) ──
+function visitNodeForEachChild(cbNode, node) {
+    return node ? cbNode(node) : undefined;
+}
+function visitNodesForEachChild(cbNode, cbNodes, nodes) {
+    if (!nodes)
+        return undefined;
+    if (cbNodes)
+        return cbNodes(nodes);
+    for (const node of nodes) {
+        const result = cbNode(node);
+        if (result)
+            return result;
+    }
+    return undefined;
+}
+// ── forEachChild implementations ──
+function forEachChildOfJSDocParameterOrPropertyTag(data, cbNode, cbNodes) {
+    return visitNodeForEachChild(cbNode, data.tagName) ||
+        (data.isNameFirst
+            ? visitNodeForEachChild(cbNode, data.name) || visitNodeForEachChild(cbNode, data.typeExpression)
+            : visitNodeForEachChild(cbNode, data.typeExpression) || visitNodeForEachChild(cbNode, data.name)) ||
+        visitNodesForEachChild(cbNode, cbNodes, data.comment);
+}
+export { forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocParameterTag, forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocPropertyTag };
+// ── visitEachChild implementations ──
+function visitEachChildOfJSDocParameterOrPropertyTag(node, visitor) {
+    const _tagName = visitNode(node.tagName, visitor, isIdentifier);
+    const _name = visitNode(node.name, visitor, isEntityName);
+    const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode);
+    const _comment = visitNodes(node.comment, visitor);
+    return node.kind === SyntaxKind.JSDocParameterTag
+        ? updateJSDocParameterTag(node, _tagName, _name, _typeExpression, _comment)
+        : updateJSDocPropertyTag(node, _tagName, _name, _typeExpression, _comment);
+}
+export { visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocPropertyTag };
+//# sourceMappingURL=visitor.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/ast/visitor.js.map b/node_modules/typescript/dist/ast/visitor.js.map
new file mode 100644
index 000000000..37a7f9add
--- /dev/null
+++ b/node_modules/typescript/dist/ast/visitor.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"visitor.js","sourceRoot":"","sources":["../../src/ast/visitor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,OAAO,EACH,uBAAuB,EACvB,sBAAsB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,UAAU,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,EACH,SAAS,EACT,UAAU,GACb,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEhG,2EAA2E;AAE3E,SAAS,qBAAqB,CAAI,MAAyB,EAAE,IAAsB;IAC/E,OAAO,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3C,CAAC;AAED,SAAS,sBAAsB,CAAI,MAAyB,EAAE,OAAoD,EAAE,KAAkC;IAClJ,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACnC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;Q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AAE,QAAQ,CAAC;QAC3E,CAAC,CAAC,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;AACnF,CAAC;AAED,OAAO,EAAE,2CAA2C,IAAI,iCAAiC,EAAE,2CAA2C,IAAI,gCAAgC,EAAE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.d.ts b/node_modules/typescript/dist/enums/characterCodes.d.ts
new file mode 100644
index 000000000..d6208f2b4
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.d.ts
@@ -0,0 +1,2 @@
+export declare var CharacterCodes: any;
+//# sourceMappingURL=characterCodes.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.d.ts.map b/node_modules/typescript/dist/enums/characterCodes.d.ts.map
new file mode 100644
index 000000000..9f6c5ea1c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"characterCodes.d.ts","sourceRoot":"","sources":["../../src/enums/characterCodes.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,cAAc,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.d.ts b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts
new file mode 100644
index 000000000..85577ef72
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts
@@ -0,0 +1,129 @@
+export declare enum CharacterCodes {
+    EOF = -1,
+    nullCharacter = 0,
+    maxAsciiCharacter = 127,
+    lineFeed = 10,// \n
+    carriageReturn = 13,// \r
+    lineSeparator = 8232,
+    paragraphSeparator = 8233,
+    nextLine = 133,
+    space = 32,// " "
+    nonBreakingSpace = 160,//
+    enQuad = 8192,
+    emQuad = 8193,
+    enSpace = 8194,
+    emSpace = 8195,
+    threePerEmSpace = 8196,
+    fourPerEmSpace = 8197,
+    sixPerEmSpace = 8198,
+    figureSpace = 8199,
+    punctuationSpace = 8200,
+    thinSpace = 8201,
+    hairSpace = 8202,
+    zeroWidthSpace = 8203,
+    narrowNoBreakSpace = 8239,
+    ideographicSpace = 12288,
+    mathematicalSpace = 8287,
+    ogham = 5760,
+    replacementCharacter = 65533,
+    _ = 95,
+    $ = 36,
+    _0 = 48,
+    _1 = 49,
+    _2 = 50,
+    _3 = 51,
+    _4 = 52,
+    _5 = 53,
+    _6 = 54,
+    _7 = 55,
+    _8 = 56,
+    _9 = 57,
+    a = 97,
+    b = 98,
+    c = 99,
+    d = 100,
+    e = 101,
+    f = 102,
+    g = 103,
+    h = 104,
+    i = 105,
+    j = 106,
+    k = 107,
+    l = 108,
+    m = 109,
+    n = 110,
+    o = 111,
+    p = 112,
+    q = 113,
+    r = 114,
+    s = 115,
+    t = 116,
+    u = 117,
+    v = 118,
+    w = 119,
+    x = 120,
+    y = 121,
+    z = 122,
+    A = 65,
+    B = 66,
+    C = 67,
+    D = 68,
+    E = 69,
+    F = 70,
+    G = 71,
+    H = 72,
+    I = 73,
+    J = 74,
+    K = 75,
+    L = 76,
+    M = 77,
+    N = 78,
+    O = 79,
+    P = 80,
+    Q = 81,
+    R = 82,
+    S = 83,
+    T = 84,
+    U = 85,
+    V = 86,
+    W = 87,
+    X = 88,
+    Y = 89,
+    Z = 90,
+    ampersand = 38,// &
+    asterisk = 42,// *
+    at = 64,// @
+    backslash = 92,// \
+    backtick = 96,// `
+    bar = 124,// |
+    caret = 94,// ^
+    closeBrace = 125,// }
+    closeBracket = 93,// ]
+    closeParen = 41,// )
+    colon = 58,// :
+    comma = 44,// ,
+    dot = 46,// .
+    doubleQuote = 34,// "
+    equals = 61,// =
+    exclamation = 33,// !
+    greaterThan = 62,// >
+    hash = 35,// #
+    lessThan = 60,// <
+    minus = 45,// -
+    openBrace = 123,// {
+    openBracket = 91,// [
+    openParen = 40,// (
+    percent = 37,// %
+    plus = 43,// +
+    question = 63,// ?
+    semicolon = 59,// ;
+    singleQuote = 39,// '
+    slash = 47,// /
+    tilde = 126,// ~
+    backspace = 8,// \b
+    formFeed = 12,// \f
+    byteOrderMark = 65279,
+    tab = 9,// \t
+    verticalTab = 11
+}
+//# sourceMappingURL=characterCodes.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map
new file mode 100644
index 000000000..969d1eff8
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"characterCodes.enum.d.ts","sourceRoot":"","sources":["../../src/enums/characterCodes.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACtB,GAAG,KAAK;IACR,aAAa,IAAI;IACjB,iBAAiB,MAAO;IAExB,QAAQ,KAAO,CAAE,KAAK;IACtB,cAAc,KAAO,CAAE,KAAK;IAC5B,aAAa,OAAS;IACtB,kBAAkB,OAAS;IAC3B,QAAQ,MAAS;IAGjB,KAAK,KAAS,CAAE,MAAM;IACtB,gBAAgB,MAAS,CAAE,EAAE;IAC7B,MAAM,OAAS;IACf,MAAM,OAAS;IACf,OAAO,OAAS;IAChB,OAAO,OAAS;IAChB,eAAe,OAAS;IACxB,cAAc,OAAS;IACvB,aAAa,OAAS;IACtB,WAAW,OAAS;IACpB,gBAAgB,OAAS;IACzB,SAAS,OAAS;IAClB,SAAS,OAAS;IAClB,cAAc,OAAS;IACvB,kBAAkB,OAAS;IAC3B,gBAAgB,QAAS;IACzB,iBAAiB,OAAS;IAC1B,KAAK,OAAS;IAGd,oBAAoB,QAAS;IAE7B,CAAC,KAAO;IACR,CAAC,KAAO;IAER,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IAET,CAAC,KAAO;IACR,C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CAAE,IAAI;IAChB,WAAW,KAAO,CAAE,IAAI;IACxB,MAAM,KAAO,CAAE,IAAI;IACnB,WAAW,KAAO,CAAE,IAAI;IACxB,WAAW,KAAO,CAAE,IAAI;IACxB,IAAI,KAAO,CAAE,IAAI;IACjB,QAAQ,KAAO,CAAE,IAAI;IACrB,KAAK,KAAO,CAAE,IAAI;IAClB,SAAS,MAAO,CAAE,IAAI;IACtB,WAAW,KAAO,CAAE,IAAI;IACxB,SAAS,KAAO,CAAE,IAAI;IACtB,OAAO,KAAO,CAAE,IAAI;IACpB,IAAI,KAAO,CAAE,IAAI;IACjB,QAAQ,KAAO,CAAE,IAAI;IACrB,SAAS,KAAO,CAAE,IAAI;IACtB,WAAW,KAAO,CAAE,IAAI;IACxB,KAAK,KAAO,CAAE,IAAI;IAClB,KAAK,MAAO,CAAE,IAAI;IAElB,SAAS,IAAO,CAAE,KAAK;IACvB,QAAQ,KAAO,CAAE,KAAK;IACtB,aAAa,QAAS;IACtB,GAAG,IAAO,CAAE,KAAK;IACjB,WAAW,KAAO;CACrB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.js b/node_modules/typescript/dist/enums/characterCodes.enum.js
new file mode 100644
index 000000000..dad58f2d4
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.enum.js
@@ -0,0 +1,132 @@
+export var CharacterCodes;
+(function (CharacterCodes) {
+    CharacterCodes[CharacterCodes["EOF"] = -1] = "EOF";
+    CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter";
+    CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter";
+    CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed";
+    CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn";
+    CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator";
+    CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator";
+    CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine";
+    // Unicode 3.0 space characters
+    CharacterCodes[CharacterCodes["space"] = 32] = "space";
+    CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace";
+    CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad";
+    CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad";
+    CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace";
+    CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace";
+    CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace";
+    CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace";
+    CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace";
+    CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace";
+    CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace";
+    CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace";
+    CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace";
+    CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace";
+    CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace";
+    CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace";
+    CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace";
+    CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham";
+    // Unicode replacement character produced when a byte sequence is invalid
+    CharacterCodes[CharacterCodes["replacementCharacter"] = 65533] = "replacementCharacter";
+    CharacterCodes[CharacterCodes["_"] = 95] = "_";
+    CharacterCodes[CharacterCodes["$"] = 36] = "$";
+    CharacterCodes[CharacterCodes["_0"] = 48] = "_0";
+    CharacterCodes[CharacterCodes["_1"] = 49] = "_1";
+    CharacterCodes[CharacterCodes["_2"] = 50] = "_2";
+    CharacterCodes[CharacterCodes["_3"] = 51] = "_3";
+    CharacterCodes[CharacterCodes["_4"] = 52] = "_4";
+    CharacterCodes[CharacterCodes["_5"] = 53] = "_5";
+    CharacterCodes[CharacterCodes["_6"] = 54] = "_6";
+    CharacterCodes[CharacterCodes["_7"] = 55] = "_7";
+    CharacterCodes[CharacterCodes["_8"] = 56] = "_8";
+    CharacterCodes[CharacterCodes["_9"] = 57] = "_9";
+    CharacterCodes[CharacterCodes["a"] = 97] = "a";
+    CharacterCodes[CharacterCodes["b"] = 98] = "b";
+    CharacterCodes[CharacterCodes["c"] = 99] = "c";
+    CharacterCodes[CharacterCodes["d"] = 100] = "d";
+    CharacterCodes[CharacterCodes["e"] = 101] = "e";
+    CharacterCodes[CharacterCodes["f"] = 102] = "f";
+    CharacterCodes[CharacterCodes["g"] = 103] = "g";
+    CharacterCodes[CharacterCodes["h"] = 104] = "h";
+    CharacterCodes[CharacterCodes["i"] = 105] = "i";
+    CharacterCodes[CharacterCodes["j"] = 106] = "j";
+    CharacterCodes[CharacterCodes["k"] = 107] = "k";
+    CharacterCodes[CharacterCodes["l"] = 108] = "l";
+    CharacterCodes[CharacterCodes["m"] = 109] = "m";
+    CharacterCodes[CharacterCodes["n"] = 110] = "n";
+    CharacterCodes[CharacterCodes["o"] = 111] = "o";
+    CharacterCodes[CharacterCodes["p"] = 112] = "p";
+    CharacterCodes[CharacterCodes["q"] = 113] = "q";
+    CharacterCodes[CharacterCodes["r"] = 114] = "r";
+    CharacterCodes[CharacterCodes["s"] = 115] = "s";
+    CharacterCodes[CharacterCodes["t"] = 116] = "t";
+    CharacterCodes[CharacterCodes["u"] = 117] = "u";
+    CharacterCodes[CharacterCodes["v"] = 118] = "v";
+    CharacterCodes[CharacterCodes["w"] = 119] = "w";
+    CharacterCodes[CharacterCodes["x"] = 120] = "x";
+    CharacterCodes[CharacterCodes["y"] = 121] = "y";
+    CharacterCodes[CharacterCodes["z"] = 122] = "z";
+    CharacterCodes[CharacterCodes["A"] = 65] = "A";
+    CharacterCodes[CharacterCodes["B"] = 66] = "B";
+    CharacterCodes[CharacterCodes["C"] = 67] = "C";
+    CharacterCodes[CharacterCodes["D"] = 68] = "D";
+    CharacterCodes[CharacterCodes["E"] = 69] = "E";
+    CharacterCodes[CharacterCodes["F"] = 70] = "F";
+    CharacterCodes[CharacterCodes["G"] = 71] = "G";
+    CharacterCodes[CharacterCodes["H"] = 72] = "H";
+    CharacterCodes[CharacterCodes["I"] = 73] = "I";
+    CharacterCodes[CharacterCodes["J"] = 74] = "J";
+    CharacterCodes[CharacterCodes["K"] = 75] = "K";
+    CharacterCodes[CharacterCodes["L"] = 76] = "L";
+    CharacterCodes[CharacterCodes["M"] = 77] = "M";
+    CharacterCodes[CharacterCodes["N"] = 78] = "N";
+    CharacterCodes[CharacterCodes["O"] = 79] = "O";
+    CharacterCodes[CharacterCodes["P"] = 80] = "P";
+    CharacterCodes[CharacterCodes["Q"] = 81] = "Q";
+    CharacterCodes[CharacterCodes["R"] = 82] = "R";
+    CharacterCodes[CharacterCodes["S"] = 83] = "S";
+    CharacterCodes[CharacterCodes["T"] = 84] = "T";
+    CharacterCodes[CharacterCodes["U"] = 85] = "U";
+    CharacterCodes[CharacterCodes["V"] = 86] = "V";
+    CharacterCodes[CharacterCodes["W"] = 87] = "W";
+    CharacterCodes[CharacterCodes["X"] = 88] = "X";
+    CharacterCodes[CharacterCodes["Y"] = 89] = "Y";
+    CharacterCodes[CharacterCodes["Z"] = 90] = "Z";
+    CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand";
+    CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk";
+    CharacterCodes[CharacterCodes["at"] = 64] = "at";
+    CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash";
+    CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick";
+    CharacterCodes[CharacterCodes["bar"] = 124] = "bar";
+    CharacterCodes[CharacterCodes["caret"] = 94] = "caret";
+    CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace";
+    CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket";
+    CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen";
+    CharacterCodes[CharacterCodes["colon"] = 58] = "colon";
+    CharacterCodes[CharacterCodes["comma"] = 44] = "comma";
+    CharacterCodes[CharacterCodes["dot"] = 46] = "dot";
+    CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote";
+    CharacterCodes[CharacterCodes["equals"] = 61] = "equals";
+    CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation";
+    CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan";
+    CharacterCodes[CharacterCodes["hash"] = 35] = "hash";
+    CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan";
+    CharacterCodes[CharacterCodes["minus"] = 45] = "minus";
+    CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace";
+    CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket";
+    CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen";
+    CharacterCodes[CharacterCodes["percent"] = 37] = "percent";
+    CharacterCodes[CharacterCodes["plus"] = 43] = "plus";
+    CharacterCodes[CharacterCodes["question"] = 63] = "question";
+    CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon";
+    CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote";
+    CharacterCodes[CharacterCodes["slash"] = 47] = "slash";
+    CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde";
+    CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace";
+    CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed";
+    CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark";
+    CharacterCodes[CharacterCodes["tab"] = 9] = "tab";
+    CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab";
+})(CharacterCodes || (CharacterCodes = {}));
+//# sourceMappingURL=characterCodes.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.js.map b/node_modules/typescript/dist/enums/characterCodes.enum.js.map
new file mode 100644
index 000000000..4801bfe0a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"characterCodes.enum.js","sourceRoot":"","sources":["../../src/enums/characterCodes.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cA0IX;AA1ID,WAAY,cAAc;IACtB,kDAAQ,CAAA;IACR,qEAAiB,CAAA;IACjB,+EAAwB,CAAA;IAExB,4DAAe,CAAA;IACf,wEAAqB,CAAA;IACrB,wEAAsB,CAAA;IACtB,kFAA2B,CAAA;IAC3B,6DAAiB,CAAA;IAEjB,+BAA+B;IAC/B,sDAAc,CAAA;IACd,6EAAyB,CAAA;IACzB,0DAAe,CAAA;IACf,0DAAe,CAAA;IACf,4DAAgB,CAAA;IAChB,4DAAgB,CAAA;IAChB,4EAAwB,CAAA;IACxB,0EAAuB,CAAA;IACvB,wEAAsB,CAAA;IACtB,oEAAoB,CAAA;IACpB,8EAAyB,CAAA;IACzB,gEAAkB,CAAA;IAClB,gEAAkB,CAAA;IAClB,0EAAuB,CAAA;IACvB,kFAA2B,CAAA;IAC3B,+EAAyB,CAAA;IACzB,gFAA0B,CAAA;IAC1B,wDAAc,CAAA;IAEd,yEAAyE;IACzE,uFAA6B,CAAA;IAE7B,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IAER,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IAET,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IAC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ChB,kEAAkB,CAAA;IAClB,8DAAgB,CAAA;IAChB,0DAAc,CAAA;IACd,oDAAW,CAAA;IACX,4DAAe,CAAA;IACf,8DAAgB,CAAA;IAChB,kEAAkB,CAAA;IAClB,sDAAY,CAAA;IACZ,uDAAY,CAAA;IAEZ,6DAAgB,CAAA;IAChB,4DAAe,CAAA;IACf,yEAAsB,CAAA;IACtB,iDAAU,CAAA;IACV,kEAAkB,CAAA;AACtB,CAAC,EA1IW,cAAc,KAAd,cAAc,QA0IzB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.js b/node_modules/typescript/dist/enums/characterCodes.js
new file mode 100644
index 000000000..10b224459
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.js
@@ -0,0 +1,130 @@
+export var CharacterCodes;
+(function (CharacterCodes) {
+    CharacterCodes[CharacterCodes["EOF"] = -1] = "EOF";
+    CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter";
+    CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter";
+    CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed";
+    CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn";
+    CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator";
+    CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator";
+    CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine";
+    CharacterCodes[CharacterCodes["space"] = 32] = "space";
+    CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace";
+    CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad";
+    CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad";
+    CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace";
+    CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace";
+    CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace";
+    CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace";
+    CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace";
+    CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace";
+    CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace";
+    CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace";
+    CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace";
+    CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace";
+    CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace";
+    CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace";
+    CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace";
+    CharacterCodes[CharacterCodes["ogham"] = 5765] = "ogham";
+    CharacterCodes[CharacterCodes["replacementCharacter"] = 65533] = "replacementCharacter";
+    CharacterCodes[CharacterCodes["_"] = 95] = "_";
+    CharacterCodes[CharacterCodes["$"] = 36] = "$";
+    CharacterCodes[CharacterCodes["_0"] = 48] = "_0";
+    CharacterCodes[CharacterCodes["_1"] = 49] = "_1";
+    CharacterCodes[CharacterCodes["_2"] = 50] = "_2";
+    CharacterCodes[CharacterCodes["_3"] = 51] = "_3";
+    CharacterCodes[CharacterCodes["_4"] = 52] = "_4";
+    CharacterCodes[CharacterCodes["_5"] = 53] = "_5";
+    CharacterCodes[CharacterCodes["_6"] = 54] = "_6";
+    CharacterCodes[CharacterCodes["_7"] = 55] = "_7";
+    CharacterCodes[CharacterCodes["_8"] = 56] = "_8";
+    CharacterCodes[CharacterCodes["_9"] = 57] = "_9";
+    CharacterCodes[CharacterCodes["a"] = 97] = "a";
+    CharacterCodes[CharacterCodes["b"] = 98] = "b";
+    CharacterCodes[CharacterCodes["c"] = 99] = "c";
+    CharacterCodes[CharacterCodes["d"] = 100] = "d";
+    CharacterCodes[CharacterCodes["e"] = 101] = "e";
+    CharacterCodes[CharacterCodes["f"] = 102] = "f";
+    CharacterCodes[CharacterCodes["g"] = 103] = "g";
+    CharacterCodes[CharacterCodes["h"] = 104] = "h";
+    CharacterCodes[CharacterCodes["i"] = 105] = "i";
+    CharacterCodes[CharacterCodes["j"] = 106] = "j";
+    CharacterCodes[CharacterCodes["k"] = 107] = "k";
+    CharacterCodes[CharacterCodes["l"] = 108] = "l";
+    CharacterCodes[CharacterCodes["m"] = 109] = "m";
+    CharacterCodes[CharacterCodes["n"] = 110] = "n";
+    CharacterCodes[CharacterCodes["o"] = 111] = "o";
+    CharacterCodes[CharacterCodes["p"] = 112] = "p";
+    CharacterCodes[CharacterCodes["q"] = 113] = "q";
+    CharacterCodes[CharacterCodes["r"] = 114] = "r";
+    CharacterCodes[CharacterCodes["s"] = 115] = "s";
+    CharacterCodes[CharacterCodes["t"] = 116] = "t";
+    CharacterCodes[CharacterCodes["u"] = 117] = "u";
+    CharacterCodes[CharacterCodes["v"] = 118] = "v";
+    CharacterCodes[CharacterCodes["w"] = 119] = "w";
+    CharacterCodes[CharacterCodes["x"] = 120] = "x";
+    CharacterCodes[CharacterCodes["y"] = 121] = "y";
+    CharacterCodes[CharacterCodes["z"] = 122] = "z";
+    CharacterCodes[CharacterCodes["A"] = 65] = "A";
+    CharacterCodes[CharacterCodes["B"] = 66] = "B";
+    CharacterCodes[CharacterCodes["C"] = 67] = "C";
+    CharacterCodes[CharacterCodes["D"] = 68] = "D";
+    CharacterCodes[CharacterCodes["E"] = 69] = "E";
+    CharacterCodes[CharacterCodes["F"] = 70] = "F";
+    CharacterCodes[CharacterCodes["G"] = 71] = "G";
+    CharacterCodes[CharacterCodes["H"] = 72] = "H";
+    CharacterCodes[CharacterCodes["I"] = 73] = "I";
+    CharacterCodes[CharacterCodes["J"] = 74] = "J";
+    CharacterCodes[CharacterCodes["K"] = 75] = "K";
+    CharacterCodes[CharacterCodes["L"] = 76] = "L";
+    CharacterCodes[CharacterCodes["M"] = 77] = "M";
+    CharacterCodes[CharacterCodes["N"] = 78] = "N";
+    CharacterCodes[CharacterCodes["O"] = 79] = "O";
+    CharacterCodes[CharacterCodes["P"] = 80] = "P";
+    CharacterCodes[CharacterCodes["Q"] = 81] = "Q";
+    CharacterCodes[CharacterCodes["R"] = 82] = "R";
+    CharacterCodes[CharacterCodes["S"] = 83] = "S";
+    CharacterCodes[CharacterCodes["T"] = 84] = "T";
+    CharacterCodes[CharacterCodes["U"] = 85] = "U";
+    CharacterCodes[CharacterCodes["V"] = 86] = "V";
+    CharacterCodes[CharacterCodes["W"] = 87] = "W";
+    CharacterCodes[CharacterCodes["X"] = 88] = "X";
+    CharacterCodes[CharacterCodes["Y"] = 89] = "Y";
+    CharacterCodes[CharacterCodes["Z"] = 90] = "Z";
+    CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand";
+    CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk";
+    CharacterCodes[CharacterCodes["at"] = 64] = "at";
+    CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash";
+    CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick";
+    CharacterCodes[CharacterCodes["bar"] = 124] = "bar";
+    CharacterCodes[CharacterCodes["caret"] = 94] = "caret";
+    CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace";
+    CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket";
+    CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen";
+    CharacterCodes[CharacterCodes["colon"] = 58] = "colon";
+    CharacterCodes[CharacterCodes["comma"] = 44] = "comma";
+    CharacterCodes[CharacterCodes["dot"] = 46] = "dot";
+    CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote";
+    CharacterCodes[CharacterCodes["equals"] = 61] = "equals";
+    CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation";
+    CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan";
+    CharacterCodes[CharacterCodes["hash"] = 35] = "hash";
+    CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan";
+    CharacterCodes[CharacterCodes["minus"] = 45] = "minus";
+    CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace";
+    CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket";
+    CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen";
+    CharacterCodes[CharacterCodes["percent"] = 37] = "percent";
+    CharacterCodes[CharacterCodes["plus"] = 43] = "plus";
+    CharacterCodes[CharacterCodes["question"] = 63] = "question";
+    CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon";
+    CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote";
+    CharacterCodes[CharacterCodes["slash"] = 47] = "slash";
+    CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde";
+    CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace";
+    CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed";
+    CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark";
+    CharacterCodes[CharacterCodes["tab"] = 9] = "tab";
+    CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab";
+})(CharacterCodes || (CharacterCodes = {}));
+//# sourceMappingURL=characterCodes.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/characterCodes.js.map b/node_modules/typescript/dist/enums/characterCodes.js.map
new file mode 100644
index 000000000..dd3a523e2
--- /dev/null
+++ b/node_modules/typescript/dist/enums/characterCodes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"characterCodes.js","sourceRoot":"","sources":["../../src/enums/characterCodes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,cAAmB,CAAC;AAC/B,CAAC,UAAU,cAAc;IACrB,cAAc,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACnD,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,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,cAAc,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.d.ts b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts
new file mode 100644
index 000000000..475efc5c2
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts
@@ -0,0 +1,2 @@
+export declare var CommentDirectiveType: any;
+//# sourceMappingURL=commentDirectiveType.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map
new file mode 100644
index 000000000..32233c5e4
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"commentDirectiveType.d.ts","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts
new file mode 100644
index 000000000..7b18e5d5d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts
@@ -0,0 +1,5 @@
+export declare enum CommentDirectiveType {
+    ExpectError = 0,
+    Ignore = 1
+}
+//# sourceMappingURL=commentDirectiveType.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map
new file mode 100644
index 000000000..f4af3f418
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"commentDirectiveType.enum.d.ts","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC5B,WAAW,IAAI;IACf,MAAM,IAAI;CACb"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.js b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js
new file mode 100644
index 000000000..445c026c7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js
@@ -0,0 +1,6 @@
+export var CommentDirectiveType;
+(function (CommentDirectiveType) {
+    CommentDirectiveType[CommentDirectiveType["ExpectError"] = 0] = "ExpectError";
+    CommentDirectiveType[CommentDirectiveType["Ignore"] = 1] = "Ignore";
+})(CommentDirectiveType || (CommentDirectiveType = {}));
+//# sourceMappingURL=commentDirectiveType.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map
new file mode 100644
index 000000000..f9a5336f4
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"commentDirectiveType.enum.js","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,6EAAe,CAAA;IACf,mEAAU,CAAA;AACd,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.js b/node_modules/typescript/dist/enums/commentDirectiveType.js
new file mode 100644
index 000000000..1c3aa7845
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.js
@@ -0,0 +1,6 @@
+export var CommentDirectiveType;
+(function (CommentDirectiveType) {
+    CommentDirectiveType[CommentDirectiveType["ExpectError"] = 0] = "ExpectError";
+    CommentDirectiveType[CommentDirectiveType["Ignore"] = 1] = "Ignore";
+})(CommentDirectiveType || (CommentDirectiveType = {}));
+//# sourceMappingURL=commentDirectiveType.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.js.map b/node_modules/typescript/dist/enums/commentDirectiveType.js.map
new file mode 100644
index 000000000..909b27cd9
--- /dev/null
+++ b/node_modules/typescript/dist/enums/commentDirectiveType.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"commentDirectiveType.js","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC9E,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AACxE,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.d.ts b/node_modules/typescript/dist/enums/completionItemKind.d.ts
new file mode 100644
index 000000000..5952449ce
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.d.ts
@@ -0,0 +1,2 @@
+export declare var CompletionItemKind: any;
+//# sourceMappingURL=completionItemKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.d.ts.map b/node_modules/typescript/dist/enums/completionItemKind.d.ts.map
new file mode 100644
index 000000000..6073415be
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"completionItemKind.d.ts","sourceRoot":"","sources":["../../src/enums/completionItemKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts
new file mode 100644
index 000000000..ab697c63f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts
@@ -0,0 +1,28 @@
+export declare enum CompletionItemKind {
+    Text = 1,
+    Method = 2,
+    Function = 3,
+    Constructor = 4,
+    Field = 5,
+    Variable = 6,
+    Class = 7,
+    Interface = 8,
+    Module = 9,
+    Property = 10,
+    Unit = 11,
+    Value = 12,
+    Enum = 13,
+    Keyword = 14,
+    Snippet = 15,
+    Color = 16,
+    File = 17,
+    Reference = 18,
+    Folder = 19,
+    EnumMember = 20,
+    Constant = 21,
+    Struct = 22,
+    Event = 23,
+    Operator = 24,
+    TypeParameter = 25
+}
+//# sourceMappingURL=completionItemKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map
new file mode 100644
index 000000000..e3a2fdaba
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"completionItemKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/completionItemKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,IAAI,IAAI;IACR,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,SAAS,IAAI;IACb,MAAM,IAAI;IACV,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,KAAK,KAAK;IACV,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,IAAI,KAAK;IACT,SAAS,KAAK;IACd,MAAM,KAAK;IACX,UAAU,KAAK;IACf,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,KAAK,KAAK;IACV,QAAQ,KAAK;IACb,aAAa,KAAK;CACrB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.js b/node_modules/typescript/dist/enums/completionItemKind.enum.js
new file mode 100644
index 000000000..ad281d544
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.enum.js
@@ -0,0 +1,30 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/lsp/lsproto/lsp_generated.go. DO NOT EDIT.
+export var CompletionItemKind;
+(function (CompletionItemKind) {
+    CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text";
+    CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method";
+    CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function";
+    CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor";
+    CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field";
+    CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable";
+    CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class";
+    CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface";
+    CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module";
+    CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property";
+    CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit";
+    CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value";
+    CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum";
+    CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword";
+    CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet";
+    CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color";
+    CompletionItemKind[CompletionItemKind["File"] = 17] = "File";
+    CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference";
+    CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder";
+    CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember";
+    CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant";
+    CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct";
+    CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event";
+    CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator";
+    CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter";
+})(CompletionItemKind || (CompletionItemKind = {}));
+//# sourceMappingURL=completionItemKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.js.map b/node_modules/typescript/dist/enums/completionItemKind.enum.js.map
new file mode 100644
index 000000000..3309d936a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"completionItemKind.enum.js","sourceRoot":"","sources":["../../src/enums/completionItemKind.enum.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAE3G,MAAM,CAAN,IAAY,kBA0BX;AA1BD,WAAY,kBAAkB;IAC1B,2DAAQ,CAAA;IACR,+DAAU,CAAA;IACV,mEAAY,CAAA;IACZ,yEAAe,CAAA;IACf,6DAAS,CAAA;IACT,mEAAY,CAAA;IACZ,6DAAS,CAAA;IACT,qEAAa,CAAA;IACb,+DAAU,CAAA;IACV,oEAAa,CAAA;IACb,4DAAS,CAAA;IACT,8DAAU,CAAA;IACV,4DAAS,CAAA;IACT,kEAAY,CAAA;IACZ,kEAAY,CAAA;IACZ,8DAAU,CAAA;IACV,4DAAS,CAAA;IACT,sEAAc,CAAA;IACd,gEAAW,CAAA;IACX,wEAAe,CAAA;IACf,oEAAa,CAAA;IACb,gEAAW,CAAA;IACX,8DAAU,CAAA;IACV,oEAAa,CAAA;IACb,8EAAkB,CAAA;AACtB,CAAC,EA1BW,kBAAkB,KAAlB,kBAAkB,QA0B7B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.js b/node_modules/typescript/dist/enums/completionItemKind.js
new file mode 100644
index 000000000..dc2c3c1ab
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.js
@@ -0,0 +1,30 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/lsp/lsproto/lsp_generated.go. DO NOT EDIT.
+export var CompletionItemKind;
+(function (CompletionItemKind) {
+    CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text";
+    CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method";
+    CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function";
+    CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor";
+    CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field";
+    CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable";
+    CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class";
+    CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface";
+    CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module";
+    CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property";
+    CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit";
+    CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value";
+    CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum";
+    CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword";
+    CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet";
+    CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color";
+    CompletionItemKind[CompletionItemKind["File"] = 17] = "File";
+    CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference";
+    CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder";
+    CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember";
+    CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant";
+    CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct";
+    CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event";
+    CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator";
+    CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter";
+})(CompletionItemKind || (CompletionItemKind = {}));
+//# sourceMappingURL=completionItemKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/completionItemKind.js.map b/node_modules/typescript/dist/enums/completionItemKind.js.map
new file mode 100644
index 000000000..8c1262835
--- /dev/null
+++ b/node_modules/typescript/dist/enums/completionItemKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"completionItemKind.js","sourceRoot":"","sources":["../../src/enums/completionItemKind.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5D,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChE,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpE,kBAAkB,CAAC,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC1E,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC9D,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC9D,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACtE,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChE,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACrE,kBAAkB,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;IAC7D,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IAC/D,kBAAkB,CAAC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osticCategory.d.ts
new file mode 100644
index 000000000..aa7035981
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts
@@ -0,0 +1,2 @@
+export declare var DiagnosticCategory: any;
+//# sourceMappingURL=diagnosticCategory.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map
new file mode 100644
index 000000000..4856f5222
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"diagnosticCategory.d.ts","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts
new file mode 100644
index 000000000..8b99b68e3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts
@@ -0,0 +1,7 @@
+export declare enum DiagnosticCategory {
+    Warning = 0,
+    Error = 1,
+    Suggestion = 2,
+    Message = 3
+}
+//# sourceMappingURL=diagnosticCategory.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map
new file mode 100644
index 000000000..c55fc24e2
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"diagnosticCategory.enum.d.ts","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,OAAO,IAAI;IACX,KAAK,IAAI;IACT,UAAU,IAAI;IACd,OAAO,IAAI;CACd"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.js b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js
new file mode 100644
index 000000000..91229a77f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js
@@ -0,0 +1,9 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/diagnostics/diagnostics.go. DO NOT EDIT.
+export var DiagnosticCategory;
+(function (DiagnosticCategory) {
+    DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
+    DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
+    DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion";
+    DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message";
+})(DiagnosticCategory || (DiagnosticCategory = {}));
+//# sourceMappingURL=diagnosticCategory.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map
new file mode 100644
index 000000000..8a802fd89
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"diagnosticCategory.enum.js","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.enum.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iEAAW,CAAA;IACX,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,iEAAW,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.js b/node_modules/typescript/dist/enums/diagnosticCategory.js
new file mode 100644
index 000000000..2a1d761e0
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.js
@@ -0,0 +1,9 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/diagnostics/diagnostics.go. DO NOT EDIT.
+export var DiagnosticCategory;
+(function (DiagnosticCategory) {
+    DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
+    DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
+    DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion";
+    DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message";
+})(DiagnosticCategory || (DiagnosticCategory = {}));
+//# sourceMappingURL=diagnosticCategory.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.js.map b/node_modules/typescript/dist/enums/diagnosticCategory.js.map
new file mode 100644
index 000000000..8ab4746c3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/diagnosticCategory.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"diagnosticCategory.js","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC9D,kBAAkB,CAAC,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IACxE,kBAAkB,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;AACtE,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.d.ts b/node_modules/typescript/dist/enums/elementFlags.d.ts
new file mode 100644
index 000000000..74129315a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var ElementFlags: any;
+//# sourceMappingURL=elementFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.d.ts.map b/node_modules/typescript/dist/enums/elementFlags.d.ts.map
new file mode 100644
index 000000000..2660426fd
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elementFlags.d.ts","sourceRoot":"","sources":["../../src/enums/elementFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,YAAY,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.d.ts b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts
new file mode 100644
index 000000000..0f826d703
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts
@@ -0,0 +1,12 @@
+export declare enum ElementFlags {
+    None = 0,
+    Required = 1,
+    Optional = 2,
+    Rest = 4,
+    Variadic = 8,
+    Fixed = 3,
+    Variable = 12,
+    NonRequired = 14,
+    NonRest = 11
+}
+//# sourceMappingURL=elementFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map
new file mode 100644
index 000000000..97c34e33a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elementFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/elementFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY;IACpB,IAAI,IAAI;IACR,QAAQ,IAAS;IACjB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,KAAK,IAAsB;IAC3B,QAAQ,KAAkB;IAC1B,WAAW,KAA6B;IACxC,OAAO,KAAiC;CAC3C"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.js b/node_modules/typescript/dist/enums/elementFlags.enum.js
new file mode 100644
index 000000000..3ecab240e
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.enum.js
@@ -0,0 +1,14 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var ElementFlags;
+(function (ElementFlags) {
+    ElementFlags[ElementFlags["None"] = 0] = "None";
+    ElementFlags[ElementFlags["Required"] = 1] = "Required";
+    ElementFlags[ElementFlags["Optional"] = 2] = "Optional";
+    ElementFlags[ElementFlags["Rest"] = 4] = "Rest";
+    ElementFlags[ElementFlags["Variadic"] = 8] = "Variadic";
+    ElementFlags[ElementFlags["Fixed"] = 3] = "Fixed";
+    ElementFlags[ElementFlags["Variable"] = 12] = "Variable";
+    ElementFlags[ElementFlags["NonRequired"] = 14] = "NonRequired";
+    ElementFlags[ElementFlags["NonRest"] = 11] = "NonRest";
+})(ElementFlags || (ElementFlags = {}));
+//# sourceMappingURL=elementFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.js.map b/node_modules/typescript/dist/enums/elementFlags.enum.js.map
new file mode 100644
index 000000000..8e84d40d8
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"elementFlags.enum.js","sourceRoot":"","sources":["../../src/enums/elementFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,YAUX;AAVD,WAAY,YAAY;IACpB,+CAAQ,CAAA;IACR,uDAAiB,CAAA;IACjB,uDAAiB,CAAA;IACjB,+CAAa,CAAA;IACb,uDAAiB,CAAA;IACjB,iDAA2B,CAAA;IAC3B,wDAA0B,CAAA;IAC1B,8DAAwC,CAAA;IACxC,sDAAwC,CAAA;AAC5C,CAAC,EAVW,YAAY,KAAZ,YAAY,QAUvB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.js b/node_modules/typescript/dist/enums/elementFlags.js
new file mode 100644
index 000000000..ecf2e9125
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.js
@@ -0,0 +1,14 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var ElementFlags;
+(function (ElementFlags) {
+    ElementFlags[ElementFlags["None"] = 0] = "None";
+    ElementFlags[ElementFlags["Required"] = 1] = "Required";
+    ElementFlags[ElementFlags["Optional"] = 2] = "Optional";
+    ElementFlags[ElementFlags["Rest"] = 4] = "Rest";
+    ElementFlags[ElementFlags["Variadic"] = 8] = "Variadic";
+    ElementFlags[ElementFlags["Fixed"] = 3] = "Fixed";
+    ElementFlags[ElementFlags["Variable"] = 12] = "Variable";
+    ElementFlags[ElementFlags["NonRequired"] = 14] = "NonRequired";
+    ElementFlags[ElementFlags["NonRest"] = 11] = "NonRest";
+})(ElementFlags || (ElementFlags = {}));
+//# sourceMappingURL=elementFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/elementFlags.js.map b/node_modules/typescript/dist/enums/elementFlags.js.map
new file mode 100644
index 000000000..bc79085a5
--- /dev/null
+++ b/node_modules/typescript/dist/enums/elementFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"elementFlags.js","sourceRoot":"","sources":["../../src/enums/elementFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,YAAiB,CAAC;AAC7B,CAAC,UAAU,YAAY;IACnB,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAChD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAChD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAClD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACzD,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IAC/D,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;AAC3D,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.d.ts b/node_modules/typescript/dist/enums/internalSymbolName.d.ts
new file mode 100644
index 000000000..d943a1d85
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.d.ts
@@ -0,0 +1,2 @@
+export declare var InternalSymbolName: any;
+//# sourceMappingURL=internalSymbolName.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map b/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map
new file mode 100644
index 000000000..6cb9e7ea9
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"internalSymbolName.d.ts","sourceRoot":"","sources":["../../src/enums/internalSymbolName.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts
new file mode 100644
index 000000000..e06ac0994
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts
@@ -0,0 +1,23 @@
+export declare enum InternalSymbolName {
+    Call = "__call",
+    Constructor = "__constructor",
+    New = "__new",
+    Index = "__index",
+    ExportStar = "__export",
+    Global = "__global",
+    Missing = "__missing",
+    Type = "__type",
+    Object = "__object",
+    JSXAttributes = "__jsxAttributes",
+    Class = "__class",
+    Function = "__function",
+    Computed = "__computed",
+    AssignmentDeclaration = "__assignment",
+    InstantiationExpression = "__instantiationExpression",
+    ImportAttributes = "__importAttributes",
+    ExportEquals = "export=",
+    Default = "default",
+    This = "this",
+    ModuleExports = "module.exports"
+}
+//# sourceMappingURL=internalSymbolName.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map
new file mode 100644
index 000000000..873a94ed3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"internalSymbolName.enum.d.ts","sourceRoot":"","sources":["../../src/enums/internalSymbolName.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,IAAI,WAAW;IACf,WAAW,kBAAkB;IAC7B,GAAG,UAAU;IACb,KAAK,YAAY;IACjB,UAAU,aAAa;IACvB,MAAM,aAAa;IACnB,OAAO,cAAc;IACrB,IAAI,WAAW;IACf,MAAM,aAAa;IACnB,aAAa,oBAAoB;IACjC,KAAK,YAAY;IACjB,QAAQ,eAAe;IACvB,QAAQ,eAAe;IACvB,qBAAqB,iBAAiB;IACtC,uBAAuB,8BAA8B;IACrD,gBAAgB,uBAAuB;IACvC,YAAY,YAAY;IACxB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,aAAa,mBAAmB;CACnC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.js b/node_modules/typescript/dist/enums/internalSymbolName.enum.js
new file mode 100644
index 000000000..cc412a567
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.js
@@ -0,0 +1,25 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbol.go. DO NOT EDIT.
+export var InternalSymbolName;
+(function (InternalSymbolName) {
+    InternalSymbolName["Call"] = "__call";
+    InternalSymbolName["Constructor"] = "__constructor";
+    InternalSymbolName["New"] = "__new";
+    InternalSymbolName["Index"] = "__index";
+    InternalSymbolName["ExportStar"] = "__export";
+    InternalSymbolName["Global"] = "__global";
+    InternalSymbolName["Missing"] = "__missing";
+    InternalSymbolName["Type"] = "__type";
+    InternalSymbolName["Object"] = "__object";
+    InternalSymbolName["JSXAttributes"] = "__jsxAttributes";
+    InternalSymbolName["Class"] = "__class";
+    InternalSymbolName["Function"] = "__function";
+    InternalSymbolName["Computed"] = "__computed";
+    InternalSymbolName["AssignmentDeclaration"] = "__assignment";
+    InternalSymbolName["InstantiationExpression"] = "__instantiationExpression";
+    InternalSymbolName["ImportAttributes"] = "__importAttributes";
+    InternalSymbolName["ExportEquals"] = "export=";
+    InternalSymbolName["Default"] = "default";
+    InternalSymbolName["This"] = "this";
+    InternalSymbolName["ModuleExports"] = "module.exports";
+})(InternalSymbolName || (InternalSymbolName = {}));
+//# sourceMappingURL=internalSymbolName.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map b/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map
new file mode 100644
index 000000000..75cdb196b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"internalSymbolName.enum.js","sourceRoot":"","sources":["../../src/enums/internalSymbolName.enum.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,MAAM,CAAN,IAAY,kBAqBX;AArBD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,mDAA6B,CAAA;IAC7B,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,uDAAiC,CAAA;IACjC,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,6CAAuB,CAAA;IACvB,4DAAsC,CAAA;IACtC,2EAAqD,CAAA;IACrD,6DAAuC,CAAA;IACvC,8CAAwB,CAAA;IACxB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,sDAAgC,CAAA;AACpC,CAAC,EArBW,kBAAkB,KAAlB,kBAAkB,QAqB7B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.js b/node_modules/typescript/dist/enums/internalSymbolName.js
new file mode 100644
index 000000000..b4254d7c0
--- /dev/null
+++ b/node_modules/typescript/dist/enums/internalSymbolName.js
@@ -0,0 +1,25 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbol.go. DO NOT EDIT.
+export var InternalSymbolName;
+(function (InternalSymbolName) {
+    InternalSymbolName["Call"] = "__call";
+    InternalSymbolName["Constructor"] = "__constructor";
+    InternalSymbolName["New"] = "__new";
+    InternalSymbolName["Index"] = "__index";
+    InternalSymbolName["ExportStar"] = "__export";
+    InternalSymbolName["Global"] = "__global";
+    InternalSymbolName["Missing"] = "__missing";
+    InternalSymbolName["Type"] = "__type";
+    InternalSymbolName["Object"] = "__object";
+    InternalSymbolName["JSXAttributes"] = "__jsxAttributes";
+    InternalSymbolName["Class"] = "__class";
+    InternalSymbolName["Function"] = "__function";
+    InternalSymbolName["Computed"] = "__computed";
+    InternalSymbolName["AssignmentDeclaration"] = "__assignment";
+    InternalSymbolName["InstantiationExpression"] = "__instantiationExpression";
+    InternalSymbolName["ImportAttributes"] = "__importAttributes";
+    InternalSymbolName["ExportEquals"] = "export=";
+    InternalSymbolName["Default"] = "default";
+    InternalSymbolName["This"] = "this";
+    InternalSymbolName["ModuleExports"] = "module.exports";
+})(InternalSymbolName || (InternalSymbolName = {}));
+//# sourceMappingURL=internalSymbolName.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/internalSymbolName.js.map b/node_modules/typescript/dist/enums/internalSymbolName.js.map
new file mode 100644
index 000000000..cdc60e02b
--- /dev/null
+++ b/node_modules/typescript/d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B,CAAC;AAC3D,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.d.ts b/node_modules/typescript/dist/enums/jsxEmit.d.ts
new file mode 100644
index 000000000..30eb9f92c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.d.ts
@@ -0,0 +1,2 @@
+export declare var JsxEmit: any;
+//# sourceMappingURL=jsxEmit.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.d.ts.map b/node_modules/typescript/dist/enums/jsxEmit.d.ts.map
new file mode 100644
index 000000000..0e22a7e03
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsxEmit.d.ts","sourceRoot":"","sources":["../../src/enums/jsxEmit.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,OAAO,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts
new file mode 100644
index 000000000..401ceba98
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts
@@ -0,0 +1,9 @@
+export declare enum JsxEmit {
+    None = 0,
+    Preserve = 1,
+    ReactNative = 2,
+    React = 3,
+    ReactJSX = 4,
+    ReactJSXDev = 5
+}
+//# sourceMappingURL=jsxEmit.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map
new file mode 100644
index 000000000..27021a740
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsxEmit.enum.d.ts","sourceRoot":"","sources":["../../src/enums/jsxEmit.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO;IACf,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,WAAW,IAAI;CAClB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.js b/node_modules/typescript/dist/enums/jsxEmit.enum.js
new file mode 100644
index 000000000..8da0e59b8
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.enum.js
@@ -0,0 +1,11 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var JsxEmit;
+(function (JsxEmit) {
+    JsxEmit[JsxEmit["None"] = 0] = "None";
+    JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
+    JsxEmit[JsxEmit["ReactNative"] = 2] = "ReactNative";
+    JsxEmit[JsxEmit["React"] = 3] = "React";
+    JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX";
+    JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev";
+})(JsxEmit || (JsxEmit = {}));
+//# sourceMappingURL=jsxEmit.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.js.map b/node_modules/typescript/dist/enums/jsxEmit.enum.js.map
new file mode 100644
index 000000000..ac916cdb4
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsxEmit.enum.js","sourceRoot":"","sources":["../../src/enums/jsxEmit.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,OAOX;AAPD,WAAY,OAAO;IACf,qCAAQ,CAAA;IACR,6CAAY,CAAA;IACZ,mDAAe,CAAA;IACf,uCAAS,CAAA;IACT,6CAAY,CAAA;IACZ,mDAAe,CAAA;AACnB,CAAC,EAPW,OAAO,KAAP,OAAO,QAOlB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.js b/node_modules/typescript/dist/enums/jsxEmit.js
new file mode 100644
index 000000000..8189512d7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.js
@@ -0,0 +1,11 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var JsxEmit;
+(function (JsxEmit) {
+    JsxEmit[JsxEmit["None"] = 0] = "None";
+    JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
+    JsxEmit[JsxEmit["ReactNative"] = 2] = "ReactNative";
+    JsxEmit[JsxEmit["React"] = 3] = "React";
+    JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX";
+    JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev";
+})(JsxEmit || (JsxEmit = {}));
+//# sourceMappingURL=jsxEmit.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/jsxEmit.js.map b/node_modules/typescript/dist/enums/jsxEmit.js.map
new file mode 100644
index 000000000..5f0fb6c63
--- /dev/null
+++ b/node_modules/typescript/dist/enums/jsxEmit.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsxEmit.js","sourceRoot":"","sources":["../../src/enums/jsxEmit.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,OAAY,CAAC;AACxB,CAAC,UAAU,OAAO;IACd,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9C,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IACpD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IACxC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9C,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;AACxD,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.d.ts b/node_modules/typescript/dist/enums/languageVariant.d.ts
new file mode 100644
index 000000000..2a6271114
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.d.ts
@@ -0,0 +1,2 @@
+export declare var LanguageVariant: any;
+//# sourceMappingURL=languageVariant.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.d.ts.map b/node_modules/typescript/dist/enums/languageVariant.d.ts.map
new file mode 100644
index 000000000..2ddc035b3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"languageVariant.d.ts","sourceRoot":"","sources":["../../src/enums/languageVariant.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,eAAe,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.d.ts b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts
new file mode 100644
index 000000000..88d53a0c7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts
@@ -0,0 +1,5 @@
+export declare enum LanguageVariant {
+    Standard = 0,
+    JSX = 1
+}
+//# sourceMappingURL=languageVariant.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map
new file mode 100644
index 000000000..371757b39
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"languageVariant.enum.d.ts","sourceRoot":"","sources":["../../src/enums/languageVariant.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACvB,QAAQ,IAAI;IACZ,GAAG,IAAI;CACV"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.js b/node_modules/typescript/dist/enums/languageVariant.enum.js
new file mode 100644
index 000000000..9c9734c91
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.enum.js
@@ -0,0 +1,6 @@
+export var LanguageVariant;
+(function (LanguageVariant) {
+    LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard";
+    LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX";
+})(LanguageVariant || (LanguageVariant = {}));
+//# sourceMappingURL=languageVariant.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.js.map b/node_modules/typescript/dist/enums/languageVariant.enum.js.map
new file mode 100644
index 000000000..a5864024d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"languageVariant.enum.js","sourceRoot":"","sources":["../../src/enums/languageVariant.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,6DAAY,CAAA;IACZ,mDAAO,CAAA;AACX,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.js b/node_modules/typescript/dist/enums/languageVariant.js
new file mode 100644
index 000000000..76dea7a37
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.js
@@ -0,0 +1,6 @@
+export var LanguageVariant;
+(function (LanguageVariant) {
+    LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard";
+    LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX";
+})(LanguageVariant || (LanguageVariant = {}));
+//# sourceMappingURL=languageVariant.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/languageVariant.js.map b/node_modules/typescript/dist/enums/languageVariant.js.map
new file mode 100644
index 000000000..f34cfb152
--- /dev/null
+++ b/node_modules/typescript/dist/enums/languageVariant.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"languageVariant.js","sourceRoot":"","sources":["../../src/enums/languageVariant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,eAAoB,CAAC;AAChC,CAAC,UAAU,eAAe;IACtB,eAAe,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9D,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AACxD,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.d.ts b/node_modules/typescript/dist/enums/modifierFlags.d.ts
new file mode 100644
index 000000000..bad24d1a6
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var ModifierFlags: any;
+//# sourceMappingURL=modifierFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.d.ts.map b/node_modules/typescript/dist/enums/modifierFlags.d.ts.map
new file mode 100644
index 000000000..7f508ac87
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"modifierFlags.d.ts","sourceRoot":"","sources":["../../src/enums/modifierFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts
new file mode 100644
index 000000000..8663c7d2f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts
@@ -0,0 +1,42 @@
+export declare enum ModifierFlags {
+    None = 0,
+    Public = 1,
+    Private = 2,
+    Protected = 4,
+    Readonly = 8,
+    Override = 16,
+    Export = 32,
+    Abstract = 64,
+    Ambient = 128,
+    Static = 256,
+    Accessor = 512,
+    Async = 1024,
+    Default = 2048,
+    Const = 4096,
+    In = 8192,
+    Out = 16384,
+    Decorator = 32768,
+    Deprecated = 65536,
+    JSDocPublic = 8388608,
+    JSDocPrivate = 16777216,
+    JSDocProtected = 33554432,
+    JSDocReadonly = 67108864,
+    JSDocOverride = 134217728,
+    HasComputedJSDocModifiers = 268435456,
+    HasComputedFlags = 536870912,
+    SyntacticOrJSDocModifiers = 31,
+    SyntacticOnlyModifiers = 65504,
+    SyntacticModifiers = 65535,
+    JSDocCacheOnlyModifiers = 260046848,
+    JSDocOnlyModifiers = 65536,
+    NonCacheOnlyModifiers = 131071,
+    AccessibilityModifier = 7,
+    ParameterPropertyModifier = 31,
+    NonPublicAccessibilityModifier = 6,
+    TypeScriptModifier = 28895,
+    ExportDefault = 2080,
+    All = 131071,
+    Modifier = 98303,
+    JavaScript = 3872
+}
+//# sourceMappingURL=modifierFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map
new file mode 100644
index 000000000..be734ffc5
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"modifierFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/modifierFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACrB,IAAI,IAAI;IACR,MAAM,IAAS;IACf,OAAO,IAAS;IAChB,SAAS,IAAS;IAClB,QAAQ,IAAS;IACjB,QAAQ,KAAS;IACjB,MAAM,KAAS;IACf,QAAQ,KAAS;IACjB,OAAO,MAAS;IAChB,MAAM,MAAS;IACf,QAAQ,MAAS;IACjB,KAAK,OAAU;IACf,OAAO,OAAU;IACjB,KAAK,OAAU;IACf,EAAE,OAAU;IACZ,GAAG,QAAU;IACb,SAAS,QAAU;IACnB,UAAU,QAAU;IACpB,WAAW,UAAU;IACrB,YAAY,WAAU;IACtB,cAAc,WAAU;IACxB,aAAa,WAAU;IACvB,aAAa,YAAU;IACvB,yBAAyB,YAAU;IACnC,gBAAgB,YAAU;IAC1B,yBAAyB,KAAqD;IAC9E,sBAAsB,QAAmG;IACzH,kBAAkB,QAAqD;IACvE,uBAAuB,YAA8E;IACrG,kBAAkB,QAAa;IAC/B,qBAAqB,SAA0E;IAC/F,qBAAqB,IAA+B;IACpD,yBAAyB,KAA8C;IACvE,8BAA8B,IAAsB;IACpD,kBAAkB,QAA6F;IAC/G,aAAa,OAAmB;IAChC,GAAG,SAAqK;IACxK,QAAQ,QAAmB;IAC3B,UAAU,OAA+C;CAC5D"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.js b/node_modules/typescript/dist/enums/modifierFlags.enum.js
new file mode 100644
index 000000000..9eb81ad90
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.enum.js
@@ -0,0 +1,44 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/modifierflags.go. DO NOT EDIT.
+export var ModifierFlags;
+(function (ModifierFlags) {
+    ModifierFlags[ModifierFlags["None"] = 0] = "None";
+    ModifierFlags[ModifierFlags["Public"] = 1] = "Public";
+    ModifierFlags[ModifierFlags["Private"] = 2] = "Private";
+    ModifierFlags[ModifierFlags["Protected"] = 4] = "Protected";
+    ModifierFlags[ModifierFlags["Readonly"] = 8] = "Readonly";
+    ModifierFlags[ModifierFlags["Override"] = 16] = "Override";
+    ModifierFlags[ModifierFlags["Export"] = 32] = "Export";
+    ModifierFlags[ModifierFlags["Abstract"] = 64] = "Abstract";
+    ModifierFlags[ModifierFlags["Ambient"] = 128] = "Ambient";
+    ModifierFlags[ModifierFlags["Static"] = 256] = "Static";
+    ModifierFlags[ModifierFlags["Accessor"] = 512] = "Accessor";
+    ModifierFlags[ModifierFlags["Async"] = 1024] = "Async";
+    ModifierFlags[ModifierFlags["Default"] = 2048] = "Default";
+    ModifierFlags[ModifierFlags["Const"] = 4096] = "Const";
+    ModifierFlags[ModifierFlags["In"] = 8192] = "In";
+    ModifierFlags[ModifierFlags["Out"] = 16384] = "Out";
+    ModifierFlags[ModifierFlags["Decorator"] = 32768] = "Decorator";
+    ModifierFlags[ModifierFlags["Deprecated"] = 65536] = "Deprecated";
+    ModifierFlags[ModifierFlags["JSDocPublic"] = 8388608] = "JSDocPublic";
+    ModifierFlags[ModifierFlags["JSDocPrivate"] = 16777216] = "JSDocPrivate";
+    ModifierFlags[ModifierFlags["JSDocProtected"] = 33554432] = "JSDocProtected";
+    ModifierFlags[ModifierFlags["JSDocReadonly"] = 67108864] = "JSDocReadonly";
+    ModifierFlags[ModifierFlags["JSDocOverride"] = 134217728] = "JSDocOverride";
+    ModifierFlags[ModifierFlags["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers";
+    ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
+    ModifierFlags[ModifierFlags["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers";
+    ModifierFlags[ModifierFlags["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers";
+    ModifierFlags[ModifierFlags["SyntacticModifiers"] = 65535] = "SyntacticModifiers";
+    ModifierFlags[ModifierFlags["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers";
+    ModifierFlags[ModifierFlags["JSDocOnlyModifiers"] = 65536] = "JSDocOnlyModifiers";
+    ModifierFlags[ModifierFlags["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers";
+    ModifierFlags[ModifierFlags["AccessibilityModifier"] = 7] = "AccessibilityModifier";
+    ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier";
+    ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier";
+    ModifierFlags[ModifierFlags["TypeScriptModifier"] = 28895] = "TypeScriptModifier";
+    ModifierFlags[ModifierFlags["ExportDefault"] = 2080] = "ExportDefault";
+    ModifierFlags[ModifierFlags["All"] = 131071] = "All";
+    ModifierFlags[ModifierFlags["Modifier"] = 98303] = "Modifier";
+    ModifierFlags[ModifierFlags["JavaScript"] = 3872] = "JavaScript";
+})(ModifierFlags || (ModifierFlags = {}));
+//# sourceMappingURL=modifierFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.js.map b/node_modules/typescript/dist/enums/modifierFlags.enum.js.map
new file mode 100644
index 000000000..8c2d84fb6
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"modifierFlags.enum.js","sourceRoot":"","sources":["../../src/enums/modifierFlags.enum.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,MAAM,CAAN,IAAY,aAwCX;AAxCD,WAAY,aAAa;IACrB,iDAAQ,CAAA;IACR,qDAAe,CAAA;IACf,uDAAgB,CAAA;IAChB,2DAAkB,CAAA;IAClB,yDAAiB,CAAA;IACjB,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,0DAAiB,CAAA;IACjB,yDAAgB,CAAA;IAChB,uDAAe,CAAA;IACf,2DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,gDAAY,CAAA;IACZ,mDAAa,CAAA;IACb,+DAAmB,CAAA;IACnB,iEAAoB,CAAA;IACpB,qEAAqB,CAAA;IACrB,wEAAsB,CAAA;IACtB,4EAAwB,CAAA;IACxB,0EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,mGAAmC,CAAA;IACnC,iFAA0B,CAAA;IAC1B,4FAA8E,CAAA;IAC9E,yFAAyH,CAAA;IACzH,iFAAuE,CAAA;IACvE,+FAAqG,CAAA;IACrG,iFAA+B,CAAA;IAC/B,wFAA+F,CAAA;IAC/F,mFAAoD,CAAA;IACpD,4FAAuE,CAAA;IACvE,qGAAoD,CAAA;IACpD,iFAA+G,CAAA;IAC/G,sEAAgC,CAAA;IAChC,oDAAwK,CAAA;IACxK,6DAA2B,CAAA;IAC3B,gEAAyD,CAAA;AAC7D,CAAC,EAxCW,aAAa,KAAb,aAAa,QAwCxB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.js b/node_modules/typescript/dist/enums/modifierFlags.js
new file mode 100644
index 000000000..48d8d88a7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.js
@@ -0,0 +1,44 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/modifierflags.go. DO NOT EDIT.
+export var ModifierFlags;
+(function (ModifierFlags) {
+    ModifierFlags[ModifierFlags["None"] = 0] = "None";
+    ModifierFlags[ModifierFlags["Public"] = 1] = "Public";
+    ModifierFlags[ModifierFlags["Private"] = 2] = "Private";
+    ModifierFlags[ModifierFlags["Protected"] = 4] = "Protected";
+    ModifierFlags[ModifierFlags["Readonly"] = 8] = "Readonly";
+    ModifierFlags[ModifierFlags["Override"] = 16] = "Override";
+    ModifierFlags[ModifierFlags["Export"] = 32] = "Export";
+    ModifierFlags[ModifierFlags["Abstract"] = 64] = "Abstract";
+    ModifierFlags[ModifierFlags["Ambient"] = 128] = "Ambient";
+    ModifierFlags[ModifierFlags["Static"] = 256] = "Static";
+    ModifierFlags[ModifierFlags["Accessor"] = 512] = "Accessor";
+    ModifierFlags[ModifierFlags["Async"] = 1024] = "Async";
+    ModifierFlags[ModifierFlags["Default"] = 2048] = "Default";
+    ModifierFlags[ModifierFlags["Const"] = 4096] = "Const";
+    ModifierFlags[ModifierFlags["In"] = 8192] = "In";
+    ModifierFlags[ModifierFlags["Out"] = 16384] = "Out";
+    ModifierFlags[ModifierFlags["Decorator"] = 32768] = "Decorator";
+    ModifierFlags[ModifierFlags["Deprecated"] = 65536] = "Deprecated";
+    ModifierFlags[ModifierFlags["JSDocPublic"] = 8388608] = "JSDocPublic";
+    ModifierFlags[ModifierFlags["JSDocPrivate"] = 16777216] = "JSDocPrivate";
+    ModifierFlags[ModifierFlags["JSDocProtected"] = 33554432] = "JSDocProtected";
+    ModifierFlags[ModifierFlags["JSDocReadonly"] = 67108864] = "JSDocReadonly";
+    ModifierFlags[ModifierFlags["JSDocOverride"] = 134217728] = "JSDocOverride";
+    ModifierFlags[ModifierFlags["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers";
+    ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
+    ModifierFlags[ModifierFlags["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers";
+    ModifierFlags[ModifierFlags["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers";
+    ModifierFlags[ModifierFlags["SyntacticModifiers"] = 65535] = "SyntacticModifiers";
+    ModifierFlags[ModifierFlags["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers";
+    ModifierFlags[ModifierFlags["JSDocOnlyModifiers"] = 65536] = "JSDocOnlyModifiers";
+    ModifierFlags[ModifierFlags["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers";
+    ModifierFlags[ModifierFlags["AccessibilityModifier"] = 7] = "AccessibilityModifier";
+    ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier";
+    ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier";
+    ModifierFlags[ModifierFlags["TypeScriptModifier"] = 28895] = "TypeScriptModifier";
+    ModifierFlags[ModifierFlags["ExportDefault"] = 2080] = "ExportDefault";
+    ModifierFlags[ModifierFlags["All"] = 131071] = "All";
+    ModifierFlags[ModifierFlags["Modifier"] = 98303] = "Modifier";
+    ModifierFlags[ModifierFlags["JavaScript"] = 3872] = "JavaScript";
+})(ModifierFlags || (ModifierFlags = {}));
+//# sourceMappingURL=modifierFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/modifierFlags.js.map b/node_modules/typescript/dist/enums/modifierFlags.js.map
new file mode 100644
index 000000000..67371acdf
--- /dev/null
+++ b/node_modules/typescript/dist/enums/modifierFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"modifierFlags.js","sourceRoot":"","sources":["../../src/enums/modifierFlags.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,IAAI,aAAkB,CAAC;AAC9B,CAAC,UAAU,aAAa;IACpB,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAClD,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACtD,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACxD,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC5D,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC1D,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC3D,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACvD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC3D,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;IAC1D,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IACxD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,UAAU,CAAC;IAC5D,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,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aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,GAAG,yBAAyB,CAAC;IAChG,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,GAAG,uBAAuB,CAAC;IACzF,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IACpF,aAAa,CAAC,aAAa,CAAC,2BAA2B,CAAC,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC;IAC7F,aAAa,CAAC,aAAa,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,GAAG,gCAAgC,CAAC;IACtG,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,CAAC;IACvE,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;IACrD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,GAAG,UAAU,CAAC;IAC9D,aAAa,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,CAAC;AACrE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts
new file mode 100644
index 000000000..09e2bc450
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts
@@ -0,0 +1,2 @@
+export declare var ModuleDetectionKind: any;
+//# sourceMappingURL=moduleDetectionKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map
new file mode 100644
index 000000000..2e30c2004
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleDetectionKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,mBAAmB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts
new file mode 100644
index 000000000..a620bd077
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts
@@ -0,0 +1,7 @@
+export declare enum ModuleDetectionKind {
+    None = 0,
+    Auto = 1,
+    Legacy = 2,
+    Force = 3
+}
+//# sourceMappingURL=moduleDetectionKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map
new file mode 100644
index 000000000..186e1f43f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleDetectionKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB;IAC3B,IAAI,IAAI;IACR,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;CACZ"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js
new file mode 100644
index 000000000..fb09242fa
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js
@@ -0,0 +1,9 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var ModuleDetectionKind;
+(function (ModuleDetectionKind) {
+    ModuleDetectionKind[ModuleDetectionKind["None"] = 0] = "None";
+    ModuleDetectionKind[ModuleDetectionKind["Auto"] = 1] = "Auto";
+    ModuleDetectionKind[ModuleDetectionKind["Legacy"] = 2] = "Legacy";
+    ModuleDetectionKind[ModuleDetectionKind["Force"] = 3] = "Force";
+})(ModuleDetectionKind || (ModuleDetectionKind = {}));
+//# sourceMappingURL=moduleDetectionKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map
new file mode 100644
index 000000000..b7e10d9b0
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleDetectionKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,6DAAQ,CAAA;IACR,6DAAQ,CAAA;IACR,iEAAU,CAAA;IACV,+DAAS,CAAA;AACb,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.js b/node_modules/typescript/dist/enums/moduleDetectionKind.js
new file mode 100644
index 000000000..61e7904e9
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.js
@@ -0,0 +1,9 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var ModuleDetectionKind;
+(function (ModuleDetectionKind) {
+    ModuleDetectionKind[ModuleDetectionKind["None"] = 0] = "None";
+    ModuleDetectionKind[ModuleDetectionKind["Auto"] = 1] = "Auto";
+    ModuleDetectionKind[ModuleDetectionKind["Legacy"] = 2] = "Legacy";
+    ModuleDetectionKind[ModuleDetectionKind["Force"] = 3] = "Force";
+})(ModuleDetectionKind || (ModuleDetectionKind = {}));
+//# sourceMappingURL=moduleDetectionKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.js.map b/node_modules/typescript/dist/enums/moduleDetectionKind.js.map
new file mode 100644
index 000000000..b29027fd0
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleDetectionKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleDetectionKind.js","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,mBAAwB,CAAC;AACpC,CAAC,UAAU,mBAAmB;IAC1B,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9D,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9D,mBAAmB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAClE,mBAAmB,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;AACpE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.d.ts b/node_modules/typescript/dist/enums/moduleKind.d.ts
new file mode 100644
index 000000000..704065128
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.d.ts
@@ -0,0 +1,2 @@
+export declare var ModuleKind: any;
+//# sourceMappingURL=moduleKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.d.ts.map b/node_modules/typescript/dist/enums/moduleKind.d.ts.map
new file mode 100644
index 000000000..4dda4c109
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts
new file mode 100644
index 000000000..d1af5b715
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts
@@ -0,0 +1,17 @@
+export declare enum ModuleKind {
+    None = 0,
+    CommonJS = 1,
+    AMD = 2,
+    UMD = 3,
+    System = 4,
+    ES2015 = 5,
+    ES2020 = 6,
+    ES2022 = 7,
+    ESNext = 99,
+    Node16 = 100,
+    Node18 = 101,
+    Node20 = 102,
+    NodeNext = 199,
+    Preserve = 200
+}
+//# sourceMappingURL=moduleKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map
new file mode 100644
index 000000000..5893dc51e
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,GAAG,IAAI;IACP,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,QAAQ,MAAM;IACd,QAAQ,MAAM;CACjB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.js b/node_modules/typescript/dist/enums/moduleKind.enum.js
new file mode 100644
index 000000000..d7d5346b1
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.enum.js
@@ -0,0 +1,19 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var ModuleKind;
+(function (ModuleKind) {
+    ModuleKind[ModuleKind["None"] = 0] = "None";
+    ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS";
+    ModuleKind[ModuleKind["AMD"] = 2] = "AMD";
+    ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
+    ModuleKind[ModuleKind["System"] = 4] = "System";
+    ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+    ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
+    ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022";
+    ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
+    ModuleKind[ModuleKind["Node16"] = 100] = "Node16";
+    ModuleKind[ModuleKind["Node18"] = 101] = "Node18";
+    ModuleKind[ModuleKind["Node20"] = 102] = "Node20";
+    ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
+    ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve";
+})(ModuleKind || (ModuleKind = {}));
+//# sourceMappingURL=moduleKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.js.map b/node_modules/typescript/dist/enums/moduleKind.enum.js.map
new file mode 100644
index 000000000..2b66cfc19
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,UAeX;AAfD,WAAY,UAAU;IAClB,2CAAQ,CAAA;IACR,mDAAY,CAAA;IACZ,yCAAO,CAAA;IACP,yCAAO,CAAA;IACP,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,gDAAW,CAAA;IACX,iDAAY,CAAA;IACZ,iDAAY,CAAA;IACZ,iDAAY,CAAA;IACZ,qDAAc,CAAA;IACd,qDAAc,CAAA;AAClB,CAAC,EAfW,UAAU,KAAV,UAAU,QAerB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.js b/node_modules/typescript/dist/enums/moduleKind.js
new file mode 100644
index 000000000..776993769
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.js
@@ -0,0 +1,19 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var ModuleKind;
+(function (ModuleKind) {
+    ModuleKind[ModuleKind["None"] = 0] = "None";
+    ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS";
+    ModuleKind[ModuleKind["AMD"] = 2] = "AMD";
+    ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
+    ModuleKind[ModuleKind["System"] = 4] = "System";
+    ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+    ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
+    ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022";
+    ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
+    ModuleKind[ModuleKind["Node16"] = 100] = "Node16";
+    ModuleKind[ModuleKind["Node18"] = 101] = "Node18";
+    ModuleKind[ModuleKind["Node20"] = 102] = "Node20";
+    ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
+    ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve";
+})(ModuleKind || (ModuleKind = {}));
+//# sourceMappingURL=moduleKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleKind.js.map b/node_modules/typescript/dist/enums/moduleKind.js.map
new file mode 100644
index 000000000..3020dca31
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleKind.js.map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AC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,UAAU,CAAC;AAC1D,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts
new file mode 100644
index 000000000..d9a16e387
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts
@@ -0,0 +1,2 @@
+export declare var ModuleResolutionKind: any;
+//# sourceMappingURL=moduleResolutionKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map
new file mode 100644
index 000000000..26db07b63
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleResolutionKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts
new file mode 100644
index 000000000..f3baec332
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts
@@ -0,0 +1,9 @@
+export declare enum ModuleResolutionKind {
+    Unknown = 0,
+    Classic = 1,
+    Node10 = 2,
+    Node16 = 3,
+    NodeNext = 99,
+    Bundler = 100
+}
+//# sourceMappingURL=moduleResolutionKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map
new file mode 100644
index 000000000..f8f3aed0b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleResolutionKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC5B,OAAO,IAAI;IACX,OAAO,IAAI;IACX,MAAM,IAAI;IACV,MAAM,IAAI;IACV,QAAQ,KAAK;IACb,OAAO,MAAM;CAChB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js
new file mode 100644
index 000000000..1f22e9ead
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js
@@ -0,0 +1,11 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var ModuleResolutionKind;
+(function (ModuleResolutionKind) {
+    ModuleResolutionKind[ModuleResolutionKind["Unknown"] = 0] = "Unknown";
+    ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
+    ModuleResolutionKind[ModuleResolutionKind["Node10"] = 2] = "Node10";
+    ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16";
+    ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
+    ModuleResolutionKind[ModuleResolutionKind["Bundler"] = 100] = "Bundler";
+})(ModuleResolutionKind || (ModuleResolutionKind = {}));
+//# sourceMappingURL=moduleResolutionKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map
new file mode 100644
index 000000000..4f3c073a6
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleResolutionKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC5B,qEAAW,CAAA;IACX,qEAAW,CAAA;IACX,mEAAU,CAAA;IACV,mEAAU,CAAA;IACV,wEAAa,CAAA;IACb,uEAAa,CAAA;AACjB,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.js b/node_modules/typescript/dist/enums/moduleResolutionKind.js
new file mode 100644
index 000000000..a24922bbe
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.js
@@ -0,0 +1,11 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var ModuleResolutionKind;
+(function (ModuleResolutionKind) {
+    ModuleResolutionKind[ModuleResolutionKind["Unknown"] = 0] = "Unknown";
+    ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
+    ModuleResolutionKind[ModuleResolutionKind["Node10"] = 2] = "Node10";
+    ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16";
+    ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
+    ModuleResolutionKind[ModuleResolutionKind["Bundler"] = 100] = "Bundler";
+})(ModuleResolutionKind || (ModuleResolutionKind = {}));
+//# sourceMappingURL=moduleResolutionKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.js.map b/node_modules/typescript/dist/enums/moduleResolutionKind.js.map
new file mode 100644
index 000000000..b4567a51f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/moduleResolutionKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"moduleResolutionKind.js","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACtE,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACtE,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACzE,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;AAC5E,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.d.ts b/node_modules/typescript/dist/enums/newLineKind.d.ts
new file mode 100644
index 000000000..bab13b9db
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.d.ts
@@ -0,0 +1,2 @@
+export declare var NewLineKind: any;
+//# sourceMappingURL=newLineKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.d.ts.map b/node_modules/typescript/dist/enums/newLineKind.d.ts.map
new file mode 100644
index 000000000..99aed2146
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"newLineKind.d.ts","sourceRoot":"","sources":["../../src/enums/newLineKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.d.ts b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts
new file mode 100644
index 000000000..a61904446
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts
@@ -0,0 +1,6 @@
+export declare enum NewLineKind {
+    None = 0,
+    CRLF = 1,
+    LF = 2
+}
+//# sourceMappingURL=newLineKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map
new file mode 100644
index 000000000..992d14e6b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"newLineKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/newLineKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,EAAE,IAAI;CACT"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.js b/node_modules/typescript/dist/enums/newLineKind.enum.js
new file mode 100644
index 000000000..d4790e077
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.enum.js
@@ -0,0 +1,8 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var NewLineKind;
+(function (NewLineKind) {
+    NewLineKind[NewLineKind["None"] = 0] = "None";
+    NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF";
+    NewLineKind[NewLineKind["LF"] = 2] = "LF";
+})(NewLineKind || (NewLineKind = {}));
+//# sourceMappingURL=newLineKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.js.map b/node_modules/typescript/dist/enums/newLineKind.enum.js.map
new file mode 100644
index 000000000..ce760aeac
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"newLineKind.enum.js","sourceRoot":"","sources":["../../src/enums/newLineKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,6CAAQ,CAAA;IACR,yCAAM,CAAA;AACV,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.js b/node_modules/typescript/dist/enums/newLineKind.js
new file mode 100644
index 000000000..c6679a91e
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.js
@@ -0,0 +1,8 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT.
+export var NewLineKind;
+(function (NewLineKind) {
+    NewLineKind[NewLineKind["None"] = 0] = "None";
+    NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF";
+    NewLineKind[NewLineKind["LF"] = 2] = "LF";
+})(NewLineKind || (NewLineKind = {}));
+//# sourceMappingURL=newLineKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/newLineKind.js.map b/node_modules/typescript/dist/enums/newLineKind.js.map
new file mode 100644
index 000000000..9de70789c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/newLineKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"newLineKind.js","sourceRoot":"","sources":["../../src/enums/newLineKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;AAC9C,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts
new file mode 100644
index 000000000..26b893b8b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var NodeBuilderFlags: any;
+//# sourceMappingURL=nodeBuilderFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map
new file mode 100644
index 000000000..5f4b8392a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeBuilderFlags.d.ts","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,gBAAgB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts
new file mode 100644
index 000000000..252840d8d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts
@@ -0,0 +1,36 @@
+export declare enum NodeBuilderFlags {
+    None = 0,
+    NoTruncation = 1,
+    WriteArrayAsGenericType = 2,
+    GenerateNamesForShadowedTypeParams = 4,
+    UseStructuralFallback = 8,
+    ForbidIndexedAccessSymbolReferences = 16,
+    WriteTypeArgumentsOfSignature = 32,
+    UseFullyQualifiedType = 64,
+    UseOnlyExternalAliasing = 128,
+    SuppressAnyReturnType = 256,
+    WriteTypeParametersInQualifiedName = 512,
+    MultilineObjectLiterals = 1024,
+    WriteClassExpressionAsTypeLiteral = 2048,
+    UseTypeOfFunction = 4096,
+    OmitParameterModifiers = 8192,
+    UseAliasDefinedOutsideCurrentScope = 16384,
+    UseSingleQuotesForStringLiteralType = 268435456,
+    NoTypeReduction = 536870912,
+    UseInstantiationExpressions = 1073741824,
+    OmitThisParameter = 33554432,
+    WriteCallStyleSignature = 134217728,
+    AllowThisInObjectLiteral = 32768,
+    AllowQualifiedNameInPlaceOfIdentifier = 65536,
+    AllowAnonymousIdentifier = 131072,
+    AllowEmptyUnionOrIntersection = 262144,
+    AllowEmptyTuple = 524288,
+    AllowUniqueESSymbolType = 1048576,
+    AllowEmptyIndexInfoType = 2097152,
+    AllowNodeModulesRelativePaths = 67108864,
+    IgnoreErrors = 70221824,
+    InObjectTypeLiteral = 4194304,
+    InTypeAlias = 8388608,
+    InInitialEntityName = 16777216
+}
+//# sourceMappingURL=nodeBuilderFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map
new file mode 100644
index 000000000..42c03ffcb
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeBuilderFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,gBAAgB;IACxB,IAAI,IAAI;IACR,YAAY,IAAS;IACrB,uBAAuB,IAAS;IAChC,kCAAkC,IAAS;IAC3C,qBAAqB,IAAS;IAC9B,mCAAmC,KAAS;IAC5C,6BAA6B,KAAS;IACtC,qBAAqB,KAAS;IAC9B,uBAAuB,MAAS;IAChC,qBAAqB,MAAS;IAC9B,kCAAkC,MAAS;IAC3C,uBAAuB,OAAU;IACjC,iCAAiC,OAAU;IAC3C,iBAAiB,OAAU;IAC3B,sBAAsB,OAAU;IAChC,kCAAkC,QAAU;IAC5C,mCAAmC,YAAU;IAC7C,eAAe,YAAU;IACzB,2BAA2B,aAAU;IACrC,iBAAiB,WAAU;IAC3B,uBAAuB,YAAU;IACjC,wBAAwB,QAAU;IAClC,qCAAqC,QAAU;IAC/C,wBAAwB,SAAU;IAClC,6BAA6B,SAAU;IACvC,eAAe,SAAU;IACzB,uBAAuB,UAAU;IACjC,uBAAuB,UAAU;IACjC,6BAA6B,WAAU;IACvC,YAAY,WAA0M;IACtN,mBAAmB,UAAU;IAC7B,WAAW,UAAU;IACrB,mBAAmB,WAAU;CAChC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js
new file mode 100644
index 000000000..82092bd06
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js
@@ -0,0 +1,38 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT.
+export var NodeBuilderFlags;
+(function (NodeBuilderFlags) {
+    NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+    NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+    NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+    NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams";
+    NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback";
+    NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences";
+    NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+    NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+    NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing";
+    NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+    NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+    NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals";
+    NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral";
+    NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction";
+    NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers";
+    NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope";
+    NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType";
+    NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction";
+    NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions";
+    NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter";
+    NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature";
+    NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral";
+    NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier";
+    NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier";
+    NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection";
+    NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple";
+    NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType";
+    NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType";
+    NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths";
+    NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors";
+    NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral";
+    NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
+    NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName";
+})(NodeBuilderFlags || (NodeBuilderFlags = {}));
+//# sourceMappingURL=nodeBuilderFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map
new file mode 100644
index 000000000..5f2bbe35b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeBuilderFlags.enum.js","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.enum.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,MAAM,CAAN,IAAY,gBAkCX;AAlCD,WAAY,gBAAgB;IACxB,uDAAQ,CAAA;IACR,uEAAqB,CAAA;IACrB,6FAAgC,CAAA;IAChC,mHAA2C,CAAA;IAC3C,yFAA8B,CAAA;IAC9B,sHAA4C,CAAA;IAC5C,0GAAsC,CAAA;IACtC,0FAA8B,CAAA;IAC9B,+FAAgC,CAAA;IAChC,2FAA8B,CAAA;IAC9B,qHAA2C,CAAA;IAC3C,gGAAiC,CAAA;IACjC,oHAA2C,CAAA;IAC3C,oFAA2B,CAAA;IAC3B,8FAAgC,CAAA;IAChC,uHAA4C,CAAA;IAC5C,6HAA6C,CAAA;IAC7C,qFAAyB,CAAA;IACzB,8GAAqC,CAAA;IACrC,wFAA2B,CAAA;IAC3B,qGAAiC,CAAA;IACjC,mGAAkC,CAAA;IAClC,6HAA+C,CAAA;IAC/C,oGAAkC,CAAA;IAClC,8GAAuC,CAAA;IACvC,kFAAyB,CAAA;IACzB,mGAAiC,CAAA;IACjC,mGAAiC,CAAA;IACjC,gHAAuC,CAAA;IACvC,8EAAsN,CAAA;IACtN,2FAA6B,CAAA;IAC7B,2EAAqB,CAAA;IACrB,4FAA6B,CAAA;AACjC,CAAC,EAlCW,gBAAgB,KAAhB,gBAAgB,QAkC3B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.js b/node_modules/typescript/dist/enums/nodeBuilderFlags.js
new file mode 100644
index 000000000..9e3cbaa14
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.js
@@ -0,0 +1,38 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT.
+export var NodeBuilderFlags;
+(function (NodeBuilderFlags) {
+    NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None";
+    NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+    NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+    NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams";
+    NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback";
+    NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences";
+    NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+    NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+    NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing";
+    NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+    NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+    NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals";
+    NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral";
+    NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction";
+    NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers";
+    NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope";
+    NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType";
+    NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction";
+    NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions";
+    NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter";
+    NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature";
+    NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral";
+    NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier";
+    NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier";
+    NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection";
+    NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple";
+    NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType";
+    NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType";
+    NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths";
+    NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors";
+    NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral";
+    NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
+    NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName";
+})(NodeBuilderFlags || (NodeBuilderFlags = {}));
+//# sourceMappingURL=nodeBuilderFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map
new file mode 100644
index 000000000..08f20a96f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeBuilderFlags.js","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,IAAI,gBAAqB,CAAC;AACjC,CAAC,UAAU,gBAAgB;IACvB,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACxD,gBAAgB,CAAC,gBAAgB,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC;IACxE,gBAAgB,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IAC9F,gBAAgB,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC,GAAG,oCAAoC,CAAC;IACpH,gBAAgB,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IAC1F,g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G,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.d.ts b/node_modules/typescript/dist/enums/nodeFlags.d.ts
new file mode 100644
index 000000000..63b27eefe
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var NodeFlags: any;
+//# sourceMappingURL=nodeFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.d.ts.map b/node_modules/typescript/dist/enums/nodeFlags.d.ts.map
new file mode 100644
index 000000000..d18921fcd
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeFlags.d.ts","sourceRoot":"","sources":["../../src/enums/nodeFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts
new file mode 100644
index 000000000..2ce097b42
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts
@@ -0,0 +1,44 @@
+export declare enum NodeFlags {
+    None = 0,
+    Let = 1,
+    Const = 2,
+    Using = 4,
+    Reparsed = 8,
+    Synthesized = 16,
+    OptionalChain = 32,
+    ExportContext = 64,
+    ContainsThis = 128,
+    HasImplicitReturn = 256,
+    HasExplicitReturn = 512,
+    DisallowInContext = 1024,
+    YieldContext = 2048,
+    DecoratorContext = 4096,
+    AwaitContext = 8192,
+    DisallowConditionalTypesContext = 16384,
+    ThisNodeHasError = 32768,
+    JavaScriptFile = 65536,
+    ThisNodeOrAnySubNodesHasError = 131072,
+    HasAsyncFunctions = 262144,
+    PossiblyContainsDynamicImport = 524288,
+    PossiblyContainsImportMeta = 1048576,
+    HasJSDoc = 2097152,
+    JSDoc = 4194304,
+    Ambient = 8388608,
+    InWithStatement = 16777216,
+    JsonFile = 33554432,
+    PossiblyContainsDeprecatedTag = 67108864,
+    Unreachable = 134217728,
+    ReparserTransformedLiteral = 268435456,
+    BlockScoped = 7,
+    Constant = 6,
+    AwaitUsing = 6,
+    ReachabilityCheckFlags = 768,
+    ReachabilityAndEmitFlags = 262912,
+    ContextFlags = 25263104,
+    TypeExcludesFlags = 10240,
+    PermanentlySetIncrementalFlags = 1572864,
+    IdentifierHasExtendedUnicodeEscape = 128,
+    IdentifierIsInJSDocNamespace = 262144,
+    NestedNamespace = 32
+}
+//# sourceMappingURL=nodeFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map
new file mode 100644
index 000000000..9af24d6fc
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/nodeFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,IAAI,IAAI;IACR,GAAG,IAAS;IACZ,KAAK,IAAS;IACd,KAAK,IAAS;IACd,QAAQ,IAAS;IACjB,WAAW,KAAS;IACpB,aAAa,KAAS;IACtB,aAAa,KAAS;IACtB,YAAY,MAAS;IACrB,iBAAiB,MAAS;IAC1B,iBAAiB,MAAS;IAC1B,iBAAiB,OAAU;IAC3B,YAAY,OAAU;IACtB,gBAAgB,OAAU;IAC1B,YAAY,OAAU;IACtB,+BAA+B,QAAU;IACzC,gBAAgB,QAAU;IAC1B,cAAc,QAAU;IACxB,6BAA6B,SAAU;IACvC,iBAAiB,SAAU;IAC3B,6BAA6B,SAAU;IACvC,0BAA0B,UAAU;IACpC,QAAQ,UAAU;IAClB,KAAK,UAAU;IACf,OAAO,UAAU;IACjB,eAAe,WAAU;IACzB,QAAQ,WAAU;IAClB,6BAA6B,WAAU;IACvC,WAAW,YAAU;IACrB,0BAA0B,YAAU;IACpC,WAAW,IAAsB;IACjC,QAAQ,IAAgB;IACxB,UAAU,IAAgB;IAC1B,sBAAsB,MAAwC;IAC9D,wBAAwB,SAA6C;IACrE,YAAY,WAAoJ;IAChK,iBAAiB,QAA8B;IAC/C,8BAA8B,UAA6D;IAC3F,kCAAkC,MAAe;IACjD,4BAA4B,SAAoB;IAChD,eAAe,KAAgB;CAClC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.js b/node_modules/typescript/dist/enums/nodeFlags.enum.js
new file mode 100644
index 000000000..a54a2d72f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.enum.js
@@ -0,0 +1,46 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/nodeflags.go. DO NOT EDIT.
+export var NodeFlags;
+(function (NodeFlags) {
+    NodeFlags[NodeFlags["None"] = 0] = "None";
+    NodeFlags[NodeFlags["Let"] = 1] = "Let";
+    NodeFlags[NodeFlags["Const"] = 2] = "Const";
+    NodeFlags[NodeFlags["Using"] = 4] = "Using";
+    NodeFlags[NodeFlags["Reparsed"] = 8] = "Reparsed";
+    NodeFlags[NodeFlags["Synthesized"] = 16] = "Synthesized";
+    NodeFlags[NodeFlags["OptionalChain"] = 32] = "OptionalChain";
+    NodeFlags[NodeFlags["ExportContext"] = 64] = "ExportContext";
+    NodeFlags[NodeFlags["ContainsThis"] = 128] = "ContainsThis";
+    NodeFlags[NodeFlags["HasImplicitReturn"] = 256] = "HasImplicitReturn";
+    NodeFlags[NodeFlags["HasExplicitReturn"] = 512] = "HasExplicitReturn";
+    NodeFlags[NodeFlags["DisallowInContext"] = 1024] = "DisallowInContext";
+    NodeFlags[NodeFlags["YieldContext"] = 2048] = "YieldContext";
+    NodeFlags[NodeFlags["DecoratorContext"] = 4096] = "DecoratorContext";
+    NodeFlags[NodeFlags["AwaitContext"] = 8192] = "AwaitContext";
+    NodeFlags[NodeFlags["DisallowConditionalTypesContext"] = 16384] = "DisallowConditionalTypesContext";
+    NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
+    NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
+    NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
+    NodeFlags[NodeFlags["HasAsyncFunctions"] = 262144] = "HasAsyncFunctions";
+    NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
+    NodeFlags[NodeFlags["PossiblyContainsImportMeta"] = 1048576] = "PossiblyContainsImportMeta";
+    NodeFlags[NodeFlags["HasJSDoc"] = 2097152] = "HasJSDoc";
+    NodeFlags[NodeFlags["JSDoc"] = 4194304] = "JSDoc";
+    NodeFlags[NodeFlags["Ambient"] = 8388608] = "Ambient";
+    NodeFlags[NodeFlags["InWithStatement"] = 16777216] = "InWithStatement";
+    NodeFlags[NodeFlags["JsonFile"] = 33554432] = "JsonFile";
+    NodeFlags[NodeFlags["PossiblyContainsDeprecatedTag"] = 67108864] = "PossiblyContainsDeprecatedTag";
+    NodeFlags[NodeFlags["Unreachable"] = 134217728] = "Unreachable";
+    NodeFlags[NodeFlags["ReparserTransformedLiteral"] = 268435456] = "ReparserTransformedLiteral";
+    NodeFlags[NodeFlags["BlockScoped"] = 7] = "BlockScoped";
+    NodeFlags[NodeFlags["Constant"] = 6] = "Constant";
+    NodeFlags[NodeFlags["AwaitUsing"] = 6] = "AwaitUsing";
+    NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags";
+    NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 262912] = "ReachabilityAndEmitFlags";
+    NodeFlags[NodeFlags["ContextFlags"] = 25263104] = "ContextFlags";
+    NodeFlags[NodeFlags["TypeExcludesFlags"] = 10240] = "TypeExcludesFlags";
+    NodeFlags[NodeFlags["PermanentlySetIncrementalFlags"] = 1572864] = "PermanentlySetIncrementalFlags";
+    NodeFlags[NodeFlags["IdentifierHasExtendedUnicodeEscape"] = 128] = "IdentifierHasExtendedUnicodeEscape";
+    NodeFlags[NodeFlags["IdentifierIsInJSDocNamespace"] = 262144] = "IdentifierIsInJSDocNamespace";
+    NodeFlags[NodeFlags["NestedNamespace"] = 32] = "NestedNamespace";
+})(NodeFlags || (NodeFlags = {}));
+//# sourceMappingURL=nodeFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.js.map b/node_modules/typescript/dist/enums/nodeFlags.enum.js.map
new file mode 100644
index 000000000..6516f1665
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeFlags.enum.js","sourceRoot":"","sources":["../../src/enums/nodeFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,SA0CX;AA1CD,WAAY,SAAS;IACjB,yCAAQ,CAAA;IACR,uCAAY,CAAA;IACZ,2CAAc,CAAA;IACd,2CAAc,CAAA;IACd,iDAAiB,CAAA;IACjB,wDAAoB,CAAA;IACpB,4DAAsB,CAAA;IACtB,4DAAsB,CAAA;IACtB,2DAAqB,CAAA;IACrB,qEAA0B,CAAA;IAC1B,qEAA0B,CAAA;IAC1B,sEAA2B,CAAA;IAC3B,4DAAsB,CAAA;IACtB,oEAA0B,CAAA;IAC1B,4DAAsB,CAAA;IACtB,mGAAyC,CAAA;IACzC,qEAA0B,CAAA;IAC1B,iEAAwB,CAAA;IACxB,gGAAuC,CAAA;IACvC,wEAA2B,CAAA;IAC3B,gGAAuC,CAAA;IACvC,2FAAoC,CAAA;IACpC,uDAAkB,CAAA;IAClB,iDAAe,CAAA;IACf,qDAAiB,CAAA;IACjB,sEAAyB,CAAA;IACzB,wDAAkB,CAAA;IAClB,kGAAuC,CAAA;IACvC,+DAAqB,CAAA;IACrB,6FAAoC,CAAA;IACpC,uDAAiC,CAAA;IACjC,iDAAwB,CAAA;IACxB,qDAA0B,CAAA;IAC1B,+EAA8D,CAAA;IAC9D,sFAAqE,CAAA;IACrE,gEAAgK,CAAA;IAChK,uEAA+C,CAAA;IAC/C,mGAA2F,CAAA;IAC3F,uGAAiD,CAAA;IACjD,8FAAgD,CAAA;IAChD,gEAA+B,CAAA;AACnC,CAAC,EA1CW,SAAS,KAAT,SAAS,QA0CpB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.js b/node_modules/typescript/dist/enums/nodeFlags.js
new file mode 100644
index 000000000..06c168878
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.js
@@ -0,0 +1,46 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/nodeflags.go. DO NOT EDIT.
+export var NodeFlags;
+(function (NodeFlags) {
+    NodeFlags[NodeFlags["None"] = 0] = "None";
+    NodeFlags[NodeFlags["Let"] = 1] = "Let";
+    NodeFlags[NodeFlags["Const"] = 2] = "Const";
+    NodeFlags[NodeFlags["Using"] = 4] = "Using";
+    NodeFlags[NodeFlags["Reparsed"] = 8] = "Reparsed";
+    NodeFlags[NodeFlags["Synthesized"] = 16] = "Synthesized";
+    NodeFlags[NodeFlags["OptionalChain"] = 32] = "OptionalChain";
+    NodeFlags[NodeFlags["ExportContext"] = 64] = "ExportContext";
+    NodeFlags[NodeFlags["ContainsThis"] = 128] = "ContainsThis";
+    NodeFlags[NodeFlags["HasImplicitReturn"] = 256] = "HasImplicitReturn";
+    NodeFlags[NodeFlags["HasExplicitReturn"] = 512] = "HasExplicitReturn";
+    NodeFlags[NodeFlags["DisallowInContext"] = 1024] = "DisallowInContext";
+    NodeFlags[NodeFlags["YieldContext"] = 2048] = "YieldContext";
+    NodeFlags[NodeFlags["DecoratorContext"] = 4096] = "DecoratorContext";
+    NodeFlags[NodeFlags["AwaitContext"] = 8192] = "AwaitContext";
+    NodeFlags[NodeFlags["DisallowConditionalTypesContext"] = 16384] = "DisallowConditionalTypesContext";
+    NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
+    NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
+    NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
+    NodeFlags[NodeFlags["HasAsyncFunctions"] = 262144] = "HasAsyncFunctions";
+    NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
+    NodeFlags[NodeFlags["PossiblyContainsImportMeta"] = 1048576] = "PossiblyContainsImportMeta";
+    NodeFlags[NodeFlags["HasJSDoc"] = 2097152] = "HasJSDoc";
+    NodeFlags[NodeFlags["JSDoc"] = 4194304] = "JSDoc";
+    NodeFlags[NodeFlags["Ambient"] = 8388608] = "Ambient";
+    NodeFlags[NodeFlags["InWithStatement"] = 16777216] = "InWithStatement";
+    NodeFlags[NodeFlags["JsonFile"] = 33554432] = "JsonFile";
+    NodeFlags[NodeFlags["PossiblyContainsDeprecatedTag"] = 67108864] = "PossiblyContainsDeprecatedTag";
+    NodeFlags[NodeFlags["Unreachable"] = 134217728] = "Unreachable";
+    NodeFlags[NodeFlags["ReparserTransformedLiteral"] = 268435456] = "ReparserTransformedLiteral";
+    NodeFlags[NodeFlags["BlockScoped"] = 7] = "BlockScoped";
+    NodeFlags[NodeFlags["Constant"] = 6] = "Constant";
+    NodeFlags[NodeFlags["AwaitUsing"] = 6] = "AwaitUsing";
+    NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags";
+    NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 262912] = "ReachabilityAndEmitFlags";
+    NodeFlags[NodeFlags["ContextFlags"] = 25263104] = "ContextFlags";
+    NodeFlags[NodeFlags["TypeExcludesFlags"] = 10240] = "TypeExcludesFlags";
+    NodeFlags[NodeFlags["PermanentlySetIncrementalFlags"] = 1572864] = "PermanentlySetIncrementalFlags";
+    NodeFlags[NodeFlags["IdentifierHasExtendedUnicodeEscape"] = 128] = "IdentifierHasExtendedUnicodeEscape";
+    NodeFlags[NodeFlags["IdentifierIsInJSDocNamespace"] = 262144] = "IdentifierIsInJSDocNamespace";
+    NodeFlags[NodeFlags["NestedNamespace"] = 32] = "NestedNamespace";
+})(NodeFlags || (NodeFlags = {}));
+//# sourceMappingURL=nodeFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/nodeFlags.js.map b/node_modules/typescript/dist/enums/nodeFlags.js.map
new file mode 100644
index 000000000..8d2d11d40
--- /dev/null
+++ b/node_modules/typescript/dist/enums/nodeFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"nodeFlags.js","sourceRoot":"","sources":["../../src/enums/nodeFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,SAAc,CAAC;AAC1B,CAAC,UAAU,SAAS;IAChB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACxC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC5C,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC5C,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAClD,SAAS,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACzD,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC;IAC7D,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC;IAC7D,SAAS,CA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oC,CAAC,GAAG,GAAG,CAAC,GAAG,oCAAoC,CAAC;IACxG,SAAS,CAAC,SAAS,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAC,GAAG,8BAA8B,CAAC;IAC/F,SAAS,CAAC,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,GAAG,iBAAiB,CAAC;AACrE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.d.ts b/node_modules/typescript/dist/enums/objectFlags.d.ts
new file mode 100644
index 000000000..1abaea2de
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var ObjectFlags: any;
+//# sourceMappingURL=objectFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.d.ts.map b/node_modules/typescript/dist/enums/objectFlags.d.ts.map
new file mode 100644
index 000000000..6958584c5
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"objectFlags.d.ts","sourceRoot":"","sources":["../../src/enums/objectFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.d.ts b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts
new file mode 100644
index 000000000..1339a6a78
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts
@@ -0,0 +1,50 @@
+export declare enum ObjectFlags {
+    None = 0,
+    Class = 1,
+    Interface = 2,
+    Reference = 4,
+    Tuple = 8,
+    Anonymous = 16,
+    Mapped = 32,
+    Instantiated = 64,
+    ObjectLiteral = 128,
+    EvolvingArray = 256,
+    ObjectLiteralPatternWithComputedProperties = 512,
+    ReverseMapped = 1024,
+    JsxAttributes = 2048,
+    JSLiteral = 4096,
+    FreshLiteral = 8192,
+    ArrayLiteral = 16384,
+    PrimitiveUnion = 32768,
+    ContainsWideningType = 65536,
+    ContainsObjectOrArrayLiteral = 131072,
+    NonInferrableType = 262144,
+    CouldContainTypeVariablesComputed = 524288,
+    CouldContainTypeVariables = 1048576,
+    MembersResolved = 2097152,
+    ClassOrInterface = 3,
+    RequiresWidening = 196608,
+    PropagatingFlags = 458752,
+    InstantiatedMapped = 96,
+    InstantiationExpressionType = 16777216,
+    SingleSignatureType = 33554432,
+    ObjectTypeKindMask = 50332991,
+    ContainsSpread = 4194304,
+    ObjectRestType = 8388608,
+    IsClassInstanceClone = 67108864,
+    IdenticalBaseTypeCalculated = 134217728,
+    IdenticalBaseTypeExists = 268435456,
+    UnresolvedMembers = 536870912,
+    FromTypeNode = 1073741824,
+    IsGenericTypeComputed = 4194304,
+    IsGenericObjectType = 8388608,
+    IsGenericIndexType = 16777216,
+    IsGenericType = 25165824,
+    ContainsIntersections = 33554432,
+    IsUnknownLikeUnionComputed = 67108864,
+    IsUnknownLikeUnion = 134217728,
+    IsNeverIntersectionComputed = 33554432,
+    IsNeverIntersection = 67108864,
+    IsConstrainedTypeVariable = 134217728
+}
+//# sourceMappingURL=objectFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map
new file mode 100644
index 000000000..5c2583103
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"objectFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/objectFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,KAAK,IAAS;IACd,SAAS,IAAS;IAClB,SAAS,IAAS;IAClB,KAAK,IAAS;IACd,SAAS,KAAS;IAClB,MAAM,KAAS;IACf,YAAY,KAAS;IACrB,aAAa,MAAS;IACtB,aAAa,MAAS;IACtB,0CAA0C,MAAS;IACnD,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,SAAS,OAAU;IACnB,YAAY,OAAU;IACtB,YAAY,QAAU;IACtB,cAAc,QAAU;IACxB,oBAAoB,QAAU;IAC9B,4BAA4B,SAAU;IACtC,iBAAiB,SAAU;IAC3B,iCAAiC,SAAU;IAC3C,yBAAyB,UAAU;IACnC,eAAe,UAAU;IACzB,gBAAgB,IAAoB;IACpC,gBAAgB,SAAsD;IACtE,gBAAgB,SAA0E;IAC1F,kBAAkB,KAAwB;IAC1C,2BAA2B,WAAU;IACrC,mBAAmB,WAAU;IAC7B,kBAAkB,WAAgJ;IAClK,cAAc,UAAU;IACxB,cAAc,UAAU;IACxB,oBAAoB,WAAU;IAC9B,2BAA2B,YAAU;IACrC,uBAAuB,YAAU;IACjC,iBAAiB,YAAU;IAC3B,YAAY,aAAU;IACtB,qBAAqB,UAAU;IAC/B,mBAAmB,UAAU;IAC7B,kBAAkB,WAAU;IAC5B,aAAa,WAA2C;IACxD,qBAAqB,WAAU;IAC/B,0BAA0B,WAAU;IACpC,kBAAkB,YAAU;IAC5B,2BAA2B,WAAU;IACrC,mBAAmB,WAAU;IAC7B,yBAAyB,YAAU;CACtC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.js b/node_modules/typescript/dist/enums/objectFlags.enum.js
new file mode 100644
index 000000000..ee2b66955
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.enum.js
@@ -0,0 +1,52 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var ObjectFlags;
+(function (ObjectFlags) {
+    ObjectFlags[ObjectFlags["None"] = 0] = "None";
+    ObjectFlags[ObjectFlags["Class"] = 1] = "Class";
+    ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface";
+    ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference";
+    ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple";
+    ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous";
+    ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped";
+    ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated";
+    ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral";
+    ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray";
+    ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
+    ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped";
+    ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes";
+    ObjectFlags[ObjectFlags["JSLiteral"] = 4096] = "JSLiteral";
+    ObjectFlags[ObjectFlags["FreshLiteral"] = 8192] = "FreshLiteral";
+    ObjectFlags[ObjectFlags["ArrayLiteral"] = 16384] = "ArrayLiteral";
+    ObjectFlags[ObjectFlags["PrimitiveUnion"] = 32768] = "PrimitiveUnion";
+    ObjectFlags[ObjectFlags["ContainsWideningType"] = 65536] = "ContainsWideningType";
+    ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral";
+    ObjectFlags[ObjectFlags["NonInferrableType"] = 262144] = "NonInferrableType";
+    ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed";
+    ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables";
+    ObjectFlags[ObjectFlags["MembersResolved"] = 2097152] = "MembersResolved";
+    ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface";
+    ObjectFlags[ObjectFlags["RequiresWidening"] = 196608] = "RequiresWidening";
+    ObjectFlags[ObjectFlags["PropagatingFlags"] = 458752] = "PropagatingFlags";
+    ObjectFlags[ObjectFlags["InstantiatedMapped"] = 96] = "InstantiatedMapped";
+    ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType";
+    ObjectFlags[ObjectFlags["SingleSignatureType"] = 33554432] = "SingleSignatureType";
+    ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 50332991] = "ObjectTypeKindMask";
+    ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread";
+    ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType";
+    ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone";
+    ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated";
+    ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists";
+    ObjectFlags[ObjectFlags["UnresolvedMembers"] = 536870912] = "UnresolvedMembers";
+    ObjectFlags[ObjectFlags["FromTypeNode"] = 1073741824] = "FromTypeNode";
+    ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed";
+    ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType";
+    ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType";
+    ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType";
+    ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections";
+    ObjectFlags[ObjectFlags["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed";
+    ObjectFlags[ObjectFlags["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion";
+    ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed";
+    ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection";
+    ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable";
+})(ObjectFlags || (ObjectFlags = {}));
+//# sourceMappingURL=objectFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.js.map b/node_modules/typescript/dist/enums/objectFlags.enum.js.map
new file mode 100644
index 000000000..89871aa5c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"objectFlags.enum.js","sourceRoot":"","sources":["../../src/enums/objectFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,WAgDX;AAhDD,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,+CAAc,CAAA;IACd,uDAAkB,CAAA;IAClB,uDAAkB,CAAA;IAClB,+CAAc,CAAA;IACd,wDAAkB,CAAA;IAClB,kDAAe,CAAA;IACf,8DAAqB,CAAA;IACrB,iEAAsB,CAAA;IACtB,iEAAsB,CAAA;IACtB,2HAAmD,CAAA;IACnD,kEAAuB,CAAA;IACvB,kEAAuB,CAAA;IACvB,0DAAmB,CAAA;IACnB,gEAAsB,CAAA;IACtB,iEAAsB,CAAA;IACtB,qEAAwB,CAAA;IACxB,iFAA8B,CAAA;IAC9B,kGAAsC,CAAA;IACtC,4EAA2B,CAAA;IAC3B,4GAA2C,CAAA;IAC3C,6FAAmC,CAAA;IACnC,yEAAyB,CAAA;IACzB,qEAAoC,CAAA;IACpC,0EAAsE,CAAA;IACtE,0EAA0F,CAAA;IAC1F,0EAA0C,CAAA;IAC1C,kGAAqC,CAAA;IACrC,kFAA6B,CAAA;IAC7B,gFAAkK,CAAA;IAClK,uEAAwB,CAAA;IACxB,uEAAwB,CAAA;IACxB,oFAA8B,CAAA;IAC9B,mGAAqC,CAAA;IACrC,2FAAiC,CAAA;IACjC,+EAA2B,CAAA;IAC3B,sEAAsB,CAAA;IACtB,qFAA+B,CAAA;IAC/B,iFAA6B,CAAA;IAC7B,gFAA4B,CAAA;IAC5B,sEAAwD,CAAA;IACxD,sFAA+B,CAAA;IAC/B,gGAAoC,CAAA;IACpC,iFAA4B,CAAA;IAC5B,kGAAqC,CAAA;IACrC,kFAA6B,CAAA;IAC7B,+FAAmC,CAAA;AACvC,CAAC,EAhDW,WAAW,KAAX,WAAW,QAgDtB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.js b/node_modules/typescript/dist/enums/objectFlags.js
new file mode 100644
index 000000000..09df289e2
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.js
@@ -0,0 +1,52 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var ObjectFlags;
+(function (ObjectFlags) {
+    ObjectFlags[ObjectFlags["None"] = 0] = "None";
+    ObjectFlags[ObjectFlags["Class"] = 1] = "Class";
+    ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface";
+    ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference";
+    ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple";
+    ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous";
+    ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped";
+    ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated";
+    ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral";
+    ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray";
+    ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
+    ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped";
+    ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes";
+    ObjectFlags[ObjectFlags["JSLiteral"] = 4096] = "JSLiteral";
+    ObjectFlags[ObjectFlags["FreshLiteral"] = 8192] = "FreshLiteral";
+    ObjectFlags[ObjectFlags["ArrayLiteral"] = 16384] = "ArrayLiteral";
+    ObjectFlags[ObjectFlags["PrimitiveUnion"] = 32768] = "PrimitiveUnion";
+    ObjectFlags[ObjectFlags["ContainsWideningType"] = 65536] = "ContainsWideningType";
+    ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral";
+    ObjectFlags[ObjectFlags["NonInferrableType"] = 262144] = "NonInferrableType";
+    ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed";
+    ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables";
+    ObjectFlags[ObjectFlags["MembersResolved"] = 2097152] = "MembersResolved";
+    ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface";
+    ObjectFlags[ObjectFlags["RequiresWidening"] = 196608] = "RequiresWidening";
+    ObjectFlags[ObjectFlags["PropagatingFlags"] = 458752] = "PropagatingFlags";
+    ObjectFlags[ObjectFlags["InstantiatedMapped"] = 96] = "InstantiatedMapped";
+    ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType";
+    ObjectFlags[ObjectFlags["SingleSignatureType"] = 33554432] = "SingleSignatureType";
+    ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 50332991] = "ObjectTypeKindMask";
+    ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread";
+    ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType";
+    ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone";
+    ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated";
+    ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists";
+    ObjectFlags[ObjectFlags["UnresolvedMembers"] = 536870912] = "UnresolvedMembers";
+    ObjectFlags[ObjectFlags["FromTypeNode"] = 1073741824] = "FromTypeNode";
+    ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed";
+    ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType";
+    ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType";
+    ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType";
+    ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections";
+    ObjectFlags[ObjectFlags["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed";
+    ObjectFlags[ObjectFlags["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion";
+    ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed";
+    ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection";
+    ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable";
+})(ObjectFlags || (ObjectFlags = {}));
+//# sourceMappingURL=objectFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/objectFlags.js.map b/node_modules/typescript/dist/enums/objectFlags.js.map
new file mode 100644
index 000000000..0dceb41b5
--- /dev/null
+++ b/node_modules/typescript/dist/enums/objectFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"objectFlags.js","sourceRoot":"","sources":["../../src/enums/objectFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAChD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACxD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACxD,WAAW,CAAC,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AAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,GAAG,yBAAyB,CAAC;IAC5F,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,GAAG,mBAAmB,CAAC;IAChF,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,GAAG,cAAc,CAAC;IACvE,WAAW,CAAC,WAAW,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,GAAG,uBAAuB,CAAC;IACtF,WAAW,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,GAAG,qBAAqB,CAAC;IAClF,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAAC,GAAG,oBAAoB,CAAC;IACjF,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,eAAe,CAAC;IACvE,WAAW,CAAC,WAAW,CAAC,uBAAuB,CAAC,GAAG,QAAQ,CAAC,GAAG,uBAAuB,CAAC;IACvF,WAAW,CAAC,WAAW,CAAC,4BAA4B,CAAC,GAAG,QAAQ,CAAC,GAAG,4BAA4B,CAAC;IACjG,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC,GAAG,oBAAoB,CAAC;IAClF,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,GAAG,QAAQ,CAAC,GAAG,6BAA6B,CAAC;IACnG,WAAW,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;IACnF,WAAW,CAAC,WAAW,CAAC,2BAA2B,CAAC,GAAG,SAAS,CAAC,GAAG,2BAA2B,CAAC;AACpG,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts
new file mode 100644
index 000000000..40792ee2d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts
@@ -0,0 +1,2 @@
+export declare var OuterExpressionKinds: any;
+//# sourceMappingURL=outerExpressionKinds.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map
new file mode 100644
index 000000000..e37ad24be
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"outerExpressionKinds.d.ts","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts
new file mode 100644
index 000000000..744b8df3d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts
@@ -0,0 +1,16 @@
+export declare enum OuterExpressionKinds {
+    Parentheses = 1,
+    TypeAssertions = 2,
+    NonNullAssertions = 4,
+    PartiallyEmittedExpressions = 8,
+    ExpressionsWithTypeArguments = 16,
+    Satisfies = 32,
+    ExcludeJSDocTypeAssertion = 64,
+    Assignments = 128,
+    Comma = 256,
+    Assertions = 38,
+    All = 63,
+    AllExceptAssertionsOrExpressionsWithTypeArguments = 9,
+    ExpressionTypePassthrough = 385
+}
+//# sourceMappingURL=outerExpressionKinds.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map
new file mode 100644
index 000000000..e384e35c1
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"outerExpressionKinds.enum.d.ts","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC5B,WAAW,IAAS;IACpB,cAAc,IAAS;IACvB,iBAAiB,IAAS;IAC1B,2BAA2B,IAAS;IACpC,4BAA4B,KAAS;IACrC,SAAS,KAAS;IAClB,yBAAyB,KAAS;IAClC,WAAW,MAAS;IACpB,KAAK,MAAS;IACd,UAAU,KAAiD;IAC3D,GAAG,KAAwF;IAC3F,iDAAiD,IAAoD;IACrG,yBAAyB,MAAoC;CAChE"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js
new file mode 100644
index 000000000..38ee9aff3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js
@@ -0,0 +1,18 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/utilities.go. DO NOT EDIT.
+export var OuterExpressionKinds;
+(function (OuterExpressionKinds) {
+    OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses";
+    OuterExpressionKinds[OuterExpressionKinds["TypeAssertions"] = 2] = "TypeAssertions";
+    OuterExpressionKinds[OuterExpressionKinds["NonNullAssertions"] = 4] = "NonNullAssertions";
+    OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions";
+    OuterExpressionKinds[OuterExpressionKinds["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments";
+    OuterExpressionKinds[OuterExpressionKinds["Satisfies"] = 32] = "Satisfies";
+    OuterExpressionKinds[OuterExpressionKinds["ExcludeJSDocTypeAssertion"] = 64] = "ExcludeJSDocTypeAssertion";
+    OuterExpressionKinds[OuterExpressionKinds["Assignments"] = 128] = "Assignments";
+    OuterExpressionKinds[OuterExpressionKinds["Comma"] = 256] = "Comma";
+    OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 38] = "Assertions";
+    OuterExpressionKinds[OuterExpressionKinds["All"] = 63] = "All";
+    OuterExpressionKinds[OuterExpressionKinds["AllExceptAssertionsOrExpressionsWithTypeArguments"] = 9] = "AllExceptAssertionsOrExpressionsWithTypeArguments";
+    OuterExpressionKinds[OuterExpressionKinds["ExpressionTypePassthrough"] = 385] = "ExpressionTypePassthrough";
+})(OuterExpressionKinds || (OuterExpressionKinds = {}));
+//# sourceMappingURL=outerExpressionKinds.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map
new file mode 100644
index 000000000..5a22619c4
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"outerExpressionKinds.enum.js","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAC5B,6EAAoB,CAAA;IACpB,mFAAuB,CAAA;IACvB,yFAA0B,CAAA;IAC1B,6GAAoC,CAAA;IACpC,gHAAqC,CAAA;IACrC,0EAAkB,CAAA;IAClB,0GAAkC,CAAA;IAClC,+EAAoB,CAAA;IACpB,mEAAc,CAAA;IACd,4EAA2D,CAAA;IAC3D,8DAA2F,CAAA;IAC3F,yJAAqG,CAAA;IACrG,2GAA6D,CAAA;AACjE,CAAC,EAdW,oBAAoB,KAApB,oBAAoB,QAc/B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.js b/node_modules/typescript/dist/enums/outerExpressionKinds.js
new file mode 100644
index 000000000..ee02d82ec
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.js
@@ -0,0 +1,18 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/utilities.go. DO NOT EDIT.
+export var OuterExpressionKinds;
+(function (OuterExpressionKinds) {
+    OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses";
+    OuterExpressionKinds[OuterExpressionKinds["TypeAssertions"] = 2] = "TypeAssertions";
+    OuterExpressionKinds[OuterExpressionKinds["NonNullAssertions"] = 4] = "NonNullAssertions";
+    OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions";
+    OuterExpressionKinds[OuterExpressionKinds["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments";
+    OuterExpressionKinds[OuterExpressionKinds["Satisfies"] = 32] = "Satisfies";
+    OuterExpressionKinds[OuterExpressionKinds["ExcludeJSDocTypeAssertion"] = 64] = "ExcludeJSDocTypeAssertion";
+    OuterExpressionKinds[OuterExpressionKinds["Assignments"] = 128] = "Assignments";
+    OuterExpressionKinds[OuterExpressionKinds["Comma"] = 256] = "Comma";
+    OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 38] = "Assertions";
+    OuterExpressionKinds[OuterExpressionKinds["All"] = 63] = "All";
+    OuterExpressionKinds[OuterExpressionKinds["AllExceptAssertionsOrExpressionsWithTypeArguments"] = 9] = "AllExceptAssertionsOrExpressionsWithTypeArguments";
+    OuterExpressionKinds[OuterExpressionKinds["ExpressionTypePassthrough"] = 385] = "ExpressionTypePassthrough";
+})(OuterExpressionKinds || (OuterExpressionKinds = {}));
+//# sourceMappingURL=outerExpressionKinds.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.js.map b/node_modules/typescript/dist/enums/outerExpressionKinds.js.map
new file mode 100644
index 000000000..79a9e8916
--- /dev/null
+++ b/node_modules/typescript/dist/enums/outerExpressionKinds.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"outerExpressionKinds.js","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,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Flags.d.ts b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts
new file mode 100644
index 000000000..bd90aa0d3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var RegularExpressionFlags: any;
+//# sourceMappingURL=regularExpressionFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map
new file mode 100644
index 000000000..cd0e2e807
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"regularExpressionFlags.d.ts","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,sBAAsB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts
new file mode 100644
index 000000000..2245516ab
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts
@@ -0,0 +1,13 @@
+export declare enum RegularExpressionFlags {
+    None = 0,
+    HasIndices = 1,
+    Global = 2,
+    IgnoreCase = 4,
+    Multiline = 8,
+    DotAll = 16,
+    Unicode = 32,
+    UnicodeSets = 64,
+    Sticky = 128,
+    AnyUnicodeMode = 96
+}
+//# sourceMappingURL=regularExpressionFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map
new file mode 100644
index 000000000..78e5f52d3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"regularExpressionFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAC9B,IAAI,IAAI;IACR,UAAU,IAAS;IACnB,MAAM,IAAS;IACf,UAAU,IAAS;IACnB,SAAS,IAAS;IAClB,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,WAAW,KAAS;IACpB,MAAM,MAAS;IACf,cAAc,KAAwB;CACzC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js
new file mode 100644
index 000000000..f0e40c68c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js
@@ -0,0 +1,14 @@
+export var RegularExpressionFlags;
+(function (RegularExpressionFlags) {
+    RegularExpressionFlags[RegularExpressionFlags["None"] = 0] = "None";
+    RegularExpressionFlags[RegularExpressionFlags["HasIndices"] = 1] = "HasIndices";
+    RegularExpressionFlags[RegularExpressionFlags["Global"] = 2] = "Global";
+    RegularExpressionFlags[RegularExpressionFlags["IgnoreCase"] = 4] = "IgnoreCase";
+    RegularExpressionFlags[RegularExpressionFlags["Multiline"] = 8] = "Multiline";
+    RegularExpressionFlags[RegularExpressionFlags["DotAll"] = 16] = "DotAll";
+    RegularExpressionFlags[RegularExpressionFlags["Unicode"] = 32] = "Unicode";
+    RegularExpressionFlags[RegularExpressionFlags["UnicodeSets"] = 64] = "UnicodeSets";
+    RegularExpressionFlags[RegularExpressionFlags["Sticky"] = 128] = "Sticky";
+    RegularExpressionFlags[RegularExpressionFlags["AnyUnicodeMode"] = 96] = "AnyUnicodeMode";
+})(RegularExpressionFlags || (RegularExpressionFlags = {}));
+//# sourceMappingURL=regularExpressionFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map
new file mode 100644
index 000000000..e8cbb91fe
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"regularExpressionFlags.enum.js","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAC9B,mEAAQ,CAAA;IACR,+EAAmB,CAAA;IACnB,uEAAe,CAAA;IACf,+EAAmB,CAAA;IACnB,6EAAkB,CAAA;IAClB,wEAAe,CAAA;IACf,0EAAgB,CAAA;IAChB,kFAAoB,CAAA;IACpB,yEAAe,CAAA;IACf,wFAAsC,CAAA;AAC1C,CAAC,EAXW,sBAAsB,KAAtB,sBAAsB,QAWjC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.js b/node_modules/typescript/dist/enums/regularExpressionFlags.js
new file mode 100644
index 000000000..0a42b371f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.js
@@ -0,0 +1,14 @@
+export var RegularExpressionFlags;
+(function (RegularExpressionFlags) {
+    RegularExpressionFlags[RegularExpressionFlags["None"] = 0] = "None";
+    RegularExpressionFlags[RegularExpressionFlags["HasIndices"] = 1] = "HasIndices";
+    RegularExpressionFlags[RegularExpressionFlags["Global"] = 2] = "Global";
+    RegularExpressionFlags[RegularExpressionFlags["IgnoreCase"] = 4] = "IgnoreCase";
+    RegularExpressionFlags[RegularExpressionFlags["Multiline"] = 8] = "Multiline";
+    RegularExpressionFlags[RegularExpressionFlags["DotAll"] = 16] = "DotAll";
+    RegularExpressionFlags[RegularExpressionFlags["Unicode"] = 32] = "Unicode";
+    RegularExpressionFlags[RegularExpressionFlags["UnicodeSets"] = 64] = "UnicodeSets";
+    RegularExpressionFlags[RegularExpressionFlags["Sticky"] = 128] = "Sticky";
+    RegularExpressionFlags[RegularExpressionFlags["AnyUnicodeMode"] = 96] = "AnyUnicodeMode";
+})(RegularExpressionFlags || (RegularExpressionFlags = {}));
+//# sourceMappingURL=regularExpressionFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.js.map b/node_modules/typescript/dist/enums/regularExpressionFlags.js.map
new file mode 100644
index 000000000..2e0abc30e
--- /dev/null
+++ b/node_modules/typescript/dist/enums/regularExpressionFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"regularExpressionFlags.js","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,sBAA2B,CAAC;AACvC,CAAC,UAAU,sBAAsB;IAC7B,sBAAsB,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IAChF,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACxE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IAChF,sBAAsB,CAAC,sBAAsB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC9E,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACzE,sBAAsB,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IAC3E,sBAAsB,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACnF,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IAC1E,sBAAsB,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC7F,CAAC,CAAC,CAAC,sBAAsB,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.d.ts b/node_modules/typescript/dist/enums/scriptKind.d.ts
new file mode 100644
index 000000000..d6e80662a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.d.ts
@@ -0,0 +1,2 @@
+export declare var ScriptKind: any;
+//# sourceMappingURL=scriptKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.d.ts.map b/node_modules/typescript/dist/enums/scriptKind.d.ts.map
new file mode 100644
index 000000000..96a351d89
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptKind.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.d.ts b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts
new file mode 100644
index 000000000..1619aa8ac
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts
@@ -0,0 +1,11 @@
+export declare enum ScriptKind {
+    Unknown = 0,
+    JS = 1,
+    JSX = 2,
+    TS = 3,
+    TSX = 4,
+    External = 5,
+    JSON = 6,
+    Deferred = 7
+}
+//# sourceMappingURL=scriptKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map
new file mode 100644
index 000000000..f866236d2
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,OAAO,IAAI;IACX,EAAE,IAAI;IACN,GAAG,IAAI;IACP,EAAE,IAAI;IACN,GAAG,IAAI;IACP,QAAQ,IAAI;IACZ,IAAI,IAAI;IACR,QAAQ,IAAI;CACf"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.js b/node_modules/typescript/dist/enums/scriptKind.enum.js
new file mode 100644
index 000000000..508c36471
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.enum.js
@@ -0,0 +1,12 @@
+export var ScriptKind;
+(function (ScriptKind) {
+    ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown";
+    ScriptKind[ScriptKind["JS"] = 1] = "JS";
+    ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
+    ScriptKind[ScriptKind["TS"] = 3] = "TS";
+    ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
+    ScriptKind[ScriptKind["External"] = 5] = "External";
+    ScriptKind[ScriptKind["JSON"] = 6] = "JSON";
+    ScriptKind[ScriptKind["Deferred"] = 7] = "Deferred";
+})(ScriptKind || (ScriptKind = {}));
+//# sourceMappingURL=scriptKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.js.map b/node_modules/typescript/dist/enums/scriptKind.enum.js.map
new file mode 100644
index 000000000..d46698bc8
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptKind.enum.js","sourceRoot":"","sources":["../../src/enums/scriptKind.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IAClB,iDAAW,CAAA;IACX,uCAAM,CAAA;IACN,yCAAO,CAAA;IACP,uCAAM,CAAA;IACN,yCAAO,CAAA;IACP,mDAAY,CAAA;IACZ,2CAAQ,CAAA;IACR,mDAAY,CAAA;AAChB,CAAC,EATW,UAAU,KAAV,UAAU,QASrB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.js b/node_modules/typescript/dist/enums/scriptKind.js
new file mode 100644
index 000000000..0ea80e13d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.js
@@ -0,0 +1,12 @@
+export var ScriptKind;
+(function (ScriptKind) {
+    ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown";
+    ScriptKind[ScriptKind["JS"] = 1] = "JS";
+    ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
+    ScriptKind[ScriptKind["TS"] = 3] = "TS";
+    ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
+    ScriptKind[ScriptKind["External"] = 5] = "External";
+    ScriptKind[ScriptKind["JSON"] = 6] = "JSON";
+    ScriptKind[ScriptKind["Deferred"] = 7] = "Deferred";
+})(ScriptKind || (ScriptKind = {}));
+//# sourceMappingURL=scriptKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptKind.js.map b/node_modules/typescript/dist/enums/scriptKind.js.map
new file mode 100644
index 000000000..4b281cf54
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptKind.js","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpD,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AACxD,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.d.ts b/node_modules/typescript/dist/enums/scriptTarget.d.ts
new file mode 100644
index 000000000..79b71004c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.d.ts
@@ -0,0 +1,2 @@
+export declare var ScriptTarget: any;
+//# sourceMappingURL=scriptTarget.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.d.ts.map b/node_modules/typescript/dist/enums/scriptTarget.d.ts.map
new file mode 100644
index 000000000..354fb54cc
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptTarget.d.ts","sourceRoot":"","sources":["../../src/enums/scriptTarget.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,YAAY,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts
new file mode 100644
index 000000000..6f2620c0b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts
@@ -0,0 +1,17 @@
+export declare enum ScriptTarget {
+    ES2015 = 2,
+    ES2016 = 3,
+    ES2017 = 4,
+    ES2018 = 5,
+    ES2019 = 6,
+    ES2020 = 7,
+    ES2021 = 8,
+    ES2022 = 9,
+    ES2023 = 10,
+    ES2024 = 11,
+    ES2025 = 12,
+    ESNext = 99,
+    JSON = 100,
+    Latest = 99
+}
+//# sourceMappingURL=scriptTarget.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map
new file mode 100644
index 000000000..20ad986a3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptTarget.enum.d.ts","sourceRoot":"","sources":["../../src/enums/scriptTarget.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACpB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,IAAI,MAAM;IACV,MAAM,KAAS;CAClB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.js b/node_modules/typescript/dist/enums/scriptTarget.enum.js
new file mode 100644
index 000000000..314ca02b6
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.enum.js
@@ -0,0 +1,18 @@
+export var ScriptTarget;
+(function (ScriptTarget) {
+    ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015";
+    ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016";
+    ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017";
+    ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018";
+    ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019";
+    ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020";
+    ScriptTarget[ScriptTarget["ES2021"] = 8] = "ES2021";
+    ScriptTarget[ScriptTarget["ES2022"] = 9] = "ES2022";
+    ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023";
+    ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024";
+    ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025";
+    ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext";
+    ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON";
+    ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest";
+})(ScriptTarget || (ScriptTarget = {}));
+//# sourceMappingURL=scriptTarget.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.js.map b/node_modules/typescript/dist/enums/scriptTarget.enum.js.map
new file mode 100644
index 000000000..a16474073
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptTarget.enum.js","sourceRoot":"","sources":["../../src/enums/scriptTarget.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACpB,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,iDAAU,CAAA;IACV,oDAAe,CAAA;AACnB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.js b/node_modules/typescript/dist/enums/scriptTarget.js
new file mode 100644
index 000000000..8212a1dc6
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.js
@@ -0,0 +1,18 @@
+export var ScriptTarget;
+(function (ScriptTarget) {
+    ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015";
+    ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016";
+    ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017";
+    ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018";
+    ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019";
+    ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020";
+    ScriptTarget[ScriptTarget["ES2021"] = 8] = "ES2021";
+    ScriptTarget[ScriptTarget["ES2022"] = 9] = "ES2022";
+    ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023";
+    ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024";
+    ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025";
+    ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext";
+    ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON";
+    ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest";
+})(ScriptTarget || (ScriptTarget = {}));
+//# sourceMappingURL=scriptTarget.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/scriptTarget.js.map b/node_modules/typescript/dist/enums/scriptTarget.js.map
new file mode 100644
index 000000000..3ae3f5a38
--- /dev/null
+++ b/node_modules/typescript/dist/enums/scriptTarget.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"scriptTarget.js","sourceRoot":"","sources":["../../src/enums/scriptTarget.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,YAAiB,CAAC;AAC7B,CAAC,UAAU,YAAY;IACnB,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACrD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACrD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACrD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACrD,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC;IAClD,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;AACzD,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.d.ts b/node_modules/typescript/dist/enums/signatureFlags.d.ts
new file mode 100644
index 000000000..79a98f1ce
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var SignatureFlags: any;
+//# sourceMappingURL=signatureFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.d.ts.map b/node_modules/typescript/dist/enums/signatureFlags.d.ts.map
new file mode 100644
index 000000000..467ac9469
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureFlags.d.ts","sourceRoot":"","sources":["../../src/enums/signatureFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,cAAc,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts
new file mode 100644
index 000000000..def530a45
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts
@@ -0,0 +1,15 @@
+export declare enum SignatureFlags {
+    None = 0,
+    HasRestParameter = 1,
+    HasLiteralTypes = 2,
+    Construct = 4,
+    Abstract = 8,
+    IsInnerCallChain = 16,
+    IsOuterCallChain = 32,
+    IsUntypedSignatureInJSFile = 64,
+    IsNonInferrable = 128,
+    IsSignatureCandidateForOverloadFailure = 256,
+    PropagatingFlags = 335,
+    CallChainFlags = 48
+}
+//# sourceMappingURL=signatureFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map
new file mode 100644
index 000000000..8e2c09206
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/signatureFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IACtB,IAAI,IAAI;IACR,gBAAgB,IAAS;IACzB,eAAe,IAAS;IACxB,SAAS,IAAS;IAClB,QAAQ,IAAS;IACjB,gBAAgB,KAAS;IACzB,gBAAgB,KAAS;IACzB,0BAA0B,KAAS;IACnC,eAAe,MAAS;IACxB,sCAAsC,MAAS;IAC/C,gBAAgB,MAAkI;IAClJ,cAAc,KAAsC;CACvD"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.js b/node_modules/typescript/dist/enums/signatureFlags.enum.js
new file mode 100644
index 000000000..83305ea70
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.enum.js
@@ -0,0 +1,17 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var SignatureFlags;
+(function (SignatureFlags) {
+    SignatureFlags[SignatureFlags["None"] = 0] = "None";
+    SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter";
+    SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes";
+    SignatureFlags[SignatureFlags["Construct"] = 4] = "Construct";
+    SignatureFlags[SignatureFlags["Abstract"] = 8] = "Abstract";
+    SignatureFlags[SignatureFlags["IsInnerCallChain"] = 16] = "IsInnerCallChain";
+    SignatureFlags[SignatureFlags["IsOuterCallChain"] = 32] = "IsOuterCallChain";
+    SignatureFlags[SignatureFlags["IsUntypedSignatureInJSFile"] = 64] = "IsUntypedSignatureInJSFile";
+    SignatureFlags[SignatureFlags["IsNonInferrable"] = 128] = "IsNonInferrable";
+    SignatureFlags[SignatureFlags["IsSignatureCandidateForOverloadFailure"] = 256] = "IsSignatureCandidateForOverloadFailure";
+    SignatureFlags[SignatureFlags["PropagatingFlags"] = 335] = "PropagatingFlags";
+    SignatureFlags[SignatureFlags["CallChainFlags"] = 48] = "CallChainFlags";
+})(SignatureFlags || (SignatureFlags = {}));
+//# sourceMappingURL=signatureFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.js.map b/node_modules/typescript/dist/enums/signatureFlags.enum.js.map
new file mode 100644
index 000000000..20ff2802e
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureFlags.enum.js","sourceRoot":"","sources":["../../src/enums/signatureFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,cAaX;AAbD,WAAY,cAAc;IACtB,mDAAQ,CAAA;IACR,2EAAyB,CAAA;IACzB,yEAAwB,CAAA;IACxB,6DAAkB,CAAA;IAClB,2DAAiB,CAAA;IACjB,4EAAyB,CAAA;IACzB,4EAAyB,CAAA;IACzB,gGAAmC,CAAA;IACnC,2EAAwB,CAAA;IACxB,yHAA+C,CAAA;IAC/C,6EAAkJ,CAAA;IAClJ,wEAAoD,CAAA;AACxD,CAAC,EAbW,cAAc,KAAd,cAAc,QAazB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.js b/node_modules/typescript/dist/enums/signatureFlags.js
new file mode 100644
index 000000000..5cb7bc576
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.js
@@ -0,0 +1,17 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var SignatureFlags;
+(function (SignatureFlags) {
+    SignatureFlags[SignatureFlags["None"] = 0] = "None";
+    SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter";
+    SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes";
+    SignatureFlags[SignatureFlags["Construct"] = 4] = "Construct";
+    SignatureFlags[SignatureFlags["Abstract"] = 8] = "Abstract";
+    SignatureFlags[SignatureFlags["IsInnerCallChain"] = 16] = "IsInnerCallChain";
+    SignatureFlags[SignatureFlags["IsOuterCallChain"] = 32] = "IsOuterCallChain";
+    SignatureFlags[SignatureFlags["IsUntypedSignatureInJSFile"] = 64] = "IsUntypedSignatureInJSFile";
+    SignatureFlags[SignatureFlags["IsNonInferrable"] = 128] = "IsNonInferrable";
+    SignatureFlags[SignatureFlags["IsSignatureCandidateForOverloadFailure"] = 256] = "IsSignatureCandidateForOverloadFailure";
+    SignatureFlags[SignatureFlags["PropagatingFlags"] = 335] = "PropagatingFlags";
+    SignatureFlags[SignatureFlags["CallChainFlags"] = 48] = "CallChainFlags";
+})(SignatureFlags || (SignatureFlags = {}));
+//# sourceMappingURL=signatureFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureFlags.js.map b/node_modules/typescript/dist/enums/signatureFlags.js.map
new file mode 100644
index 000000000..f9be5e54c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureFlags.js","source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/enums/signatureKind.d.ts b/node_modules/typescript/dist/enums/signatureKind.d.ts
new file mode 100644
index 000000000..9c0bded6d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.d.ts
@@ -0,0 +1,2 @@
+export declare var SignatureKind: any;
+//# sourceMappingURL=signatureKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.d.ts.map b/node_modules/typescript/dist/enums/signatureKind.d.ts.map
new file mode 100644
index 000000000..88e51129b
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureKind.d.ts","sourceRoot":"","sources":["../../src/enums/signatureKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.d.ts b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts
new file mode 100644
index 000000000..e5ba5a5ae
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts
@@ -0,0 +1,5 @@
+export declare enum SignatureKind {
+    Call = 0,
+    Construct = 1
+}
+//# sourceMappingURL=signatureKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map
new file mode 100644
index 000000000..2acb860a7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/signatureKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACrB,IAAI,IAAI;IACR,SAAS,IAAI;CAChB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.js b/node_modules/typescript/dist/enums/signatureKind.enum.js
new file mode 100644
index 000000000..f99b0dd85
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.enum.js
@@ -0,0 +1,7 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var SignatureKind;
+(function (SignatureKind) {
+    SignatureKind[SignatureKind["Call"] = 0] = "Call";
+    SignatureKind[SignatureKind["Construct"] = 1] = "Construct";
+})(SignatureKind || (SignatureKind = {}));
+//# sourceMappingURL=signatureKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.js.map b/node_modules/typescript/dist/enums/signatureKind.enum.js.map
new file mode 100644
index 000000000..9b28a3451
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureKind.enum.js","sourceRoot":"","sources":["../../src/enums/signatureKind.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,iDAAQ,CAAA;IACR,2DAAa,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.js b/node_modules/typescript/dist/enums/signatureKind.js
new file mode 100644
index 000000000..c54dfb21a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.js
@@ -0,0 +1,7 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var SignatureKind;
+(function (SignatureKind) {
+    SignatureKind[SignatureKind["Call"] = 0] = "Call";
+    SignatureKind[SignatureKind["Construct"] = 1] = "Construct";
+})(SignatureKind || (SignatureKind = {}));
+//# sourceMappingURL=signatureKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/signatureKind.js.map b/node_modules/typescript/dist/enums/signatureKind.js.map
new file mode 100644
index 000000000..77af56a32
--- /dev/null
+++ b/node_modules/typescript/dist/enums/signatureKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"signatureKind.js","sourceRoot":"","sources":["../../src/enums/signatureKind.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,aAAkB,CAAC;AAC9B,CAAC,UAAU,aAAa;IACpB,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAClD,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;AAChE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.d.ts b/node_modules/typescript/dist/enums/symbolFlags.d.ts
new file mode 100644
index 000000000..4f828b7ce
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var SymbolFlags: any;
+//# sourceMappingURL=symbolFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.d.ts.map b/node_modules/typescript/dist/enums/symbolFlags.d.ts.map
new file mode 100644
index 000000000..1f12be9f1
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"symbolFlags.d.ts","sourceRoot":"","sources":["../../src/enums/symbolFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts
new file mode 100644
index 000000000..275b5bc2f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts
@@ -0,0 +1,71 @@
+export declare enum SymbolFlags {
+    None = 0,
+    FunctionScopedVariable = 1,
+    BlockScopedVariable = 2,
+    Property = 4,
+    EnumMember = 8,
+    Function = 16,
+    Class = 32,
+    Interface = 64,
+    ConstEnum = 128,
+    RegularEnum = 256,
+    ValueModule = 512,
+    NamespaceModule = 1024,
+    TypeLiteral = 2048,
+    ObjectLiteral = 4096,
+    Method = 8192,
+    Constructor = 16384,
+    GetAccessor = 32768,
+    SetAccessor = 65536,
+    Signature = 131072,
+    TypeParameter = 262144,
+    TypeAlias = 524288,
+    ExportValue = 1048576,
+    Alias = 2097152,
+    Prototype = 4194304,
+    ExportStar = 8388608,
+    Optional = 16777216,
+    Transient = 33554432,
+    Assignment = 67108864,
+    ModuleExports = 134217728,
+    ConstEnumOnlyModule = 268435456,
+    ReplaceableByMethod = 536870912,
+    GlobalLookup = 1073741824,
+    All = 536870912,
+    Enum = 384,
+    Variable = 3,
+    Value = 111551,
+    Type = 788968,
+    Namespace = 1920,
+    Module = 1536,
+    Accessor = 98304,
+    FunctionScopedVariableExcludes = 111550,
+    BlockScopedVariableExcludes = 111551,
+    ParameterExcludes = 111551,
+    PropertyExcludes = 13243,
+    EnumMemberExcludes = 900095,
+    FunctionExcludes = 110991,
+    ClassExcludes = 899503,
+    InterfaceExcludes = 788872,
+    RegularEnumExcludes = 899327,
+    ConstEnumExcludes = 899967,
+    ValueModuleExcludes = 110735,
+    NamespaceModuleExcludes = 0,
+    MethodExcludes = 103359,
+    GetAccessorExcludes = 46011,
+    SetAccessorExcludes = 78779,
+    AccessorExcludes = 111547,
+    TypeParameterExcludes = 526824,
+    TypeAliasExcludes = 788968,
+    AliasExcludes = 2097152,
+    ModuleMember = 2623475,
+    ExportHasLocal = 944,
+    BlockScoped = 418,
+    PropertyOrAccessor = 98308,
+    ClassMember = 106500,
+    ExportSupportsDefaultModifier = 112,
+    ExportDoesNotSupportDefaultModifier = -113,
+    Classifiable = 2885600,
+    LateBindingContainer = 6256
+}
+//# sourceMappingURL=symbolFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map
new file mode 100644
index 000000000..e21da4674
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"symbolFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/symbolFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,sBAAsB,IAAS;IAC/B,mBAAmB,IAAS;IAC5B,QAAQ,IAAS;IACjB,UAAU,IAAS;IACnB,QAAQ,KAAS;IACjB,KAAK,KAAS;IACd,SAAS,KAAS;IAClB,SAAS,MAAS;IAClB,WAAW,MAAS;IACpB,WAAW,MAAS;IACpB,eAAe,OAAU;IACzB,WAAW,OAAU;IACrB,aAAa,OAAU;IACvB,MAAM,OAAU;IAChB,WAAW,QAAU;IACrB,WAAW,QAAU;IACrB,WAAW,QAAU;IACrB,SAAS,SAAU;IACnB,aAAa,SAAU;IACvB,SAAS,SAAU;IACnB,WAAW,UAAU;IACrB,KAAK,UAAU;IACf,SAAS,UAAU;IACnB,UAAU,UAAU;IACpB,QAAQ,WAAU;IAClB,SAAS,WAAU;IACnB,UAAU,WAAU;IACpB,aAAa,YAAU;IACvB,mBAAmB,YAAU;IAC7B,mBAAmB,YAAU;IAC7B,YAAY,aAAU;IACtB,GAAG,YAAc;IACjB,IAAI,MAA0B;IAC9B,QAAQ,IAA+C;IACvD,KAAK,SAAgI;IACrI,IAAI,SAAkF;IACtF,SAAS,OAAuC;IAChD,MAAM,OAAgC;IACtC,QAAQ,QAA4B;IACpC,8BAA8B,SAAkC;IAChE,2BAA2B,SAAQ;IACnC,iBAAiB,SAAQ;IACzB,gBAAgB,QAAiC;IACjD,kBAAkB,SAAe;IACjC,gBAAgB,SAA4C;IAC5D,aAAa,SAAyD;IACtE,iBAAiB,SAA8B;IAC/C,mBAAmB,SAAgD;IACnE,iBAAiB,SAA8B;IAC/C,mBAAmB,SAA0D;IAC7E,uBAAuB,IAAO;IAC9B,cAAc,SAAkB;IAChC,mBAAmB,QAAoC;IACvD,mBAAmB,QAAoC;IACvD,gBAAgB,SAAoB;IACpC,qBAAqB,SAAwB;IAC7C,iBAAiB,SAAO;IACxB,aAAa,UAAQ;IACrB,YAAY,UAA8E;IAC1F,cAAc,MAAwC;IACtD,WAAW,MAAqC;IAChD,kBAAkB,QAAsB;IACxC,WAAW,SAA+B;IAC1C,6BAA6B,MAA+B;IAC5D,mCAAmC,OAAiC;IACpE,YAAY,UAAwE;IACpF,oBAAoB,OAA6D;CACpF"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.js b/node_modules/typescript/dist/enums/symbolFlags.enum.js
new file mode 100644
index 000000000..12d21929d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.enum.js
@@ -0,0 +1,73 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbolflags.go. DO NOT EDIT.
+export var SymbolFlags;
+(function (SymbolFlags) {
+    SymbolFlags[SymbolFlags["None"] = 0] = "None";
+    SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable";
+    SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable";
+    SymbolFlags[SymbolFlags["Property"] = 4] = "Property";
+    SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember";
+    SymbolFlags[SymbolFlags["Function"] = 16] = "Function";
+    SymbolFlags[SymbolFlags["Class"] = 32] = "Class";
+    SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface";
+    SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum";
+    SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum";
+    SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule";
+    SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule";
+    SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral";
+    SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral";
+    SymbolFlags[SymbolFlags["Method"] = 8192] = "Method";
+    SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor";
+    SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor";
+    SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor";
+    SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature";
+    SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter";
+    SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias";
+    SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue";
+    SymbolFlags[SymbolFlags["Alias"] = 2097152] = "Alias";
+    SymbolFlags[SymbolFlags["Prototype"] = 4194304] = "Prototype";
+    SymbolFlags[SymbolFlags["ExportStar"] = 8388608] = "ExportStar";
+    SymbolFlags[SymbolFlags["Optional"] = 16777216] = "Optional";
+    SymbolFlags[SymbolFlags["Transient"] = 33554432] = "Transient";
+    SymbolFlags[SymbolFlags["Assignment"] = 67108864] = "Assignment";
+    SymbolFlags[SymbolFlags["ModuleExports"] = 134217728] = "ModuleExports";
+    SymbolFlags[SymbolFlags["ConstEnumOnlyModule"] = 268435456] = "ConstEnumOnlyModule";
+    SymbolFlags[SymbolFlags["ReplaceableByMethod"] = 536870912] = "ReplaceableByMethod";
+    SymbolFlags[SymbolFlags["GlobalLookup"] = 1073741824] = "GlobalLookup";
+    SymbolFlags[SymbolFlags["All"] = 536870912] = "All";
+    SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
+    SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
+    SymbolFlags[SymbolFlags["Value"] = 111551] = "Value";
+    SymbolFlags[SymbolFlags["Type"] = 788968] = "Type";
+    SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace";
+    SymbolFlags[SymbolFlags["Module"] = 1536] = "Module";
+    SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor";
+    SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes";
+    SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes";
+    SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes";
+    SymbolFlags[SymbolFlags["PropertyExcludes"] = 13243] = "PropertyExcludes";
+    SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes";
+    SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes";
+    SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes";
+    SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes";
+    SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes";
+    SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes";
+    SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes";
+    SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes";
+    SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes";
+    SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46011] = "GetAccessorExcludes";
+    SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78779] = "SetAccessorExcludes";
+    SymbolFlags[SymbolFlags["AccessorExcludes"] = 111547] = "AccessorExcludes";
+    SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes";
+    SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes";
+    SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes";
+    SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember";
+    SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
+    SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
+    SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
+    SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
+    SymbolFlags[SymbolFlags["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier";
+    SymbolFlags[SymbolFlags["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier";
+    SymbolFlags[SymbolFlags["Classifiable"] = 2885600] = "Classifiable";
+    SymbolFlags[SymbolFlags["LateBindingContainer"] = 6256] = "LateBindingContainer";
+})(SymbolFlags || (SymbolFlags = {}));
+//# sourceMappingURL=symbolFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.js.map b/node_modules/typescript/dist/enums/symbolFlags.enum.js.map
new file mode 100644
index 000000000..999ccc7cc
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"symbolFlags.enum.js","sourceRoot":"","sources":["../../src/enums/symbolFlags.enum.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAEjG,MAAM,CAAN,IAAY,WAqEX;AArED,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,iFAA+B,CAAA;IAC/B,2EAA4B,CAAA;IAC5B,qDAAiB,CAAA;IACjB,yDAAmB,CAAA;IACnB,sDAAiB,CAAA;IACjB,gDAAc,CAAA;IACd,wDAAkB,CAAA;IAClB,yDAAkB,CAAA;IAClB,6DAAoB,CAAA;IACpB,6DAAoB,CAAA;IACpB,sEAAyB,CAAA;IACzB,8DAAqB,CAAA;IACrB,kEAAuB,CAAA;IACvB,oDAAgB,CAAA;IAChB,+DAAqB,CAAA;IACrB,+DAAqB,CAAA;IACrB,+DAAqB,CAAA;IACrB,4DAAmB,CAAA;IACnB,oEAAuB,CAAA;IACvB,4DAAmB,CAAA;IACnB,iEAAqB,CAAA;IACrB,qDAAe,CAAA;IACf,6DAAmB,CAAA;IACnB,+DAAoB,CAAA;IACpB,4DAAkB,CAAA;IAClB,8DAAmB,CAAA;IACnB,gEAAoB,CAAA;IACpB,uEAAuB,CAAA;IACvB,mFAA6B,CAAA;IAC7B,mFAA6B,CAAA;IAC7B,sEAAsB,CAAA;IACtB,mDAAiB,CAAA;IACjB,+CAA8B,CAAA;IAC9B,qDAAuD,CAAA;IACvD,oDAAqI,CAAA;IACrI,kDAAsF,CAAA;IACtF,0DAAgD,CAAA;IAChD,oDAAsC,CAAA;IACtC,yDAAoC,CAAA;IACpC,sGAAgE,CAAA;IAChE,gGAAmC,CAAA;IACnC,4EAAyB,CAAA;IACzB,yEAAiD,CAAA;IACjD,8EAAiC,CAAA;IACjC,0EAA4D,CAAA;IAC5D,oEAAsE,CAAA;IACtE,4EAA+C,CAAA;IAC/C,gFAAmE,CAAA;IACnE,4EAA+C,CAAA;IAC/C,gFAA6E,CAAA;IAC7E,mFAA8B,CAAA;IAC9B,sEAAgC,CAAA;IAChC,+EAAuD,CAAA;IACvD,+EAAuD,CAAA;IACvD,0EAAoC,CAAA;IACpC,oFAA6C,CAAA;IAC7C,4EAAwB,CAAA;IACxB,qEAAqB,CAAA;IACrB,mEAA0F,CAAA;IAC1F,mEAAsD,CAAA;IACtD,6DAAgD,CAAA;IAChD,6EAAwC,CAAA;IACxC,gEAA0C,CAAA;IAC1C,iGAA4D,CAAA;IAC5D,8GAAoE,CAAA;IACpE,mEAAoF,CAAA;IACpF,gFAAiF,CAAA;AACrF,CAAC,EArEW,WAAW,KAAX,WAAW,QAqEtB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.js b/node_modules/typescript/dist/enums/symbolFlags.js
new file mode 100644
index 000000000..ce1996d50
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.js
@@ -0,0 +1,73 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbolflags.go. DO NOT EDIT.
+export var SymbolFlags;
+(function (SymbolFlags) {
+    SymbolFlags[SymbolFlags["None"] = 0] = "None";
+    SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable";
+    SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable";
+    SymbolFlags[SymbolFlags["Property"] = 4] = "Property";
+    SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember";
+    SymbolFlags[SymbolFlags["Function"] = 16] = "Function";
+    SymbolFlags[SymbolFlags["Class"] = 32] = "Class";
+    SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface";
+    SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum";
+    SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum";
+    SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule";
+    SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule";
+    SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral";
+    SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral";
+    SymbolFlags[SymbolFlags["Method"] = 8192] = "Method";
+    SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor";
+    SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor";
+    SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor";
+    SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature";
+    SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter";
+    SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias";
+    SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue";
+    SymbolFlags[SymbolFlags["Alias"] = 2097152] = "Alias";
+    SymbolFlags[SymbolFlags["Prototype"] = 4194304] = "Prototype";
+    SymbolFlags[SymbolFlags["ExportStar"] = 8388608] = "ExportStar";
+    SymbolFlags[SymbolFlags["Optional"] = 16777216] = "Optional";
+    SymbolFlags[SymbolFlags["Transient"] = 33554432] = "Transient";
+    SymbolFlags[SymbolFlags["Assignment"] = 67108864] = "Assignment";
+    SymbolFlags[SymbolFlags["ModuleExports"] = 134217728] = "ModuleExports";
+    SymbolFlags[SymbolFlags["ConstEnumOnlyModule"] = 268435456] = "ConstEnumOnlyModule";
+    SymbolFlags[SymbolFlags["ReplaceableByMethod"] = 536870912] = "ReplaceableByMethod";
+    SymbolFlags[SymbolFlags["GlobalLookup"] = 1073741824] = "GlobalLookup";
+    SymbolFlags[SymbolFlags["All"] = 536870912] = "All";
+    SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
+    SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
+    SymbolFlags[SymbolFlags["Value"] = 111551] = "Value";
+    SymbolFlags[SymbolFlags["Type"] = 788968] = "Type";
+    SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace";
+    SymbolFlags[SymbolFlags["Module"] = 1536] = "Module";
+    SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor";
+    SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes";
+    SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes";
+    SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes";
+    SymbolFlags[SymbolFlags["PropertyExcludes"] = 13243] = "PropertyExcludes";
+    SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes";
+    SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes";
+    SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes";
+    SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes";
+    SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes";
+    SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes";
+    SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes";
+    SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes";
+    SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes";
+    SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46011] = "GetAccessorExcludes";
+    SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78779] = "SetAccessorExcludes";
+    SymbolFlags[SymbolFlags["AccessorExcludes"] = 111547] = "AccessorExcludes";
+    SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes";
+    SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes";
+    SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes";
+    SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember";
+    SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
+    SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
+    SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
+    SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
+    SymbolFlags[SymbolFlags["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier";
+    SymbolFlags[SymbolFlags["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier";
+    SymbolFlags[SymbolFlags["Classifiable"] = 2885600] = "Classifiable";
+    SymbolFlags[SymbolFlags["LateBindingContainer"] = 6256] = "LateBindingContainer";
+})(SymbolFlags || (SymbolFlags = {}));
+//# sourceMappingURL=symbolFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/symbolFlags.js.map b/node_modules/typescript/dist/enums/symbolFlags.js.map
new file mode 100644
index 000000000..1cff9dc04
--- /dev/null
+++ b/node_modules/typescript/dist/enums/symbolFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"symbolFlags.js","sourceRoot":"","sources":["../../src/enums/symbolFlags.ts"],"names":[],"mappings":"AAAA,iGA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C,gBAAgB,CAAC,GAAG,GAAG,CAAC,GAAG,gBAAgB,CAAC;IACpE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,GAAG,aAAa,CAAC;IAC9D,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAC9E,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,GAAG,aAAa,CAAC;IACjE,WAAW,CAAC,WAAW,CAAC,+BAA+B,CAAC,GAAG,GAAG,CAAC,GAAG,+BAA+B,CAAC;IAClG,WAAW,CAAC,WAAW,CAAC,qCAAqC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,qCAAqC,CAAC;IAC/G,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,GAAG,cAAc,CAAC;IACpE,WAAW,CAAC,WAAW,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,GAAG,sBAAsB,CAAC;AACrF,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.d.ts b/node_modules/typescript/dist/enums/syntaxKind.d.ts
new file mode 100644
index 000000000..26fedb910
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.d.ts
@@ -0,0 +1,2 @@
+export declare var SyntaxKind: any;
+//# sourceMappingURL=syntaxKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.d.ts.map b/node_modules/typescript/dist/enums/syntaxKind.d.ts.map
new file mode 100644
index 000000000..fd18cc459
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"syntaxKind.d.ts","sourceRoot":"","sources":["../../src/enums/syntaxKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts
new file mode 100644
index 000000000..8756759d7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts
@@ -0,0 +1,389 @@
+export declare enum SyntaxKind {
+    Unknown = 0,
+    EndOfFile = 1,
+    SingleLineCommentTrivia = 2,
+    MultiLineCommentTrivia = 3,
+    NewLineTrivia = 4,
+    WhitespaceTrivia = 5,
+    ConflictMarkerTrivia = 6,
+    NonTextFileMarkerTrivia = 7,
+    NumericLiteral = 8,
+    BigIntLiteral = 9,
+    StringLiteral = 10,
+    JsxText = 11,
+    JsxTextAllWhiteSpaces = 12,
+    RegularExpressionLiteral = 13,
+    NoSubstitutionTemplateLiteral = 14,
+    TemplateHead = 15,
+    TemplateMiddle = 16,
+    TemplateTail = 17,
+    OpenBraceToken = 18,
+    CloseBraceToken = 19,
+    OpenParenToken = 20,
+    CloseParenToken = 21,
+    OpenBracketToken = 22,
+    CloseBracketToken = 23,
+    DotToken = 24,
+    DotDotDotToken = 25,
+    SemicolonToken = 26,
+    CommaToken = 27,
+    QuestionDotToken = 28,
+    LessThanToken = 29,
+    LessThanSlashToken = 30,
+    GreaterThanToken = 31,
+    LessThanEqualsToken = 32,
+    GreaterThanEqualsToken = 33,
+    EqualsEqualsToken = 34,
+    ExclamationEqualsToken = 35,
+    EqualsEqualsEqualsToken = 36,
+    ExclamationEqualsEqualsToken = 37,
+    EqualsGreaterThanToken = 38,
+    PlusToken = 39,
+    MinusToken = 40,
+    AsteriskToken = 41,
+    AsteriskAsteriskToken = 42,
+    SlashToken = 43,
+    PercentToken = 44,
+    PlusPlusToken = 45,
+    MinusMinusToken = 46,
+    LessThanLessThanToken = 47,
+    GreaterThanGreaterThanToken = 48,
+    GreaterThanGreaterThanGreaterThanToken = 49,
+    AmpersandToken = 50,
+    BarToken = 51,
+    CaretToken = 52,
+    ExclamationToken = 53,
+    TildeToken = 54,
+    AmpersandAmpersandToken = 55,
+    BarBarToken = 56,
+    QuestionToken = 57,
+    ColonToken = 58,
+    AtToken = 59,
+    QuestionQuestionToken = 60,
+    BacktickToken = 61,
+    HashToken = 62,
+    EqualsToken = 63,
+    PlusEqualsToken = 64,
+    MinusEqualsToken = 65,
+    AsteriskEqualsToken = 66,
+    AsteriskAsteriskEqualsToken = 67,
+    SlashEqualsToken = 68,
+    PercentEqualsToken = 69,
+    LessThanLessThanEqualsToken = 70,
+    GreaterThanGreaterThanEqualsToken = 71,
+    GreaterThanGreaterThanGreaterThanEqualsToken = 72,
+    AmpersandEqualsToken = 73,
+    BarEqualsToken = 74,
+    BarBarEqualsToken = 75,
+    AmpersandAmpersandEqualsToken = 76,
+    QuestionQuestionEqualsToken = 77,
+    CaretEqualsToken = 78,
+    Identifier = 79,
+    PrivateIdentifier = 80,
+    JSDocCommentTextToken = 81,
+    BreakKeyword = 82,
+    CaseKeyword = 83,
+    CatchKeyword = 84,
+    ClassKeyword = 85,
+    ConstKeyword = 86,
+    ContinueKeyword = 87,
+    DebuggerKeyword = 88,
+    DefaultKeyword = 89,
+    DeleteKeyword = 90,
+    DoKeyword = 91,
+    ElseKeyword = 92,
+    EnumKeyword = 93,
+    ExportKeyword = 94,
+    ExtendsKeyword = 95,
+    FalseKeyword = 96,
+    FinallyKeyword = 97,
+    ForKeyword = 98,
+    FunctionKeyword = 99,
+    IfKeyword = 100,
+    ImportKeyword = 101,
+    InKeyword = 102,
+    InstanceOfKeyword = 103,
+    NewKeyword = 104,
+    NullKeyword = 105,
+    ReturnKeyword = 106,
+    SuperKeyword = 107,
+    SwitchKeyword = 108,
+    ThisKeyword = 109,
+    ThrowKeyword = 110,
+    TrueKeyword = 111,
+    TryKeyword = 112,
+    TypeOfKeyword = 113,
+    VarKeyword = 114,
+    VoidKeyword = 115,
+    WhileKeyword = 116,
+    WithKeyword = 117,
+    ImplementsKeyword = 118,
+    InterfaceKeyword = 119,
+    LetKeyword = 120,
+    PackageKeyword = 121,
+    PrivateKeyword = 122,
+    ProtectedKeyword = 123,
+    PublicKeyword = 124,
+    StaticKeyword = 125,
+    YieldKeyword = 126,
+    AbstractKeyword = 127,
+    AccessorKeyword = 128,
+    AsKeyword = 129,
+    AssertsKeyword = 130,
+    AssertKeyword = 131,
+    AnyKeyword = 132,
+    AsyncKeyword = 133,
+    AwaitKeyword = 134,
+    BooleanKeyword = 135,
+    ConstructorKeyword = 136,
+    DeclareKeyword = 137,
+    GetKeyword = 138,
+    ImmediateKeyword = 139,
+    InferKeyword = 140,
+    IntrinsicKeyword = 141,
+    IsKeyword = 142,
+    KeyOfKeyword = 143,
+    ModuleKeyword = 144,
+    NamespaceKeyword = 145,
+    NeverKeyword = 146,
+    OutKeyword = 147,
+    ReadonlyKeyword = 148,
+    RequireKeyword = 149,
+    NumberKeyword = 150,
+    ObjectKeyword = 151,
+    SatisfiesKeyword = 152,
+    SetKeyword = 153,
+    StringKeyword = 154,
+    SymbolKeyword = 155,
+    TypeKeyword = 156,
+    UndefinedKeyword = 157,
+    UniqueKeyword = 158,
+    UnknownKeyword = 159,
+    UsingKeyword = 160,
+    FromKeyword = 161,
+    GlobalKeyword = 162,
+    BigIntKeyword = 163,
+    OverrideKeyword = 164,
+    OfKeyword = 165,
+    DeferKeyword = 166,
+    QualifiedName = 167,
+    ComputedPropertyName = 168,
+    TypeParameter = 169,
+    Parameter = 170,
+    Decorator = 171,
+    PropertySignature = 172,
+    PropertyDeclaration = 173,
+    MethodSignature = 174,
+    MethodDeclaration = 175,
+    ClassStaticBlockDeclaration = 176,
+    Constructor = 177,
+    GetAccessor = 178,
+    SetAccessor = 179,
+    CallSignature = 180,
+    ConstructSignature = 181,
+    IndexSignature = 182,
+    TypePredicate = 183,
+    TypeReference = 184,
+    FunctionType = 185,
+    ConstructorType = 186,
+    TypeQuery = 187,
+    TypeLiteral = 188,
+    ArrayType = 189,
+    TupleType = 190,
+    OptionalType = 191,
+    RestType = 192,
+    UnionType = 193,
+    IntersectionType = 194,
+    ConditionalType = 195,
+    InferType = 196,
+    ParenthesizedType = 197,
+    ThisType = 198,
+    TypeOperator = 199,
+    IndexedAccessType = 200,
+    MappedType = 201,
+    LiteralType = 202,
+    NamedTupleMember = 203,
+    TemplateLiteralType = 204,
+    TemplateLiteralTypeSpan = 205,
+    ImportType = 206,
+    ObjectBindingPattern = 207,
+    ArrayBindingPattern = 208,
+    BindingElement = 209,
+    ArrayLiteralExpression = 210,
+    ObjectLiteralExpression = 211,
+    PropertyAccessExpression = 212,
+    ElementAccessExpression = 213,
+    CallExpression = 214,
+    NewExpression = 215,
+    TaggedTemplateExpression = 216,
+    TypeAssertionExpression = 217,
+    ParenthesizedExpression = 218,
+    FunctionExpression = 219,
+    ArrowFunction = 220,
+    DeleteExpression = 221,
+    TypeOfExpression = 222,
+    VoidExpression = 223,
+    AwaitExpression = 224,
+    PrefixUnaryExpression = 225,
+    PostfixUnaryExpression = 226,
+    BinaryExpression = 227,
+    ConditionalExpression = 228,
+    TemplateExpression = 229,
+    YieldExpression = 230,
+    SpreadElement = 231,
+    ClassExpression = 232,
+    OmittedExpression = 233,
+    ExpressionWithTypeArguments = 234,
+    AsExpression = 235,
+    NonNullExpression = 236,
+    MetaProperty = 237,
+    SyntheticExpression = 238,
+    SatisfiesExpression = 239,
+    TemplateSpan = 240,
+    SemicolonClassElement = 241,
+    Block = 242,
+    EmptyStatement = 243,
+    VariableStatement = 244,
+    ExpressionStatement = 245,
+    IfStatement = 246,
+    DoStatement = 247,
+    WhileStatement = 248,
+    ForStatement = 249,
+    ForInStatement = 250,
+    ForOfStatement = 251,
+    ContinueStatement = 252,
+    BreakStatement = 253,
+    ReturnStatement = 254,
+    WithStatement = 255,
+    SwitchStatement = 256,
+    LabeledStatement = 257,
+    ThrowStatement = 258,
+    TryStatement = 259,
+    DebuggerStatement = 260,
+    VariableDeclaration = 261,
+    VariableDeclarationList = 262,
+    FunctionDeclaration = 263,
+    ClassDeclaration = 264,
+    InterfaceDeclaration = 265,
+    TypeAliasDeclaration = 266,
+    EnumDeclaration = 267,
+    ModuleDeclaration = 268,
+    ModuleBlock = 269,
+    CaseBlock = 270,
+    NamespaceExportDeclaration = 271,
+    ImportEqualsDeclaration = 272,
+    ImportDeclaration = 273,
+    ImportClause = 274,
+    NamespaceImport = 275,
+    NamedImports = 276,
+    ImportSpecifier = 277,
+    ExportAssignment = 278,
+    ExportDeclaration = 279,
+    NamedExports = 280,
+    NamespaceExport = 281,
+    ExportSpecifier = 282,
+    MissingDeclaration = 283,
+    ExternalModuleReference = 284,
+    JsxElement = 285,
+    JsxSelfClosingElement = 286,
+    JsxOpeningElement = 287,
+    JsxClosingElement = 288,
+    JsxFragment = 289,
+    JsxOpeningFragment = 290,
+    JsxClosingFragment = 291,
+    JsxAttribute = 292,
+    JsxAttributes = 293,
+    JsxSpreadAttribute = 294,
+    JsxExpression = 295,
+    JsxNamespacedName = 296,
+    CaseClause = 297,
+    DefaultClause = 298,
+    HeritageClause = 299,
+    CatchClause = 300,
+    ImportAttributes = 301,
+    ImportAttribute = 302,
+    PropertyAssignment = 303,
+    ShorthandPropertyAssignment = 304,
+    SpreadAssignment = 305,
+    EnumMember = 306,
+    SourceFile = 307,
+    JSDocTypeExpression = 308,
+    JSDocNameReference = 309,
+    JSDocAllType = 310,
+    JSDocNullableType = 311,
+    JSDocNonNullableType = 312,
+    JSDocOptionalType = 313,
+    JSDocVariadicType = 314,
+    JSDoc = 315,
+    JSDocText = 316,
+    JSDocTypeLiteral = 317,
+    JSDocSignature = 318,
+    JSDocLink = 319,
+    JSDocLinkCode = 320,
+    JSDocLinkPlain = 321,
+    JSDocUnknownTag = 322,
+    JSDocAugmentsTag = 323,
+    JSDocImplementsTag = 324,
+    JSDocDeprecatedTag = 325,
+    JSDocPublicTag = 326,
+    JSDocPrivateTag = 327,
+    JSDocProtectedTag = 328,
+    JSDocReadonlyTag = 329,
+    JSDocOverrideTag = 330,
+    JSDocCallbackTag = 331,
+    JSDocOverloadTag = 332,
+    JSDocParameterTag = 333,
+    JSDocReturnTag = 334,
+    JSDocThisTag = 335,
+    JSDocTypeTag = 336,
+    JSDocTemplateTag = 337,
+    JSDocTypedefTag = 338,
+    JSDocSeeTag = 339,
+    JSDocPropertyTag = 340,
+    JSDocThrowsTag = 341,
+    JSDocSatisfiesTag = 342,
+    JSDocImportTag = 343,
+    SyntaxList = 344,
+    JSTypeAliasDeclaration = 345,
+    JSImportDeclaration = 346,
+    NotEmittedStatement = 347,
+    PartiallyEmittedExpression = 348,
+    SyntheticReferenceExpression = 349,
+    NotEmittedTypeElement = 350,
+    Count = 351,
+    FirstAssignment = 63,
+    LastAssignment = 78,
+    FirstCompoundAssignment = 64,
+    LastCompoundAssignment = 78,
+    FirstReservedWord = 82,
+    LastReservedWord = 117,
+    FirstKeyword = 82,
+    LastKeyword = 166,
+    FirstFutureReservedWord = 118,
+    LastFutureReservedWord = 126,
+    FirstTypeNode = 183,
+    LastTypeNode = 206,
+    FirstPunctuation = 18,
+    LastPunctuation = 78,
+    FirstToken = 0,
+    LastToken = 166,
+    FirstLiteralToken = 8,
+    LastLiteralToken = 14,
+    FirstTemplateToken = 14,
+    LastTemplateToken = 17,
+    FirstBinaryOperator = 29,
+    LastBinaryOperator = 78,
+    FirstStatement = 244,
+    LastStatement = 260,
+    FirstNode = 167,
+    FirstJSDocNode = 308,
+    LastJSDocNode = 343,
+    FirstJSDocTagNode = 322,
+    LastJSDocTagNode = 343,
+    FirstContextualKeyword = 127,
+    LastContextualKeyword = 166,
+    LastUnaryOperator = 54,
+    FirstTriviaToken = 2,
+    LastTriviaToken = 6
+}
+//# sourceMappingURL=syntaxKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map
new file mode 100644
index 000000000..825277357
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"syntaxKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/syntaxKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,OAAO,IAAI;IACX,SAAS,IAAI;IACb,uBAAuB,IAAI;IAC3B,sBAAsB,IAAI;IAC1B,aAAa,IAAI;IACjB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI;IACxB,uBAAuB,IAAI;IAC3B,cAAc,IAAI;IAClB,aAAa,IAAI;IACjB,aAAa,KAAK;IAClB,OAAO,KAAK;IACZ,qBAAqB,KAAK;IAC1B,wBAAwB,KAAK;IAC7B,6BAA6B,KAAK;IAClC,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,eAAe,KAAK;IACpB,cAAc,KAAK;IACnB,eAAe,KAAK;IACpB,gBAAgB,KAAK;IACrB,iBAAiB,KAAK;IACtB,QAAQ,KAAK;IACb,cAAc,KAAK;IACnB,cAAc,KAAK;IACnB,UAAU,KAAK;IACf,gBAAgB,KAAK;IACrB,aAAa,KAAK;IAClB,kBAAkB,KAAK;IACvB,gBAAgB,KAAK;IACrB,mBAAmB,KAAK;IACxB,sBAAsB,KAAK;IAC3B,iBAAiB,KAAK;IACtB,sBAAsB,KAAK;IAC3B,uBAAuB,KAAK;IAC5B,4BAA4B,KAAK;IACjC,sBAAsB,KAAK;IAC3B,SAAS,KAAK;IACd,UAAU,KAAK;IACf,aAAa,KAAK;IAClB,qBAAqB,KAAK;IAC1B,UAAU,KAAK;IACf,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,eAAe,KAAK;IACpB,qBAAqB,KAAK;IAC1B,2BAA2B,KAAK;IAChC,sCAAsC,KAAK;IAC3C,cAAc,KAAK;IACnB,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,gBAAgB,KAAK;IACrB,UAAU,KAAK;IACf,uBAAuB,KAAK;IAC5B,WAAW,KAAK;IAChB,aAAa,KAAK;IAClB,UAAU,K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AiB;IACjC,sBAAsB,MAAkB;IACxC,qBAAqB,MAAe;IACpC,iBAAiB,KAAa;IAC9B,gBAAgB,IAA0B;IAC1C,eAAe,IAAuB;CACzC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.js b/node_modules/typescript/dist/enums/syntaxKind.enum.js
new file mode 100644
index 000000000..cbde1c839
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.enum.js
@@ -0,0 +1,391 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/kind_generated.go. DO NOT EDIT.
+export var SyntaxKind;
+(function (SyntaxKind) {
+    SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown";
+    SyntaxKind[SyntaxKind["EndOfFile"] = 1] = "EndOfFile";
+    SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
+    SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia";
+    SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia";
+    SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia";
+    SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia";
+    SyntaxKind[SyntaxKind["NonTextFileMarkerTrivia"] = 7] = "NonTextFileMarkerTrivia";
+    SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral";
+    SyntaxKind[SyntaxKind["BigIntLiteral"] = 9] = "BigIntLiteral";
+    SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral";
+    SyntaxKind[SyntaxKind["JsxText"] = 11] = "JsxText";
+    SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 12] = "JsxTextAllWhiteSpaces";
+    SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 13] = "RegularExpressionLiteral";
+    SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 14] = "NoSubstitutionTemplateLiteral";
+    SyntaxKind[SyntaxKind["TemplateHead"] = 15] = "TemplateHead";
+    SyntaxKind[SyntaxKind["TemplateMiddle"] = 16] = "TemplateMiddle";
+    SyntaxKind[SyntaxKind["TemplateTail"] = 17] = "TemplateTail";
+    SyntaxKind[SyntaxKind["OpenBraceToken"] = 18] = "OpenBraceToken";
+    SyntaxKind[SyntaxKind["CloseBraceToken"] = 19] = "CloseBraceToken";
+    SyntaxKind[SyntaxKind["OpenParenToken"] = 20] = "OpenParenToken";
+    SyntaxKind[SyntaxKind["CloseParenToken"] = 21] = "CloseParenToken";
+    SyntaxKind[SyntaxKind["OpenBracketToken"] = 22] = "OpenBracketToken";
+    SyntaxKind[SyntaxKind["CloseBracketToken"] = 23] = "CloseBracketToken";
+    SyntaxKind[SyntaxKind["DotToken"] = 24] = "DotToken";
+    SyntaxKind[SyntaxKind["DotDotDotToken"] = 25] = "DotDotDotToken";
+    SyntaxKind[SyntaxKind["SemicolonToken"] = 26] = "SemicolonToken";
+    SyntaxKind[SyntaxKind["CommaToken"] = 27] = "CommaToken";
+    SyntaxKind[SyntaxKind["QuestionDotToken"] = 28] = "QuestionDotToken";
+    SyntaxKind[SyntaxKind["LessThanToken"] = 29] = "LessThanToken";
+    SyntaxKind[SyntaxKind["LessThanSlashToken"] = 30] = "LessThanSlashToken";
+    SyntaxKind[SyntaxKind["GreaterThanToken"] = 31] = "GreaterThanToken";
+    SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 32] = "LessThanEqualsToken";
+    SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 33] = "GreaterThanEqualsToken";
+    SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 34] = "EqualsEqualsToken";
+    SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 35] = "ExclamationEqualsToken";
+    SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 36] = "EqualsEqualsEqualsToken";
+    SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 37] = "ExclamationEqualsEqualsToken";
+    SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 38] = "EqualsGreaterThanToken";
+    SyntaxKind[SyntaxKind["PlusToken"] = 39] = "PlusToken";
+    SyntaxKind[SyntaxKind["MinusToken"] = 40] = "MinusToken";
+    SyntaxKind[SyntaxKind["AsteriskToken"] = 41] = "AsteriskToken";
+    SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 42] = "AsteriskAsteriskToken";
+    SyntaxKind[SyntaxKind["SlashToken"] = 43] = "SlashToken";
+    SyntaxKind[SyntaxKind["PercentToken"] = 44] = "PercentToken";
+    SyntaxKind[SyntaxKind["PlusPlusToken"] = 45] = "PlusPlusToken";
+    SyntaxKind[SyntaxKind["MinusMinusToken"] = 46] = "MinusMinusToken";
+    SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 47] = "LessThanLessThanToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 48] = "GreaterThanGreaterThanToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanGreaterThanToken";
+    SyntaxKind[SyntaxKind["AmpersandToken"] = 50] = "AmpersandToken";
+    SyntaxKind[SyntaxKind["BarToken"] = 51] = "BarToken";
+    SyntaxKind[SyntaxKind["CaretToken"] = 52] = "CaretToken";
+    SyntaxKind[SyntaxKind["ExclamationToken"] = 53] = "ExclamationToken";
+    SyntaxKind[SyntaxKind["TildeToken"] = 54] = "TildeToken";
+    SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 55] = "AmpersandAmpersandToken";
+    SyntaxKind[SyntaxKind["BarBarToken"] = 56] = "BarBarToken";
+    SyntaxKind[SyntaxKind["QuestionToken"] = 57] = "QuestionToken";
+    SyntaxKind[SyntaxKind["ColonToken"] = 58] = "ColonToken";
+    SyntaxKind[SyntaxKind["AtToken"] = 59] = "AtToken";
+    SyntaxKind[SyntaxKind["QuestionQuestionToken"] = 60] = "QuestionQuestionToken";
+    SyntaxKind[SyntaxKind["BacktickToken"] = 61] = "BacktickToken";
+    SyntaxKind[SyntaxKind["HashToken"] = 62] = "HashToken";
+    SyntaxKind[SyntaxKind["EqualsToken"] = 63] = "EqualsToken";
+    SyntaxKind[SyntaxKind["PlusEqualsToken"] = 64] = "PlusEqualsToken";
+    SyntaxKind[SyntaxKind["MinusEqualsToken"] = 65] = "MinusEqualsToken";
+    SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 66] = "AsteriskEqualsToken";
+    SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 67] = "AsteriskAsteriskEqualsToken";
+    SyntaxKind[SyntaxKind["SlashEqualsToken"] = 68] = "SlashEqualsToken";
+    SyntaxKind[SyntaxKind["PercentEqualsToken"] = 69] = "PercentEqualsToken";
+    SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 70] = "LessThanLessThanEqualsToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 71] = "GreaterThanGreaterThanEqualsToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanGreaterThanEqualsToken";
+    SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 73] = "AmpersandEqualsToken";
+    SyntaxKind[SyntaxKind["BarEqualsToken"] = 74] = "BarEqualsToken";
+    SyntaxKind[SyntaxKind["BarBarEqualsToken"] = 75] = "BarBarEqualsToken";
+    SyntaxKind[SyntaxKind["AmpersandAmpersandEqualsToken"] = 76] = "AmpersandAmpersandEqualsToken";
+    SyntaxKind[SyntaxKind["QuestionQuestionEqualsToken"] = 77] = "QuestionQuestionEqualsToken";
+    SyntaxKind[SyntaxKind["CaretEqualsToken"] = 78] = "CaretEqualsToken";
+    SyntaxKind[SyntaxKind["Identifier"] = 79] = "Identifier";
+    SyntaxKind[SyntaxKind["PrivateIdentifier"] = 80] = "PrivateIdentifier";
+    SyntaxKind[SyntaxKind["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken";
+    SyntaxKind[SyntaxKind["BreakKeyword"] = 82] = "BreakKeyword";
+    SyntaxKind[SyntaxKind["CaseKeyword"] = 83] = "CaseKeyword";
+    SyntaxKind[SyntaxKind["CatchKeyword"] = 84] = "CatchKeyword";
+    SyntaxKind[SyntaxKind["ClassKeyword"] = 85] = "ClassKeyword";
+    SyntaxKind[SyntaxKind["ConstKeyword"] = 86] = "ConstKeyword";
+    SyntaxKind[SyntaxKind["ContinueKeyword"] = 87] = "ContinueKeyword";
+    SyntaxKind[SyntaxKind["DebuggerKeyword"] = 88] = "DebuggerKeyword";
+    SyntaxKind[SyntaxKind["DefaultKeyword"] = 89] = "DefaultKeyword";
+    SyntaxKind[SyntaxKind["DeleteKeyword"] = 90] = "DeleteKeyword";
+    SyntaxKind[SyntaxKind["DoKeyword"] = 91] = "DoKeyword";
+    SyntaxKind[SyntaxKind["ElseKeyword"] = 92] = "ElseKeyword";
+    SyntaxKind[SyntaxKind["EnumKeyword"] = 93] = "EnumKeyword";
+    SyntaxKind[SyntaxKind["ExportKeyword"] = 94] = "ExportKeyword";
+    SyntaxKind[SyntaxKind["ExtendsKeyword"] = 95] = "ExtendsKeyword";
+    SyntaxKind[SyntaxKind["FalseKeyword"] = 96] = "FalseKeyword";
+    SyntaxKind[SyntaxKind["FinallyKeyword"] = 97] = "FinallyKeyword";
+    SyntaxKind[SyntaxKind["ForKeyword"] = 98] = "ForKeyword";
+    SyntaxKind[SyntaxKind["FunctionKeyword"] = 99] = "FunctionKeyword";
+    SyntaxKind[SyntaxKind["IfKeyword"] = 100] = "IfKeyword";
+    SyntaxKind[SyntaxKind["ImportKeyword"] = 101] = "ImportKeyword";
+    SyntaxKind[SyntaxKind["InKeyword"] = 102] = "InKeyword";
+    SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 103] = "InstanceOfKeyword";
+    SyntaxKind[SyntaxKind["NewKeyword"] = 104] = "NewKeyword";
+    SyntaxKind[SyntaxKind["NullKeyword"] = 105] = "NullKeyword";
+    SyntaxKind[SyntaxKind["ReturnKeyword"] = 106] = "ReturnKeyword";
+    SyntaxKind[SyntaxKind["SuperKeyword"] = 107] = "SuperKeyword";
+    SyntaxKind[SyntaxKind["SwitchKeyword"] = 108] = "SwitchKeyword";
+    SyntaxKind[SyntaxKind["ThisKeyword"] = 109] = "ThisKeyword";
+    SyntaxKind[SyntaxKind["ThrowKeyword"] = 110] = "ThrowKeyword";
+    SyntaxKind[SyntaxKind["TrueKeyword"] = 111] = "TrueKeyword";
+    SyntaxKind[SyntaxKind["TryKeyword"] = 112] = "TryKeyword";
+    SyntaxKind[SyntaxKind["TypeOfKeyword"] = 113] = "TypeOfKeyword";
+    SyntaxKind[SyntaxKind["VarKeyword"] = 114] = "VarKeyword";
+    SyntaxKind[SyntaxKind["VoidKeyword"] = 115] = "VoidKeyword";
+    SyntaxKind[SyntaxKind["WhileKeyword"] = 116] = "WhileKeyword";
+    SyntaxKind[SyntaxKind["WithKeyword"] = 117] = "WithKeyword";
+    SyntaxKind[SyntaxKind["ImplementsKeyword"] = 118] = "ImplementsKeyword";
+    SyntaxKind[SyntaxKind["InterfaceKeyword"] = 119] = "InterfaceKeyword";
+    SyntaxKind[SyntaxKind["LetKeyword"] = 120] = "LetKeyword";
+    SyntaxKind[SyntaxKind["PackageKeyword"] = 121] = "PackageKeyword";
+    SyntaxKind[SyntaxKind["PrivateKeyword"] = 122] = "PrivateKeyword";
+    SyntaxKind[SyntaxKind["ProtectedKeyword"] = 123] = "ProtectedKeyword";
+    SyntaxKind[SyntaxKind["PublicKeyword"] = 124] = "PublicKeyword";
+    SyntaxKind[SyntaxKind["StaticKeyword"] = 125] = "StaticKeyword";
+    SyntaxKind[SyntaxKind["YieldKeyword"] = 126] = "YieldKeyword";
+    SyntaxKind[SyntaxKind["AbstractKeyword"] = 127] = "AbstractKeyword";
+    SyntaxKind[SyntaxKind["AccessorKeyword"] = 128] = "AccessorKeyword";
+    SyntaxKind[SyntaxKind["AsKeyword"] = 129] = "AsKeyword";
+    SyntaxKind[SyntaxKind["AssertsKeyword"] = 130] = "AssertsKeyword";
+    SyntaxKind[SyntaxKind["AssertKeyword"] = 131] = "AssertKeyword";
+    SyntaxKind[SyntaxKind["AnyKeyword"] = 132] = "AnyKeyword";
+    SyntaxKind[SyntaxKind["AsyncKeyword"] = 133] = "AsyncKeyword";
+    SyntaxKind[SyntaxKind["AwaitKeyword"] = 134] = "AwaitKeyword";
+    SyntaxKind[SyntaxKind["BooleanKeyword"] = 135] = "BooleanKeyword";
+    SyntaxKind[SyntaxKind["ConstructorKeyword"] = 136] = "ConstructorKeyword";
+    SyntaxKind[SyntaxKind["DeclareKeyword"] = 137] = "DeclareKeyword";
+    SyntaxKind[SyntaxKind["GetKeyword"] = 138] = "GetKeyword";
+    SyntaxKind[SyntaxKind["ImmediateKeyword"] = 139] = "ImmediateKeyword";
+    SyntaxKind[SyntaxKind["InferKeyword"] = 140] = "InferKeyword";
+    SyntaxKind[SyntaxKind["IntrinsicKeyword"] = 141] = "IntrinsicKeyword";
+    SyntaxKind[SyntaxKind["IsKeyword"] = 142] = "IsKeyword";
+    SyntaxKind[SyntaxKind["KeyOfKeyword"] = 143] = "KeyOfKeyword";
+    SyntaxKind[SyntaxKind["ModuleKeyword"] = 144] = "ModuleKeyword";
+    SyntaxKind[SyntaxKind["NamespaceKeyword"] = 145] = "NamespaceKeyword";
+    SyntaxKind[SyntaxKind["NeverKeyword"] = 146] = "NeverKeyword";
+    SyntaxKind[SyntaxKind["OutKeyword"] = 147] = "OutKeyword";
+    SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 148] = "ReadonlyKeyword";
+    SyntaxKind[SyntaxKind["RequireKeyword"] = 149] = "RequireKeyword";
+    SyntaxKind[SyntaxKind["NumberKeyword"] = 150] = "NumberKeyword";
+    SyntaxKind[SyntaxKind["ObjectKeyword"] = 151] = "ObjectKeyword";
+    SyntaxKind[SyntaxKind["SatisfiesKeyword"] = 152] = "SatisfiesKeyword";
+    SyntaxKind[SyntaxKind["SetKeyword"] = 153] = "SetKeyword";
+    SyntaxKind[SyntaxKind["StringKeyword"] = 154] = "StringKeyword";
+    SyntaxKind[SyntaxKind["SymbolKeyword"] = 155] = "SymbolKeyword";
+    SyntaxKind[SyntaxKind["TypeKeyword"] = 156] = "TypeKeyword";
+    SyntaxKind[SyntaxKind["UndefinedKeyword"] = 157] = "UndefinedKeyword";
+    SyntaxKind[SyntaxKind["UniqueKeyword"] = 158] = "UniqueKeyword";
+    SyntaxKind[SyntaxKind["UnknownKeyword"] = 159] = "UnknownKeyword";
+    SyntaxKind[SyntaxKind["UsingKeyword"] = 160] = "UsingKeyword";
+    SyntaxKind[SyntaxKind["FromKeyword"] = 161] = "FromKeyword";
+    SyntaxKind[SyntaxKind["GlobalKeyword"] = 162] = "GlobalKeyword";
+    SyntaxKind[SyntaxKind["BigIntKeyword"] = 163] = "BigIntKeyword";
+    SyntaxKind[SyntaxKind["OverrideKeyword"] = 164] = "OverrideKeyword";
+    SyntaxKind[SyntaxKind["OfKeyword"] = 165] = "OfKeyword";
+    SyntaxKind[SyntaxKind["DeferKeyword"] = 166] = "DeferKeyword";
+    SyntaxKind[SyntaxKind["QualifiedName"] = 167] = "QualifiedName";
+    SyntaxKind[SyntaxKind["ComputedPropertyName"] = 168] = "ComputedPropertyName";
+    SyntaxKind[SyntaxKind["TypeParameter"] = 169] = "TypeParameter";
+    SyntaxKind[SyntaxKind["Parameter"] = 170] = "Parameter";
+    SyntaxKind[SyntaxKind["Decorator"] = 171] = "Decorator";
+    SyntaxKind[SyntaxKind["PropertySignature"] = 172] = "PropertySignature";
+    SyntaxKind[SyntaxKind["PropertyDeclaration"] = 173] = "PropertyDeclaration";
+    SyntaxKind[SyntaxKind["MethodSignature"] = 174] = "MethodSignature";
+    SyntaxKind[SyntaxKind["MethodDeclaration"] = 175] = "MethodDeclaration";
+    SyntaxKind[SyntaxKind["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration";
+    SyntaxKind[SyntaxKind["Constructor"] = 177] = "Constructor";
+    SyntaxKind[SyntaxKind["GetAccessor"] = 178] = "GetAccessor";
+    SyntaxKind[SyntaxKind["SetAccessor"] = 179] = "SetAccessor";
+    SyntaxKind[SyntaxKind["CallSignature"] = 180] = "CallSignature";
+    SyntaxKind[SyntaxKind["ConstructSignature"] = 181] = "ConstructSignature";
+    SyntaxKind[SyntaxKind["IndexSignature"] = 182] = "IndexSignature";
+    SyntaxKind[SyntaxKind["TypePredicate"] = 183] = "TypePredicate";
+    SyntaxKind[SyntaxKind["TypeReference"] = 184] = "TypeReference";
+    SyntaxKind[SyntaxKind["FunctionType"] = 185] = "FunctionType";
+    SyntaxKind[SyntaxKind["ConstructorType"] = 186] = "ConstructorType";
+    SyntaxKind[SyntaxKind["TypeQuery"] = 187] = "TypeQuery";
+    SyntaxKind[SyntaxKind["TypeLiteral"] = 188] = "TypeLiteral";
+    SyntaxKind[SyntaxKind["ArrayType"] = 189] = "ArrayType";
+    SyntaxKind[SyntaxKind["TupleType"] = 190] = "TupleType";
+    SyntaxKind[SyntaxKind["OptionalType"] = 191] = "OptionalType";
+    SyntaxKind[SyntaxKind["RestType"] = 192] = "RestType";
+    SyntaxKind[SyntaxKind["UnionType"] = 193] = "UnionType";
+    SyntaxKind[SyntaxKind["IntersectionType"] = 194] = "IntersectionType";
+    SyntaxKind[SyntaxKind["ConditionalType"] = 195] = "ConditionalType";
+    SyntaxKind[SyntaxKind["InferType"] = 196] = "InferType";
+    SyntaxKind[SyntaxKind["ParenthesizedType"] = 197] = "ParenthesizedType";
+    SyntaxKind[SyntaxKind["ThisType"] = 198] = "ThisType";
+    SyntaxKind[SyntaxKind["TypeOperator"] = 199] = "TypeOperator";
+    SyntaxKind[SyntaxKind["IndexedAccessType"] = 200] = "IndexedAccessType";
+    SyntaxKind[SyntaxKind["MappedType"] = 201] = "MappedType";
+    SyntaxKind[SyntaxKind["LiteralType"] = 202] = "LiteralType";
+    SyntaxKind[SyntaxKind["NamedTupleMember"] = 203] = "NamedTupleMember";
+    SyntaxKind[SyntaxKind["TemplateLiteralType"] = 204] = "TemplateLiteralType";
+    SyntaxKind[SyntaxKind["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan";
+    SyntaxKind[SyntaxKind["ImportType"] = 206] = "ImportType";
+    SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 207] = "ObjectBindingPattern";
+    SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 208] = "ArrayBindingPattern";
+    SyntaxKind[SyntaxKind["BindingElement"] = 209] = "BindingElement";
+    SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression";
+    SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression";
+    SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 212] = "PropertyAccessExpression";
+    SyntaxKind[SyntaxKind["ElementAccessExpression"] = 213] = "ElementAccessExpression";
+    SyntaxKind[SyntaxKind["CallExpression"] = 214] = "CallExpression";
+    SyntaxKind[SyntaxKind["NewExpression"] = 215] = "NewExpression";
+    SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression";
+    SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 217] = "TypeAssertionExpression";
+    SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 218] = "ParenthesizedExpression";
+    SyntaxKind[SyntaxKind["FunctionExpression"] = 219] = "FunctionExpression";
+    SyntaxKind[SyntaxKind["ArrowFunction"] = 220] = "ArrowFunction";
+    SyntaxKind[SyntaxKind["DeleteExpression"] = 221] = "DeleteExpression";
+    SyntaxKind[SyntaxKind["TypeOfExpression"] = 222] = "TypeOfExpression";
+    SyntaxKind[SyntaxKind["VoidExpression"] = 223] = "VoidExpression";
+    SyntaxKind[SyntaxKind["AwaitExpression"] = 224] = "AwaitExpression";
+    SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression";
+    SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression";
+    SyntaxKind[SyntaxKind["BinaryExpression"] = 227] = "BinaryExpression";
+    SyntaxKind[SyntaxKind["ConditionalExpression"] = 228] = "ConditionalExpression";
+    SyntaxKind[SyntaxKind["TemplateExpression"] = 229] = "TemplateExpression";
+    SyntaxKind[SyntaxKind["YieldExpression"] = 230] = "YieldExpression";
+    SyntaxKind[SyntaxKind["SpreadElement"] = 231] = "SpreadElement";
+    SyntaxKind[SyntaxKind["ClassExpression"] = 232] = "ClassExpression";
+    SyntaxKind[SyntaxKind["OmittedExpression"] = 233] = "OmittedExpression";
+    SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments";
+    SyntaxKind[SyntaxKind["AsExpression"] = 235] = "AsExpression";
+    SyntaxKind[SyntaxKind["NonNullExpression"] = 236] = "NonNullExpression";
+    SyntaxKind[SyntaxKind["MetaProperty"] = 237] = "MetaProperty";
+    SyntaxKind[SyntaxKind["SyntheticExpression"] = 238] = "SyntheticExpression";
+    SyntaxKind[SyntaxKind["SatisfiesExpression"] = 239] = "SatisfiesExpression";
+    SyntaxKind[SyntaxKind["TemplateSpan"] = 240] = "TemplateSpan";
+    SyntaxKind[SyntaxKind["SemicolonClassElement"] = 241] = "SemicolonClassElement";
+    SyntaxKind[SyntaxKind["Block"] = 242] = "Block";
+    SyntaxKind[SyntaxKind["EmptyStatement"] = 243] = "EmptyStatement";
+    SyntaxKind[SyntaxKind["VariableStatement"] = 244] = "VariableStatement";
+    SyntaxKind[SyntaxKind["ExpressionStatement"] = 245] = "ExpressionStatement";
+    SyntaxKind[SyntaxKind["IfStatement"] = 246] = "IfStatement";
+    SyntaxKind[SyntaxKind["DoStatement"] = 247] = "DoStatement";
+    SyntaxKind[SyntaxKind["WhileStatement"] = 248] = "WhileStatement";
+    SyntaxKind[SyntaxKind["ForStatement"] = 249] = "ForStatement";
+    SyntaxKind[SyntaxKind["ForInStatement"] = 250] = "ForInStatement";
+    SyntaxKind[SyntaxKind["ForOfStatement"] = 251] = "ForOfStatement";
+    SyntaxKind[SyntaxKind["ContinueStatement"] = 252] = "ContinueStatement";
+    SyntaxKind[SyntaxKind["BreakStatement"] = 253] = "BreakStatement";
+    SyntaxKind[SyntaxKind["ReturnStatement"] = 254] = "ReturnStatement";
+    SyntaxKind[SyntaxKind["WithStatement"] = 255] = "WithStatement";
+    SyntaxKind[SyntaxKind["SwitchStatement"] = 256] = "SwitchStatement";
+    SyntaxKind[SyntaxKind["LabeledStatement"] = 257] = "LabeledStatement";
+    SyntaxKind[SyntaxKind["ThrowStatement"] = 258] = "ThrowStatement";
+    SyntaxKind[SyntaxKind["TryStatement"] = 259] = "TryStatement";
+    SyntaxKind[SyntaxKind["DebuggerStatement"] = 260] = "DebuggerStatement";
+    SyntaxKind[SyntaxKind["VariableDeclaration"] = 261] = "VariableDeclaration";
+    SyntaxKind[SyntaxKind["VariableDeclarationList"] = 262] = "VariableDeclarationList";
+    SyntaxKind[SyntaxKind["FunctionDeclaration"] = 263] = "FunctionDeclaration";
+    SyntaxKind[SyntaxKind["ClassDeclaration"] = 264] = "ClassDeclaration";
+    SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 265] = "InterfaceDeclaration";
+    SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration";
+    SyntaxKind[SyntaxKind["EnumDeclaration"] = 267] = "EnumDeclaration";
+    SyntaxKind[SyntaxKind["ModuleDeclaration"] = 268] = "ModuleDeclaration";
+    SyntaxKind[SyntaxKind["ModuleBlock"] = 269] = "ModuleBlock";
+    SyntaxKind[SyntaxKind["CaseBlock"] = 270] = "CaseBlock";
+    SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration";
+    SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration";
+    SyntaxKind[SyntaxKind["ImportDeclaration"] = 273] = "ImportDeclaration";
+    SyntaxKind[SyntaxKind["ImportClause"] = 274] = "ImportClause";
+    SyntaxKind[SyntaxKind["NamespaceImport"] = 275] = "NamespaceImport";
+    SyntaxKind[SyntaxKind["NamedImports"] = 276] = "NamedImports";
+    SyntaxKind[SyntaxKind["ImportSpecifier"] = 277] = "ImportSpecifier";
+    SyntaxKind[SyntaxKind["ExportAssignment"] = 278] = "ExportAssignment";
+    SyntaxKind[SyntaxKind["ExportDeclaration"] = 279] = "ExportDeclaration";
+    SyntaxKind[SyntaxKind["NamedExports"] = 280] = "NamedExports";
+    SyntaxKind[SyntaxKind["NamespaceExport"] = 281] = "NamespaceExport";
+    SyntaxKind[SyntaxKind["ExportSpecifier"] = 282] = "ExportSpecifier";
+    SyntaxKind[SyntaxKind["MissingDeclaration"] = 283] = "MissingDeclaration";
+    SyntaxKind[SyntaxKind["ExternalModuleReference"] = 284] = "ExternalModuleReference";
+    SyntaxKind[SyntaxKind["JsxElement"] = 285] = "JsxElement";
+    SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement";
+    SyntaxKind[SyntaxKind["JsxOpeningElement"] = 287] = "JsxOpeningElement";
+    SyntaxKind[SyntaxKind["JsxClosingElement"] = 288] = "JsxClosingElement";
+    SyntaxKind[SyntaxKind["JsxFragment"] = 289] = "JsxFragment";
+    SyntaxKind[SyntaxKind["JsxOpeningFragment"] = 290] = "JsxOpeningFragment";
+    SyntaxKind[SyntaxKind["JsxClosingFragment"] = 291] = "JsxClosingFragment";
+    SyntaxKind[SyntaxKind["JsxAttribute"] = 292] = "JsxAttribute";
+    SyntaxKind[SyntaxKind["JsxAttributes"] = 293] = "JsxAttributes";
+    SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute";
+    SyntaxKind[SyntaxKind["JsxExpression"] = 295] = "JsxExpression";
+    SyntaxKind[SyntaxKind["JsxNamespacedName"] = 296] = "JsxNamespacedName";
+    SyntaxKind[SyntaxKind["CaseClause"] = 297] = "CaseClause";
+    SyntaxKind[SyntaxKind["DefaultClause"] = 298] = "DefaultClause";
+    SyntaxKind[SyntaxKind["HeritageClause"] = 299] = "HeritageClause";
+    SyntaxKind[SyntaxKind["CatchClause"] = 300] = "CatchClause";
+    SyntaxKind[SyntaxKind["ImportAttributes"] = 301] = "ImportAttributes";
+    SyntaxKind[SyntaxKind["ImportAttribute"] = 302] = "ImportAttribute";
+    SyntaxKind[SyntaxKind["PropertyAssignment"] = 303] = "PropertyAssignment";
+    SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
+    SyntaxKind[SyntaxKind["SpreadAssignment"] = 305] = "SpreadAssignment";
+    SyntaxKind[SyntaxKind["EnumMember"] = 306] = "EnumMember";
+    SyntaxKind[SyntaxKind["SourceFile"] = 307] = "SourceFile";
+    SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression";
+    SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference";
+    SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType";
+    SyntaxKind[SyntaxKind["JSDocNullableType"] = 311] = "JSDocNullableType";
+    SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 312] = "JSDocNonNullableType";
+    SyntaxKind[SyntaxKind["JSDocOptionalType"] = 313] = "JSDocOptionalType";
+    SyntaxKind[SyntaxKind["JSDocVariadicType"] = 314] = "JSDocVariadicType";
+    SyntaxKind[SyntaxKind["JSDoc"] = 315] = "JSDoc";
+    SyntaxKind[SyntaxKind["JSDocText"] = 316] = "JSDocText";
+    SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 317] = "JSDocTypeLiteral";
+    SyntaxKind[SyntaxKind["JSDocSignature"] = 318] = "JSDocSignature";
+    SyntaxKind[SyntaxKind["JSDocLink"] = 319] = "JSDocLink";
+    SyntaxKind[SyntaxKind["JSDocLinkCode"] = 320] = "JSDocLinkCode";
+    SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 321] = "JSDocLinkPlain";
+    SyntaxKind[SyntaxKind["JSDocUnknownTag"] = 322] = "JSDocUnknownTag";
+    SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 323] = "JSDocAugmentsTag";
+    SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 324] = "JSDocImplementsTag";
+    SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 325] = "JSDocDeprecatedTag";
+    SyntaxKind[SyntaxKind["JSDocPublicTag"] = 326] = "JSDocPublicTag";
+    SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 327] = "JSDocPrivateTag";
+    SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 328] = "JSDocProtectedTag";
+    SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 329] = "JSDocReadonlyTag";
+    SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 330] = "JSDocOverrideTag";
+    SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 331] = "JSDocCallbackTag";
+    SyntaxKind[SyntaxKind["JSDocOverloadTag"] = 332] = "JSDocOverloadTag";
+    SyntaxKind[SyntaxKind["JSDocParameterTag"] = 333] = "JSDocParameterTag";
+    SyntaxKind[SyntaxKind["JSDocReturnTag"] = 334] = "JSDocReturnTag";
+    SyntaxKind[SyntaxKind["JSDocThisTag"] = 335] = "JSDocThisTag";
+    SyntaxKind[SyntaxKind["JSDocTypeTag"] = 336] = "JSDocTypeTag";
+    SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 337] = "JSDocTemplateTag";
+    SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 338] = "JSDocTypedefTag";
+    SyntaxKind[SyntaxKind["JSDocSeeTag"] = 339] = "JSDocSeeTag";
+    SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 340] = "JSDocPropertyTag";
+    SyntaxKind[SyntaxKind["JSDocThrowsTag"] = 341] = "JSDocThrowsTag";
+    SyntaxKind[SyntaxKind["JSDocSatisfiesTag"] = 342] = "JSDocSatisfiesTag";
+    SyntaxKind[SyntaxKind["JSDocImportTag"] = 343] = "JSDocImportTag";
+    SyntaxKind[SyntaxKind["SyntaxList"] = 344] = "SyntaxList";
+    SyntaxKind[SyntaxKind["JSTypeAliasDeclaration"] = 345] = "JSTypeAliasDeclaration";
+    SyntaxKind[SyntaxKind["JSImportDeclaration"] = 346] = "JSImportDeclaration";
+    SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement";
+    SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression";
+    SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 349] = "SyntheticReferenceExpression";
+    SyntaxKind[SyntaxKind["NotEmittedTypeElement"] = 350] = "NotEmittedTypeElement";
+    SyntaxKind[SyntaxKind["Count"] = 351] = "Count";
+    SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment";
+    SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment";
+    SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 64] = "FirstCompoundAssignment";
+    SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 78] = "LastCompoundAssignment";
+    SyntaxKind[SyntaxKind["FirstReservedWord"] = 82] = "FirstReservedWord";
+    SyntaxKind[SyntaxKind["LastReservedWord"] = 117] = "LastReservedWord";
+    SyntaxKind[SyntaxKind["FirstKeyword"] = 82] = "FirstKeyword";
+    SyntaxKind[SyntaxKind["LastKeyword"] = 166] = "LastKeyword";
+    SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 118] = "FirstFutureReservedWord";
+    SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 126] = "LastFutureReservedWord";
+    SyntaxKind[SyntaxKind["FirstTypeNode"] = 183] = "FirstTypeNode";
+    SyntaxKind[SyntaxKind["LastTypeNode"] = 206] = "LastTypeNode";
+    SyntaxKind[SyntaxKind["FirstPunctuation"] = 18] = "FirstPunctuation";
+    SyntaxKind[SyntaxKind["LastPunctuation"] = 78] = "LastPunctuation";
+    SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
+    SyntaxKind[SyntaxKind["LastToken"] = 166] = "LastToken";
+    SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
+    SyntaxKind[SyntaxKind["LastLiteralToken"] = 14] = "LastLiteralToken";
+    SyntaxKind[SyntaxKind["FirstTemplateToken"] = 14] = "FirstTemplateToken";
+    SyntaxKind[SyntaxKind["LastTemplateToken"] = 17] = "LastTemplateToken";
+    SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 29] = "FirstBinaryOperator";
+    SyntaxKind[SyntaxKind["LastBinaryOperator"] = 78] = "LastBinaryOperator";
+    SyntaxKind[SyntaxKind["FirstStatement"] = 244] = "FirstStatement";
+    SyntaxKind[SyntaxKind["LastStatement"] = 260] = "LastStatement";
+    SyntaxKind[SyntaxKind["FirstNode"] = 167] = "FirstNode";
+    SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode";
+    SyntaxKind[SyntaxKind["LastJSDocNode"] = 343] = "LastJSDocNode";
+    SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 322] = "FirstJSDocTagNode";
+    SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 343] = "LastJSDocTagNode";
+    SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 127] = "FirstContextualKeyword";
+    SyntaxKind[SyntaxKind["LastContextualKeyword"] = 166] = "LastContextualKeyword";
+    SyntaxKind[SyntaxKind["LastUnaryOperator"] = 54] = "LastUnaryOperator";
+    SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
+    SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken";
+})(SyntaxKind || (SyntaxKind = {}));
+//# sourceMappingURL=syntaxKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.js.map b/node_modules/typescript/dist/enums/syntaxKind.enum.js.map
new file mode 100644
index 000000000..90ebb10cb
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"syntaxKind.enum.js","sourceRoot":"","sources":["../../src/enums/syntaxKind.enum.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,MAAM,CAAN,IAAY,UAmYX;AAnYD,WAAY,UAAU;IAClB,iDAAW,CAAA;IACX,qDAAa,CAAA;IACb,iFAA2B,CAAA;IAC3B,+EAA0B,CAAA;IAC1B,6DAAiB,CAAA;IACjB,mEAAoB,CAAA;IACpB,2EAAwB,CAAA;IACxB,iFAA2B,CAAA;IAC3B,+DAAkB,CAAA;IAClB,6DAAiB,CAAA;IACjB,8DAAkB,CAAA;IAClB,kDAAY,CAAA;IACZ,8EAA0B,CAAA;IAC1B,oFAA6B,CAAA;IAC7B,8FAAkC,CAAA;IAClC,4DAAiB,CAAA;IACjB,gEAAmB,CAAA;IACnB,4DAAiB,CAAA;IACjB,gEAAmB,CAAA;IACnB,kEAAoB,CAAA;IACpB,gEAAmB,CAAA;IACnB,kEAAoB,CAAA;IACpB,oEAAqB,CAAA;IACrB,sEAAsB,CAAA;IACtB,oDAAa,CAAA;IACb,gEAAmB,CAAA;IACnB,gEAAmB,CAAA;IACnB,wDAAe,CAAA;IACf,oEAAqB,CAAA;IACrB,8DAAkB,CAAA;IAClB,wEAAuB,CAAA;IACvB,oEAAqB,CAAA;IACrB,0EAAwB,CAAA;IACxB,gFAA2B,CAAA;IAC3B,sEAAsB,CAAA;IACtB,gFAA2B,CAAA;IAC3B,kFAA4B,CAAA;IAC5B,4FAAiC,CAAA;IACjC,gFAA2B,CAAA;IAC3B,sDAAc,CAAA;IACd,wDAAe,CAAA;IACf,8DAAkB,CAAA;IAClB,8EAA0B,CAAA;IAC1B,wDAAe,CAAA;IACf,4DAAiB,CAAA;IACjB,8DAAkB,CAAA;IAClB,kEAAoB,CAAA;IACpB,8EAA0B,CAAA;IAC1B,0FAAgC,CAAA;IAChC,g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kEAA6B,CAAA;IAC7B,gEAAiC,CAAA;IACjC,kFAAyC,CAAA;IACzC,gFAAyC,CAAA;IACzC,sEAAgC,CAAA;IAChC,qEAA8B,CAAA;IAC9B,4DAA2B,CAAA;IAC3B,2DAA0B,CAAA;IAC1B,mFAA2C,CAAA;IAC3C,iFAAqC,CAAA;IACrC,+DAA6B,CAAA;IAC7B,6DAAyB,CAAA;IACzB,oEAAiC,CAAA;IACjC,kEAAkC,CAAA;IAClC,uDAAoB,CAAA;IACpB,uDAAuB,CAAA;IACvB,qEAAkC,CAAA;IAClC,oEAAgD,CAAA;IAChD,wEAAkD,CAAA;IAClD,sEAAgC,CAAA;IAChC,0EAAmC,CAAA;IACnC,wEAAqC,CAAA;IACrC,iEAAkC,CAAA;IAClC,+DAAiC,CAAA;IACjC,uDAAyB,CAAA;IACzB,iEAAoC,CAAA;IACpC,+DAA8B,CAAA;IAC9B,uEAAmC,CAAA;IACnC,qEAAiC,CAAA;IACjC,iFAAwC,CAAA;IACxC,+EAAoC,CAAA;IACpC,sEAA8B,CAAA;IAC9B,mEAA0C,CAAA;IAC1C,iEAAsC,CAAA;AAC1C,CAAC,EAnYW,UAAU,KAAV,UAAU,QAmYrB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.js b/node_modules/typescript/dist/enums/syntaxKind.js
new file mode 100644
index 000000000..1326dc0cd
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.js
@@ -0,0 +1,391 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/kind_generated.go. DO NOT EDIT.
+export var SyntaxKind;
+(function (SyntaxKind) {
+    SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown";
+    SyntaxKind[SyntaxKind["EndOfFile"] = 1] = "EndOfFile";
+    SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
+    SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia";
+    SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia";
+    SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia";
+    SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia";
+    SyntaxKind[SyntaxKind["NonTextFileMarkerTrivia"] = 7] = "NonTextFileMarkerTrivia";
+    SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral";
+    SyntaxKind[SyntaxKind["BigIntLiteral"] = 9] = "BigIntLiteral";
+    SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral";
+    SyntaxKind[SyntaxKind["JsxText"] = 11] = "JsxText";
+    SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 12] = "JsxTextAllWhiteSpaces";
+    SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 13] = "RegularExpressionLiteral";
+    SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 14] = "NoSubstitutionTemplateLiteral";
+    SyntaxKind[SyntaxKind["TemplateHead"] = 15] = "TemplateHead";
+    SyntaxKind[SyntaxKind["TemplateMiddle"] = 16] = "TemplateMiddle";
+    SyntaxKind[SyntaxKind["TemplateTail"] = 17] = "TemplateTail";
+    SyntaxKind[SyntaxKind["OpenBraceToken"] = 18] = "OpenBraceToken";
+    SyntaxKind[SyntaxKind["CloseBraceToken"] = 19] = "CloseBraceToken";
+    SyntaxKind[SyntaxKind["OpenParenToken"] = 20] = "OpenParenToken";
+    SyntaxKind[SyntaxKind["CloseParenToken"] = 21] = "CloseParenToken";
+    SyntaxKind[SyntaxKind["OpenBracketToken"] = 22] = "OpenBracketToken";
+    SyntaxKind[SyntaxKind["CloseBracketToken"] = 23] = "CloseBracketToken";
+    SyntaxKind[SyntaxKind["DotToken"] = 24] = "DotToken";
+    SyntaxKind[SyntaxKind["DotDotDotToken"] = 25] = "DotDotDotToken";
+    SyntaxKind[SyntaxKind["SemicolonToken"] = 26] = "SemicolonToken";
+    SyntaxKind[SyntaxKind["CommaToken"] = 27] = "CommaToken";
+    SyntaxKind[SyntaxKind["QuestionDotToken"] = 28] = "QuestionDotToken";
+    SyntaxKind[SyntaxKind["LessThanToken"] = 29] = "LessThanToken";
+    SyntaxKind[SyntaxKind["LessThanSlashToken"] = 30] = "LessThanSlashToken";
+    SyntaxKind[SyntaxKind["GreaterThanToken"] = 31] = "GreaterThanToken";
+    SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 32] = "LessThanEqualsToken";
+    SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 33] = "GreaterThanEqualsToken";
+    SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 34] = "EqualsEqualsToken";
+    SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 35] = "ExclamationEqualsToken";
+    SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 36] = "EqualsEqualsEqualsToken";
+    SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 37] = "ExclamationEqualsEqualsToken";
+    SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 38] = "EqualsGreaterThanToken";
+    SyntaxKind[SyntaxKind["PlusToken"] = 39] = "PlusToken";
+    SyntaxKind[SyntaxKind["MinusToken"] = 40] = "MinusToken";
+    SyntaxKind[SyntaxKind["AsteriskToken"] = 41] = "AsteriskToken";
+    SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 42] = "AsteriskAsteriskToken";
+    SyntaxKind[SyntaxKind["SlashToken"] = 43] = "SlashToken";
+    SyntaxKind[SyntaxKind["PercentToken"] = 44] = "PercentToken";
+    SyntaxKind[SyntaxKind["PlusPlusToken"] = 45] = "PlusPlusToken";
+    SyntaxKind[SyntaxKind["MinusMinusToken"] = 46] = "MinusMinusToken";
+    SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 47] = "LessThanLessThanToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 48] = "GreaterThanGreaterThanToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanGreaterThanToken";
+    SyntaxKind[SyntaxKind["AmpersandToken"] = 50] = "AmpersandToken";
+    SyntaxKind[SyntaxKind["BarToken"] = 51] = "BarToken";
+    SyntaxKind[SyntaxKind["CaretToken"] = 52] = "CaretToken";
+    SyntaxKind[SyntaxKind["ExclamationToken"] = 53] = "ExclamationToken";
+    SyntaxKind[SyntaxKind["TildeToken"] = 54] = "TildeToken";
+    SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 55] = "AmpersandAmpersandToken";
+    SyntaxKind[SyntaxKind["BarBarToken"] = 56] = "BarBarToken";
+    SyntaxKind[SyntaxKind["QuestionToken"] = 57] = "QuestionToken";
+    SyntaxKind[SyntaxKind["ColonToken"] = 58] = "ColonToken";
+    SyntaxKind[SyntaxKind["AtToken"] = 59] = "AtToken";
+    SyntaxKind[SyntaxKind["QuestionQuestionToken"] = 60] = "QuestionQuestionToken";
+    SyntaxKind[SyntaxKind["BacktickToken"] = 61] = "BacktickToken";
+    SyntaxKind[SyntaxKind["HashToken"] = 62] = "HashToken";
+    SyntaxKind[SyntaxKind["EqualsToken"] = 63] = "EqualsToken";
+    SyntaxKind[SyntaxKind["PlusEqualsToken"] = 64] = "PlusEqualsToken";
+    SyntaxKind[SyntaxKind["MinusEqualsToken"] = 65] = "MinusEqualsToken";
+    SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 66] = "AsteriskEqualsToken";
+    SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 67] = "AsteriskAsteriskEqualsToken";
+    SyntaxKind[SyntaxKind["SlashEqualsToken"] = 68] = "SlashEqualsToken";
+    SyntaxKind[SyntaxKind["PercentEqualsToken"] = 69] = "PercentEqualsToken";
+    SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 70] = "LessThanLessThanEqualsToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 71] = "GreaterThanGreaterThanEqualsToken";
+    SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanGreaterThanEqualsToken";
+    SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 73] = "AmpersandEqualsToken";
+    SyntaxKind[SyntaxKind["BarEqualsToken"] = 74] = "BarEqualsToken";
+    SyntaxKind[SyntaxKind["BarBarEqualsToken"] = 75] = "BarBarEqualsToken";
+    SyntaxKind[SyntaxKind["AmpersandAmpersandEqualsToken"] = 76] = "AmpersandAmpersandEqualsToken";
+    SyntaxKind[SyntaxKind["QuestionQuestionEqualsToken"] = 77] = "QuestionQuestionEqualsToken";
+    SyntaxKind[SyntaxKind["CaretEqualsToken"] = 78] = "CaretEqualsToken";
+    SyntaxKind[SyntaxKind["Identifier"] = 79] = "Identifier";
+    SyntaxKind[SyntaxKind["PrivateIdentifier"] = 80] = "PrivateIdentifier";
+    SyntaxKind[SyntaxKind["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken";
+    SyntaxKind[SyntaxKind["BreakKeyword"] = 82] = "BreakKeyword";
+    SyntaxKind[SyntaxKind["CaseKeyword"] = 83] = "CaseKeyword";
+    SyntaxKind[SyntaxKind["CatchKeyword"] = 84] = "CatchKeyword";
+    SyntaxKind[SyntaxKind["ClassKeyword"] = 85] = "ClassKeyword";
+    SyntaxKind[SyntaxKind["ConstKeyword"] = 86] = "ConstKeyword";
+    SyntaxKind[SyntaxKind["ContinueKeyword"] = 87] = "ContinueKeyword";
+    SyntaxKind[SyntaxKind["DebuggerKeyword"] = 88] = "DebuggerKeyword";
+    SyntaxKind[SyntaxKind["DefaultKeyword"] = 89] = "DefaultKeyword";
+    SyntaxKind[SyntaxKind["DeleteKeyword"] = 90] = "DeleteKeyword";
+    SyntaxKind[SyntaxKind["DoKeyword"] = 91] = "DoKeyword";
+    SyntaxKind[SyntaxKind["ElseKeyword"] = 92] = "ElseKeyword";
+    SyntaxKind[SyntaxKind["EnumKeyword"] = 93] = "EnumKeyword";
+    SyntaxKind[SyntaxKind["ExportKeyword"] = 94] = "ExportKeyword";
+    SyntaxKind[SyntaxKind["ExtendsKeyword"] = 95] = "ExtendsKeyword";
+    SyntaxKind[SyntaxKind["FalseKeyword"] = 96] = "FalseKeyword";
+    SyntaxKind[SyntaxKind["FinallyKeyword"] = 97] = "FinallyKeyword";
+    SyntaxKind[SyntaxKind["ForKeyword"] = 98] = "ForKeyword";
+    SyntaxKind[SyntaxKind["FunctionKeyword"] = 99] = "FunctionKeyword";
+    SyntaxKind[SyntaxKind["IfKeyword"] = 100] = "IfKeyword";
+    SyntaxKind[SyntaxKind["ImportKeyword"] = 101] = "ImportKeyword";
+    SyntaxKind[SyntaxKind["InKeyword"] = 102] = "InKeyword";
+    SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 103] = "InstanceOfKeyword";
+    SyntaxKind[SyntaxKind["NewKeyword"] = 104] = "NewKeyword";
+    SyntaxKind[SyntaxKind["NullKeyword"] = 105] = "NullKeyword";
+    SyntaxKind[SyntaxKind["ReturnKeyword"] = 106] = "ReturnKeyword";
+    SyntaxKind[SyntaxKind["SuperKeyword"] = 107] = "SuperKeyword";
+    SyntaxKind[SyntaxKind["SwitchKeyword"] = 108] = "SwitchKeyword";
+    SyntaxKind[SyntaxKind["ThisKeyword"] = 109] = "ThisKeyword";
+    SyntaxKind[SyntaxKind["ThrowKeyword"] = 110] = "ThrowKeyword";
+    SyntaxKind[SyntaxKind["TrueKeyword"] = 111] = "TrueKeyword";
+    SyntaxKind[SyntaxKind["TryKeyword"] = 112] = "TryKeyword";
+    SyntaxKind[SyntaxKind["TypeOfKeyword"] = 113] = "TypeOfKeyword";
+    SyntaxKind[SyntaxKind["VarKeyword"] = 114] = "VarKeyword";
+    SyntaxKind[SyntaxKind["VoidKeyword"] = 115] = "VoidKeyword";
+    SyntaxKind[SyntaxKind["WhileKeyword"] = 116] = "WhileKeyword";
+    SyntaxKind[SyntaxKind["WithKeyword"] = 117] = "WithKeyword";
+    SyntaxKind[SyntaxKind["ImplementsKeyword"] = 118] = "ImplementsKeyword";
+    SyntaxKind[SyntaxKind["InterfaceKeyword"] = 119] = "InterfaceKeyword";
+    SyntaxKind[SyntaxKind["LetKeyword"] = 120] = "LetKeyword";
+    SyntaxKind[SyntaxKind["PackageKeyword"] = 121] = "PackageKeyword";
+    SyntaxKind[SyntaxKind["PrivateKeyword"] = 122] = "PrivateKeyword";
+    SyntaxKind[SyntaxKind["ProtectedKeyword"] = 123] = "ProtectedKeyword";
+    SyntaxKind[SyntaxKind["PublicKeyword"] = 124] = "PublicKeyword";
+    SyntaxKind[SyntaxKind["StaticKeyword"] = 125] = "StaticKeyword";
+    SyntaxKind[SyntaxKind["YieldKeyword"] = 126] = "YieldKeyword";
+    SyntaxKind[SyntaxKind["AbstractKeyword"] = 127] = "AbstractKeyword";
+    SyntaxKind[SyntaxKind["AccessorKeyword"] = 128] = "AccessorKeyword";
+    SyntaxKind[SyntaxKind["AsKeyword"] = 129] = "AsKeyword";
+    SyntaxKind[SyntaxKind["AssertsKeyword"] = 130] = "AssertsKeyword";
+    SyntaxKind[SyntaxKind["AssertKeyword"] = 131] = "AssertKeyword";
+    SyntaxKind[SyntaxKind["AnyKeyword"] = 132] = "AnyKeyword";
+    SyntaxKind[SyntaxKind["AsyncKeyword"] = 133] = "AsyncKeyword";
+    SyntaxKind[SyntaxKind["AwaitKeyword"] = 134] = "AwaitKeyword";
+    SyntaxKind[SyntaxKind["BooleanKeyword"] = 135] = "BooleanKeyword";
+    SyntaxKind[SyntaxKind["ConstructorKeyword"] = 136] = "ConstructorKeyword";
+    SyntaxKind[SyntaxKind["DeclareKeyword"] = 137] = "DeclareKeyword";
+    SyntaxKind[SyntaxKind["GetKeyword"] = 138] = "GetKeyword";
+    SyntaxKind[SyntaxKind["ImmediateKeyword"] = 139] = "ImmediateKeyword";
+    SyntaxKind[SyntaxKind["InferKeyword"] = 140] = "InferKeyword";
+    SyntaxKind[SyntaxKind["IntrinsicKeyword"] = 141] = "IntrinsicKeyword";
+    SyntaxKind[SyntaxKind["IsKeyword"] = 142] = "IsKeyword";
+    SyntaxKind[SyntaxKind["KeyOfKeyword"] = 143] = "KeyOfKeyword";
+    SyntaxKind[SyntaxKind["ModuleKeyword"] = 144] = "ModuleKeyword";
+    SyntaxKind[SyntaxKind["NamespaceKeyword"] = 145] = "NamespaceKeyword";
+    SyntaxKind[SyntaxKind["NeverKeyword"] = 146] = "NeverKeyword";
+    SyntaxKind[SyntaxKind["OutKeyword"] = 147] = "OutKeyword";
+    SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 148] = "ReadonlyKeyword";
+    SyntaxKind[SyntaxKind["RequireKeyword"] = 149] = "RequireKeyword";
+    SyntaxKind[SyntaxKind["NumberKeyword"] = 150] = "NumberKeyword";
+    SyntaxKind[SyntaxKind["ObjectKeyword"] = 151] = "ObjectKeyword";
+    SyntaxKind[SyntaxKind["SatisfiesKeyword"] = 152] = "SatisfiesKeyword";
+    SyntaxKind[SyntaxKind["SetKeyword"] = 153] = "SetKeyword";
+    SyntaxKind[SyntaxKind["StringKeyword"] = 154] = "StringKeyword";
+    SyntaxKind[SyntaxKind["SymbolKeyword"] = 155] = "SymbolKeyword";
+    SyntaxKind[SyntaxKind["TypeKeyword"] = 156] = "TypeKeyword";
+    SyntaxKind[SyntaxKind["UndefinedKeyword"] = 157] = "UndefinedKeyword";
+    SyntaxKind[SyntaxKind["UniqueKeyword"] = 158] = "UniqueKeyword";
+    SyntaxKind[SyntaxKind["UnknownKeyword"] = 159] = "UnknownKeyword";
+    SyntaxKind[SyntaxKind["UsingKeyword"] = 160] = "UsingKeyword";
+    SyntaxKind[SyntaxKind["FromKeyword"] = 161] = "FromKeyword";
+    SyntaxKind[SyntaxKind["GlobalKeyword"] = 162] = "GlobalKeyword";
+    SyntaxKind[SyntaxKind["BigIntKeyword"] = 163] = "BigIntKeyword";
+    SyntaxKind[SyntaxKind["OverrideKeyword"] = 164] = "OverrideKeyword";
+    SyntaxKind[SyntaxKind["OfKeyword"] = 165] = "OfKeyword";
+    SyntaxKind[SyntaxKind["DeferKeyword"] = 166] = "DeferKeyword";
+    SyntaxKind[SyntaxKind["QualifiedName"] = 167] = "QualifiedName";
+    SyntaxKind[SyntaxKind["ComputedPropertyName"] = 168] = "ComputedPropertyName";
+    SyntaxKind[SyntaxKind["TypeParameter"] = 169] = "TypeParameter";
+    SyntaxKind[SyntaxKind["Parameter"] = 170] = "Parameter";
+    SyntaxKind[SyntaxKind["Decorator"] = 171] = "Decorator";
+    SyntaxKind[SyntaxKind["PropertySignature"] = 172] = "PropertySignature";
+    SyntaxKind[SyntaxKind["PropertyDeclaration"] = 173] = "PropertyDeclaration";
+    SyntaxKind[SyntaxKind["MethodSignature"] = 174] = "MethodSignature";
+    SyntaxKind[SyntaxKind["MethodDeclaration"] = 175] = "MethodDeclaration";
+    SyntaxKind[SyntaxKind["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration";
+    SyntaxKind[SyntaxKind["Constructor"] = 177] = "Constructor";
+    SyntaxKind[SyntaxKind["GetAccessor"] = 178] = "GetAccessor";
+    SyntaxKind[SyntaxKind["SetAccessor"] = 179] = "SetAccessor";
+    SyntaxKind[SyntaxKind["CallSignature"] = 180] = "CallSignature";
+    SyntaxKind[SyntaxKind["ConstructSignature"] = 181] = "ConstructSignature";
+    SyntaxKind[SyntaxKind["IndexSignature"] = 182] = "IndexSignature";
+    SyntaxKind[SyntaxKind["TypePredicate"] = 183] = "TypePredicate";
+    SyntaxKind[SyntaxKind["TypeReference"] = 184] = "TypeReference";
+    SyntaxKind[SyntaxKind["FunctionType"] = 185] = "FunctionType";
+    SyntaxKind[SyntaxKind["ConstructorType"] = 186] = "ConstructorType";
+    SyntaxKind[SyntaxKind["TypeQuery"] = 187] = "TypeQuery";
+    SyntaxKind[SyntaxKind["TypeLiteral"] = 188] = "TypeLiteral";
+    SyntaxKind[SyntaxKind["ArrayType"] = 189] = "ArrayType";
+    SyntaxKind[SyntaxKind["TupleType"] = 190] = "TupleType";
+    SyntaxKind[SyntaxKind["OptionalType"] = 191] = "OptionalType";
+    SyntaxKind[SyntaxKind["RestType"] = 192] = "RestType";
+    SyntaxKind[SyntaxKind["UnionType"] = 193] = "UnionType";
+    SyntaxKind[SyntaxKind["IntersectionType"] = 194] = "IntersectionType";
+    SyntaxKind[SyntaxKind["ConditionalType"] = 195] = "ConditionalType";
+    SyntaxKind[SyntaxKind["InferType"] = 196] = "InferType";
+    SyntaxKind[SyntaxKind["ParenthesizedType"] = 197] = "ParenthesizedType";
+    SyntaxKind[SyntaxKind["ThisType"] = 198] = "ThisType";
+    SyntaxKind[SyntaxKind["TypeOperator"] = 199] = "TypeOperator";
+    SyntaxKind[SyntaxKind["IndexedAccessType"] = 200] = "IndexedAccessType";
+    SyntaxKind[SyntaxKind["MappedType"] = 201] = "MappedType";
+    SyntaxKind[SyntaxKind["LiteralType"] = 202] = "LiteralType";
+    SyntaxKind[SyntaxKind["NamedTupleMember"] = 203] = "NamedTupleMember";
+    SyntaxKind[SyntaxKind["TemplateLiteralType"] = 204] = "TemplateLiteralType";
+    SyntaxKind[SyntaxKind["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan";
+    SyntaxKind[SyntaxKind["ImportType"] = 206] = "ImportType";
+    SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 207] = "ObjectBindingPattern";
+    SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 208] = "ArrayBindingPattern";
+    SyntaxKind[SyntaxKind["BindingElement"] = 209] = "BindingElement";
+    SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression";
+    SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression";
+    SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 212] = "PropertyAccessExpression";
+    SyntaxKind[SyntaxKind["ElementAccessExpression"] = 213] = "ElementAccessExpression";
+    SyntaxKind[SyntaxKind["CallExpression"] = 214] = "CallExpression";
+    SyntaxKind[SyntaxKind["NewExpression"] = 215] = "NewExpression";
+    SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression";
+    SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 217] = "TypeAssertionExpression";
+    SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 218] = "ParenthesizedExpression";
+    SyntaxKind[SyntaxKind["FunctionExpression"] = 219] = "FunctionExpression";
+    SyntaxKind[SyntaxKind["ArrowFunction"] = 220] = "ArrowFunction";
+    SyntaxKind[SyntaxKind["DeleteExpression"] = 221] = "DeleteExpression";
+    SyntaxKind[SyntaxKind["TypeOfExpression"] = 222] = "TypeOfExpression";
+    SyntaxKind[SyntaxKind["VoidExpression"] = 223] = "VoidExpression";
+    SyntaxKind[SyntaxKind["AwaitExpression"] = 224] = "AwaitExpression";
+    SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression";
+    SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression";
+    SyntaxKind[SyntaxKind["BinaryExpression"] = 227] = "BinaryExpression";
+    SyntaxKind[SyntaxKind["ConditionalExpression"] = 228] = "ConditionalExpression";
+    SyntaxKind[SyntaxKind["TemplateExpression"] = 229] = "TemplateExpression";
+    SyntaxKind[SyntaxKind["YieldExpression"] = 230] = "YieldExpression";
+    SyntaxKind[SyntaxKind["SpreadElement"] = 231] = "SpreadElement";
+    SyntaxKind[SyntaxKind["ClassExpression"] = 232] = "ClassExpression";
+    SyntaxKind[SyntaxKind["OmittedExpression"] = 233] = "OmittedExpression";
+    SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments";
+    SyntaxKind[SyntaxKind["AsExpression"] = 235] = "AsExpression";
+    SyntaxKind[SyntaxKind["NonNullExpression"] = 236] = "NonNullExpression";
+    SyntaxKind[SyntaxKind["MetaProperty"] = 237] = "MetaProperty";
+    SyntaxKind[SyntaxKind["SyntheticExpression"] = 238] = "SyntheticExpression";
+    SyntaxKind[SyntaxKind["SatisfiesExpression"] = 239] = "SatisfiesExpression";
+    SyntaxKind[SyntaxKind["TemplateSpan"] = 240] = "TemplateSpan";
+    SyntaxKind[SyntaxKind["SemicolonClassElement"] = 241] = "SemicolonClassElement";
+    SyntaxKind[SyntaxKind["Block"] = 242] = "Block";
+    SyntaxKind[SyntaxKind["EmptyStatement"] = 243] = "EmptyStatement";
+    SyntaxKind[SyntaxKind["VariableStatement"] = 244] = "VariableStatement";
+    SyntaxKind[SyntaxKind["ExpressionStatement"] = 245] = "ExpressionStatement";
+    SyntaxKind[SyntaxKind["IfStatement"] = 246] = "IfStatement";
+    SyntaxKind[SyntaxKind["DoStatement"] = 247] = "DoStatement";
+    SyntaxKind[SyntaxKind["WhileStatement"] = 248] = "WhileStatement";
+    SyntaxKind[SyntaxKind["ForStatement"] = 249] = "ForStatement";
+    SyntaxKind[SyntaxKind["ForInStatement"] = 250] = "ForInStatement";
+    SyntaxKind[SyntaxKind["ForOfStatement"] = 251] = "ForOfStatement";
+    SyntaxKind[SyntaxKind["ContinueStatement"] = 252] = "ContinueStatement";
+    SyntaxKind[SyntaxKind["BreakStatement"] = 253] = "BreakStatement";
+    SyntaxKind[SyntaxKind["ReturnStatement"] = 254] = "ReturnStatement";
+    SyntaxKind[SyntaxKind["WithStatement"] = 255] = "WithStatement";
+    SyntaxKind[SyntaxKind["SwitchStatement"] = 256] = "SwitchStatement";
+    SyntaxKind[SyntaxKind["LabeledStatement"] = 257] = "LabeledStatement";
+    SyntaxKind[SyntaxKind["ThrowStatement"] = 258] = "ThrowStatement";
+    SyntaxKind[SyntaxKind["TryStatement"] = 259] = "TryStatement";
+    SyntaxKind[SyntaxKind["DebuggerStatement"] = 260] = "DebuggerStatement";
+    SyntaxKind[SyntaxKind["VariableDeclaration"] = 261] = "VariableDeclaration";
+    SyntaxKind[SyntaxKind["VariableDeclarationList"] = 262] = "VariableDeclarationList";
+    SyntaxKind[SyntaxKind["FunctionDeclaration"] = 263] = "FunctionDeclaration";
+    SyntaxKind[SyntaxKind["ClassDeclaration"] = 264] = "ClassDeclaration";
+    SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 265] = "InterfaceDeclaration";
+    SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration";
+    SyntaxKind[SyntaxKind["EnumDeclaration"] = 267] = "EnumDeclaration";
+    SyntaxKind[SyntaxKind["ModuleDeclaration"] = 268] = "ModuleDeclaration";
+    SyntaxKind[SyntaxKind["ModuleBlock"] = 269] = "ModuleBlock";
+    SyntaxKind[SyntaxKind["CaseBlock"] = 270] = "CaseBlock";
+    SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration";
+    SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration";
+    SyntaxKind[SyntaxKind["ImportDeclaration"] = 273] = "ImportDeclaration";
+    SyntaxKind[SyntaxKind["ImportClause"] = 274] = "ImportClause";
+    SyntaxKind[SyntaxKind["NamespaceImport"] = 275] = "NamespaceImport";
+    SyntaxKind[SyntaxKind["NamedImports"] = 276] = "NamedImports";
+    SyntaxKind[SyntaxKind["ImportSpecifier"] = 277] = "ImportSpecifier";
+    SyntaxKind[SyntaxKind["ExportAssignment"] = 278] = "ExportAssignment";
+    SyntaxKind[SyntaxKind["ExportDeclaration"] = 279] = "ExportDeclaration";
+    SyntaxKind[SyntaxKind["NamedExports"] = 280] = "NamedExports";
+    SyntaxKind[SyntaxKind["NamespaceExport"] = 281] = "NamespaceExport";
+    SyntaxKind[SyntaxKind["ExportSpecifier"] = 282] = "ExportSpecifier";
+    SyntaxKind[SyntaxKind["MissingDeclaration"] = 283] = "MissingDeclaration";
+    SyntaxKind[SyntaxKind["ExternalModuleReference"] = 284] = "ExternalModuleReference";
+    SyntaxKind[SyntaxKind["JsxElement"] = 285] = "JsxElement";
+    SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement";
+    SyntaxKind[SyntaxKind["JsxOpeningElement"] = 287] = "JsxOpeningElement";
+    SyntaxKind[SyntaxKind["JsxClosingElement"] = 288] = "JsxClosingElement";
+    SyntaxKind[SyntaxKind["JsxFragment"] = 289] = "JsxFragment";
+    SyntaxKind[SyntaxKind["JsxOpeningFragment"] = 290] = "JsxOpeningFragment";
+    SyntaxKind[SyntaxKind["JsxClosingFragment"] = 291] = "JsxClosingFragment";
+    SyntaxKind[SyntaxKind["JsxAttribute"] = 292] = "JsxAttribute";
+    SyntaxKind[SyntaxKind["JsxAttributes"] = 293] = "JsxAttributes";
+    SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute";
+    SyntaxKind[SyntaxKind["JsxExpression"] = 295] = "JsxExpression";
+    SyntaxKind[SyntaxKind["JsxNamespacedName"] = 296] = "JsxNamespacedName";
+    SyntaxKind[SyntaxKind["CaseClause"] = 297] = "CaseClause";
+    SyntaxKind[SyntaxKind["DefaultClause"] = 298] = "DefaultClause";
+    SyntaxKind[SyntaxKind["HeritageClause"] = 299] = "HeritageClause";
+    SyntaxKind[SyntaxKind["CatchClause"] = 300] = "CatchClause";
+    SyntaxKind[SyntaxKind["ImportAttributes"] = 301] = "ImportAttributes";
+    SyntaxKind[SyntaxKind["ImportAttribute"] = 302] = "ImportAttribute";
+    SyntaxKind[SyntaxKind["PropertyAssignment"] = 303] = "PropertyAssignment";
+    SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
+    SyntaxKind[SyntaxKind["SpreadAssignment"] = 305] = "SpreadAssignment";
+    SyntaxKind[SyntaxKind["EnumMember"] = 306] = "EnumMember";
+    SyntaxKind[SyntaxKind["SourceFile"] = 307] = "SourceFile";
+    SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression";
+    SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference";
+    SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType";
+    SyntaxKind[SyntaxKind["JSDocNullableType"] = 311] = "JSDocNullableType";
+    SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 312] = "JSDocNonNullableType";
+    SyntaxKind[SyntaxKind["JSDocOptionalType"] = 313] = "JSDocOptionalType";
+    SyntaxKind[SyntaxKind["JSDocVariadicType"] = 314] = "JSDocVariadicType";
+    SyntaxKind[SyntaxKind["JSDoc"] = 315] = "JSDoc";
+    SyntaxKind[SyntaxKind["JSDocText"] = 316] = "JSDocText";
+    SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 317] = "JSDocTypeLiteral";
+    SyntaxKind[SyntaxKind["JSDocSignature"] = 318] = "JSDocSignature";
+    SyntaxKind[SyntaxKind["JSDocLink"] = 319] = "JSDocLink";
+    SyntaxKind[SyntaxKind["JSDocLinkCode"] = 320] = "JSDocLinkCode";
+    SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 321] = "JSDocLinkPlain";
+    SyntaxKind[SyntaxKind["JSDocUnknownTag"] = 322] = "JSDocUnknownTag";
+    SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 323] = "JSDocAugmentsTag";
+    SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 324] = "JSDocImplementsTag";
+    SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 325] = "JSDocDeprecatedTag";
+    SyntaxKind[SyntaxKind["JSDocPublicTag"] = 326] = "JSDocPublicTag";
+    SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 327] = "JSDocPrivateTag";
+    SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 328] = "JSDocProtectedTag";
+    SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 329] = "JSDocReadonlyTag";
+    SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 330] = "JSDocOverrideTag";
+    SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 331] = "JSDocCallbackTag";
+    SyntaxKind[SyntaxKind["JSDocOverloadTag"] = 332] = "JSDocOverloadTag";
+    SyntaxKind[SyntaxKind["JSDocParameterTag"] = 333] = "JSDocParameterTag";
+    SyntaxKind[SyntaxKind["JSDocReturnTag"] = 334] = "JSDocReturnTag";
+    SyntaxKind[SyntaxKind["JSDocThisTag"] = 335] = "JSDocThisTag";
+    SyntaxKind[SyntaxKind["JSDocTypeTag"] = 336] = "JSDocTypeTag";
+    SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 337] = "JSDocTemplateTag";
+    SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 338] = "JSDocTypedefTag";
+    SyntaxKind[SyntaxKind["JSDocSeeTag"] = 339] = "JSDocSeeTag";
+    SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 340] = "JSDocPropertyTag";
+    SyntaxKind[SyntaxKind["JSDocThrowsTag"] = 341] = "JSDocThrowsTag";
+    SyntaxKind[SyntaxKind["JSDocSatisfiesTag"] = 342] = "JSDocSatisfiesTag";
+    SyntaxKind[SyntaxKind["JSDocImportTag"] = 343] = "JSDocImportTag";
+    SyntaxKind[SyntaxKind["SyntaxList"] = 344] = "SyntaxList";
+    SyntaxKind[SyntaxKind["JSTypeAliasDeclaration"] = 345] = "JSTypeAliasDeclaration";
+    SyntaxKind[SyntaxKind["JSImportDeclaration"] = 346] = "JSImportDeclaration";
+    SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement";
+    SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression";
+    SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 349] = "SyntheticReferenceExpression";
+    SyntaxKind[SyntaxKind["NotEmittedTypeElement"] = 350] = "NotEmittedTypeElement";
+    SyntaxKind[SyntaxKind["Count"] = 351] = "Count";
+    SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment";
+    SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment";
+    SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 64] = "FirstCompoundAssignment";
+    SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 78] = "LastCompoundAssignment";
+    SyntaxKind[SyntaxKind["FirstReservedWord"] = 82] = "FirstReservedWord";
+    SyntaxKind[SyntaxKind["LastReservedWord"] = 117] = "LastReservedWord";
+    SyntaxKind[SyntaxKind["FirstKeyword"] = 82] = "FirstKeyword";
+    SyntaxKind[SyntaxKind["LastKeyword"] = 166] = "LastKeyword";
+    SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 118] = "FirstFutureReservedWord";
+    SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 126] = "LastFutureReservedWord";
+    SyntaxKind[SyntaxKind["FirstTypeNode"] = 183] = "FirstTypeNode";
+    SyntaxKind[SyntaxKind["LastTypeNode"] = 206] = "LastTypeNode";
+    SyntaxKind[SyntaxKind["FirstPunctuation"] = 18] = "FirstPunctuation";
+    SyntaxKind[SyntaxKind["LastPunctuation"] = 78] = "LastPunctuation";
+    SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
+    SyntaxKind[SyntaxKind["LastToken"] = 166] = "LastToken";
+    SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
+    SyntaxKind[SyntaxKind["LastLiteralToken"] = 14] = "LastLiteralToken";
+    SyntaxKind[SyntaxKind["FirstTemplateToken"] = 14] = "FirstTemplateToken";
+    SyntaxKind[SyntaxKind["LastTemplateToken"] = 17] = "LastTemplateToken";
+    SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 29] = "FirstBinaryOperator";
+    SyntaxKind[SyntaxKind["LastBinaryOperator"] = 78] = "LastBinaryOperator";
+    SyntaxKind[SyntaxKind["FirstStatement"] = 244] = "FirstStatement";
+    SyntaxKind[SyntaxKind["LastStatement"] = 260] = "LastStatement";
+    SyntaxKind[SyntaxKind["FirstNode"] = 167] = "FirstNode";
+    SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode";
+    SyntaxKind[SyntaxKind["LastJSDocNode"] = 343] = "LastJSDocNode";
+    SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 322] = "FirstJSDocTagNode";
+    SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 343] = "LastJSDocTagNode";
+    SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 127] = "FirstContextualKeyword";
+    SyntaxKind[SyntaxKind["LastContextualKeyword"] = 166] = "LastContextualKeyword";
+    SyntaxKind[SyntaxKind["LastUnaryOperator"] = 54] = "LastUnaryOperator";
+    SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
+    SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken";
+})(SyntaxKind || (SyntaxKind = {}));
+//# sourceMappingURL=syntaxKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/syntaxKind.js.map b/node_modules/typescript/dist/enums/syntaxKind.js.map
new file mode 100644
index 000000000..2494251ab
--- /dev/null
+++ b/node_modules/typescript/dist/enums/syntaxKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"syntaxKind.js","sourceRoot":"","sources":["../../src/enums/syntaxKind.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACtD,UAAU,CAAC,UAAU,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IAClF,UAAU,CAAC,UAAU,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,GAAG,wBAAwB,CAAC;IAChF,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAA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AuB,CAAC;IAChF,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,GAAG,mBAAmB,CAAC;IACvE,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC;IACpE,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,iBAAiB,CAAC;AACtE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.d.ts b/node_modules/typescript/dist/enums/tokenFlags.d.ts
new file mode 100644
index 000000000..30e711ba8
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var TokenFlags: any;
+//# sourceMappingURL=tokenFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.d.ts.map b/node_modules/typescript/dist/enums/tokenFlags.d.ts.map
new file mode 100644
index 000000000..ca891add9
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"tokenFlags.d.ts","sourceRoot":"","sources":["../../src/enums/tokenFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts
new file mode 100644
index 000000000..66c1950b0
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts
@@ -0,0 +1,30 @@
+export declare enum TokenFlags {
+    None = 0,
+    PrecedingLineBreak = 1,
+    PrecedingJSDocComment = 2,
+    Unterminated = 4,
+    ExtendedUnicodeEscape = 8,
+    Scientific = 16,
+    Octal = 32,
+    HexSpecifier = 64,
+    BinarySpecifier = 128,
+    OctalSpecifier = 256,
+    ContainsSeparator = 512,
+    UnicodeEscape = 1024,
+    ContainsInvalidEscape = 2048,
+    HexEscape = 4096,
+    ContainsLeadingZero = 8192,
+    ContainsInvalidSeparator = 16384,
+    PrecedingJSDocLeadingAsterisks = 32768,
+    SingleQuote = 65536,
+    PrecedingJSDocWithDeprecated = 131072,
+    PrecedingJSDocWithSeeOrLink = 262144,
+    BinaryOrOctalSpecifier = 384,
+    WithSpecifier = 448,
+    StringLiteralFlags = 72716,
+    NumericLiteralFlags = 25584,
+    TemplateLiteralLikeFlags = 7180,
+    RegularExpressionLiteralFlags = 4,
+    IsInvalid = 26656
+}
+//# sourceMappingURL=tokenFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map
new file mode 100644
index 000000000..9a4fed2c3
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"tokenFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/tokenFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,IAAI;IACR,kBAAkB,IAAS;IAC3B,qBAAqB,IAAS;IAC9B,YAAY,IAAS;IACrB,qBAAqB,IAAS;IAC9B,UAAU,KAAS;IACnB,KAAK,KAAS;IACd,YAAY,KAAS;IACrB,eAAe,MAAS;IACxB,cAAc,MAAS;IACvB,iBAAiB,MAAS;IAC1B,aAAa,OAAU;IACvB,qBAAqB,OAAU;IAC/B,SAAS,OAAU;IACnB,mBAAmB,OAAU;IAC7B,wBAAwB,QAAU;IAClC,8BAA8B,QAAU;IACxC,WAAW,QAAU;IACrB,4BAA4B,SAAU;IACtC,2BAA2B,SAAU;IACrC,sBAAsB,MAAmC;IACzD,aAAa,MAAwC;IACrD,kBAAkB,QAAyG;IAC3H,mBAAmB,QAA0G;IAC7H,wBAAwB,OAA2F;IACnH,6BAA6B,IAAe;IAC5C,SAAS,QAAiF;CAC7F"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.js b/node_modules/typescript/dist/enums/tokenFlags.enum.js
new file mode 100644
index 000000000..21874cf82
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.enum.js
@@ -0,0 +1,32 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/tokenflags.go. DO NOT EDIT.
+export var TokenFlags;
+(function (TokenFlags) {
+    TokenFlags[TokenFlags["None"] = 0] = "None";
+    TokenFlags[TokenFlags["PrecedingLineBreak"] = 1] = "PrecedingLineBreak";
+    TokenFlags[TokenFlags["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment";
+    TokenFlags[TokenFlags["Unterminated"] = 4] = "Unterminated";
+    TokenFlags[TokenFlags["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape";
+    TokenFlags[TokenFlags["Scientific"] = 16] = "Scientific";
+    TokenFlags[TokenFlags["Octal"] = 32] = "Octal";
+    TokenFlags[TokenFlags["HexSpecifier"] = 64] = "HexSpecifier";
+    TokenFlags[TokenFlags["BinarySpecifier"] = 128] = "BinarySpecifier";
+    TokenFlags[TokenFlags["OctalSpecifier"] = 256] = "OctalSpecifier";
+    TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator";
+    TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape";
+    TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape";
+    TokenFlags[TokenFlags["HexEscape"] = 4096] = "HexEscape";
+    TokenFlags[TokenFlags["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero";
+    TokenFlags[TokenFlags["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator";
+    TokenFlags[TokenFlags["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks";
+    TokenFlags[TokenFlags["SingleQuote"] = 65536] = "SingleQuote";
+    TokenFlags[TokenFlags["PrecedingJSDocWithDeprecated"] = 131072] = "PrecedingJSDocWithDeprecated";
+    TokenFlags[TokenFlags["PrecedingJSDocWithSeeOrLink"] = 262144] = "PrecedingJSDocWithSeeOrLink";
+    TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier";
+    TokenFlags[TokenFlags["WithSpecifier"] = 448] = "WithSpecifier";
+    TokenFlags[TokenFlags["StringLiteralFlags"] = 72716] = "StringLiteralFlags";
+    TokenFlags[TokenFlags["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags";
+    TokenFlags[TokenFlags["TemplateLiteralLikeFlags"] = 7180] = "TemplateLiteralLikeFlags";
+    TokenFlags[TokenFlags["RegularExpressionLiteralFlags"] = 4] = "RegularExpressionLiteralFlags";
+    TokenFlags[TokenFlags["IsInvalid"] = 26656] = "IsInvalid";
+})(TokenFlags || (TokenFlags = {}));
+//# sourceMappingURL=tokenFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.js.map b/node_modules/typescript/dist/enums/tokenFlags.enum.js.map
new file mode 100644
index 000000000..782e208a2
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"tokenFlags.enum.js","sourceRoot":"","sources":["../../src/enums/tokenFlags.enum.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,MAAM,CAAN,IAAY,UA4BX;AA5BD,WAAY,UAAU;IAClB,2CAAQ,CAAA;IACR,uEAA2B,CAAA;IAC3B,6EAA8B,CAAA;IAC9B,2DAAqB,CAAA;IACrB,6EAA8B,CAAA;IAC9B,wDAAmB,CAAA;IACnB,8CAAc,CAAA;IACd,4DAAqB,CAAA;IACrB,mEAAwB,CAAA;IACxB,iEAAuB,CAAA;IACvB,uEAA0B,CAAA;IAC1B,gEAAuB,CAAA;IACvB,gFAA+B,CAAA;IAC/B,wDAAmB,CAAA;IACnB,4EAA6B,CAAA;IAC7B,uFAAkC,CAAA;IAClC,mGAAwC,CAAA;IACxC,6DAAqB,CAAA;IACrB,gGAAsC,CAAA;IACtC,8FAAqC,CAAA;IACrC,iFAAyD,CAAA;IACzD,+DAAqD,CAAA;IACrD,2EAA2H,CAAA;IAC3H,6EAA6H,CAAA;IAC7H,sFAAmH,CAAA;IACnH,6FAA4C,CAAA;IAC5C,yDAA0F,CAAA;AAC9F,CAAC,EA5BW,UAAU,KAAV,UAAU,QA4BrB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.js b/node_modules/typescript/dist/enums/tokenFlags.js
new file mode 100644
index 000000000..1cbe9ff25
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.js
@@ -0,0 +1,32 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/ast/tokenflags.go. DO NOT EDIT.
+export var TokenFlags;
+(function (TokenFlags) {
+    TokenFlags[TokenFlags["None"] = 0] = "None";
+    TokenFlags[TokenFlags["PrecedingLineBreak"] = 1] = "PrecedingLineBreak";
+    TokenFlags[TokenFlags["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment";
+    TokenFlags[TokenFlags["Unterminated"] = 4] = "Unterminated";
+    TokenFlags[TokenFlags["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape";
+    TokenFlags[TokenFlags["Scientific"] = 16] = "Scientific";
+    TokenFlags[TokenFlags["Octal"] = 32] = "Octal";
+    TokenFlags[TokenFlags["HexSpecifier"] = 64] = "HexSpecifier";
+    TokenFlags[TokenFlags["BinarySpecifier"] = 128] = "BinarySpecifier";
+    TokenFlags[TokenFlags["OctalSpecifier"] = 256] = "OctalSpecifier";
+    TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator";
+    TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape";
+    TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape";
+    TokenFlags[TokenFlags["HexEscape"] = 4096] = "HexEscape";
+    TokenFlags[TokenFlags["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero";
+    TokenFlags[TokenFlags["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator";
+    TokenFlags[TokenFlags["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks";
+    TokenFlags[TokenFlags["SingleQuote"] = 65536] = "SingleQuote";
+    TokenFlags[TokenFlags["PrecedingJSDocWithDeprecated"] = 131072] = "PrecedingJSDocWithDeprecated";
+    TokenFlags[TokenFlags["PrecedingJSDocWithSeeOrLink"] = 262144] = "PrecedingJSDocWithSeeOrLink";
+    TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier";
+    TokenFlags[TokenFlags["WithSpecifier"] = 448] = "WithSpecifier";
+    TokenFlags[TokenFlags["StringLiteralFlags"] = 72716] = "StringLiteralFlags";
+    TokenFlags[TokenFlags["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags";
+    TokenFlags[TokenFlags["TemplateLiteralLikeFlags"] = 7180] = "TemplateLiteralLikeFlags";
+    TokenFlags[TokenFlags["RegularExpressionLiteralFlags"] = 4] = "RegularExpressionLiteralFlags";
+    TokenFlags[TokenFlags["IsInvalid"] = 26656] = "IsInvalid";
+})(TokenFlags || (TokenFlags = {}));
+//# sourceMappingURL=tokenFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/tokenFlags.js.map b/node_modules/typescript/dist/enums/tokenFlags.js.map
new file mode 100644
index 000000000..764756510
--- /dev/null
+++ b/node_modules/typescript/dist/enums/tokenFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"tokenFlags.js","sourceRoot":"","sources":["../../src/enums/tokenFlags.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,MAAM,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G,KAAK,CAAC,GAAG,0BAA0B,CAAC;IACxF,UAAU,CAAC,UAAU,CAAC,gCAAgC,CAAC,GAAG,KAAK,CAAC,GAAG,gCAAgC,CAAC;IACpG,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC;IAC9D,UAAU,CAAC,UAAU,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAC,GAAG,8BAA8B,CAAC;IACjG,UAAU,CAAC,UAAU,CAAC,6BAA6B,CAAC,GAAG,MAAM,CAAC,GAAG,6BAA6B,CAAC;IAC/F,UAAU,CAAC,UAAU,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAC,GAAG,wBAAwB,CAAC;IAClF,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,GAAG,eAAe,CAAC;IAChE,UAAU,CAAC,UAAU,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAC5E,UAAU,CAAC,UAAU,CAAC,qBAAqB,CAAC,GAAG,KAAK,CAAC,GAAG,qBAAqB,CAAC;IAC9E,UAAU,CAAC,UAAU,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC,GAAG,0BAA0B,CAAC;IACvF,UAAU,CAAC,UAAU,CAAC,+BAA+B,CAAC,GAAG,CAAC,CAAC,GAAG,+BAA+B,CAAC;IAC9F,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC;AAC9D,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.d.ts b/node_modules/typescript/dist/enums/typeFlags.d.ts
new file mode 100644
index 000000000..c1d60756a
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.d.ts
@@ -0,0 +1,2 @@
+export declare var TypeFlags: any;
+//# sourceMappingURL=typeFlags.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.d.ts.map b/node_modules/typescript/dist/enums/typeFlags.d.ts.map
new file mode 100644
index 000000000..670f31da1
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"typeFlags.d.ts","sourceRoot":"","sources":["../../src/enums/typeFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.d.ts b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts
new file mode 100644
index 000000000..79cbd0600
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts
@@ -0,0 +1,76 @@
+export declare enum TypeFlags {
+    None = 0,
+    Any = 1,
+    Unknown = 2,
+    Undefined = 4,
+    Null = 8,
+    Void = 16,
+    String = 32,
+    Number = 64,
+    BigInt = 128,
+    Boolean = 256,
+    ESSymbol = 512,
+    StringLiteral = 1024,
+    NumberLiteral = 2048,
+    BigIntLiteral = 4096,
+    BooleanLiteral = 8192,
+    UniqueESSymbol = 16384,
+    EnumLiteral = 32768,
+    Enum = 65536,
+    NonPrimitive = 131072,
+    Never = 262144,
+    TypeParameter = 524288,
+    Object = 1048576,
+    Index = 2097152,
+    TemplateLiteral = 4194304,
+    StringMapping = 8388608,
+    Substitution = 16777216,
+    IndexedAccess = 33554432,
+    Conditional = 67108864,
+    Union = 134217728,
+    Intersection = 268435456,
+    Reserved1 = 536870912,
+    Reserved2 = 1073741824,
+    Reserved3 = -2147483648,
+    AnyOrUnknown = 3,
+    Nullable = 12,
+    Literal = 15360,
+    Unit = 97292,
+    Freshable = 80896,
+    StringOrNumberLiteral = 3072,
+    StringOrNumberLiteralOrUnique = 19456,
+    DefinitelyFalsy = 15388,
+    PossiblyFalsy = 15868,
+    Intrinsic = 393983,
+    StringLike = 12583968,
+    NumberLike = 67648,
+    BigIntLike = 4224,
+    BooleanLike = 8448,
+    EnumLike = 98304,
+    ESSymbolLike = 16896,
+    VoidLike = 20,
+    Primitive = 12713980,
+    DefinitelyNonNullable = 13893600,
+    DisjointDomains = 12812284,
+    UnionOrIntersection = 402653184,
+    StructuredType = 403701760,
+    TypeVariable = 34078720,
+    InstantiableNonPrimitive = 117964800,
+    InstantiablePrimitive = 14680064,
+    Instantiable = 132644864,
+    StructuredOrInstantiable = 536346624,
+    ObjectFlagsType = 403963917,
+    Simplifiable = 102760448,
+    Singleton = 394239,
+    Narrowable = 536575971,
+    IncludesMask = 416808959,
+    IncludesMissingType = 524288,
+    IncludesNonWideningType = 2097152,
+    IncludesWildcard = 33554432,
+    IncludesEmptyObject = 67108864,
+    IncludesInstantiable = 16777216,
+    IncludesConstrainedTypeVariable = 536870912,
+    IncludesError = 1073741824,
+    NotPrimitiveUnion = 286523411
+}
+//# sourceMappingURL=typeFlags.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map
new file mode 100644
index 000000000..7f4aae61c
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"typeFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/typeFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,IAAI,IAAI;IACR,GAAG,IAAS;IACZ,OAAO,IAAS;IAChB,SAAS,IAAS;IAClB,IAAI,IAAS;IACb,IAAI,KAAS;IACb,MAAM,KAAS;IACf,MAAM,KAAS;IACf,MAAM,MAAS;IACf,OAAO,MAAS;IAChB,QAAQ,MAAS;IACjB,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,cAAc,OAAU;IACxB,cAAc,QAAU;IACxB,WAAW,QAAU;IACrB,IAAI,QAAU;IACd,YAAY,SAAU;IACtB,KAAK,SAAU;IACf,aAAa,SAAU;IACvB,MAAM,UAAU;IAChB,KAAK,UAAU;IACf,eAAe,UAAU;IACzB,aAAa,UAAU;IACvB,YAAY,WAAU;IACtB,aAAa,WAAU;IACvB,WAAW,WAAU;IACrB,KAAK,YAAU;IACf,YAAY,YAAU;IACtB,SAAS,YAAU;IACnB,SAAS,aAAU;IACnB,SAAS,cAAU;IACnB,YAAY,IAAgB;IAC5B,QAAQ,KAAmB;IAC3B,OAAO,QAAiE;IACxE,IAAI,QAA6C;IACjD,SAAS,QAAiB;IAC1B,qBAAqB,OAAgC;IACrD,6BAA6B,QAAiD;IAC9E,eAAe,QAA2F;IAC1G,aAAa,QAAuD;IACpE,SAAS,SAAuG;IAChH,UAAU,WAA2D;IACrE,UAAU,QAAgC;IAC1C,UAAU,OAAyB;IACnC,WAAW,OAA2B;IACtC,QAAQ,QAAqB;IAC7B,YAAY,QAA4B;IACxC,QAAQ,KAAmB;IAC3B,SAAS,WAAiG;IAC1G,qBAAqB,WAAuG;IAC5H,eAAe,WAAqG;IACpH,mBAAmB,YAAuB;IAC1C,cAAc,YAAgC;IAC9C,YAAY,WAAgC;IAC5C,wBAAwB,YAA4C;IACpE,qBAAqB,WAA0C;IAC/D,YAAY,YAAmD;IAC/D,wBAAwB,YAAgC;IACxD,eAAe,YAAyD;IACxE,YAAY,YAAsC;IAClD,SAAS,SAAiH;IAC1H,UAAU,YAA2I;IACrJ,YAAY,YAAqH;IACjI,mBAAmB,SAAgB;IACnC,uBAAuB,UAAQ;IAC/B,gBAAgB,WAAgB;IAChC,mBAAmB,WAAc;IACjC,oBAAoB,WAAe;IACnC,+BAA+B,YAAY;IAC3C,aAAa,aAAY;IACzB,iBAAiB,YAA8E;CAClG"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.js b/node_modules/typescript/dist/enums/typeFlags.enum.js
new file mode 100644
index 000000000..d6de1e051
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.enum.js
@@ -0,0 +1,78 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var TypeFlags;
+(function (TypeFlags) {
+    TypeFlags[TypeFlags["None"] = 0] = "None";
+    TypeFlags[TypeFlags["Any"] = 1] = "Any";
+    TypeFlags[TypeFlags["Unknown"] = 2] = "Unknown";
+    TypeFlags[TypeFlags["Undefined"] = 4] = "Undefined";
+    TypeFlags[TypeFlags["Null"] = 8] = "Null";
+    TypeFlags[TypeFlags["Void"] = 16] = "Void";
+    TypeFlags[TypeFlags["String"] = 32] = "String";
+    TypeFlags[TypeFlags["Number"] = 64] = "Number";
+    TypeFlags[TypeFlags["BigInt"] = 128] = "BigInt";
+    TypeFlags[TypeFlags["Boolean"] = 256] = "Boolean";
+    TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol";
+    TypeFlags[TypeFlags["StringLiteral"] = 1024] = "StringLiteral";
+    TypeFlags[TypeFlags["NumberLiteral"] = 2048] = "NumberLiteral";
+    TypeFlags[TypeFlags["BigIntLiteral"] = 4096] = "BigIntLiteral";
+    TypeFlags[TypeFlags["BooleanLiteral"] = 8192] = "BooleanLiteral";
+    TypeFlags[TypeFlags["UniqueESSymbol"] = 16384] = "UniqueESSymbol";
+    TypeFlags[TypeFlags["EnumLiteral"] = 32768] = "EnumLiteral";
+    TypeFlags[TypeFlags["Enum"] = 65536] = "Enum";
+    TypeFlags[TypeFlags["NonPrimitive"] = 131072] = "NonPrimitive";
+    TypeFlags[TypeFlags["Never"] = 262144] = "Never";
+    TypeFlags[TypeFlags["TypeParameter"] = 524288] = "TypeParameter";
+    TypeFlags[TypeFlags["Object"] = 1048576] = "Object";
+    TypeFlags[TypeFlags["Index"] = 2097152] = "Index";
+    TypeFlags[TypeFlags["TemplateLiteral"] = 4194304] = "TemplateLiteral";
+    TypeFlags[TypeFlags["StringMapping"] = 8388608] = "StringMapping";
+    TypeFlags[TypeFlags["Substitution"] = 16777216] = "Substitution";
+    TypeFlags[TypeFlags["IndexedAccess"] = 33554432] = "IndexedAccess";
+    TypeFlags[TypeFlags["Conditional"] = 67108864] = "Conditional";
+    TypeFlags[TypeFlags["Union"] = 134217728] = "Union";
+    TypeFlags[TypeFlags["Intersection"] = 268435456] = "Intersection";
+    TypeFlags[TypeFlags["Reserved1"] = 536870912] = "Reserved1";
+    TypeFlags[TypeFlags["Reserved2"] = 1073741824] = "Reserved2";
+    TypeFlags[TypeFlags["Reserved3"] = -2147483648] = "Reserved3";
+    TypeFlags[TypeFlags["AnyOrUnknown"] = 3] = "AnyOrUnknown";
+    TypeFlags[TypeFlags["Nullable"] = 12] = "Nullable";
+    TypeFlags[TypeFlags["Literal"] = 15360] = "Literal";
+    TypeFlags[TypeFlags["Unit"] = 97292] = "Unit";
+    TypeFlags[TypeFlags["Freshable"] = 80896] = "Freshable";
+    TypeFlags[TypeFlags["StringOrNumberLiteral"] = 3072] = "StringOrNumberLiteral";
+    TypeFlags[TypeFlags["StringOrNumberLiteralOrUnique"] = 19456] = "StringOrNumberLiteralOrUnique";
+    TypeFlags[TypeFlags["DefinitelyFalsy"] = 15388] = "DefinitelyFalsy";
+    TypeFlags[TypeFlags["PossiblyFalsy"] = 15868] = "PossiblyFalsy";
+    TypeFlags[TypeFlags["Intrinsic"] = 393983] = "Intrinsic";
+    TypeFlags[TypeFlags["StringLike"] = 12583968] = "StringLike";
+    TypeFlags[TypeFlags["NumberLike"] = 67648] = "NumberLike";
+    TypeFlags[TypeFlags["BigIntLike"] = 4224] = "BigIntLike";
+    TypeFlags[TypeFlags["BooleanLike"] = 8448] = "BooleanLike";
+    TypeFlags[TypeFlags["EnumLike"] = 98304] = "EnumLike";
+    TypeFlags[TypeFlags["ESSymbolLike"] = 16896] = "ESSymbolLike";
+    TypeFlags[TypeFlags["VoidLike"] = 20] = "VoidLike";
+    TypeFlags[TypeFlags["Primitive"] = 12713980] = "Primitive";
+    TypeFlags[TypeFlags["DefinitelyNonNullable"] = 13893600] = "DefinitelyNonNullable";
+    TypeFlags[TypeFlags["DisjointDomains"] = 12812284] = "DisjointDomains";
+    TypeFlags[TypeFlags["UnionOrIntersection"] = 402653184] = "UnionOrIntersection";
+    TypeFlags[TypeFlags["StructuredType"] = 403701760] = "StructuredType";
+    TypeFlags[TypeFlags["TypeVariable"] = 34078720] = "TypeVariable";
+    TypeFlags[TypeFlags["InstantiableNonPrimitive"] = 117964800] = "InstantiableNonPrimitive";
+    TypeFlags[TypeFlags["InstantiablePrimitive"] = 14680064] = "InstantiablePrimitive";
+    TypeFlags[TypeFlags["Instantiable"] = 132644864] = "Instantiable";
+    TypeFlags[TypeFlags["StructuredOrInstantiable"] = 536346624] = "StructuredOrInstantiable";
+    TypeFlags[TypeFlags["ObjectFlagsType"] = 403963917] = "ObjectFlagsType";
+    TypeFlags[TypeFlags["Simplifiable"] = 102760448] = "Simplifiable";
+    TypeFlags[TypeFlags["Singleton"] = 394239] = "Singleton";
+    TypeFlags[TypeFlags["Narrowable"] = 536575971] = "Narrowable";
+    TypeFlags[TypeFlags["IncludesMask"] = 416808959] = "IncludesMask";
+    TypeFlags[TypeFlags["IncludesMissingType"] = 524288] = "IncludesMissingType";
+    TypeFlags[TypeFlags["IncludesNonWideningType"] = 2097152] = "IncludesNonWideningType";
+    TypeFlags[TypeFlags["IncludesWildcard"] = 33554432] = "IncludesWildcard";
+    TypeFlags[TypeFlags["IncludesEmptyObject"] = 67108864] = "IncludesEmptyObject";
+    TypeFlags[TypeFlags["IncludesInstantiable"] = 16777216] = "IncludesInstantiable";
+    TypeFlags[TypeFlags["IncludesConstrainedTypeVariable"] = 536870912] = "IncludesConstrainedTypeVariable";
+    TypeFlags[TypeFlags["IncludesError"] = 1073741824] = "IncludesError";
+    TypeFlags[TypeFlags["NotPrimitiveUnion"] = 286523411] = "NotPrimitiveUnion";
+})(TypeFlags || (TypeFlags = {}));
+//# sourceMappingURL=typeFlags.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.js.map b/node_modules/typescript/dist/enums/typeFlags.enum.js.map
new file mode 100644
index 000000000..3fbec3a30
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"typeFlags.enum.js","sourceRoot":"","sources":["../../src/enums/typeFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,SA0EX;AA1ED,WAAY,SAAS;IACjB,yCAAQ,CAAA;IACR,uCAAY,CAAA;IACZ,+CAAgB,CAAA;IAChB,mDAAkB,CAAA;IAClB,yCAAa,CAAA;IACb,0CAAa,CAAA;IACb,8CAAe,CAAA;IACf,8CAAe,CAAA;IACf,+CAAe,CAAA;IACf,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,8DAAuB,CAAA;IACvB,8DAAuB,CAAA;IACvB,8DAAuB,CAAA;IACvB,gEAAwB,CAAA;IACxB,iEAAwB,CAAA;IACxB,2DAAqB,CAAA;IACrB,6CAAc,CAAA;IACd,8DAAsB,CAAA;IACtB,gDAAe,CAAA;IACf,gEAAuB,CAAA;IACvB,mDAAgB,CAAA;IAChB,iDAAe,CAAA;IACf,qEAAyB,CAAA;IACzB,iEAAuB,CAAA;IACvB,gEAAsB,CAAA;IACtB,kEAAuB,CAAA;IACvB,8DAAqB,CAAA;IACrB,mDAAe,CAAA;IACf,iEAAsB,CAAA;IACtB,2DAAmB,CAAA;IACnB,4DAAmB,CAAA;IACnB,6DAAmB,CAAA;IACnB,yDAA4B,CAAA;IAC5B,kDAA2B,CAAA;IAC3B,mDAAwE,CAAA;IACxE,6CAAiD,CAAA;IACjD,uDAA0B,CAAA;IAC1B,8EAAqD,CAAA;IACrD,+FAA8E,CAAA;IAC9E,mEAA0G,CAAA;IAC1G,+DAAoE,CAAA;IACpE,wDAAgH,CAAA;IAChH,4DAAqE,CAAA;IACrE,yDAA0C,CAAA;IAC1C,wDAAmC,CAAA;IACnC,0DAAsC,CAAA;IACtC,qDAA6B,CAAA;IAC7B,6DAAwC,CAAA;IACxC,kDAA2B,CAAA;IAC3B,0DAA0G,CAAA;IAC1G,kFAA4H,CAAA;IAC5H,sEAAoH,CAAA;IACpH,+EAA0C,CAAA;IAC1C,qEAA8C,CAAA;IAC9C,gEAA4C,CAAA;IAC5C,yFAAoE,CAAA;IACpE,kFAA+D,CAAA;IAC/D,iEAA+D,CAAA;IAC/D,yFAAwD,CAAA;IACxD,uEAAwE,CAAA;IACxE,iEAAkD,CAAA;IAClD,wDAA0H,CAAA;IAC1H,6DAAqJ,CAAA;IACrJ,iEAAiI,CAAA;IACjI,4EAAmC,CAAA;IACnC,qFAA+B,CAAA;IAC/B,wEAAgC,CAAA;IAChC,8EAAiC,CAAA;IACjC,gFAAmC,CAAA;IACnC,uGAA2C,CAAA;IAC3C,oEAAyB,CAAA;IACzB,2EAA+F,CAAA;AACnG,CAAC,EA1EW,SAAS,KAAT,SAAS,QA0EpB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.js b/node_modules/typescript/dist/enums/typeFlags.js
new file mode 100644
index 000000000..c032a1a84
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.js
@@ -0,0 +1,78 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var TypeFlags;
+(function (TypeFlags) {
+    TypeFlags[TypeFlags["None"] = 0] = "None";
+    TypeFlags[TypeFlags["Any"] = 1] = "Any";
+    TypeFlags[TypeFlags["Unknown"] = 2] = "Unknown";
+    TypeFlags[TypeFlags["Undefined"] = 4] = "Undefined";
+    TypeFlags[TypeFlags["Null"] = 8] = "Null";
+    TypeFlags[TypeFlags["Void"] = 16] = "Void";
+    TypeFlags[TypeFlags["String"] = 32] = "String";
+    TypeFlags[TypeFlags["Number"] = 64] = "Number";
+    TypeFlags[TypeFlags["BigInt"] = 128] = "BigInt";
+    TypeFlags[TypeFlags["Boolean"] = 256] = "Boolean";
+    TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol";
+    TypeFlags[TypeFlags["StringLiteral"] = 1024] = "StringLiteral";
+    TypeFlags[TypeFlags["NumberLiteral"] = 2048] = "NumberLiteral";
+    TypeFlags[TypeFlags["BigIntLiteral"] = 4096] = "BigIntLiteral";
+    TypeFlags[TypeFlags["BooleanLiteral"] = 8192] = "BooleanLiteral";
+    TypeFlags[TypeFlags["UniqueESSymbol"] = 16384] = "UniqueESSymbol";
+    TypeFlags[TypeFlags["EnumLiteral"] = 32768] = "EnumLiteral";
+    TypeFlags[TypeFlags["Enum"] = 65536] = "Enum";
+    TypeFlags[TypeFlags["NonPrimitive"] = 131072] = "NonPrimitive";
+    TypeFlags[TypeFlags["Never"] = 262144] = "Never";
+    TypeFlags[TypeFlags["TypeParameter"] = 524288] = "TypeParameter";
+    TypeFlags[TypeFlags["Object"] = 1048576] = "Object";
+    TypeFlags[TypeFlags["Index"] = 2097152] = "Index";
+    TypeFlags[TypeFlags["TemplateLiteral"] = 4194304] = "TemplateLiteral";
+    TypeFlags[TypeFlags["StringMapping"] = 8388608] = "StringMapping";
+    TypeFlags[TypeFlags["Substitution"] = 16777216] = "Substitution";
+    TypeFlags[TypeFlags["IndexedAccess"] = 33554432] = "IndexedAccess";
+    TypeFlags[TypeFlags["Conditional"] = 67108864] = "Conditional";
+    TypeFlags[TypeFlags["Union"] = 134217728] = "Union";
+    TypeFlags[TypeFlags["Intersection"] = 268435456] = "Intersection";
+    TypeFlags[TypeFlags["Reserved1"] = 536870912] = "Reserved1";
+    TypeFlags[TypeFlags["Reserved2"] = 1073741824] = "Reserved2";
+    TypeFlags[TypeFlags["Reserved3"] = -2147483648] = "Reserved3";
+    TypeFlags[TypeFlags["AnyOrUnknown"] = 3] = "AnyOrUnknown";
+    TypeFlags[TypeFlags["Nullable"] = 12] = "Nullable";
+    TypeFlags[TypeFlags["Literal"] = 15360] = "Literal";
+    TypeFlags[TypeFlags["Unit"] = 97292] = "Unit";
+    TypeFlags[TypeFlags["Freshable"] = 80896] = "Freshable";
+    TypeFlags[TypeFlags["StringOrNumberLiteral"] = 3072] = "StringOrNumberLiteral";
+    TypeFlags[TypeFlags["StringOrNumberLiteralOrUnique"] = 19456] = "StringOrNumberLiteralOrUnique";
+    TypeFlags[TypeFlags["DefinitelyFalsy"] = 15388] = "DefinitelyFalsy";
+    TypeFlags[TypeFlags["PossiblyFalsy"] = 15868] = "PossiblyFalsy";
+    TypeFlags[TypeFlags["Intrinsic"] = 393983] = "Intrinsic";
+    TypeFlags[TypeFlags["StringLike"] = 12583968] = "StringLike";
+    TypeFlags[TypeFlags["NumberLike"] = 67648] = "NumberLike";
+    TypeFlags[TypeFlags["BigIntLike"] = 4224] = "BigIntLike";
+    TypeFlags[TypeFlags["BooleanLike"] = 8448] = "BooleanLike";
+    TypeFlags[TypeFlags["EnumLike"] = 98304] = "EnumLike";
+    TypeFlags[TypeFlags["ESSymbolLike"] = 16896] = "ESSymbolLike";
+    TypeFlags[TypeFlags["VoidLike"] = 20] = "VoidLike";
+    TypeFlags[TypeFlags["Primitive"] = 12713980] = "Primitive";
+    TypeFlags[TypeFlags["DefinitelyNonNullable"] = 13893600] = "DefinitelyNonNullable";
+    TypeFlags[TypeFlags["DisjointDomains"] = 12812284] = "DisjointDomains";
+    TypeFlags[TypeFlags["UnionOrIntersection"] = 402653184] = "UnionOrIntersection";
+    TypeFlags[TypeFlags["StructuredType"] = 403701760] = "StructuredType";
+    TypeFlags[TypeFlags["TypeVariable"] = 34078720] = "TypeVariable";
+    TypeFlags[TypeFlags["InstantiableNonPrimitive"] = 117964800] = "InstantiableNonPrimitive";
+    TypeFlags[TypeFlags["InstantiablePrimitive"] = 14680064] = "InstantiablePrimitive";
+    TypeFlags[TypeFlags["Instantiable"] = 132644864] = "Instantiable";
+    TypeFlags[TypeFlags["StructuredOrInstantiable"] = 536346624] = "StructuredOrInstantiable";
+    TypeFlags[TypeFlags["ObjectFlagsType"] = 403963917] = "ObjectFlagsType";
+    TypeFlags[TypeFlags["Simplifiable"] = 102760448] = "Simplifiable";
+    TypeFlags[TypeFlags["Singleton"] = 394239] = "Singleton";
+    TypeFlags[TypeFlags["Narrowable"] = 536575971] = "Narrowable";
+    TypeFlags[TypeFlags["IncludesMask"] = 416808959] = "IncludesMask";
+    TypeFlags[TypeFlags["IncludesMissingType"] = 524288] = "IncludesMissingType";
+    TypeFlags[TypeFlags["IncludesNonWideningType"] = 2097152] = "IncludesNonWideningType";
+    TypeFlags[TypeFlags["IncludesWildcard"] = 33554432] = "IncludesWildcard";
+    TypeFlags[TypeFlags["IncludesEmptyObject"] = 67108864] = "IncludesEmptyObject";
+    TypeFlags[TypeFlags["IncludesInstantiable"] = 16777216] = "IncludesInstantiable";
+    TypeFlags[TypeFlags["IncludesConstrainedTypeVariable"] = 536870912] = "IncludesConstrainedTypeVariable";
+    TypeFlags[TypeFlags["IncludesError"] = 1073741824] = "IncludesError";
+    TypeFlags[TypeFlags["NotPrimitiveUnion"] = 286523411] = "NotPrimitiveUnion";
+})(TypeFlags || (TypeFlags = {}));
+//# sourceMappingURL=typeFlags.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typeFlags.js.map b/node_modules/typescript/dist/enums/typeFlags.js.map
new file mode 100644
index 000000000..b88dd458f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typeFlags.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"typeFlags.js","sourceRoot":"","sources":["../../src/enums/typeFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,SAAc,CAAC;AAC1B,CAAC,UAAU,SAAS;IAChB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACxC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,SAAS,CAAC,WAA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AAc,CAAC;IAClE,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAC,GAAG,qBAAqB,CAAC;IAC7E,SAAS,CAAC,SAAS,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,GAAG,yBAAyB,CAAC;IACtF,SAAS,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAC,GAAG,kBAAkB,CAAC;IACzE,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;IAC/E,SAAS,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG,QAAQ,CAAC,GAAG,sBAAsB,CAAC;IACjF,SAAS,CAAC,SAAS,CAAC,iCAAiC,CAAC,GAAG,SAAS,CAAC,GAAG,iCAAiC,CAAC;IACxG,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,GAAG,eAAe,CAAC;IACrE,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,GAAG,mBAAmB,CAAC;AAChF,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.d.ts b/node_modules/typescript/dist/enums/typePredicateKind.d.ts
new file mode 100644
index 000000000..89e80ae41
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.d.ts
@@ -0,0 +1,2 @@
+export declare var TypePredicateKind: any;
+//# sourceMappingURL=typePredicateKind.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map b/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map
new file mode 100644
index 000000000..b1be557f5
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"typePredicateKind.d.ts","sourceRoot":"","sources":["../../src/enums/typePredicateKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts
new file mode 100644
index 000000000..8948d4a2f
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts
@@ -0,0 +1,7 @@
+export declare enum TypePredicateKind {
+    This = 0,
+    Identifier = 1,
+    AssertsThis = 2,
+    AssertsIdentifier = 3
+}
+//# sourceMappingURL=typePredicateKind.enum.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map
new file mode 100644
index 000000000..201098db0
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"typePredicateKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/typePredicateKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IACzB,IAAI,IAAI;IACR,UAAU,IAAI;IACd,WAAW,IAAI;IACf,iBAAiB,IAAI;CACxB"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.js b/node_modules/typescript/dist/enums/typePredicateKind.enum.js
new file mode 100644
index 000000000..30438317d
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.js
@@ -0,0 +1,9 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var TypePredicateKind;
+(function (TypePredicateKind) {
+    TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
+    TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
+    TypePredicateKind[TypePredicateKind["AssertsThis"] = 2] = "AssertsThis";
+    TypePredicateKind[TypePredicateKind["AssertsIdentifier"] = 3] = "AssertsIdentifier";
+})(TypePredicateKind || (TypePredicateKind = {}));
+//# sourceMappingURL=typePredicateKind.enum.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map b/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map
new file mode 100644
index 000000000..55f4b239e
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"typePredicateKind.enum.js","sourceRoot":"","sources":["../../src/enums/typePredicateKind.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,yDAAQ,CAAA;IACR,qEAAc,CAAA;IACd,uEAAe,CAAA;IACf,mFAAqB,CAAA;AACzB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.js b/node_modules/typescript/dist/enums/typePredicateKind.js
new file mode 100644
index 000000000..c4012c798
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.js
@@ -0,0 +1,9 @@
+// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT.
+export var TypePredicateKind;
+(function (TypePredicateKind) {
+    TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
+    TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
+    TypePredicateKind[TypePredicateKind["AssertsThis"] = 2] = "AssertsThis";
+    TypePredicateKind[TypePredicateKind["AssertsIdentifier"] = 3] = "AssertsIdentifier";
+})(TypePredicateKind || (TypePredicateKind = {}));
+//# sourceMappingURL=typePredicateKind.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/enums/typePredicateKind.js.map b/node_modules/typescript/dist/enums/typePredicateKind.js.map
new file mode 100644
index 000000000..d87dfc8b7
--- /dev/null
+++ b/node_modules/typescript/dist/enums/typePredicateKind.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"typePredicateKind.js","sourceRoot":"","sources":["../../src/enums/typePredicateKind.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,iBAAsB,CAAC;AAClC,CAAC,UAAU,iBAAiB;IACxB,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1D,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IACtE,iBAAiB,CAAC,iBAAiB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IACxE,iBAAiB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC;AACxF,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/internal/utils.d.ts b/node_modules/typescript/dist/internal/utils.d.ts
new file mode 100644
index 000000000..fbaf75587
--- /dev/null
+++ b/node_modules/typescript/dist/internal/utils.d.ts
@@ -0,0 +1,23 @@
+/**
+ * Safer version of `Function` which should not be called.
+ * Every function should be assignable to this, but this should not be assignable to every function.
+ */
+export type AnyFunction = (...args: never[]) => void;
+/**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
+export interface MapLike {
+    [index: string]: T;
+}
+/**
+ * Indicates whether a map-like contains an own property with the specified key.
+ *
+ * @param map A map-like.
+ * @param key A property key.
+ */
+export declare function hasProperty(map: MapLike, key: string): boolean;
+export declare function assertNever(member: never, message?: string, stackCrawlMark?: AnyFunction): never;
+export declare function fail(message?: string, stackCrawlMark?: AnyFunction): never;
+//# sourceMappingURL=utils.d.ts.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/internal/utils.d.ts.map b/node_modules/typescript/dist/internal/utils.d.ts.map
new file mode 100644
index 000000000..e52d6d4db
--- /dev/null
+++ b/node_modules/typescript/dist/internal/utils.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,SAAmB,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,KAAK,CAG1G;AAED,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,KAAK,CAQ1E"}
\ No newline at end of file
diff --git a/node_modules/typescript/dist/internal/utils.js b/node_modules/typescript/dist/internal/utils.js
new file mode 100644
index 000000000..00899c56b
--- /dev/null
+++ b/node_modules/typescript/dist/internal/utils.js
@@ -0,0 +1,25 @@
+import { formatSyntaxKind } from "../ast/utils.js";
+const hasOwnProperty = Object.prototype.hasOwnProperty;
+/**
+ * Indicates whether a map-like contains an own property with the specified key.
+ *
+ * @param map A map-like.
+ * @param key A property key.
+ */
+export function hasProperty(map, key) {
+    return hasOwnProperty.call(map, key);
+}
+export function assertNever(member, message = "Illegal value:", stackCrawlMark) {
+    const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
+    return fail(`${message} ${detail}`, stackCrawlMark || assertNever);
+}
+export function fail(message, stackCrawlMark) {
+    // eslint-disable-next-line no-debugger
+    debugger;
+    const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure.");
+    if (Error.captureStackTrace) {
+        Error.captureStackTrace(e, stackCrawlMark || fail);
+    }
+    throw e;
+}
+//# sourceMappingURL=utils.js.map
\ No newline at end of file
diff --git a/node_modules/typescript/dist/internal/utils.js.map b/node_modules/typescript/dist/internal/utils.js.map
new file mode 100644
index 000000000..b896aa352
--- /dev/null
+++ b/node_modules/typescript/dist/internal/utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAiBvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAiB,EAAE,GAAW;IACtD,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,MAAa,EAAE,OAAO,GAAG,gBAAgB,EAAE,cAA4B;IAC/F,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,gBAAgB,CAAE,MAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3L,OAAO,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,EAAE,cAAc,IAAI,WAAW,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAgB,EAAE,cAA4B;IAC/D,uCAAuC;IACvC,QAAQ,CAAC;IACT,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC9E,IAAK,KAAa,CAAC,iBAAiB,EAAE,CAAC;QAClC,KAAa,CAAC,iBAAiB,CAAC,CAAC,EAAE,cAAc,IAAI,IAAI,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,CAAC,CAAC;AACZ,CAAC"}
\ No newline at end of file
diff --git a/node_modules/typescript/lib/getExePath.d.ts b/node_modules/typescript/lib/getExePath.d.ts
new file mode 100644
index 000000000..b78ebd282
--- /dev/null
+++ b/node_modules/typescript/lib/getExePath.d.ts
@@ -0,0 +1,2 @@
+declare function getExePath(): string;
+export default getExePath;
diff --git a/node_modules/typescript/lib/getExePath.js b/node_modules/typescript/lib/getExePath.js
new file mode 100644
index 000000000..9b0dd8605
--- /dev/null
+++ b/node_modules/typescript/lib/getExePath.js
@@ -0,0 +1,70 @@
+import fs from "node:fs";
+import module from "node:module";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+
+// NOTE: Keep VS Code extension's resolveTsdkPathToExe in sync with this function.
+export default function getExePath() {
+    const __dirname = path.dirname(fileURLToPath(import.meta.url));
+    const normalizedDirname = __dirname.replace(/\\/g, "/");
+
+    const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"));
+    const pkgName = pkg.name;
+    const baseName = pkgName.startsWith("@") ? pkgName.split("/")[1] : pkgName;
+    const expectedBinName = baseName === "typescript" ? "tsc" : "tsgo";
+    const binNames = pkg.bin && typeof pkg.bin === "object" ? Object.keys(pkg.bin) : [];
+    if (binNames.length !== 1 || binNames[0] !== expectedBinName) {
+        throw new Error(`Expected ${pkgName} to declare exactly one bin entry named ${expectedBinName}.`);
+    }
+    let binName = expectedBinName;
+    let exeDir;
+
+    const expectedPackage = baseName + "-" + process.platform + "-" + process.arch;
+
+    if (normalizedDirname.endsWith("/_packages/" + baseName + "/lib")) {
+        // We're running directly from source in the repo.
+        // The local repo build (`hereby build`) always produces `tsgo`, regardless
+        // of the published `bin` name, so don't use binName here.
+        exeDir = path.resolve(__dirname, "..", "..", "..", "built", "local");
+        binName = "tsgo";
+    }
+    else if (normalizedDirname.endsWith("/built/npm/" + baseName + "/lib")) {
+        // We're running from the built output.
+        exeDir = path.resolve(__dirname, "..", "..", expectedPackage, "lib");
+    }
+    else {
+        // We're actually running from an installed package.
+        const platformPackageName = "@typescript/" + expectedPackage;
+        try {
+            if (typeof import.meta.resolve === "undefined") {
+                // v16.20.1
+                const require = module.createRequire(import.meta.url);
+                const packageJson = require.resolve(platformPackageName + "/package.json");
+                exeDir = path.join(path.dirname(packageJson), "lib");
+            }
+            else {
+                // v20.6.0, v18.19.0
+                const packageJson = import.meta.resolve(platformPackageName + "/package.json");
+                const packageJsonPath = fileURLToPath(packageJson);
+                exeDir = path.join(path.dirname(packageJsonPath), "lib");
+            }
+        }
+        catch (e) {
+            throw new Error("Unable to resolve " + platformPackageName + ". Either your platform is unsupported, or you are missing the package on disk.");
+        }
+    }
+
+    let exe = path.join(exeDir, binName);
+    if (process.platform === "win32") {
+        exe += ".exe";
+        if (exe.length >= 248) {
+            exe = "\\\\?\\" + exe;
+        }
+    }
+
+    if (!fs.existsSync(exe)) {
+        throw new Error("Executable not found: " + exe);
+    }
+
+    return exe;
+}
diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js
new file mode 100644
index 000000000..721fde8fb
--- /dev/null
+++ b/node_modules/typescript/lib/tsc.js
@@ -0,0 +1,28 @@
+#!/usr/bin/env node
+
+import getExePath from "#getExePath";
+import { execFileSync } from "node:child_process";
+
+const exe = getExePath();
+
+if (process.platform !== "win32" && typeof process.execve === "function") {
+    // > v22.15.0
+    try {
+        process.execve(exe, [exe, ...process.argv.slice(2)]);
+    }
+    catch {
+        // may not be available, ignore the error and fallback
+    }
+}
+
+try {
+    execFileSync(exe, process.argv.slice(2), { stdio: "inherit" });
+}
+catch (e) {
+    if (e.status) {
+        process.exitCode = e.status;
+    }
+    else {
+        throw e;
+    }
+}
diff --git a/node_modules/typescript/lib/version.cjs b/node_modules/typescript/lib/version.cjs
new file mode 100644
index 000000000..4a054a048
--- /dev/null
+++ b/node_modules/typescript/lib/version.cjs
@@ -0,0 +1,3 @@
+const { version } = require("../package.json");
+exports.version = version;
+exports.versionMajorMinor = "7.0";
diff --git a/node_modules/typescript/lib/version.d.cts b/node_modules/typescript/lib/version.d.cts
new file mode 100644
index 000000000..cdc632ec8
--- /dev/null
+++ b/node_modules/typescript/lib/version.d.cts
@@ -0,0 +1,2 @@
+export declare const version: string;
+export declare const versionMajorMinor = "7.0";
diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json
new file mode 100644
index 000000000..f4242a69d
--- /dev/null
+++ b/node_modules/typescript/package.json
@@ -0,0 +1,87 @@
+{
+    "name": "typescript",
+    "version": "7.0.2",
+    "license": "Apache-2.0",
+    "author": "Microsoft Corp.",
+    "homepage": "https://www.typescriptlang.org/",
+    "description": "TypeScript is a language for application scale JavaScript development",
+    "keywords": [
+        "TypeScript",
+        "Microsoft",
+        "compiler",
+        "language",
+        "javascript"
+    ],
+    "bugs": {
+        "url": "https://github.com/microsoft/TypeScript/issues"
+    },
+    "repository": {
+        "type": "git",
+        "url": "https://github.com/microsoft/TypeScript.git"
+    },
+    "type": "module",
+    "preferUnplugged": true,
+    "engines": {
+        "node": ">=16.20.0"
+    },
+    "files": [
+        "bin",
+        "lib",
+        "dist",
+        "vendor",
+        "NOTICE.txt"
+    ],
+    "bin": {
+        "tsc": "./bin/tsc"
+    },
+    "exports": {
+        "./package.json": "./package.json",
+        ".": "./lib/version.cjs",
+        "./unstable/sync": "./dist/api/sync/api.js",
+        "./unstable/async": "./dist/api/async/api.js",
+        "./unstable/fs": "./dist/api/fs.js",
+        "./unstable/proto": "./dist/api/proto.js",
+        "./unstable/ast": "./dist/ast/index.js",
+        "./unstable/ast/is": "./dist/ast/is.js",
+        "./unstable/ast/factory": "./dist/ast/factory.generated.js",
+        "./unstable/ast/utils": "./dist/ast/utils.js",
+        "./unstable/ast/scanner": "./dist/ast/scanner.js",
+        "./unstable/ast/visitor": "./dist/ast/visitor.js",
+        "./unstable/ast/clone": "./dist/ast/clone.js"
+    },
+    "imports": {
+        "#getExePath": "./lib/getExePath.js",
+        "#enums/*": {
+            "types": "./dist/enums/*.enum.d.ts",
+            "default": "./dist/enums/*.js"
+        },
+        "#vscode-jsonrpc/node": "./vendor/vscode-jsonrpc/lib/node/main.js"
+    },
+    "gitHead": "2bd066d87f5bafd315be9f40889d0a60b9e58e0b",
+    "publishConfig": {
+        "access": "public",
+        "tag": "latest"
+    },
+    "optionalDependencies": {
+        "@typescript/typescript-win32-x64": "7.0.2",
+        "@typescript/typescript-win32-arm64": "7.0.2",
+        "@typescript/typescript-linux-x64": "7.0.2",
+        "@typescript/typescript-linux-arm": "7.0.2",
+        "@typescript/typescript-linux-arm64": "7.0.2",
+        "@typescript/typescript-darwin-x64": "7.0.2",
+        "@typescript/typescript-darwin-arm64": "7.0.2",
+        "@typescript/typescript-aix-ppc64": "7.0.2",
+        "@typescript/typescript-freebsd-arm64": "7.0.2",
+        "@typescript/typescript-freebsd-x64": "7.0.2",
+        "@typescript/typescript-linux-loong64": "7.0.2",
+        "@typescript/typescript-linux-mips64el": "7.0.2",
+        "@typescript/typescript-linux-ppc64": "7.0.2",
+        "@typescript/typescript-linux-riscv64": "7.0.2",
+        "@typescript/typescript-linux-s390x": "7.0.2",
+        "@typescript/typescript-netbsd-arm64": "7.0.2",
+        "@typescript/typescript-netbsd-x64": "7.0.2",
+        "@typescript/typescript-openbsd-arm64": "7.0.2",
+        "@typescript/typescript-openbsd-x64": "7.0.2",
+        "@typescript/typescript-sunos-x64": "7.0.2"
+    }
+}
\ No newline at end of file
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/License.txt b/node_modules/typescript/vendor/vscode-jsonrpc/License.txt
new file mode 100644
index 000000000..a07e3ae82
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/License.txt
@@ -0,0 +1,11 @@
+Copyright (c) Microsoft Corporation
+
+All rights reserved.
+
+MIT License
+
+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.
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/README.md b/node_modules/typescript/vendor/vscode-jsonrpc/README.md
new file mode 100644
index 000000000..a3ddd91ea
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/README.md
@@ -0,0 +1,54 @@
+# VSCode JSON RPC
+
+[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
+[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
+[![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_apis/build/status%2Fvscode-languageserver-node?branchName=main)](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)
+
+This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.
+
+The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between
+a client and a server. Below an example how to setup a JSON-RPC connection. First the client side.
+
+```ts
+import * as cp from 'child_process';
+import * as rpc from 'vscode-jsonrpc/node';
+
+let childProcess = cp.spawn(...);
+
+// Use stdin and stdout for communication:
+let connection = rpc.createMessageConnection(
+	new rpc.StreamMessageReader(childProcess.stdout),
+	new rpc.StreamMessageWriter(childProcess.stdin));
+
+let notification = new rpc.NotificationType('testNotification');
+
+connection.listen();
+
+connection.sendNotification(notification, 'Hello World');
+```
+
+The server side looks very symmetrical:
+
+```ts
+import * as rpc from 'vscode-jsonrpc/node';
+
+
+let connection = rpc.createMessageConnection(
+	new rpc.StreamMessageReader(process.stdin),
+	new rpc.StreamMessageWriter(process.stdout));
+
+let notification = new rpc.NotificationType('testNotification');
+connection.onNotification(notification, (param: string) => {
+	console.log(param); // This prints Hello World
+});
+
+connection.listen();
+```
+
+# History
+
+For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)
+
+
+## License
+[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts
new file mode 100644
index 000000000..05d994f7b
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts
@@ -0,0 +1,17 @@
+import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, Disposable, ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter, Logger, MessageConnection } from '../common/api';
+export * from '../common/api';
+export declare class BrowserMessageReader extends AbstractMessageReader implements MessageReader {
+    private _onData;
+    private _messageListener;
+    constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope);
+    listen(callback: DataCallback): Disposable;
+}
+export declare class BrowserMessageWriter extends AbstractMessageWriter implements MessageWriter {
+    private port;
+    private errorCount;
+    constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope);
+    write(msg: Message): Promise;
+    private handleError;
+    end(): void;
+}
+export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection;
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js
new file mode 100644
index 000000000..11e51f838
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js
@@ -0,0 +1,83 @@
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+    return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0;
+exports.createMessageConnection = createMessageConnection;
+const ril_1 = __importDefault(require("./ril"));
+// Install the browser runtime abstract.
+ril_1.default.install();
+const api_1 = require("../common/api");
+__exportStar(require("../common/api"), exports);
+class BrowserMessageReader extends api_1.AbstractMessageReader {
+    _onData;
+    _messageListener;
+    constructor(port) {
+        super();
+        this._onData = new api_1.Emitter();
+        this._messageListener = (event) => {
+            this._onData.fire(event.data);
+        };
+        port.addEventListener('error', (event) => this.fireError(event));
+        port.onmessage = this._messageListener;
+    }
+    listen(callback) {
+        return this._onData.event(callback);
+    }
+}
+exports.BrowserMessageReader = BrowserMessageReader;
+class BrowserMessageWriter extends api_1.AbstractMessageWriter {
+    port;
+    errorCount;
+    constructor(port) {
+        super();
+        this.port = port;
+        this.errorCount = 0;
+        port.addEventListener('error', (event) => this.fireError(event));
+    }
+    write(msg) {
+        try {
+            this.port.postMessage(msg);
+            return Promise.resolve();
+        }
+        catch (error) {
+            this.handleError(error, msg);
+            return Promise.reject(error);
+        }
+    }
+    handleError(error, msg) {
+        this.errorCount++;
+        this.fireError(error, msg, this.errorCount);
+    }
+    end() {
+    }
+}
+exports.BrowserMessageWriter = BrowserMessageWriter;
+function createMessageConnection(reader, writer, logger, options) {
+    if (logger === undefined) {
+        logger = api_1.NullLogger;
+    }
+    if (api_1.ConnectionStrategy.is(options)) {
+        options = { connectionStrategy: options };
+    }
+    return (0, api_1.createMessageConnection)(reader, writer, logger, options);
+}
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts
new file mode 100644
index 000000000..78d42d8f0
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts
@@ -0,0 +1,22 @@
+import { RAL, Disposable } from '../common/api';
+interface RIL extends RAL {
+    readonly stream: {
+        readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream;
+        readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream;
+    };
+}
+export declare class QueueMicrotaskImpl implements Disposable {
+    private isDisposed;
+    constructor(callback: (...args: any[]) => void, ...args: any[]);
+    dispose(): void;
+}
+export declare class PromiseImpl implements Disposable {
+    private isDisposed;
+    constructor(callback: (...args: any[]) => void, ...args: any[]);
+    dispose(): void;
+}
+declare function RIL(): RIL;
+declare namespace RIL {
+    function install(): void;
+}
+export default RIL;
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js
new file mode 100644
index 000000000..04969b2a8
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js
@@ -0,0 +1,210 @@
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PromiseImpl = exports.QueueMicrotaskImpl = void 0;
+const api_1 = require("../common/api");
+class MessageBuffer extends api_1.AbstractMessageBuffer {
+    static emptyBuffer = new Uint8Array(0);
+    asciiDecoder;
+    constructor(encoding = 'utf-8') {
+        super(encoding);
+        this.asciiDecoder = new TextDecoder('ascii');
+    }
+    emptyBuffer() {
+        return MessageBuffer.emptyBuffer;
+    }
+    fromString(value, _encoding) {
+        return (new TextEncoder()).encode(value);
+    }
+    toString(value, encoding) {
+        if (encoding === 'ascii') {
+            return this.asciiDecoder.decode(value);
+        }
+        else {
+            return (new TextDecoder(encoding)).decode(value);
+        }
+    }
+    asNative(buffer, length) {
+        if (length === undefined) {
+            return buffer;
+        }
+        else {
+            return buffer.slice(0, length);
+        }
+    }
+    allocNative(length) {
+        return new Uint8Array(length);
+    }
+}
+class ReadableStreamWrapper {
+    socket;
+    _onData;
+    _messageListener;
+    constructor(socket) {
+        this.socket = socket;
+        this._onData = new api_1.Emitter();
+        this._messageListener = (event) => {
+            const blob = event.data;
+            blob.arrayBuffer().then((buffer) => {
+                this._onData.fire(new Uint8Array(buffer));
+            }, () => {
+                (0, api_1.RAL)().console.error(`Converting blob to array buffer failed.`);
+            });
+        };
+        this.socket.addEventListener('message', this._messageListener);
+    }
+    onClose(listener) {
+        this.socket.addEventListener('close', listener);
+        return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener));
+    }
+    onError(listener) {
+        this.socket.addEventListener('error', listener);
+        return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener));
+    }
+    onEnd(listener) {
+        this.socket.addEventListener('end', listener);
+        return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener));
+    }
+    onData(listener) {
+        return this._onData.event(listener);
+    }
+}
+class WritableStreamWrapper {
+    socket;
+    constructor(socket) {
+        this.socket = socket;
+    }
+    onClose(listener) {
+        this.socket.addEventListener('close', listener);
+        return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener));
+    }
+    onError(listener) {
+        this.socket.addEventListener('error', listener);
+        return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener));
+    }
+    onEnd(listener) {
+        this.socket.addEventListener('end', listener);
+        return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener));
+    }
+    write(data, encoding) {
+        if (typeof data === 'string') {
+            if (encoding !== undefined && encoding !== 'utf-8') {
+                throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${encoding}`);
+            }
+            this.socket.send(data);
+        }
+        else {
+            if (data.buffer instanceof ArrayBuffer) {
+                this.socket.send(data.buffer);
+            }
+            else {
+                // We can't send a shared array buffer directly, so we need to
+                // create a copy of it.
+                this.socket.send(new Uint8Array(data.buffer).slice().buffer);
+            }
+        }
+        return Promise.resolve();
+    }
+    end() {
+        this.socket.close();
+    }
+}
+class QueueMicrotaskImpl {
+    isDisposed;
+    constructor(callback, ...args) {
+        this.isDisposed = false;
+        queueMicrotask(() => {
+            if (!this.isDisposed) {
+                callback(...args);
+            }
+        });
+    }
+    dispose() {
+        this.isDisposed = true;
+    }
+}
+exports.QueueMicrotaskImpl = QueueMicrotaskImpl;
+class PromiseImpl {
+    isDisposed;
+    constructor(callback, ...args) {
+        this.isDisposed = false;
+        Promise.resolve().then(() => {
+            if (!this.isDisposed) {
+                callback(...args);
+            }
+        }, () => {
+        });
+    }
+    dispose() {
+        this.isDisposed = true;
+    }
+}
+exports.PromiseImpl = PromiseImpl;
+const _textEncoder = new TextEncoder();
+const _ril = Object.freeze({
+    messageBuffer: Object.freeze({
+        create: (encoding) => new MessageBuffer(encoding)
+    }),
+    applicationJson: Object.freeze({
+        encoder: Object.freeze({
+            name: 'application/json',
+            encode: (msg, options) => {
+                if (options.charset !== 'utf-8') {
+                    throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${options.charset}`);
+                }
+                return Promise.resolve(_textEncoder.encode(JSON.stringify(msg, undefined, 0)));
+            }
+        }),
+        decoder: Object.freeze({
+            name: 'application/json',
+            decode: (buffer, options) => {
+                if (!(buffer instanceof Uint8Array)) {
+                    throw new Error(`In a Browser environments only Uint8Arrays are supported.`);
+                }
+                return Promise.resolve(JSON.parse(new TextDecoder(options.charset).decode(buffer)));
+            }
+        })
+    }),
+    stream: Object.freeze({
+        asReadableStream: (socket) => new ReadableStreamWrapper(socket),
+        asWritableStream: (socket) => new WritableStreamWrapper(socket)
+    }),
+    console: console,
+    timer: Object.freeze({
+        setTimeout(callback, ms, ...args) {
+            const handle = setTimeout(callback, ms, ...args);
+            return { dispose: () => clearTimeout(handle) };
+        },
+        setImmediate(callback, ...args) {
+            // Browser don't have setImmediate and setTimeout with 0 delay of 0 can cause problems
+            // in webviews and similar environments due to throttling.
+            if (typeof globalThis.queueMicrotask === 'function') {
+                return new QueueMicrotaskImpl(callback, ...args);
+            }
+            else if (Promise !== undefined) {
+                return new PromiseImpl(callback, ...args);
+            }
+            else {
+                const handle = setTimeout(callback, 0, ...args);
+                return { dispose: () => clearTimeout(handle) };
+            }
+        },
+        setInterval(callback, ms, ...args) {
+            const handle = setInterval(callback, ms, ...args);
+            return { dispose: () => clearInterval(handle) };
+        },
+    })
+});
+function RIL() {
+    return _ril;
+}
+(function (RIL) {
+    function install() {
+        api_1.RAL.install(_ril);
+    }
+    RIL.install = install;
+})(RIL || (RIL = {}));
+exports.default = RIL;
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts
new file mode 100644
index 000000000..8250d533f
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts
@@ -0,0 +1,14 @@
+/// 
+import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from './messages';
+import { LinkedMap, LRUCache, Touch } from './linkedMap';
+import { Disposable } from './disposable';
+import { Event, Emitter } from './events';
+import { AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken } from './cancellation';
+import { SharedArraySenderStrategy, SharedArrayReceiverStrategy } from './sharedArrayCancellation';
+import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo } from './messageReader';
+import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from './messageWriter';
+import { AbstractMessageBuffer } from './messageBuffer';
+import { ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder } from './encoding';
+import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy, TraceValues } from './connection';
+import RAL from './ral';
+export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy };
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js
new file mode 100644
index 000000000..ab7abd539
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js
@@ -0,0 +1,87 @@
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+/// 
+var __importDefault = (this && this.__importDefault) || function (mod) {
+    return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0;
+exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = void 0;
+const messages_1 = require("./messages");
+Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } });
+Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } });
+Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } });
+Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } });
+Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } });
+Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } });
+Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } });
+Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } });
+Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } });
+Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } });
+Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } });
+Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } });
+Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } });
+Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } });
+Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } });
+Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } });
+Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } });
+Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } });
+Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } });
+Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } });
+Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } });
+Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } });
+Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } });
+Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } });
+Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } });
+Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } });
+const linkedMap_1 = require("./linkedMap");
+Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } });
+Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } });
+Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } });
+const disposable_1 = require("./disposable");
+Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } });
+const events_1 = require("./events");
+Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } });
+Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } });
+const cancellation_1 = require("./cancellation");
+Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } });
+Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } });
+const sharedArrayCancellation_1 = require("./sharedArrayCancellation");
+Object.defineProperty(exports, "SharedArraySenderStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } });
+Object.defineProperty(exports, "SharedArrayReceiverStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } });
+const messageReader_1 = require("./messageReader");
+Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } });
+Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } });
+Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } });
+const messageWriter_1 = require("./messageWriter");
+Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } });
+Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } });
+Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } });
+const messageBuffer_1 = require("./messageBuffer");
+Object.defineProperty(exports, "AbstractMessageBuffer", { enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } });
+const connection_1 = require("./connection");
+Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } });
+Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } });
+Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } });
+Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } });
+Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } });
+Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } });
+Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } });
+Object.defineProperty(exports, "TraceValue", { enumerable: true, get: function () { return connection_1.TraceValue; } });
+Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } });
+Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } });
+Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } });
+Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } });
+Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } });
+Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } });
+Object.defineProperty(exports, "IdCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.IdCancellationReceiverStrategy; } });
+Object.defineProperty(exports, "RequestCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.RequestCancellationReceiverStrategy; } });
+Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } });
+Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } });
+Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } });
+Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } });
+const ral_1 = __importDefault(require("./ral"));
+exports.RAL = ral_1.default;
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts
new file mode 100644
index 000000000..4028512ef
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts
@@ -0,0 +1,32 @@
+import { Event } from './events';
+import { Disposable } from './disposable';
+/**
+ * Defines a CancellationToken. This interface is not
+ * intended to be implemented. A CancellationToken must
+ * be created via a CancellationTokenSource.
+ */
+export interface CancellationToken {
+    /**
+     * Is `true` when the token has been cancelled, `false` otherwise.
+     */
+    readonly isCancellationRequested: boolean;
+    /**
+     * An {@link Event event} which fires upon cancellation.
+     */
+    readonly onCancellationRequested: Event;
+}
+export declare namespace CancellationToken {
+    const None: CancellationToken;
+    const Cancelled: CancellationToken;
+    function is(value: any): value is CancellationToken;
+}
+export interface AbstractCancellationTokenSource extends Disposable {
+    token: CancellationToken;
+    cancel(): void;
+}
+export declare class CancellationTokenSource implements AbstractCancellationTokenSource {
+    private _token;
+    get token(): CancellationToken;
+    cancel(): void;
+    dispose(): void;
+}
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js
new file mode 100644
index 000000000..ec04640d5
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js
@@ -0,0 +1,132 @@
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    var desc = Object.getOwnPropertyDescriptor(m, k);
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+      desc = { enumerable: true, get: function() { return m[k]; } };
+    }
+    Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+    var ownKeys = function(o) {
+        ownKeys = Object.getOwnPropertyNames || function (o) {
+            var ar = [];
+            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+            return ar;
+        };
+        return ownKeys(o);
+    };
+    return function (mod) {
+        if (mod && mod.__esModule) return mod;
+        var result = {};
+        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+        __setModuleDefault(result, mod);
+        return result;
+    };
+})();
+var __importDefault = (this && this.__importDefault) || function (mod) {
+    return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CancellationTokenSource = exports.CancellationToken = void 0;
+const ral_1 = __importDefault(require("./ral"));
+const Is = __importStar(require("./is"));
+const events_1 = require("./events");
+var CancellationToken;
+(function (CancellationToken) {
+    CancellationToken.None = Object.freeze({
+        isCancellationRequested: false,
+        onCancellationRequested: events_1.Event.None
+    });
+    CancellationToken.Cancelled = Object.freeze({
+        isCancellationRequested: true,
+        onCancellationRequested: events_1.Event.None
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && (candidate === CancellationToken.None
+            || candidate === CancellationToken.Cancelled
+            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
+    }
+    CancellationToken.is = is;
+})(CancellationToken || (exports.CancellationToken = CancellationToken = {}));
+const shortcutEvent = Object.freeze(function (callback, context) {
+    const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);
+    return { dispose() { handle.dispose(); } };
+});
+class MutableToken {
+    _isCancelled = false;
+    _emitter;
+    cancel() {
+        if (!this._isCancelled) {
+            this._isCancelled = true;
+            if (this._emitter) {
+                this._emitter.fire(undefined);
+                this.dispose();
+            }
+        }
+    }
+    get isCancellationRequested() {
+        return this._isCancelled;
+    }
+    get onCancellationRequested() {
+        if (this._isCancelled) {
+            return shortcutEvent;
+        }
+        if (!this._emitter) {
+            this._emitter = new events_1.Emitter();
+        }
+        return this._emitter.event;
+    }
+    dispose() {
+        if (this._emitter) {
+            this._emitter.dispose();
+            this._emitter = undefined;
+        }
+    }
+}
+class CancellationTokenSource {
+    _token;
+    get token() {
+        if (!this._token) {
+            // be lazy and create the token only when
+            // actually needed
+            this._token = new MutableToken();
+        }
+        return this._token;
+    }
+    cancel() {
+        if (!this._token) {
+            // save an object by returning the default
+            // cancelled token when cancellation happens
+            // before someone asks for the token
+            this._token = CancellationToken.Cancelled;
+        }
+        else {
+            this._token.cancel();
+        }
+    }
+    dispose() {
+        if (!this._token) {
+            // ensure to initialize with an empty token if we had none
+            this._token = CancellationToken.None;
+        }
+        else if (this._token instanceof MutableToken) {
+            // actually dispose
+            this._token.dispose();
+        }
+    }
+}
+exports.CancellationTokenSource = CancellationTokenSource;
diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts
new file mode 100644
index 000000000..b658ac188
--- /dev/null
+++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts
@@ -0,0 +1,367 @@
+/// 
+import { Message, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseMessage, ResponseError, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, _EM, ParameterStructures } from './messages';
+import type { Disposable } from './disposable';
+import { Event } from './events';
+import { CancellationToken, AbstractCancellationTokenSource } from './cancellation';
+import { MessageReader } from './messageReader';
+import { MessageWriter } from './messageWriter';
+export type ProgressToken = number | string;
+export declare namespace ProgressToken {
+    function is(value: any): value is number | string;
+}
+interface ProgressParams {
+    /**
+     * The progress token provided by the client or server.
+     */
+    token: ProgressToken;
+    /**
+     * The progress data.
+     */
+    value: T;
+}
+export declare class ProgressType {
+    /**
+     * Clients must not use these properties. They are here to ensure correct typing.
+     * in TypeScript
+     */
+    readonly __: [PR, _EM] | undefined;
+    readonly _pr: PR | undefined;
+    constructor();
+}
+export type RequestParam

= P extends null ? P | undefined : P; +export type HandlerResult = _R | ResponseError | Thenable<_R> | Thenable> | Thenable<_R | ResponseError>; +export interface StarRequestHandler { + (method: string, params: any[] | object | undefined, token: CancellationToken): HandlerResult; +} +export interface GenericRequestHandler { + (...params: any[]): HandlerResult; +} +export interface RequestHandler0 { + (token: CancellationToken): HandlerResult; +} +export interface RequestHandler { + (params: P, token: CancellationToken): HandlerResult; +} +export interface RequestHandler1 { + (p1: P1, token: CancellationToken): HandlerResult; +} +export interface RequestHandler2 { + (p1: P1, p2: P2, token: CancellationToken): HandlerResult; +} +export interface RequestHandler3 { + (p1: P1, p2: P2, p3: P3, token: CancellationToken): HandlerResult; +} +export interface RequestHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4, token: CancellationToken): HandlerResult; +} +export interface RequestHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token: CancellationToken): HandlerResult; +} +export interface RequestHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token: CancellationToken): HandlerResult; +} +export interface RequestHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token: CancellationToken): HandlerResult; +} +export interface RequestHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token: CancellationToken): HandlerResult; +} +export interface RequestHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token: CancellationToken): HandlerResult; +} +export type NotificationResult = void | Promise; +export interface StarNotificationHandler { + (method: string, params: any[] | object | undefined): NotificationResult; +} +export interface GenericNotificationHandler { + (...params: any[]): NotificationResult; +} +export interface NotificationHandler0 { + (): NotificationResult; +} +export interface NotificationHandler

{ + (params: P): NotificationResult; +} +export interface NotificationHandler1 { + (p1: P1): NotificationResult; +} +export interface NotificationHandler2 { + (p1: P1, p2: P2): NotificationResult; +} +export interface NotificationHandler3 { + (p1: P1, p2: P2, p3: P3): NotificationResult; +} +export interface NotificationHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4): NotificationResult; +} +export interface NotificationHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): NotificationResult; +} +export interface NotificationHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): NotificationResult; +} +export interface NotificationHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): NotificationResult; +} +export interface NotificationHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): NotificationResult; +} +export interface NotificationHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): NotificationResult; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare const NullLogger: Logger; +export declare enum Trace { + Off = 0, + Messages = 1, + Compact = 2, + Verbose = 3 +} +export declare namespace TraceValue { + /** + * Turn tracing off. + */ + const Off: 'off'; + /** + * Trace messages only. + */ + const Messages: 'messages'; + /** + * Compact message tracing. + */ + const Compact: 'compact'; + /** + * Verbose message tracing. + */ + const Verbose: 'verbose'; +} +export type TraceValue = 'off' | 'messages' | 'compact' | 'verbose'; +/** + * @deprecated Use TraceValue instead + */ +export declare const TraceValues: typeof TraceValue; +export type TraceValues = TraceValue; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValue; +} +export declare enum TraceFormat { + Text = "text", + JSON = "json" +} +export declare namespace TraceFormat { + function fromString(value: string): TraceFormat; +} +export interface TraceOptions { + sendNotification?: boolean; + traceFormat?: TraceFormat; +} +export interface SetTraceParams { + value: TraceValue; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(dataObject: any): void; + log(message: string, data?: string): void; +} +export declare enum ConnectionErrors { + /** + * The connection is closed. + */ + Closed = 1, + /** + * The connection got disposed. + */ + Disposed = 2, + /** + * The connection is already in listening mode. + */ + AlreadyListening = 3 +} +export declare class ConnectionError extends Error { + readonly code: ConnectionErrors; + constructor(code: ConnectionErrors, message: string); +} +export type ConnectionStrategy = { + cancelUndispatched?: (message: Message, next: (message: Message) => ResponseMessage | undefined) => ResponseMessage | undefined; +}; +export declare namespace ConnectionStrategy { + function is(value: any): value is ConnectionStrategy; +} +export type CancellationId = number | string; +export interface IdCancellationReceiverStrategy { + kind?: 'id'; + /** + * Creates a CancellationTokenSource from a cancellation id. + * + * @param id The cancellation id. + */ + createCancellationTokenSource(id: CancellationId): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace IdCancellationReceiverStrategy { + function is(value: any): value is IdCancellationReceiverStrategy; +} +export interface RequestCancellationReceiverStrategy { + kind: 'request'; + /** + * Create a cancellation token source from a given request message. + * + * @param requestMessage The request message. + */ + createCancellationTokenSource(requestMessage: RequestMessage): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace RequestCancellationReceiverStrategy { + function is(value: any): value is RequestCancellationReceiverStrategy; +} +export type CancellationReceiverStrategy = IdCancellationReceiverStrategy | RequestCancellationReceiverStrategy; +export declare namespace CancellationReceiverStrategy { + const Message: CancellationReceiverStrategy; + function is(value: any): value is CancellationReceiverStrategy; +} +export interface CancellationSenderStrategy { + /** + * Hook to enable cancellation for the given request. + * + * @param request The request to enable cancellation for. + */ + enableCancellation?(request: RequestMessage): void; + /** + * Send cancellation for the given cancellation id + * + * @param conn The connection used. + * @param id The cancellation id. + */ + sendCancellation(conn: MessageConnection, id: CancellationId): Promise; + /** + * Cleanup any cancellation state for the given cancellation id. After this + * method has been call no cancellation will be sent anymore for the given id. + * + * @param id The cancellation id. + */ + cleanup(id: CancellationId): void; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace CancellationSenderStrategy { + const Message: CancellationSenderStrategy; + function is(value: any): value is CancellationSenderStrategy; +} +export interface CancellationStrategy { + receiver: CancellationReceiverStrategy | RequestCancellationReceiverStrategy; + sender: CancellationSenderStrategy; +} +export declare namespace CancellationStrategy { + const Message: CancellationStrategy; + function is(value: any): value is CancellationStrategy; +} +export interface MessageStrategy { + handleMessage(message: Message, next: (message: Message) => NotificationResult): NotificationResult; +} +export declare namespace MessageStrategy { + function is(value: any): value is MessageStrategy; +} +/** + * Connection options. A valid connection option must have at least a + * `CancellationStrategy` or a `MessageStrategy` or a `ConnectionStrategy`. + */ +export interface ConnectionOptions { + cancellationStrategy?: CancellationStrategy; + connectionStrategy?: ConnectionStrategy; + messageStrategy?: MessageStrategy; + maxParallelism?: number; +} +export declare namespace ConnectionOptions { + function is(value: any): value is ConnectionOptions; +} +export interface MessageConnection { + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType1, p1: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType2, p1: NoInfer>, p2: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType3, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType4, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType5, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType6, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType7, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType8, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType9, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, p9: NoInfer>, token?: CancellationToken): Promise; + sendRequest(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onRequest(type: RequestType0, handler: NoInfer>): Disposable; + onRequest(type: RequestType, handler: NoInfer>): Disposable; + onRequest(type: RequestType1, handler: NoInfer>): Disposable; + onRequest(type: RequestType2, handler: NoInfer>): Disposable; + onRequest(type: RequestType3, handler: NoInfer>): Disposable; + onRequest(type: RequestType4, handler: NoInfer>): Disposable; + onRequest(type: RequestType5, handler: NoInfer>): Disposable; + onRequest(type: RequestType6, handler: NoInfer>): Disposable; + onRequest(type: RequestType7, handler: NoInfer>): Disposable; + onRequest(type: RequestType8, handler: NoInfer>): Disposable; + onRequest(type: RequestType9, handler: NoInfer>): Disposable; + onRequest(method: string, handler: GenericRequestHandler): Disposable; + onRequest(handler: StarRequestHandler): Disposable; + hasPendingResponse(): boolean; + sendNotification(type: NotificationType0): Promise; + sendNotification

(type: NotificationType

, params?: NoInfer>): Promise; + sendNotification(type: NotificationType1, p1: NoInfer>): Promise; + sendNotification(type: NotificationType2, p1: NoInfer>, p2: NoInfer>): Promise; + sendNotification(type: NotificationType3, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>): Promise; + sendNotification(type: NotificationType4, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>): Promise; + sendNotification(type: NotificationType5, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>): Promise; + sendNotification(type: NotificationType6, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>): Promise; + sendNotification(type: NotificationType7, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>): Promise; + sendNotification(type: NotificationType8, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>): Promise; + sendNotification(type: NotificationType9, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, p9: NoInfer>): Promise; + sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NoInfer>): Disposable; + onNotification(type: NotificationType1, handler: NoInfer>): Disposable; + onNotification(type: NotificationType2, handler: NoInfer>): Disposable; + onNotification(type: NotificationType3, handler: NoInfer>): Disposable; + onNotification(type: NotificationType4, handler: NoInfer>): Disposable; + onNotification(type: NotificationType5, handler: NoInfer>): Disposable; + onNotification(type: NotificationType6, handler: NoInfer>): Disposable; + onNotification(type: NotificationType7, handler: NoInfer>): Disposable; + onNotification(type: NotificationType8, handler: NoInfer>): Disposable; + onNotification(type: NotificationType9, handler: NoInfer>): Disposable; + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + onNotification(handler: StarNotificationHandler): Disposable; + onUnhandledNotification: Event; + onProgress

(type: ProgressType

, token: string | number, handler: NoInfer>): Disposable; + sendProgress

(type: ProgressType

, token: string | number, value: NoInfer>): Promise; + onUnhandledProgress: Event>; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + onError: Event<[Error, Message | undefined, number | undefined]>; + onClose: Event; + listen(): void; + end(): void; + onDispose: Event; + dispose(): void; + inspect(): void; +} +export declare function createMessageConnection(messageReader: MessageReader, messageWriter: MessageWriter, _logger?: Logger, options?: ConnectionOptions): MessageConnection; +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js new file mode 100644 index 000000000..7ea47c652 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js @@ -0,0 +1,1271 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0; +exports.createMessageConnection = createMessageConnection; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const messages_1 = require("./messages"); +const linkedMap_1 = require("./linkedMap"); +const events_1 = require("./events"); +const cancellation_1 = require("./cancellation"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressToken; +(function (ProgressToken) { + function is(value) { + return typeof value === 'string' || typeof value === 'number'; + } + ProgressToken.is = is; +})(ProgressToken || (exports.ProgressToken = ProgressToken = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + __; + _pr; + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Compact"] = 2] = "Compact"; + Trace[Trace["Verbose"] = 3] = "Verbose"; +})(Trace || (exports.Trace = Trace = {})); +var TraceValue; +(function (TraceValue) { + /** + * Turn tracing off. + */ + TraceValue.Off = 'off'; + /** + * Trace messages only. + */ + TraceValue.Messages = 'messages'; + /** + * Compact message tracing. + */ + TraceValue.Compact = 'compact'; + /** + * Verbose message tracing. + */ + TraceValue.Verbose = 'verbose'; +})(TraceValue || (exports.TraceValue = TraceValue = {})); +/** + * @deprecated Use TraceValue instead + */ +exports.TraceValues = TraceValue; +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'compact': + return Trace.Compact; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Compact: + return 'compact'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace || (exports.Trace = Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + if (!Is.string(value)) { + return TraceFormat.Text; + } + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {})); +class ConnectionError extends Error { + code; + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {})); +var IdCancellationReceiverStrategy; +(function (IdCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + IdCancellationReceiverStrategy.is = is; +})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {})); +var RequestCancellationReceiverStrategy; +(function (RequestCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + RequestCancellationReceiverStrategy.is = is; +})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + return conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {})); +var MessageStrategy; +(function (MessageStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.handleMessage); + } + MessageStrategy.is = is; +})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate + && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy) || Is.number(candidate.maxParallelism)); + } + ConnectionOptions.is = is; +})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSequenceNumber = 0; + let unknownResponseSequenceNumber = 0; + const version = '2.0'; + const maxParallelism = options?.maxParallelism ?? -1; + let inFlight = 0; + let starRequestHandler = undefined; + const requestHandlers = new Map(); + let starNotificationHandler = undefined; + const notificationHandlers = new Map(); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = new Map(); + let knownCanceledRequests = new Set(); + let requestTokens = new Map(); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSequenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSequenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.Message.isRequest(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.Message.isResponse(message)) { + // If we have unlimited parallelism we queue the response to keep + // the previous semantics. + if (maxParallelism === -1) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + // If we have limited parallelism we resolve responses to avoid + // dead locks. + handleResponse(message); + } + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + timer = (0, ral_1.default)().timer.setImmediate(async () => { + timer = undefined; + if (messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + const message = messageQueue.shift(); + let result; + try { + inFlight++; + const messageStrategy = options?.messageStrategy; + if (MessageStrategy.is(messageStrategy)) { + result = messageStrategy.handleMessage(message, handleMessage); + } + else { + result = handleMessage(message); + } + } + catch (error) { + logger.error(`Processing message queue failed: ${error.toString()}`); + } + finally { + if (result instanceof Promise) { + result.then(() => { + inFlight--; + triggerMessageQueue(); + }).catch((error) => { + logger.error(`Processing message queue failed: ${error.toString()}`); + }); + } + else { + inFlight--; + } + triggerMessageQueue(); + } + }); + } + async function handleMessage(message) { + if (messages_1.Message.isRequest(message)) { + return handleRequest(message); + } + else if (messages_1.Message.isNotification(message)) { + return handleNotification(message); + } + else if (messages_1.Message.isResponse(message)) { + return handleResponse(message); + } + else { + return handleInvalidMessage(message); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + const key = createRequestQueueKey(cancelId); + const toCancel = messageQueue.get(key); + if (messages_1.Message.isRequest(toCancel)) { + const strategy = options?.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + requestTokens.delete(cancelId); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`)); + return; + } + } + const cancellationToken = requestTokens.get(cancelId); + // The request is already running. Cancel the token + if (cancellationToken !== undefined) { + cancellationToken.cancel(); + traceReceivedNotification(message); + return; + } + else { + // Remember the cancel but still queue the message to + // clean up state in process message. + knownCanceledRequests.add(cancelId); + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + async function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return Promise.resolve(); + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers.get(requestMessage.method); + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = requestMessage.id ?? String(Date.now()); // + const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) + ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) + : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage); + if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) { + cancellationSource.cancel(); + } + if (requestMessage.id !== null) { + requestTokens.set(tokenKey, cancellationSource); + } + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime); + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const resultOrError = await handlerResult; + await reply(resultOrError, requestMessage.method, startTime); + } + catch (error) { + if (error instanceof messages_1.ResponseError) { + await reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + finally { + requestTokens.delete(tokenKey); + } + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = responseMessage.id; + const responsePromise = responsePromises.get(key); + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise !== undefined) { + responsePromises.delete(key); + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + async function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + knownCanceledRequests.delete(cancelId); + traceReceivedNotification(message); + return; + } + else { + const element = notificationHandlers.get(message.method); + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`); + } + } + await notificationHandler(); + } + else if (Array.isArray(message.params)) { + // There are JSON-RPC libraries that send progress message as positional params although + // specified as named. So convert them if this is the case. + const params = message.params; + if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) { + await notificationHandler({ token: params[0], value: params[1] }); + } + else { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`); + } + } + await notificationHandler(...params); + } + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + await notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + await starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = responseMessage.id; + const responseHandler = responsePromises.get(key); + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function stringifyTrace(params) { + if (params === undefined || params === null) { + return undefined; + } + switch (trace) { + case Trace.Verbose: + return JSON.stringify(params, null, 4); + case Trace.Compact: + return JSON.stringify(params); + default: + return undefined; + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Received parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + const paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + return messageWriter.write(notificationMessage).catch((error) => { + logger.error(`Sending notification failed.`); + throw error; + }); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers.set(type, { type: undefined, handler }); + } + else { + method = type.method; + notificationHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method !== undefined) { + if (notificationHandlers.get(method)?.handler === handler) { + notificationHandlers.delete(method); + } + } + else if (starNotificationHandler === type) { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + if (progressHandlers.get(token) === handler) { + progressHandlers.delete(token); + } + } + }; + }, + sendProgress: (_type, token, value) => { + // This should not await but simple return to ensure that we don't have another + // async scheduling. Otherwise one send could overtake another send. + return connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + function sendCancellation(connection, id) { + const p = cancellationStrategy.sender.sendCancellation(connection, id); + if (p === undefined) { + logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`); + } + else { + p.catch(() => { + logger.log(`Sending cancellation messages for id ${id} failed.`); + }); + } + } + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + let tokenWasCancelled = false; + if (token !== undefined) { + if (token.isCancellationRequested) { + tokenWasCancelled = true; + } + else { + disposable = token.onCancellationRequested(() => { + sendCancellation(connection, id); + }); + } + } + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + traceSendingRequest(requestMessage); + if (typeof cancellationStrategy.sender.enableCancellation === 'function') { + cancellationStrategy.sender.enableCancellation(requestMessage); + } + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + try { + responsePromises.set(id, responsePromise); + await messageWriter.write(requestMessage); + if (tokenWasCancelled) { + sendCancellation(connection, id); + } + } + catch (error) { + // Writing the message failed. So we need to delete it from the response promises and + // reject it. + responsePromises.delete(id); + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason')); + logger.error(`Sending request failed.`); + throw error; + } + }); + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers.set(type, { handler: handler, type: undefined }); + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + if (requestHandlers.get(method)?.handler === handler) { + requestHandlers.delete(method); + } + } + else if (starRequestHandler === type) { + starRequestHandler = undefined; + } + } + }; + }, + hasPendingResponse: () => { + return responsePromises.size > 0; + }, + trace: async (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed'); + for (const promise of responsePromises.values()) { + promise.reject(error); + } + responsePromises = new Map(); + requestTokens = new Map(); + knownCanceledRequests = new Set(); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + (0, ral_1.default)().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + const verbose = trace === Trace.Verbose || trace === Trace.Compact; + tracer.log(params.message, verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, async (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + await handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts new file mode 100644 index 000000000..99878bba4 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts @@ -0,0 +1,9 @@ +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): void; +} +export declare namespace Disposable { + function create(func: () => void): Disposable; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js new file mode 100644 index 000000000..b2800ad50 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js @@ -0,0 +1,16 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable || (exports.Disposable = Disposable = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts new file mode 100644 index 000000000..9bc71364f --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts @@ -0,0 +1,52 @@ +import type RAL from './ral'; +import { Message } from './messages'; +export interface FunctionContentEncoder { + name: string; + encode(input: Uint8Array): Promise; +} +export interface StreamContentEncoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentEncoder = FunctionContentEncoder | (FunctionContentEncoder & StreamContentEncoder); +export interface FunctionContentDecoder { + name: string; + decode(buffer: Uint8Array): Promise; +} +export interface StreamContentDecoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentDecoder = FunctionContentDecoder | (FunctionContentDecoder & StreamContentDecoder); +export interface ContentTypeEncoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeEncoder { + name: string; + encode(msg: Message, options: ContentTypeEncoderOptions): Promise; +} +export interface StreamContentTypeEncoder { + name: string; + create(options: ContentTypeEncoderOptions): RAL.WritableStream; +} +export type ContentTypeEncoder = FunctionContentTypeEncoder | (FunctionContentTypeEncoder & StreamContentTypeEncoder); +export interface ContentTypeDecoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeDecoder { + name: string; + decode(buffer: Uint8Array, options: ContentTypeDecoderOptions): Promise; +} +export interface StreamContentTypeDecoder { + name: string; + create(options: ContentTypeDecoderOptions): RAL.WritableStream; +} +export type ContentTypeDecoder = FunctionContentTypeDecoder | (FunctionContentTypeDecoder & StreamContentTypeDecoder); +interface Named { + name: string; +} +export declare namespace Encodings { + function getEncodingHeaderValue(encodings: Named[]): string | undefined; + function parseEncodingHeaderValue(value: string): string[]; +} +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js new file mode 100644 index 000000000..914ce0a5c --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js @@ -0,0 +1,70 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Encodings = void 0; +var Encodings; +(function (Encodings) { + function getEncodingHeaderValue(encodings) { + if (encodings.length === 1) { + return encodings[0].name; + } + const distribute = encodings.length - 1; + if (distribute > 1000) { + throw new Error(`Quality value can only have three decimal digits but trying to distribute ${encodings.length} elements.`); + } + const digits = Math.ceil(Math.log10(distribute)); + const factor = Math.pow(10, digits); + const diff = Math.floor((1 / distribute) * factor) / factor; + const result = []; + let q = 1; + for (const encoding of encodings) { + result.push(`${encoding.name};q=${q === 1 || q === 0 ? q.toFixed(0) : q.toFixed(digits)}`); + q = q - diff; + } + return result.join(', '); + } + Encodings.getEncodingHeaderValue = getEncodingHeaderValue; + function parseEncodingHeaderValue(value) { + const map = new Map(); + const encodings = value.split(/\s*,\s*/); + for (const value of encodings) { + const [encoding, q] = parseEncoding(value); + if (encoding === '*') { + continue; + } + let values = map.get(q); + if (values === undefined) { + values = []; + map.set(q, values); + } + values.push(encoding); + } + const keys = Array.from(map.keys()); + keys.sort((a, b) => b - a); + const result = []; + for (const key of keys) { + result.push(...map.get(key)); + } + return result; + } + Encodings.parseEncodingHeaderValue = parseEncodingHeaderValue; + function parseEncoding(value) { + let q = 1; + let encoding; + const index = value.indexOf(';q='); + if (index !== -1) { + const parsed = parseFloat(value.substr(index)); + if (!Number.isNaN(parsed)) { + q = parsed; + } + encoding = value.substr(0, index); + } + else { + encoding = value; + } + return [encoding, q]; + } +})(Encodings || (exports.Encodings = Encodings = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts new file mode 100644 index 000000000..fe8f407ae --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts @@ -0,0 +1,39 @@ +import { Disposable } from './disposable'; +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be called when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options?; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions | undefined); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event(): Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js new file mode 100644 index 000000000..fbf8d4639 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js @@ -0,0 +1,135 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Emitter = exports.Event = void 0; +const ral_1 = __importDefault(require("./ral")); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event || (exports.Event = Event = {})); +class CallbackList { + _callbacks; + _contexts; + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + (0, ral_1.default)().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + _options; + static _noop = function () { }; + _event; + _callbacks; + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts new file mode 100644 index 000000000..9261a2697 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts @@ -0,0 +1,7 @@ +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js new file mode 100644 index 000000000..7506053a8 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js @@ -0,0 +1,34 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.boolean = boolean; +exports.string = string; +exports.number = number; +exports.error = error; +exports.func = func; +exports.array = array; +exports.stringArray = stringArray; +function boolean(value) { + return value === true || value === false; +} +function string(value) { + return typeof value === 'string' || value instanceof String; +} +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +function error(value) { + return value instanceof Error; +} +function func(value) { + return typeof value === 'function'; +} +function array(value) { + return Array.isArray(value); +} +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts new file mode 100644 index 000000000..9ee2d1fa2 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts @@ -0,0 +1,55 @@ +export declare namespace Touch { + const None: 0; + const First: 1; + const AsOld: 1; + const Last: 2; + const AsNew: 2; +} +export type Touch = 0 | 1 | 2; +export declare class LinkedMap { + readonly [Symbol.toStringTag] = "LinkedMap"; + private _map; + private _head; + private _tail; + private _size; + private _state; + constructor(); + clear(): void; + isEmpty(): boolean; + get size(): number; + get first(): V | undefined; + get last(): V | undefined; + before(key: K): V | undefined; + after(key: K): V | undefined; + has(key: K): boolean; + get(key: K, touch?: Touch): V | undefined; + set(key: K, value: V, touch?: Touch): this; + delete(key: K): boolean; + remove(key: K): V | undefined; + shift(): V | undefined; + forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + protected trimOld(newSize: number): void; + private addItemFirst; + private addItemLast; + private removeItem; + private touch; + toJSON(): [K, V][]; + fromJSON(data: [K, V][]): void; +} +export declare class LRUCache extends LinkedMap { + private _limit; + private _ratio; + constructor(limit: number, ratio?: number); + get limit(): number; + set limit(limit: number); + get ratio(): number; + set ratio(ratio: number); + get(key: K, touch?: Touch): V | undefined; + peek(key: K): V | undefined; + set(key: K, value: V): this; + private checkTrim; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js new file mode 100644 index 000000000..521079a69 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js @@ -0,0 +1,412 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch || (exports.Touch = Touch = {})); +class LinkedMap { + [Symbol.toStringTag] = 'LinkedMap'; + _map; + _head; + _tail; + _size; + _state; + constructor() { + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + return this._head?.value; + } + get last() { + return this._tail?.value; + } + before(key) { + const item = this._map.get(key); + return item ? item.previous?.value : undefined; + } + after(key) { + const item = this._map.get(key); + return item ? item.next?.value : undefined; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [Symbol.iterator]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + _limit; + _ratio; + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts new file mode 100644 index 000000000..354df8d2e --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts @@ -0,0 +1,18 @@ +import RAL from './ral'; +export declare abstract class AbstractMessageBuffer implements RAL.MessageBuffer { + private _encoding; + private _chunks; + private _totalLength; + constructor(encoding?: RAL.MessageBufferEncoding); + protected abstract emptyBuffer(): Uint8Array; + protected abstract fromString(value: string, encoding: RAL.MessageBufferEncoding): Uint8Array; + protected abstract toString(value: Uint8Array, encoding: RAL.MessageBufferEncoding): string; + protected abstract asNative(buffer: Uint8Array, length?: number): Uint8Array; + protected abstract allocNative(length: number): Uint8Array; + get encoding(): RAL.MessageBufferEncoding; + append(chunk: Uint8Array | string): void; + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + tryReadBody(length: number): Uint8Array | undefined; + get numberOfBytes(): number; + private _read; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js new file mode 100644 index 000000000..7875b0e72 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js @@ -0,0 +1,155 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + _encoding; + _chunks; + _totalLength; + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders(lowerCaseKeys = false) { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error(`Message header must separate key and value using ':'\n${header}`); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(lowerCaseKeys ? key.toLowerCase() : key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + const chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts new file mode 100644 index 000000000..d447d07a2 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts @@ -0,0 +1,77 @@ +import RAL from './ral'; +import { Event } from './events'; +import { Message } from './messages'; +import { ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Disposable } from './api'; +/** + * A callback that receives each incoming JSON-RPC message. + */ +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + readonly messageToken: number; + readonly waitingTime: number; +} +/** Reads JSON-RPC messages from some underlying transport. */ +export interface MessageReader { + /** Raised whenever an error occurs while reading a message. */ + readonly onError: Event; + /** An event raised when the end of the underlying transport has been reached. */ + readonly onClose: Event; + /** + * An event that *may* be raised to inform the owner that only part of a message has been received. + * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received. + */ + readonly onPartialMessage: Event; + /** + * Begins listening for incoming messages. To be called at most once. + * @param callback A callback for receiving decoded messages. + */ + listen(callback: DataCallback): Disposable; + /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageReader { + function is(value: any): value is MessageReader; +} +export declare abstract class AbstractMessageReader implements MessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + dispose(): void; + get onError(): Event; + protected fireError(error: any): void; + get onClose(): Event; + protected fireClose(): void; + get onPartialMessage(): Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError; + abstract listen(callback: DataCallback): Disposable; +} +export interface MessageReaderOptions { + charset?: RAL.MessageBufferEncoding; + contentDecoder?: ContentDecoder; + contentDecoders?: ContentDecoder[]; + contentTypeDecoder?: ContentTypeDecoder; + contentTypeDecoders?: ContentTypeDecoder[]; +} +export declare class ReadableStreamMessageReader extends AbstractMessageReader { + private readable; + private options; + private callback; + private nextMessageLength; + private messageToken; + private buffer; + private partialMessageTimer; + private _partialMessageTimeout; + private readSemaphore; + constructor(readable: RAL.ReadableStream, options?: RAL.MessageBufferEncoding | MessageReaderOptions); + set partialMessageTimeout(timeout: number); + get partialMessageTimeout(): number; + listen(callback: DataCallback): Disposable; + private onData; + private clearPartialMessageTimer; + private setPartialMessageTimer; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js new file mode 100644 index 000000000..59c6ca675 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js @@ -0,0 +1,246 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const events_1 = require("./events"); +const semaphore_1 = require("./semaphore"); +var MessageReader; +(function (MessageReader) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader || (exports.MessageReader = MessageReader = {})); +class AbstractMessageReader { + errorEmitter; + closeEmitter; + partialMessageEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + this.partialMessageEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options ?? 'utf-8'; + } + else { + charset = options.charset ?? 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + readable; + options; + callback; + nextMessageLength; + messageToken; + buffer; + partialMessageTimer; + _partialMessageTimeout; + readSemaphore; + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + this.readSemaphore = new semaphore_1.Semaphore(1); + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + try { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(true); + if (!headers) { + return; + } + const contentLength = headers.get('content-length'); + if (!contentLength) { + this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`)); + return; + } + const length = parseInt(contentLength); + if (isNaN(length)) { + this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`)); + return; + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + // Make sure that we convert one received message after the + // other. Otherwise it could happen that a decoding of a second + // smaller message finished before the decoding of a first larger + // message and then we would deliver the second message first. + this.readSemaphore.lock(async () => { + const bytes = this.options.contentDecoder !== undefined + ? await this.options.contentDecoder.decode(body) + : body; + const message = await this.options.contentTypeDecoder.decode(bytes, this.options); + this.callback(message); + }).catch((error) => { + this.fireError(error); + }); + } + } + catch (error) { + this.fireError(error); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + this.partialMessageTimer.dispose(); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts new file mode 100644 index 000000000..fd8648880 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts @@ -0,0 +1,60 @@ +import RAL from './ral'; +import { Message } from './messages'; +import { Event } from './events'; +import { ContentEncoder, ContentTypeEncoder } from './encoding'; +/** + * Writes JSON-RPC messages to an underlying transport. + */ +export interface MessageWriter { + /** + * Raised whenever an error occurs while writing a message. + */ + readonly onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event raised when the underlying transport has closed and writing is no longer possible. + */ + readonly onClose: Event; + /** + * Sends a JSON-RPC message. + * @param msg The JSON-RPC message to be sent. + * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method. + */ + write(msg: Message): Promise; + /** + * Call when the connection using this message writer ends + * (e.g. MessageConnection.end() is called) + */ + end(): void; + /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageWriter { + function is(value: any): value is MessageWriter; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + dispose(): void; + get onError(): Event<[Error, Message | undefined, number | undefined]>; + protected fireError(error: any, message?: Message, count?: number): void; + get onClose(): Event; + protected fireClose(): void; + private asError; +} +export interface MessageWriterOptions { + charset?: RAL.MessageBufferEncoding; + contentEncoder?: ContentEncoder; + contentTypeEncoder?: ContentTypeEncoder; +} +export declare class WriteableStreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private options; + private errorCount; + private writeSemaphore; + constructor(writable: RAL.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + write(msg: Message): Promise; + private doWrite; + private handleError; + end(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js new file mode 100644 index 000000000..9db0e13fb --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js @@ -0,0 +1,157 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const semaphore_1 = require("./semaphore"); +const events_1 = require("./events"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter || (exports.MessageWriter = MessageWriter = {})); +class AbstractMessageWriter { + errorEmitter; + closeEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + if (options === undefined || typeof options === 'string') { + return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder }; + } + else { + return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + writable; + options; + errorCount; + writeSemaphore; + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts new file mode 100644 index 000000000..4d9ab2bbd --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts @@ -0,0 +1,369 @@ +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any[] | object; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: -32700; + const InvalidRequest: -32600; + const MethodNotFound: -32601; + const InvalidParams: -32602; + const InternalError: -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeStart: -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + const serverErrorStart: -32099; + /** + * An error occurred when write a message to the transport layer. + */ + const MessageWriteError: -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + const MessageReadError: -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + const PendingResponseRejected: -32097; + /** + * The connection is inactive and a use of it failed. + */ + const ConnectionInactive: -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + const ServerNotInitialized: -32002; + const UnknownErrorCode: -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeEnd: -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + const serverErrorEnd: -32000; +} +type integer = number; +export type ErrorCodes = integer; +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occurred. + */ + code: number; + /** + * A string providing a short description of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * An error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + readonly code: number; + readonly data: D | undefined; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The result of a request. This member is REQUIRED on success. + * This member MUST NOT exist if there was an error invoking the method. + */ + result?: string | number | boolean | object | any[] | null; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A LSP Log Entry. + */ +export type LSPMessageType = 'send-request' | 'receive-request' | 'send-response' | 'receive-response' | 'send-notification' | 'receive-notification'; +export interface LSPLogMessage { + type: LSPMessageType; + message: RequestMessage | ResponseMessage | NotificationMessage; + timestamp: number; +} +export declare class ParameterStructures { + private readonly kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static readonly auto: ParameterStructures; + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static readonly byPosition: ParameterStructures; + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static readonly byName: ParameterStructures; + private constructor(); + static is(value: any): value is ParameterStructures; + toString(): string; +} +/** + * An interface to type messages. + */ +export interface MessageSignature { + readonly method: string; + readonly numberOfParams: number; + readonly parameterStructures: ParameterStructures; +} +/** + * An abstract implementation of a MessageType. + */ +export declare abstract class AbstractMessageSignature implements MessageSignature { + readonly method: string; + readonly numberOfParams: number; + constructor(method: string, numberOfParams: number); + get parameterStructures(): ParameterStructures; +} +/** + * End marker interface for request and notification types. + */ +export interface _EM { + _$endMarker$_: number; +} +/** + * Classes to type request response pairs + */ +export declare class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, R, E, _EM] | undefined; + constructor(method: string); +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: any[] | object; +} +export declare class NotificationType

extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [_EM] | undefined; + constructor(method: string); +} +export declare class NotificationType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, _EM] | undefined; + constructor(method: string); +} +export declare namespace Message { + /** + * Tests if the given message is a request message + */ + function isRequest(message: Message | undefined): message is RequestMessage; + /** + * Tests if the given message is a notification message + */ + function isNotification(message: Message | undefined): message is NotificationMessage; + /** + * Tests if the given message is a response message + */ + function isResponse(message: Message | undefined): message is ResponseMessage; +} +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js new file mode 100644 index 000000000..5e4a720b9 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js @@ -0,0 +1,436 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = __importStar(require("./is")); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = -32099; + /** + * An error occurred when write a message to the transport layer. + */ + ErrorCodes.MessageWriteError = -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + ErrorCodes.MessageReadError = -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + ErrorCodes.PendingResponseRejected = -32097; + /** + * The connection is inactive and a use of it failed. + */ + ErrorCodes.ConnectionInactive = -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = -32000; +})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + code; + data; + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + const result = { + code: this.code, + message: this.message + }; + if (this.data !== undefined) { + result.data = this.data; + } + return result; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static auto = new ParameterStructures('auto'); + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static byPosition = new ParameterStructures('byPosition'); + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static byName = new ParameterStructures('byName'); + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + method; + numberOfParams; + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +var Message; +(function (Message) { + /** + * Tests if the given message is a request message + */ + function isRequest(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); + } + Message.isRequest = isRequest; + /** + * Tests if the given message is a notification message + */ + function isNotification(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; + } + Message.isNotification = isNotification; + /** + * Tests if the given message is a response message + */ + function isResponse(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); + } + Message.isResponse = isResponse; +})(Message || (exports.Message = Message = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts new file mode 100644 index 000000000..e14ec4ae1 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts @@ -0,0 +1,74 @@ +import type { Disposable } from './disposable'; +import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding'; +interface _MessageBuffer { + readonly encoding: RAL.MessageBufferEncoding; + /** + * Append data to the message buffer. + * + * @param chunk the data to append. + */ + append(chunk: Uint8Array | string): void; + /** + * Tries to read the headers from the buffer + * + * @param lowerCaseKeys Whether the keys should be stored lower case. Doing + * so is recommended since HTTP headers are case insensitive. + * + * @returns the header properties or undefined in not enough data can be read. + */ + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + /** + * Tries to read the body of the given length. + * + * @param length the amount of bytes to read. + * @returns the data or undefined int less data is available. + */ + tryReadBody(length: number): Uint8Array | undefined; +} +type _MessageBufferEncoding = 'ascii' | 'utf-8'; +interface _ReadableStream { + onData(listener: (data: Uint8Array) => void): Disposable; + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; +} +interface _WritableStream { + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; + write(data: Uint8Array): Promise; + write(data: string, encoding: _MessageBufferEncoding): Promise; + end(): void; +} +interface _DuplexStream extends _ReadableStream, _WritableStream { +} +interface RAL { + readonly applicationJson: { + readonly encoder: ContentTypeEncoder; + readonly decoder: ContentTypeDecoder; + }; + readonly messageBuffer: { + create(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; + }; + readonly console: { + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + }; + readonly timer: { + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; + setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + }; +} +declare function RAL(): RAL; +declare namespace RAL { + type MessageBuffer = _MessageBuffer; + type MessageBufferEncoding = _MessageBufferEncoding; + type ReadableStream = _ReadableStream; + type WritableStream = _WritableStream; + type DuplexStream = _DuplexStream; + function install(ral: RAL): void; +} +export default RAL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js new file mode 100644 index 000000000..ae335df56 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js @@ -0,0 +1,23 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts new file mode 100644 index 000000000..1261daab5 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts @@ -0,0 +1,10 @@ +export declare class Semaphore { + private _capacity; + private _active; + private _waiting; + constructor(capacity?: number); + lock(thunk: () => T | PromiseLike): Promise; + get active(): number; + private runNext; + private doRunNext; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js new file mode 100644 index 000000000..e1705cca0 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js @@ -0,0 +1,74 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Semaphore = void 0; +const ral_1 = __importDefault(require("./ral")); +class Semaphore { + _capacity; + _active; + _waiting; + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, ral_1.default)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`Too many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts new file mode 100644 index 000000000..c6e8d08ea --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts @@ -0,0 +1,15 @@ +import { RequestMessage } from './messages'; +import { AbstractCancellationTokenSource } from './cancellation'; +import { CancellationId, RequestCancellationReceiverStrategy, CancellationSenderStrategy, MessageConnection } from './connection'; +export declare class SharedArraySenderStrategy implements CancellationSenderStrategy { + private readonly buffers; + constructor(); + enableCancellation(request: RequestMessage): void; + sendCancellation(_conn: MessageConnection, id: CancellationId): Promise; + cleanup(id: CancellationId): void; + dispose(): void; +} +export declare class SharedArrayReceiverStrategy implements RequestCancellationReceiverStrategy { + readonly kind: "request"; + createCancellationTokenSource(request: RequestMessage): AbstractCancellationTokenSource; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js new file mode 100644 index 000000000..a9318222f --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js @@ -0,0 +1,77 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0; +const cancellation_1 = require("./cancellation"); +var CancellationState; +(function (CancellationState) { + CancellationState.Continue = 0; + CancellationState.Cancelled = 1; +})(CancellationState || (CancellationState = {})); +class SharedArraySenderStrategy { + buffers; + constructor() { + this.buffers = new Map(); + } + enableCancellation(request) { + if (request.id === null) { + return; + } + const buffer = new SharedArrayBuffer(4); + const data = new Int32Array(buffer, 0, 1); + data[0] = CancellationState.Continue; + this.buffers.set(request.id, buffer); + request.$cancellationData = buffer; + } + async sendCancellation(_conn, id) { + const buffer = this.buffers.get(id); + if (buffer === undefined) { + return; + } + const data = new Int32Array(buffer, 0, 1); + Atomics.store(data, 0, CancellationState.Cancelled); + } + cleanup(id) { + this.buffers.delete(id); + } + dispose() { + this.buffers.clear(); + } +} +exports.SharedArraySenderStrategy = SharedArraySenderStrategy; +class SharedArrayBufferCancellationToken { + data; + constructor(buffer) { + this.data = new Int32Array(buffer, 0, 1); + } + get isCancellationRequested() { + return Atomics.load(this.data, 0) === CancellationState.Cancelled; + } + get onCancellationRequested() { + throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`); + } +} +class SharedArrayBufferCancellationTokenSource { + token; + constructor(buffer) { + this.token = new SharedArrayBufferCancellationToken(buffer); + } + cancel() { + } + dispose() { + } +} +class SharedArrayReceiverStrategy { + kind = 'request'; + createCancellationTokenSource(request) { + const buffer = request.$cancellationData; + if (buffer === undefined) { + return new cancellation_1.CancellationTokenSource(); + } + return new SharedArrayBufferCancellationTokenSource(buffer); + } +} +exports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts new file mode 100644 index 000000000..926a954eb --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts @@ -0,0 +1,58 @@ +import { ChildProcess } from 'child_process'; +import { Socket } from 'net'; +import { MessagePort, Worker } from 'worker_threads'; +import { RAL, AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, ReadableStreamMessageReader, WriteableStreamMessageWriter, MessageWriterOptions, MessageReaderOptions, MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, MessageConnection, Logger, Disposable } from '../common/api'; +export * from '../common/api'; +export declare class IPCMessageReader extends AbstractMessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): Disposable; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class PortMessageReader extends AbstractMessageReader implements MessageReader { + private onData; + constructor(port: MessagePort | Worker); + listen(callback: DataCallback): Disposable; +} +export declare class PortMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly port; + private errorCount; + constructor(port: MessagePort | Worker); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class SocketMessageReader extends ReadableStreamMessageReader { + constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding); +} +export declare class SocketMessageWriter extends WriteableStreamMessageWriter { + private socket; + constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + dispose(): void; +} +export declare class StreamMessageReader extends ReadableStreamMessageReader { + constructor(readable: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions); +} +export declare class StreamMessageWriter extends WriteableStreamMessageWriter { + constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); +} +export declare function generateRandomPipeName(): string; +export interface PipeTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export interface SocketTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; +export declare function createMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js new file mode 100644 index 000000000..716604683 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js @@ -0,0 +1,289 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +exports.generateRandomPipeName = generateRandomPipeName; +exports.createClientPipeTransport = createClientPipeTransport; +exports.createServerPipeTransport = createServerPipeTransport; +exports.createClientSocketTransport = createClientSocketTransport; +exports.createServerSocketTransport = createServerSocketTransport; +exports.createMessageConnection = createMessageConnection; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = __importDefault(require("./ril")); +// Install the node runtime abstract. +ril_1.default.install(); +const path = __importStar(require("path")); +const os = __importStar(require("os")); +const fs = __importStar(require("fs")); +const crypto_1 = require("crypto"); +const net_1 = require("net"); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + process; + constructor(process) { + super(); + this.process = process; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + process; + errorCount; + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class PortMessageReader extends api_1.AbstractMessageReader { + onData; + constructor(port) { + super(); + this.onData = new api_1.Emitter; + port.on('close', () => this.fireClose); + port.on('error', (error) => this.fireError(error)); + port.on('message', (message) => { + this.onData.fire(message); + }); + } + listen(callback) { + return this.onData.event(callback); + } +} +exports.PortMessageReader = PortMessageReader; +class PortMessageWriter extends api_1.AbstractMessageWriter { + port; + errorCount; + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.on('close', () => this.fireClose()); + port.on('error', (error) => this.fireError(error)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.PortMessageWriter = PortMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super((0, ril_1.default)().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + socket; + constructor(socket, options) { + super((0, ril_1.default)().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readable, encoding) { + super((0, ril_1.default)().stream.asReadableStream(readable), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super((0, ril_1.default)().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 103] +]); +function generateRandomPipeName() { + if (process.platform === 'win32') { + return `\\\\.\\pipe\\lsp-${(0, crypto_1.randomBytes)(16).toString('hex')}-sock`; + } + let randomLength = 32; + const fixedLength = '/lsp-.sock'.length; + const tmpDir = fs.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir()); + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined) { + randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength); + } + if (randomLength < 16) { + throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`); + } + const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString('hex'); + return path.join(tmpDir, `lsp-${randomSuffix}.sock`); +} +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts new file mode 100644 index 000000000..02202e00d --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts @@ -0,0 +1,12 @@ +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: NodeJS.ReadableStream) => RAL.ReadableStream; + readonly asWritableStream: (stream: NodeJS.WritableStream) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js new file mode 100644 index 000000000..10bcc0a63 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js @@ -0,0 +1,163 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("util"); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + static emptyBuffer = Buffer.allocUnsafe(0); + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +class ReadableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return api_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setImmediate(callback, ...args); + return { dispose: () => clearImmediate(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/package.json b/node_modules/typescript/vendor/vscode-jsonrpc/package.json new file mode 100644 index 000000000..457b7ca95 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/package.json @@ -0,0 +1,54 @@ +{ + "name": "vscode-jsonrpc", + "description": "A json rpc implementation over streams", + "version": "9.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "jsonrpc" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "engines": { + "node": ">=14.0.0" + }, + "exports": { + ".": { + "types": "./lib/common/api.d.ts", + "default": "./lib/common/api.js" + }, + "./node": { + "types": "./lib/node/main.d.ts", + "node": "./lib/node/main.js" + }, + "./browser": { + "types": "./lib/browser/main.d.ts", + "browser": "./lib/browser/main.js" + } + }, + "devDependencies": { + "@types/msgpack-lite": "^0.1.12", + "msgpack-lite": "^0.1.26" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "preversion": "npm test", + "compile": "tsc -b ./tsconfig.json", + "watch": "tsc -b ./tsconfig.watch.json -w", + "clean": "rimraf lib && rimraf dist", + "lint": "eslint src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/", + "webpack": "node ../build/bin/webpack --mode none --config ./webpack.config.js", + "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:publish": "tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test" + } +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts new file mode 100644 index 000000000..8c4d2eeac --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts @@ -0,0 +1,5 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git a/node_modules/undici-types/LICENSE b/node_modules/undici-types/LICENSE new file mode 100644 index 000000000..e7323bb52 --- /dev/null +++ b/node_modules/undici-types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Matteo Collina and Undici contributors + +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. diff --git a/node_modules/undici-types/README.md b/node_modules/undici-types/README.md new file mode 100644 index 000000000..20a721c44 --- /dev/null +++ b/node_modules/undici-types/README.md @@ -0,0 +1,6 @@ +# undici-types + +This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. + +- [GitHub nodejs/undici](https://github.com/nodejs/undici) +- [Undici Documentation](https://undici.nodejs.org/#/) diff --git a/node_modules/undici-types/agent.d.ts b/node_modules/undici-types/agent.d.ts new file mode 100644 index 000000000..3d41105ef --- /dev/null +++ b/node_modules/undici-types/agent.d.ts @@ -0,0 +1,30 @@ +import { URL } from 'node:url' +import Pool from './pool' +import Dispatcher from './dispatcher' +import TClientStats from './client-stats' +import TPoolStats from './pool-stats' + +export default Agent + +declare class Agent extends Dispatcher { + constructor (opts?: Agent.Options) + /** `true` after `dispatcher.close()` has been called. */ + closed: boolean + /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ + destroyed: boolean + /** Dispatches a request. */ + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Aggregate stats for a Agent by origin. */ + readonly stats: Record +} + +declare namespace Agent { + export interface Options extends Pool.Options { + /** Default: `(origin, opts) => new Pool(origin, opts)`. */ + factory?(origin: string | URL, opts: Object): Dispatcher; + maxOrigins?: number + } + + export interface DispatchOptions extends Dispatcher.DispatchOptions { + } +} diff --git a/node_modules/undici-types/api.d.ts b/node_modules/undici-types/api.d.ts new file mode 100644 index 000000000..b362b14f2 --- /dev/null +++ b/node_modules/undici-types/api.d.ts @@ -0,0 +1,43 @@ +import { URL, UrlObject } from 'node:url' +import { Duplex } from 'node:stream' +import Dispatcher from './dispatcher' + +/** Performs an HTTP request. */ +declare function request ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path' | 'method'> & Partial>, +): Promise> + +/** A faster version of `request`. */ +declare function stream ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, + factory: Dispatcher.StreamFactory +): Promise> + +/** For easy use with `stream.pipeline`. */ +declare function pipeline ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, + handler: Dispatcher.PipelineHandler +): Duplex + +/** Starts two-way communications with the requested resource. */ +declare function connect ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'> +): Promise> + +/** Upgrade to a different protocol. */ +declare function upgrade ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit +): Promise + +export { + request, + stream, + pipeline, + connect, + upgrade +} diff --git a/node_modules/undici-types/balanced-pool.d.ts b/node_modules/undici-types/balanced-pool.d.ts new file mode 100644 index 000000000..1813e0ca9 --- /dev/null +++ b/node_modules/undici-types/balanced-pool.d.ts @@ -0,0 +1,30 @@ +import Pool from './pool' +import Dispatcher from './dispatcher' +import { URL } from 'node:url' + +export default BalancedPool + +type BalancedPoolConnectOptions = Omit + +declare class BalancedPool extends Dispatcher { + constructor (url: string | string[] | URL | URL[], options?: Pool.Options) + + addUpstream (upstream: string | URL): BalancedPool + removeUpstream (upstream: string | URL): BalancedPool + getUpstream (upstream: string | URL): Pool | undefined + upstreams: Array + + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: BalancedPoolConnectOptions + ): Promise + override connect ( + options: BalancedPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} diff --git a/node_modules/undici-types/cache-interceptor.d.ts b/node_modules/undici-types/cache-interceptor.d.ts new file mode 100644 index 000000000..8588ccdcb --- /dev/null +++ b/node_modules/undici-types/cache-interceptor.d.ts @@ -0,0 +1,179 @@ +import { Readable, Writable } from 'node:stream' + +export default CacheHandler + +declare namespace CacheHandler { + export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + + export interface CacheHandlerOptions { + store: CacheStore + + cacheByDefault?: number + + type?: CacheOptions['type'] + } + + export interface CacheOptions { + store?: CacheStore + + /** + * The methods to cache + * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST) + * invalidate the cache for a origin. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons + * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1 + */ + methods?: CacheMethods[] + + /** + * RFC9111 allows for caching responses that we aren't explicitly told to + * cache or to not cache. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5 + * @default undefined + */ + cacheByDefault?: number + + /** + * TODO docs + * @default 'shared' + */ + type?: 'shared' | 'private' + + /** + * Array of origins to cache. Only requests to these origins will be cached. + * Supports strings (case insensitive) and RegExp patterns. + * @default undefined (cache all origins) + */ + origins?: (string | RegExp)[] + } + + export interface CacheControlDirectives { + 'max-stale'?: number; + 'min-fresh'?: number; + 'max-age'?: number; + 's-maxage'?: number; + 'stale-while-revalidate'?: number; + 'stale-if-error'?: number; + public?: true; + private?: true | string[]; + 'no-store'?: true; + 'no-cache'?: true | string[]; + 'must-revalidate'?: true; + 'proxy-revalidate'?: true; + immutable?: true; + 'no-transform'?: true; + 'must-understand'?: true; + 'only-if-cached'?: true; + } + + export interface CacheKey { + origin: string + method: string + path: string + headers?: Record + } + + export interface CacheValue { + statusCode: number + statusMessage: string + headers: Record + vary?: Record + etag?: string + cacheControlDirectives?: CacheControlDirectives + cachedAt: number + staleAt: number + deleteAt: number + } + + export interface DeleteByUri { + origin: string + method: string + path: string + } + + type GetResult = { + statusCode: number + statusMessage: string + headers: Record + vary?: Record + etag?: string + body?: Readable | Iterable | AsyncIterable | Buffer | Iterable | AsyncIterable | string + cacheControlDirectives: CacheControlDirectives, + cachedAt: number + staleAt: number + deleteAt: number + } + + /** + * Underlying storage provider for cached responses + */ + export interface CacheStore { + get(key: CacheKey): GetResult | Promise | undefined + + createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined + + delete(key: CacheKey): void | Promise + } + + export interface MemoryCacheStoreOpts { + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxSize?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + + errorCallback?: (err: Error) => void + } + + export class MemoryCacheStore implements CacheStore { + constructor (opts?: MemoryCacheStoreOpts) + + get (key: CacheKey): GetResult | Promise | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise + } + + export interface SqliteCacheStoreOpts { + /** + * Location of the database + * @default ':memory:' + */ + location?: string + + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + } + + export class SqliteCacheStore implements CacheStore { + constructor (opts?: SqliteCacheStoreOpts) + + /** + * Closes the connection to the database + */ + close (): void + + get (key: CacheKey): GetResult | Promise | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise + } +} diff --git a/node_modules/undici-types/cache.d.ts b/node_modules/undici-types/cache.d.ts new file mode 100644 index 000000000..4c3333576 --- /dev/null +++ b/node_modules/undici-types/cache.d.ts @@ -0,0 +1,36 @@ +import type { RequestInfo, Response, Request } from './fetch' + +export interface CacheStorage { + match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, + has (cacheName: string): Promise, + open (cacheName: string): Promise, + delete (cacheName: string): Promise, + keys (): Promise +} + +declare const CacheStorage: { + prototype: CacheStorage + new(): CacheStorage +} + +export interface Cache { + match (request: RequestInfo, options?: CacheQueryOptions): Promise, + matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, + add (request: RequestInfo): Promise, + addAll (requests: RequestInfo[]): Promise, + put (request: RequestInfo, response: Response): Promise, + delete (request: RequestInfo, options?: CacheQueryOptions): Promise, + keys (request?: RequestInfo, options?: CacheQueryOptions): Promise +} + +export interface CacheQueryOptions { + ignoreSearch?: boolean, + ignoreMethod?: boolean, + ignoreVary?: boolean +} + +export interface MultiCacheQueryOptions extends CacheQueryOptions { + cacheName?: string +} + +export declare const caches: CacheStorage diff --git a/node_modules/undici-types/client-stats.d.ts b/node_modules/undici-types/client-stats.d.ts new file mode 100644 index 000000000..ad9bd8482 --- /dev/null +++ b/node_modules/undici-types/client-stats.d.ts @@ -0,0 +1,15 @@ +import Client from './client' + +export default ClientStats + +declare class ClientStats { + constructor (pool: Client) + /** If socket has open connection. */ + connected: boolean + /** Number of open socket connections in this client that do not have an active request. */ + pending: number + /** Number of currently active requests of this client. */ + running: number + /** Number of active, pending, or queued requests of this client. */ + size: number +} diff --git a/node_modules/undici-types/client.d.ts b/node_modules/undici-types/client.d.ts new file mode 100644 index 000000000..e3b121962 --- /dev/null +++ b/node_modules/undici-types/client.d.ts @@ -0,0 +1,134 @@ +import { URL } from 'node:url' +import Dispatcher from './dispatcher' +import buildConnector from './connector' +import TClientStats from './client-stats' + +type ClientConnectOptions = Omit, 'origin'> + +/** + * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. + */ +export class Client extends Dispatcher { + constructor (url: string | URL, options?: Client.Options) + /** Property to get and set the pipelining factor. */ + pipelining: number + /** `true` after `client.close()` has been called. */ + closed: boolean + /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a Client. */ + readonly stats: TClientStats + + // Override dispatcher APIs. + override connect ( + options: ClientConnectOptions + ): Promise> + override connect ( + options: ClientConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +export declare namespace Client { + export interface Options { + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + headersTimeout?: number; + /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ + socketTimeout?: never; + /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ + requestTimeout?: never; + /** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + bodyTimeout?: number; + /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ + idleTimeout?: never; + /** @deprecated unsupported keepAlive, use pipelining=0 instead */ + keepAlive?: never; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ + maxKeepAliveTimeout?: never; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */ + socketPath?: string; + /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Only enable values greater than `1` when the remote server is trusted. Default: `1`. */ + pipelining?: number; + /** @deprecated use the connect option instead */ + tls?: never; + /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ + strictContentLength?: boolean; + /** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */ + maxCachedSessions?: number; + /** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */ + connect?: Partial | buildConnector.connector; + /** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */ + maxRequestsPerClient?: number; + /** Local IP address the socket should connect from. */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** WebSocket-specific options */ + webSocket?: Client.WebSocketOptions; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. + * @default true + */ + allowH2?: boolean; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number; + /** + * @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE). + * @default 262144 + */ + initialWindowSize?: number; + /** + * @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize). + * @default 524288 + */ + connectionWindowSize?: number; + /** + * @description Time interval between PING frames dispatch + * @default 60000 + */ + pingInterval?: number; + } + export interface SocketInfo { + localAddress?: string + localPort?: number + remoteAddress?: string + remotePort?: number + remoteFamily?: string + timeout?: number + bytesWritten?: number + bytesRead?: number + } + export interface WebSocketOptions { + /** + * Maximum number of fragments in a message. Set to 0 to disable the limit. + * @default 131072 + */ + maxFragments?: number; + /** + * Maximum allowed payload size in bytes for WebSocket messages. + * Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages. + * Set to 0 to disable the limit. + * @default 134217728 (128 MB) + */ + maxPayloadSize?: number; + } +} + +export default Client diff --git a/node_modules/undici-types/connector.d.ts b/node_modules/undici-types/connector.d.ts new file mode 100644 index 000000000..b089942f9 --- /dev/null +++ b/node_modules/undici-types/connector.d.ts @@ -0,0 +1,37 @@ +import { TLSSocket, ConnectionOptions } from 'node:tls' +import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'node:net' + +export default buildConnector +declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector + +declare namespace buildConnector { + export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { + allowH2?: boolean; + preferH2?: boolean; + maxCachedSessions?: number | null; + socketPath?: string | null; + timeout?: number | null; + port?: number; + keepAlive?: boolean | null; + keepAliveInitialDelay?: number | null; + typeOfService?: number | null; + } + + export interface Options { + hostname: string + host?: string + protocol: string + port: string + servername?: string + localAddress?: string | null + socketPath?: string | null + httpSocket?: Socket + } + + export type Callback = (...args: CallbackArgs) => void + type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] + + export interface connector { + (options: buildConnector.Options, callback: buildConnector.Callback): void + } +} diff --git a/node_modules/undici-types/content-type.d.ts b/node_modules/undici-types/content-type.d.ts new file mode 100644 index 000000000..f2a87f1b7 --- /dev/null +++ b/node_modules/undici-types/content-type.d.ts @@ -0,0 +1,21 @@ +/// + +interface MIMEType { + type: string + subtype: string + parameters: Map + essence: string +} + +/** + * Parse a string to a {@link MIMEType} object. Returns `failure` if the string + * couldn't be parsed. + * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type + */ +export function parseMIMEType (input: string): 'failure' | MIMEType + +/** + * Convert a MIMEType object to a string. + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +export function serializeAMimeType (mimeType: MIMEType): string diff --git a/node_modules/undici-types/cookies.d.ts b/node_modules/undici-types/cookies.d.ts new file mode 100644 index 000000000..d8dc1f60c --- /dev/null +++ b/node_modules/undici-types/cookies.d.ts @@ -0,0 +1,30 @@ +/// + +import type { Headers } from './fetch' + +export interface Cookie { + name: string + value: string + expires?: Date | number + maxAge?: number + domain?: string + path?: string + secure?: boolean + httpOnly?: boolean + sameSite?: 'Strict' | 'Lax' | 'None' + unparsed?: string[] +} + +export function deleteCookie ( + headers: Headers, + name: string, + attributes?: { path?: string, domain?: string } +): void + +export function getCookies (headers: Headers): Record + +export function getSetCookies (headers: Headers): Cookie[] + +export function setCookie (headers: Headers, cookie: Cookie): void + +export function parseCookie (cookie: string): Cookie | null diff --git a/node_modules/undici-types/diagnostics-channel.d.ts b/node_modules/undici-types/diagnostics-channel.d.ts new file mode 100644 index 000000000..3c6a5299d --- /dev/null +++ b/node_modules/undici-types/diagnostics-channel.d.ts @@ -0,0 +1,74 @@ +import { Socket } from 'node:net' +import { URL } from 'node:url' +import buildConnector from './connector' +import Dispatcher from './dispatcher' + +declare namespace DiagnosticsChannel { + interface Request { + origin?: string | URL; + completed: boolean; + method?: Dispatcher.HttpMethod; + path: string; + headers: any; + } + interface Response { + statusCode: number; + statusText: string; + headers: Array; + } + interface ConnectParams { + host: URL['host']; + hostname: URL['hostname']; + protocol: URL['protocol']; + port: URL['port']; + servername: string | null; + } + type Connector = buildConnector.connector + export interface RequestCreateMessage { + request: Request; + } + export interface RequestBodySentMessage { + request: Request; + } + + export interface RequestBodyChunkSentMessage { + request: Request; + chunk: Uint8Array | string; + } + export interface RequestBodyChunkReceivedMessage { + request: Request; + chunk: Buffer; + } + export interface RequestHeadersMessage { + request: Request; + response: Response; + } + export interface RequestTrailersMessage { + request: Request; + trailers: Array; + } + export interface RequestErrorMessage { + request: Request; + error: Error; + } + export interface ClientSendHeadersMessage { + request: Request; + headers: string; + socket: Socket; + } + export interface ClientBeforeConnectMessage { + connectParams: ConnectParams; + connector: Connector; + } + export interface ClientConnectedMessage { + socket: Socket; + connectParams: ConnectParams; + connector: Connector; + } + export interface ClientConnectErrorMessage { + error: Error; + socket: Socket; + connectParams: ConnectParams; + connector: Connector; + } +} diff --git a/node_modules/undici-types/dispatcher.d.ts b/node_modules/undici-types/dispatcher.d.ts new file mode 100644 index 000000000..1c2e3357c --- /dev/null +++ b/node_modules/undici-types/dispatcher.d.ts @@ -0,0 +1,253 @@ +import { URL } from 'node:url' +import { Duplex, Readable, Writable } from 'node:stream' +import { EventEmitter } from 'node:events' +import { Blob } from 'node:buffer' +import { IncomingHttpHeaders, OutgoingHttpHeaders } from './header' +import BodyReadable from './readable' +import { FormData } from './formdata' +import Errors from './errors' +import { Autocomplete } from './utility' + +export default Dispatcher + +export type UndiciHeaders = OutgoingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null + +/** Dispatcher is the core API used to dispatch requests. */ +declare class Dispatcher extends EventEmitter { + /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */ + dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Starts two-way communications with the requested resource. */ + connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void + connect(options: Dispatcher.ConnectOptions): Promise> + /** Compose a chain of dispatchers */ + compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + /** Performs an HTTP request. */ + request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void + request(options: Dispatcher.RequestOptions): Promise> + /** For easy use with `stream.pipeline`. */ + pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex + /** A faster version of `Dispatcher.request`. */ + stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void + stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise> + /** Upgrade to a different protocol. */ + upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void + upgrade (options: Dispatcher.UpgradeOptions): Promise + /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */ + close (callback: () => void): void + close (): Promise + /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */ + destroy (err: Error | null, callback: () => void): void + destroy (callback: () => void): void + destroy (err: Error | null): Promise + destroy (): Promise + + on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + on (eventName: 'drain', callback: (origin: URL) => void): this + + once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + once (eventName: 'drain', callback: (origin: URL) => void): this + + off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + off (eventName: 'drain', callback: (origin: URL) => void): this + + addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + addListener (eventName: 'drain', callback: (origin: URL) => void): this + + removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + removeListener (eventName: 'drain', callback: (origin: URL) => void): this + + prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependListener (eventName: 'drain', callback: (origin: URL) => void): this + + prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this + + listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] + listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + listeners (eventName: 'drain'): ((origin: URL) => void)[] + + rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] + rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + rawListeners (eventName: 'drain'): ((origin: URL) => void)[] + + emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean + emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean + emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean + emit (eventName: 'drain', origin: URL): boolean +} + +declare namespace Dispatcher { + export interface ComposedDispatcher extends Dispatcher { } + export type Dispatch = Dispatcher['dispatch'] + export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch + export interface DispatchOptions { + origin?: string | URL; + path: string; + method: HttpMethod; + /** Default: `null` */ + body?: string | Buffer | Uint8Array | Readable | null | FormData; + /** Default: `null` */ + headers?: UndiciHeaders; + /** Query string params to be embedded in the request URL. Default: `null` */ + query?: Record; + /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ + idempotent?: boolean; + /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */ + blocking?: boolean; + /** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. */ + typeOfService?: number | null; + /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ + upgrade?: boolean | string | null; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + headersTimeout?: number | null; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + bodyTimeout?: number | null; + /** Whether the request should stablish a keep-alive or not. Default `false` */ + reset?: boolean; + /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */ + expectContinue?: boolean; + } + export interface ConnectOptions { + origin: string | URL; + path: string; + /** Default: `null` */ + headers?: UndiciHeaders; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** This argument parameter is passed through to `ConnectData` */ + opaque?: TOpaque; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + } + export interface RequestOptions extends DispatchOptions { + /** Default: `null` */ + opaque?: TOpaque; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** Default: `null` */ + onInfo?: (info: { statusCode: number, headers: Record }) => void; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + /** Default: `64 KiB` */ + highWaterMark?: number; + } + export interface PipelineOptions extends RequestOptions { + /** `true` if the `handler` will return an object stream. Default: `false` */ + objectMode?: boolean; + } + export interface UpgradeOptions { + path: string; + /** Default: `'GET'` */ + method?: string; + /** Default: `null` */ + headers?: UndiciHeaders; + /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */ + protocol?: string; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + } + export interface ConnectData { + statusCode: number; + headers: IncomingHttpHeaders; + socket: Duplex; + opaque: TOpaque; + } + export interface ResponseData { + statusCode: number; + statusText: string; + headers: IncomingHttpHeaders; + body: BodyReadable & BodyMixin; + trailers: Record; + opaque: TOpaque; + context: object; + } + export interface PipelineHandlerData { + statusCode: number; + headers: IncomingHttpHeaders; + opaque: TOpaque; + body: BodyReadable; + context: object; + } + export interface StreamData { + opaque: TOpaque; + trailers: Record; + } + export interface UpgradeData { + headers: IncomingHttpHeaders; + socket: Duplex; + opaque: TOpaque; + } + export interface StreamFactoryData { + statusCode: number; + headers: IncomingHttpHeaders; + opaque: TOpaque; + context: object; + } + export type StreamFactory = (data: StreamFactoryData) => Writable + + export interface DispatchController { + get aborted(): boolean + get paused(): boolean + get reason(): Error | null + rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null + rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null + abort(reason: Error): void + pause(): void + resume(): void + } + + export interface DispatchHandler { + onRequestStart?(controller: DispatchController, context: any): void; + onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void; + onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void; + onResponseData?(controller: DispatchController, chunk: Buffer): void; + onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void; + onResponseError?(controller: DispatchController, error: Error): void; + + /** Invoked when response is received, before headers have been read. **/ + onResponseStarted?(): void; + /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ + onBodySent?(chunk: Buffer): void; + /** Invoked after the request body is fully sent. */ + onRequestSent?(): void; + } + export type PipelineHandler = (data: PipelineHandlerData) => Readable + export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'> + + /** + * @link https://fetch.spec.whatwg.org/#body-mixin + */ + interface BodyMixin { + readonly body?: never; + readonly bodyUsed: boolean; + arrayBuffer(): Promise; + blob(): Promise; + bytes(): Promise; + formData(): Promise; + json(): Promise; + text(): Promise; + } + + export interface DispatchInterceptor { + (dispatch: Dispatch): Dispatch + } +} diff --git a/node_modules/undici-types/dispatcher1-wrapper.d.ts b/node_modules/undici-types/dispatcher1-wrapper.d.ts new file mode 100644 index 000000000..f8a7d5e0d --- /dev/null +++ b/node_modules/undici-types/dispatcher1-wrapper.d.ts @@ -0,0 +1,7 @@ +import Dispatcher from './dispatcher' + +export default Dispatcher1Wrapper + +declare class Dispatcher1Wrapper extends Dispatcher { + constructor (dispatcher: Dispatcher) +} diff --git a/node_modules/undici-types/env-http-proxy-agent.d.ts b/node_modules/undici-types/env-http-proxy-agent.d.ts new file mode 100644 index 000000000..1733d7f6e --- /dev/null +++ b/node_modules/undici-types/env-http-proxy-agent.d.ts @@ -0,0 +1,22 @@ +import Agent from './agent' +import ProxyAgent from './proxy-agent' +import Dispatcher from './dispatcher' + +export default EnvHttpProxyAgent + +declare class EnvHttpProxyAgent extends Dispatcher { + constructor (opts?: EnvHttpProxyAgent.Options) + + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean +} + +declare namespace EnvHttpProxyAgent { + export interface Options extends Omit { + /** Overrides the value of the HTTP_PROXY environment variable */ + httpProxy?: string; + /** Overrides the value of the HTTPS_PROXY environment variable */ + httpsProxy?: string; + /** Overrides the value of the NO_PROXY environment variable */ + noProxy?: string; + } +} diff --git a/node_modules/undici-types/errors.d.ts b/node_modules/undici-types/errors.d.ts new file mode 100644 index 000000000..7155b9c0b --- /dev/null +++ b/node_modules/undici-types/errors.d.ts @@ -0,0 +1,187 @@ +import { IncomingHttpHeaders } from './header' +import Client from './client' + +export default Errors + +declare namespace Errors { + export class UndiciError extends Error { + name: string + code: string + } + + /** Connect timeout error. */ + export class ConnectTimeoutError extends UndiciError { + name: 'ConnectTimeoutError' + code: 'UND_ERR_CONNECT_TIMEOUT' + } + + /** A header exceeds the `headersTimeout` option. */ + export class HeadersTimeoutError extends UndiciError { + name: 'HeadersTimeoutError' + code: 'UND_ERR_HEADERS_TIMEOUT' + } + + /** Headers overflow error. */ + export class HeadersOverflowError extends UndiciError { + name: 'HeadersOverflowError' + code: 'UND_ERR_HEADERS_OVERFLOW' + } + + /** A body exceeds the `bodyTimeout` option. */ + export class BodyTimeoutError extends UndiciError { + name: 'BodyTimeoutError' + code: 'UND_ERR_BODY_TIMEOUT' + } + + export class ResponseError extends UndiciError { + constructor ( + message: string, + code: number, + options: { + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + } + ) + name: 'ResponseError' + code: 'UND_ERR_RESPONSE' + statusCode: number + body: null | Record | string + headers: IncomingHttpHeaders | string[] | null + } + + /** Passed an invalid argument. */ + export class InvalidArgumentError extends UndiciError { + name: 'InvalidArgumentError' + code: 'UND_ERR_INVALID_ARG' + } + + /** Returned an invalid value. */ + export class InvalidReturnValueError extends UndiciError { + name: 'InvalidReturnValueError' + code: 'UND_ERR_INVALID_RETURN_VALUE' + } + + /** The request has been aborted by the user. */ + export class RequestAbortedError extends UndiciError { + name: 'AbortError' + code: 'UND_ERR_ABORTED' + } + + /** Expected error with reason. */ + export class InformationalError extends UndiciError { + name: 'InformationalError' + code: 'UND_ERR_INFO' + } + + /** Request body length does not match content-length header. */ + export class RequestContentLengthMismatchError extends UndiciError { + name: 'RequestContentLengthMismatchError' + code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } + + /** Response body length does not match content-length header. */ + export class ResponseContentLengthMismatchError extends UndiciError { + name: 'ResponseContentLengthMismatchError' + code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' + } + + /** Trying to use a destroyed client. */ + export class ClientDestroyedError extends UndiciError { + name: 'ClientDestroyedError' + code: 'UND_ERR_DESTROYED' + } + + /** Trying to use a closed client. */ + export class ClientClosedError extends UndiciError { + name: 'ClientClosedError' + code: 'UND_ERR_CLOSED' + } + + /** There is an error with the socket. */ + export class SocketError extends UndiciError { + name: 'SocketError' + code: 'UND_ERR_SOCKET' + socket: Client.SocketInfo | null + } + + /** Encountered unsupported functionality. */ + export class NotSupportedError extends UndiciError { + name: 'NotSupportedError' + code: 'UND_ERR_NOT_SUPPORTED' + } + + /** No upstream has been added to the BalancedPool. */ + export class BalancedPoolMissingUpstreamError extends UndiciError { + name: 'MissingUpstreamError' + code: 'UND_ERR_BPL_MISSING_UPSTREAM' + } + + export class HTTPParserError extends UndiciError { + name: 'HTTPParserError' + code: string + } + + /** The response exceed the length allowed. */ + export class ResponseExceededMaxSizeError extends UndiciError { + name: 'ResponseExceededMaxSizeError' + code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } + + export class RequestRetryError extends UndiciError { + constructor ( + message: string, + statusCode: number, + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + ) + name: 'RequestRetryError' + code: 'UND_ERR_REQ_RETRY' + statusCode: number + data: { + count: number; + } + + headers: Record + } + + export class SecureProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record + ) + name: 'SecureProxyConnectionError' + code: 'UND_ERR_PRX_TLS' + } + + export class ProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record + ) + name: 'ProxyConnectionError' + code: 'UND_ERR_PRX_CONN' + } + + export class MaxOriginsReachedError extends UndiciError { + name: 'MaxOriginsReachedError' + code: 'UND_ERR_MAX_ORIGINS_REACHED' + } + + /** SOCKS5 proxy related error. */ + export class Socks5ProxyError extends UndiciError { + constructor ( + message?: string, + code?: string + ) + name: 'Socks5ProxyError' + code: string + } + + /** WebSocket decompressed message exceeded maximum size. */ + export class MessageSizeExceededError extends UndiciError { + name: 'MessageSizeExceededError' + code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' + } +} diff --git a/node_modules/undici-types/eventsource.d.ts b/node_modules/undici-types/eventsource.d.ts new file mode 100644 index 000000000..081ca09ae --- /dev/null +++ b/node_modules/undici-types/eventsource.d.ts @@ -0,0 +1,66 @@ +import { MessageEvent, ErrorEvent } from './websocket' +import Dispatcher from './dispatcher' + +import { + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' + +interface EventSourceEventMap { + error: ErrorEvent + message: MessageEvent + open: Event +} + +interface EventSource extends EventTarget { + close(): void + readonly CLOSED: 2 + readonly CONNECTING: 0 + readonly OPEN: 1 + onerror: ((this: EventSource, ev: ErrorEvent) => any) | null + onmessage: ((this: EventSource, ev: MessageEvent) => any) | null + onopen: ((this: EventSource, ev: Event) => any) | null + readonly readyState: 0 | 1 | 2 + readonly url: string + readonly withCredentials: boolean + + addEventListener( + type: K, + listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const EventSource: { + prototype: EventSource + new (url: string | URL, init?: EventSourceInit): EventSource + readonly CLOSED: 2 + readonly CONNECTING: 0 + readonly OPEN: 1 +} + +interface EventSourceInit { + withCredentials?: boolean + // @deprecated use `node.dispatcher` instead + dispatcher?: Dispatcher + node?: { + dispatcher?: Dispatcher + reconnectionTime?: number + } +} diff --git a/node_modules/undici-types/fetch.d.ts b/node_modules/undici-types/fetch.d.ts new file mode 100644 index 000000000..df9218ada --- /dev/null +++ b/node_modules/undici-types/fetch.d.ts @@ -0,0 +1,235 @@ +// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) +// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) +/// + +import { Blob } from 'node:buffer' +import { URL, URLSearchParams } from 'node:url' +import { ReadableStream } from 'node:stream/web' +import { FormData } from './formdata' +import { HeaderRecord } from './header' +import Dispatcher from './dispatcher' + +export type RequestInfo = string | URL | Request + +export declare function fetch ( + input: RequestInfo, + init?: RequestInit +): Promise + +export type BodyInit = + | ArrayBuffer + | AsyncIterable + | Blob + | FormData + | Iterable + | NodeJS.ArrayBufferView + | URLSearchParams + | null + | string + +export class BodyMixin { + readonly body: ReadableStream | null + readonly bodyUsed: boolean + + readonly arrayBuffer: () => Promise + readonly blob: () => Promise + readonly bytes: () => Promise + /** + * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. + * Calling body.formData() buffers and parses the entire body. Since this is dictated by the spec, + * this method must only be called on responses from trusted servers. + * For responses from untrusted or user-controlled servers, use a dedicated streaming parser such as + * [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) and apply application-specific limits as follows: + * + * @example + * ```js + * import { Busboy } from '@fastify/busboy' + * import { Readable } from 'node:stream' + * + * const response = await fetch('...') + * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) + * + * // handle events emitted from `busboy` + * + * Readable.fromWeb(response.body).pipe(busboy) + * ``` + */ + readonly formData: () => Promise + readonly json: () => Promise + readonly text: () => Promise + readonly textStream: () => ReadableStream +} + +export interface SpecIterator { + next(...args: [] | [TNext]): IteratorResult; +} + +export interface SpecIteratorObject extends SpecIterator { + [Symbol.iterator](): SpecIteratorObject; + map(callbackfn: (value: T, index: number) => U): SpecIteratorObject; + filter(predicate: (value: T, index: number) => value is S): SpecIteratorObject; + filter(predicate: (value: T, index: number) => unknown): SpecIteratorObject; + take(limit: number): SpecIteratorObject; + drop(count: number): SpecIteratorObject; + flatMap(callbackfn: (value: T, index: number) => Iterator | Iterable): SpecIteratorObject; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U; + toArray(): T[]; + forEach(callbackfn: (value: T, index: number) => void): void; + some(predicate: (value: T, index: number) => unknown): boolean; + every(predicate: (value: T, index: number) => unknown): boolean; + find(predicate: (value: T, index: number) => value is S): S | undefined; + find(predicate: (value: T, index: number) => unknown): T | undefined; + readonly [Symbol.toStringTag]: string; +} + +export interface SpecIterableIterator extends SpecIteratorObject { + [Symbol.iterator](): SpecIterableIterator; +} + +export interface SpecIterable { + [Symbol.iterator](): SpecIterableIterator; +} + +export type HeadersInit = [string, string][] | HeaderRecord | Headers + +export declare class Headers implements SpecIterable<[string, string]> { + constructor (init?: HeadersInit) + readonly append: (name: string, value: string) => void + readonly delete: (name: string) => void + readonly get: (name: string) => string | null + readonly has: (name: string) => boolean + readonly set: (name: string, value: string) => void + readonly getSetCookie: () => string[] + readonly forEach: ( + callbackfn: (value: string, key: string, iterable: Headers) => void, + thisArg?: unknown + ) => void + + readonly keys: () => SpecIterableIterator + readonly values: () => SpecIterableIterator + readonly entries: () => SpecIterableIterator<[string, string]> + readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> +} + +export type RequestCache = + | 'default' + | 'force-cache' + | 'no-cache' + | 'no-store' + | 'only-if-cached' + | 'reload' + +export type RequestCredentials = 'omit' | 'include' | 'same-origin' + +type RequestDestination = + | '' + | 'audio' + | 'audioworklet' + | 'document' + | 'embed' + | 'font' + | 'image' + | 'manifest' + | 'object' + | 'paintworklet' + | 'report' + | 'script' + | 'sharedworker' + | 'style' + | 'track' + | 'video' + | 'worker' + | 'xslt' + +export interface RequestInit { + body?: BodyInit | null + cache?: RequestCache + credentials?: RequestCredentials + dispatcher?: Dispatcher + duplex?: RequestDuplex + headers?: HeadersInit + integrity?: string + keepalive?: boolean + method?: string + mode?: RequestMode + redirect?: RequestRedirect + referrer?: string + referrerPolicy?: ReferrerPolicy + signal?: AbortSignal | null + window?: null +} + +export type ReferrerPolicy = + | '' + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + +export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' + +export type RequestRedirect = 'error' | 'follow' | 'manual' + +export type RequestDuplex = 'half' + +export declare class Request extends BodyMixin { + constructor (input: RequestInfo, init?: RequestInit) + + readonly cache: RequestCache + readonly credentials: RequestCredentials + readonly destination: RequestDestination + readonly headers: Headers + readonly integrity: string + readonly method: string + readonly mode: RequestMode + readonly redirect: RequestRedirect + readonly referrer: string + readonly referrerPolicy: ReferrerPolicy + readonly url: string + + readonly keepalive: boolean + readonly signal: AbortSignal + readonly duplex: RequestDuplex + + public clone (): Request +} + +export interface ResponseInit { + readonly status?: number + readonly statusText?: string + readonly headers?: HeadersInit +} + +export type ResponseType = + | 'basic' + | 'cors' + | 'default' + | 'error' + | 'opaque' + | 'opaqueredirect' + +export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 + +export declare class Response extends BodyMixin { + constructor (body?: BodyInit, init?: ResponseInit) + + readonly headers: Headers + readonly ok: boolean + readonly status: number + readonly statusText: string + readonly type: ResponseType + readonly url: string + readonly redirected: boolean + + public clone (): Response + + static error (): Response + static json (data: any, init?: ResponseInit): Response + static redirect (url: string | URL, status?: ResponseRedirectStatus): Response +} diff --git a/node_modules/undici-types/formdata.d.ts b/node_modules/undici-types/formdata.d.ts new file mode 100644 index 000000000..b9819a7e7 --- /dev/null +++ b/node_modules/undici-types/formdata.d.ts @@ -0,0 +1,108 @@ +// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) +/// + +import { File } from 'node:buffer' +import { SpecIterableIterator } from './fetch' + +/** + * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. + */ +declare type FormDataEntryValue = string | File + +/** + * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch(). + */ +export declare class FormData { + /** + * Appends a new value onto an existing key inside a FormData object, + * or adds the key if it does not already exist. + * + * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values. + * + * @param name The name of the field whose data is contained in `value`. + * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. + * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. + */ + append (name: string, value: unknown, fileName?: string): void + + /** + * Set a new value for an existing key inside FormData, + * or add the new field if it does not already exist. + * + * @param name The name of the field whose data is contained in `value`. + * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. + * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. + * + */ + set (name: string, value: unknown, fileName?: string): void + + /** + * Returns the first value associated with a given key from within a `FormData` object. + * If you expect multiple values and want all of them, use the `getAll()` method instead. + * + * @param {string} name A name of the value you want to retrieve. + * + * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. + */ + get (name: string): FormDataEntryValue | null + + /** + * Returns all the values associated with a given key from within a `FormData` object. + * + * @param {string} name A name of the value you want to retrieve. + * + * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list. + */ + getAll (name: string): FormDataEntryValue[] + + /** + * Returns a boolean stating whether a `FormData` object contains a certain key. + * + * @param name A string representing the name of the key you want to test for. + * + * @return A boolean value. + */ + has (name: string): boolean + + /** + * Deletes a key and its value(s) from a `FormData` object. + * + * @param name The name of the key you want to delete. + */ + delete (name: string): void + + /** + * Executes given callback function for each field of the FormData instance + */ + forEach: ( + callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, + thisArg?: unknown + ) => void + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object. + * Each key is a `string`. + */ + keys: () => SpecIterableIterator + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object. + * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). + */ + values: () => SpecIterableIterator + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs. + * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). + */ + entries: () => SpecIterableIterator<[string, FormDataEntryValue]> + + /** + * An alias for FormData#entries() + */ + [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]> + + readonly [Symbol.toStringTag]: string +} diff --git a/node_modules/undici-types/global-dispatcher.d.ts b/node_modules/undici-types/global-dispatcher.d.ts new file mode 100644 index 000000000..2760e136d --- /dev/null +++ b/node_modules/undici-types/global-dispatcher.d.ts @@ -0,0 +1,9 @@ +import Dispatcher from './dispatcher' + +declare function setGlobalDispatcher (dispatcher: DispatcherImplementation): void +declare function getGlobalDispatcher (): Dispatcher + +export { + getGlobalDispatcher, + setGlobalDispatcher +} diff --git a/node_modules/undici-types/global-origin.d.ts b/node_modules/undici-types/global-origin.d.ts new file mode 100644 index 000000000..265769b7b --- /dev/null +++ b/node_modules/undici-types/global-origin.d.ts @@ -0,0 +1,7 @@ +declare function setGlobalOrigin (origin: string | URL | undefined): void +declare function getGlobalOrigin (): URL | undefined + +export { + setGlobalOrigin, + getGlobalOrigin +} diff --git a/node_modules/undici-types/h2c-client.d.ts b/node_modules/undici-types/h2c-client.d.ts new file mode 100644 index 000000000..b921a3471 --- /dev/null +++ b/node_modules/undici-types/h2c-client.d.ts @@ -0,0 +1,73 @@ +import { URL } from 'node:url' +import Dispatcher from './dispatcher' +import buildConnector from './connector' + +type H2ClientOptions = Omit + +/** + * A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default. + */ +export class H2CClient extends Dispatcher { + constructor (url: string | URL, options?: H2CClient.Options) + /** Property to get and set the pipelining factor. */ + pipelining: number + /** `true` after `client.close()` has been called. */ + closed: boolean + /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: H2ClientOptions + ): Promise + override connect ( + options: H2ClientOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +export declare namespace H2CClient { + export interface Options { + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ + headersTimeout?: number; + /** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ + bodyTimeout?: number; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */ + socketPath?: string; + /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ + pipelining?: number; + /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ + strictContentLength?: boolean; + /** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */ + maxCachedSessions?: number; + /** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */ + connect?: Omit, 'allowH2'> | buildConnector.connector; + /** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */ + maxRequestsPerClient?: number; + /** Local IP address the socket should connect from. */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number + } +} + +export default H2CClient diff --git a/node_modules/undici-types/handlers.d.ts b/node_modules/undici-types/handlers.d.ts new file mode 100644 index 000000000..343526b03 --- /dev/null +++ b/node_modules/undici-types/handlers.d.ts @@ -0,0 +1,16 @@ +import Dispatcher from './dispatcher' + +export declare class RedirectHandler implements Dispatcher.DispatchHandler { + static buildDispatch (dispatcher: Dispatcher, maxRedirections: number): Dispatcher.Dispatch + + constructor ( + dispatch: Dispatcher.Dispatch, + maxRedirections: number, + opts: Dispatcher.DispatchOptions, + handler: Dispatcher.DispatchHandler + ) +} + +export declare class DecoratorHandler implements Dispatcher.DispatchHandler { + constructor (handler: Dispatcher.DispatchHandler) +} diff --git a/node_modules/undici-types/header.d.ts b/node_modules/undici-types/header.d.ts new file mode 100644 index 000000000..17e72520f --- /dev/null +++ b/node_modules/undici-types/header.d.ts @@ -0,0 +1,165 @@ +import { Autocomplete } from './utility' + +/** + * The header type declaration of `undici`. + */ +export type IncomingHttpHeaders = Record + +/** + * The header type declaration of `undici` for outgoing requests. + */ +export type OutgoingHttpHeaders = Record + +type HeaderNames = Autocomplete< + | 'Accept' + | 'Accept-CH' + | 'Accept-Charset' + | 'Accept-Encoding' + | 'Accept-Language' + | 'Accept-Patch' + | 'Accept-Post' + | 'Accept-Ranges' + | 'Access-Control-Allow-Credentials' + | 'Access-Control-Allow-Headers' + | 'Access-Control-Allow-Methods' + | 'Access-Control-Allow-Origin' + | 'Access-Control-Expose-Headers' + | 'Access-Control-Max-Age' + | 'Access-Control-Request-Headers' + | 'Access-Control-Request-Method' + | 'Age' + | 'Allow' + | 'Alt-Svc' + | 'Alt-Used' + | 'Authorization' + | 'Cache-Control' + | 'Clear-Site-Data' + | 'Connection' + | 'Content-Disposition' + | 'Content-Encoding' + | 'Content-Language' + | 'Content-Length' + | 'Content-Location' + | 'Content-Range' + | 'Content-Security-Policy' + | 'Content-Security-Policy-Report-Only' + | 'Content-Type' + | 'Cookie' + | 'Cross-Origin-Embedder-Policy' + | 'Cross-Origin-Opener-Policy' + | 'Cross-Origin-Resource-Policy' + | 'Date' + | 'Device-Memory' + | 'ETag' + | 'Expect' + | 'Expect-CT' + | 'Expires' + | 'Forwarded' + | 'From' + | 'Host' + | 'If-Match' + | 'If-Modified-Since' + | 'If-None-Match' + | 'If-Range' + | 'If-Unmodified-Since' + | 'Keep-Alive' + | 'Last-Modified' + | 'Link' + | 'Location' + | 'Max-Forwards' + | 'Origin' + | 'Permissions-Policy' + | 'Priority' + | 'Proxy-Authenticate' + | 'Proxy-Authorization' + | 'Range' + | 'Referer' + | 'Referrer-Policy' + | 'Retry-After' + | 'Sec-Fetch-Dest' + | 'Sec-Fetch-Mode' + | 'Sec-Fetch-Site' + | 'Sec-Fetch-User' + | 'Sec-Purpose' + | 'Sec-WebSocket-Accept' + | 'Server' + | 'Server-Timing' + | 'Service-Worker-Navigation-Preload' + | 'Set-Cookie' + | 'SourceMap' + | 'Strict-Transport-Security' + | 'TE' + | 'Timing-Allow-Origin' + | 'Trailer' + | 'Transfer-Encoding' + | 'Upgrade' + | 'Upgrade-Insecure-Requests' + | 'User-Agent' + | 'Vary' + | 'Via' + | 'WWW-Authenticate' + | 'X-Content-Type-Options' + | 'X-Frame-Options' +> + +type IANARegisteredMimeType = Autocomplete< + | 'audio/aac' + | 'video/x-msvideo' + | 'image/avif' + | 'video/av1' + | 'application/octet-stream' + | 'image/bmp' + | 'text/css' + | 'text/csv' + | 'application/vnd.ms-fontobject' + | 'application/epub+zip' + | 'image/gif' + | 'application/gzip' + | 'text/html' + | 'image/x-icon' + | 'text/calendar' + | 'image/jpeg' + | 'text/javascript' + | 'application/json' + | 'application/ld+json' + | 'audio/x-midi' + | 'audio/mpeg' + | 'video/mp4' + | 'video/mpeg' + | 'audio/ogg' + | 'video/ogg' + | 'application/ogg' + | 'audio/opus' + | 'font/otf' + | 'application/pdf' + | 'image/png' + | 'application/rtf' + | 'image/svg+xml' + | 'image/tiff' + | 'video/mp2t' + | 'font/ttf' + | 'text/plain' + | 'application/wasm' + | 'video/webm' + | 'audio/webm' + | 'image/webp' + | 'font/woff' + | 'font/woff2' + | 'application/xhtml+xml' + | 'application/xml' + | 'application/zip' + | 'video/3gpp' + | 'video/3gpp2' + | 'model/gltf+json' + | 'model/gltf-binary' +> + +type KnownHeaderValues = { + 'content-type': IANARegisteredMimeType +} + +export type HeaderRecord = { + [K in HeaderNames | Lowercase]?: Lowercase extends keyof KnownHeaderValues + ? KnownHeaderValues[Lowercase] + : string +} diff --git a/node_modules/undici-types/index.d.ts b/node_modules/undici-types/index.d.ts new file mode 100644 index 000000000..891358f33 --- /dev/null +++ b/node_modules/undici-types/index.d.ts @@ -0,0 +1,93 @@ +import Dispatcher from './dispatcher' +import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' +import { setGlobalOrigin, getGlobalOrigin } from './global-origin' +import Pool from './pool' +import { RedirectHandler, DecoratorHandler } from './handlers' + +import BalancedPool from './balanced-pool' +import RoundRobinPool from './round-robin-pool' +import Client from './client' +import H2CClient from './h2c-client' +import buildConnector from './connector' +import errors from './errors' +import Agent from './agent' +import Dispatcher1Wrapper from './dispatcher1-wrapper' +import MockClient from './mock-client' +import MockPool from './mock-pool' +import MockAgent from './mock-agent' +import { SnapshotAgent } from './snapshot-agent' +import { MockCallHistory, MockCallHistoryLog } from './mock-call-history' +import mockErrors from './mock-errors' +import ProxyAgent from './proxy-agent' +import Socks5ProxyAgent from './socks5-proxy-agent' +import EnvHttpProxyAgent from './env-http-proxy-agent' +import RetryHandler from './retry-handler' +import RetryAgent from './retry-agent' +import { request, pipeline, stream, connect, upgrade } from './api' +import interceptors from './interceptors' + +import CacheInterceptor from './cache-interceptor' +declare const cacheStores: { + MemoryCacheStore: typeof CacheInterceptor.MemoryCacheStore; + SqliteCacheStore: typeof CacheInterceptor.SqliteCacheStore; +} + +export * from './util' +export * from './cookies' +export * from './eventsource' +export * from './fetch' +export * from './formdata' +export * from './diagnostics-channel' +export * from './websocket' +export * from './content-type' +export * from './cache' +export { Interceptable } from './mock-interceptor' + +declare function globalThisInstall (): void + +export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, Dispatcher1Wrapper, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install } +export default Undici + +declare namespace Undici { + const Dispatcher: typeof import('./dispatcher').default + const Pool: typeof import('./pool').default + const RedirectHandler: typeof import ('./handlers').RedirectHandler + const DecoratorHandler: typeof import ('./handlers').DecoratorHandler + const RetryHandler: typeof import ('./retry-handler').default + const BalancedPool: typeof import('./balanced-pool').default + const RoundRobinPool: typeof import('./round-robin-pool').default + const Client: typeof import('./client').default + const H2CClient: typeof import('./h2c-client').default + const buildConnector: typeof import('./connector').default + const errors: typeof import('./errors').default + const Agent: typeof import('./agent').default + const Dispatcher1Wrapper: typeof import('./dispatcher1-wrapper').default + const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher + const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher + const request: typeof import('./api').request + const stream: typeof import('./api').stream + const pipeline: typeof import('./api').pipeline + const connect: typeof import('./api').connect + const upgrade: typeof import('./api').upgrade + const MockClient: typeof import('./mock-client').default + const MockPool: typeof import('./mock-pool').default + const MockAgent: typeof import('./mock-agent').default + const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent + const MockCallHistory: typeof import('./mock-call-history').MockCallHistory + const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog + const mockErrors: typeof import('./mock-errors').default + const ProxyAgent: typeof import('./proxy-agent').default + const Socks5ProxyAgent: typeof import('./socks5-proxy-agent').default + const fetch: typeof import('./fetch').fetch + const Headers: typeof import('./fetch').Headers + const Response: typeof import('./fetch').Response + const Request: typeof import('./fetch').Request + const FormData: typeof import('./formdata').FormData + const caches: typeof import('./cache').caches + const interceptors: typeof import('./interceptors').default + const cacheStores: { + MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore, + SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore + } + const install: typeof globalThisInstall +} diff --git a/node_modules/undici-types/interceptors.d.ts b/node_modules/undici-types/interceptors.d.ts new file mode 100644 index 000000000..d21d717ce --- /dev/null +++ b/node_modules/undici-types/interceptors.d.ts @@ -0,0 +1,80 @@ +import CacheHandler from './cache-interceptor' +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' +import { LookupOptions } from 'node:dns' + +export default Interceptors + +declare namespace Interceptors { + export type DumpInterceptorOpts = { maxSize?: number } + export type RetryInterceptorOpts = RetryHandler.RetryOptions + export type RedirectInterceptorOpts = { maxRedirections?: number, throwOnMaxRedirect?: boolean, stripHeadersOnRedirect?: string[], stripHeadersOnCrossOriginRedirect?: string[] } + export type DecompressInterceptorOpts = { + skipErrorResponses?: boolean + skipStatusCodes?: number[] + } + + export type ResponseErrorInterceptorOpts = { throwOnError: boolean } + export type CacheInterceptorOpts = CacheHandler.CacheOptions + + // DNS interceptor + export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } + export type DNSInterceptorOriginRecords = { records: { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } } + export type DNSStorage = { + size: number + get(origin: string): DNSInterceptorOriginRecords | null + set(origin: string, records: DNSInterceptorOriginRecords | null, options: { ttl: number }): void + delete(origin: string): void + full(): boolean + } + export type DNSInterceptorOpts = { + maxTTL?: number + maxItems?: number + lookup?: (origin: URL, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void + pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord + dualStack?: boolean + affinity?: 4 | 6 + storage?: DNSStorage + } + + // Deduplicate interceptor + export type DeduplicateMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + export type DeduplicateInterceptorOpts = { + /** + * The HTTP methods to deduplicate. + * Note: Only safe HTTP methods can be deduplicated. + * @default ['GET'] + */ + methods?: DeduplicateMethods[] + /** + * Header names that, if present in a request, will cause the request to skip deduplication. + * Header name matching is case-insensitive. + * @default [] + */ + skipHeaderNames?: string[] + /** + * Header names to exclude from the deduplication key. + * Requests with different values for these headers will still be deduplicated together. + * Useful for headers like `x-request-id` that vary per request but shouldn't affect deduplication. + * Header name matching is case-insensitive. + * @default [] + */ + excludeHeaderNames?: string[] + /** + * Maximum bytes buffered per paused waiting deduplicated handler. + * If a waiting handler remains paused and exceeds this threshold, + * it is failed with an abort error to prevent unbounded memory growth. + * @default 5 * 1024 * 1024 + */ + maxBufferSize?: number + } + + export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function deduplicate (opts?: DeduplicateInterceptorOpts): Dispatcher.DispatcherComposeInterceptor +} diff --git a/node_modules/undici-types/mock-agent.d.ts b/node_modules/undici-types/mock-agent.d.ts new file mode 100644 index 000000000..330926be1 --- /dev/null +++ b/node_modules/undici-types/mock-agent.d.ts @@ -0,0 +1,68 @@ +import Agent from './agent' +import Dispatcher from './dispatcher' +import { Interceptable, MockInterceptor } from './mock-interceptor' +import MockDispatch = MockInterceptor.MockDispatch +import { MockCallHistory } from './mock-call-history' + +export default MockAgent + +interface PendingInterceptor extends MockDispatch { + origin: string; +} + +/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ +declare class MockAgent extends Dispatcher { + constructor (options?: TMockAgentOptions) + /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ + get(origin: string): TInterceptable + get(origin: RegExp): TInterceptable + get(origin: ((origin: string) => boolean)): TInterceptable + /** Dispatches a mocked request. */ + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ + close (): Promise + /** Disables mocking in MockAgent. */ + deactivate (): void + /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ + activate (): void + /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ + enableNetConnect (): void + enableNetConnect (host: string): void + enableNetConnect (host: RegExp): void + enableNetConnect (host: ((host: string) => boolean)): void + /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ + disableNetConnect (): void + /** get call history. returns the MockAgent call history or undefined if the option is not enabled. */ + getCallHistory (): MockCallHistory | undefined + /** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */ + clearCallHistory (): void + /** Enable call history. Any subsequence calls will then be registered. */ + enableCallHistory (): this + /** Disable call history. Any subsequence calls will then not be registered. */ + disableCallHistory (): this + pendingInterceptors (): PendingInterceptor[] + assertNoPendingInterceptors (options?: { + pendingInterceptorsFormatter?: PendingInterceptorsFormatter; + }): void +} + +interface PendingInterceptorsFormatter { + format(pendingInterceptors: readonly PendingInterceptor[]): string; +} + +declare namespace MockAgent { + /** MockAgent options. */ + export interface Options extends Agent.Options { + /** A custom agent to be encapsulated by the MockAgent. */ + agent?: Dispatcher; + + /** Ignore trailing slashes in the path */ + ignoreTrailingSlash?: boolean; + + /** Accept URLs with search parameters using non standard syntaxes. default false */ + acceptNonStandardSearchParameters?: boolean; + + /** Enable call history. you can either call MockAgent.enableCallHistory(). default false */ + enableCallHistory?: boolean + } +} diff --git a/node_modules/undici-types/mock-call-history.d.ts b/node_modules/undici-types/mock-call-history.d.ts new file mode 100644 index 000000000..df07fa0dc --- /dev/null +++ b/node_modules/undici-types/mock-call-history.d.ts @@ -0,0 +1,111 @@ +import Dispatcher from './dispatcher' + +declare namespace MockCallHistoryLog { + /** request's configuration properties */ + export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers' +} + +/** a log reflecting request configuration */ +declare class MockCallHistoryLog { + constructor (requestInit: Dispatcher.DispatchOptions) + /** protocol used. ie. 'https:' or 'http:' etc... */ + protocol: string + /** request's host. */ + host: string + /** request's port. */ + port: string + /** request's origin. ie. https://localhost:3000. */ + origin: string + /** path. never contains searchParams. */ + path: string + /** request's hash. */ + hash: string + /** the full url requested. */ + fullUrl: string + /** request's method. */ + method: string + /** search params. */ + searchParams: Record + /** request's body */ + body: string | null | undefined + /** request's headers */ + headers: Record | null | undefined + + /** returns an Map of property / value pair */ + toMap (): Map | null | undefined> + + /** returns a string computed with all key value pair */ + toString (): string +} + +declare namespace MockCallHistory { + export type FilterCallsOperator = 'AND' | 'OR' + + /** modify the filtering behavior */ + export interface FilterCallsOptions { + /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */ + operator?: FilterCallsOperator | Lowercase + } + /** a function to be executed for filtering MockCallHistoryLog */ + export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean + + /** parameter to filter MockCallHistoryLog */ + export type FilterCallsParameter = string | RegExp | undefined | null + + /** an object to execute multiple filtering at once */ + export interface FilterCallsObjectCriteria extends Record { + /** filter by request protocol. ie https: */ + protocol?: FilterCallsParameter; + /** filter by request host. */ + host?: FilterCallsParameter; + /** filter by request port. */ + port?: FilterCallsParameter; + /** filter by request origin. */ + origin?: FilterCallsParameter; + /** filter by request path. */ + path?: FilterCallsParameter; + /** filter by request hash. */ + hash?: FilterCallsParameter; + /** filter by request fullUrl. */ + fullUrl?: FilterCallsParameter; + /** filter by request method. */ + method?: FilterCallsParameter; + } +} + +/** a call history to track requests configuration */ +declare class MockCallHistory { + constructor (name: string) + /** returns an array of MockCallHistoryLog. */ + calls (): Array + /** returns the first MockCallHistoryLog */ + firstCall (): MockCallHistoryLog | undefined + /** returns the last MockCallHistoryLog. */ + lastCall (): MockCallHistoryLog | undefined + /** returns the nth MockCallHistoryLog. */ + nthCall (position: number): MockCallHistoryLog | undefined + /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */ + filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array + /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */ + filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */ + filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */ + filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */ + filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */ + filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */ + filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */ + filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */ + filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array + /** clear all MockCallHistoryLog on this MockCallHistory. */ + clear (): void + /** use it with for..of loop or spread operator */ + [Symbol.iterator]: () => Generator +} + +export { MockCallHistoryLog, MockCallHistory } diff --git a/node_modules/undici-types/mock-client.d.ts b/node_modules/undici-types/mock-client.d.ts new file mode 100644 index 000000000..702e82464 --- /dev/null +++ b/node_modules/undici-types/mock-client.d.ts @@ -0,0 +1,27 @@ +import Client from './client' +import Dispatcher from './dispatcher' +import MockAgent from './mock-agent' +import { MockInterceptor, Interceptable } from './mock-interceptor' + +export default MockClient + +/** MockClient extends the Client API and allows one to mock requests. */ +declare class MockClient extends Client implements Interceptable { + constructor (origin: string, options: MockClient.Options) + /** Intercepts any matching requests that use the same origin as this mock client. */ + intercept (options: MockInterceptor.Options): MockInterceptor + /** Dispatches a mocked request. */ + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean + /** Closes the mock client and gracefully waits for enqueued requests to complete. */ + close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +declare namespace MockClient { + /** MockClient options. */ + export interface Options extends Client.Options { + /** The agent to associate this MockClient with. */ + agent: MockAgent; + } +} diff --git a/node_modules/undici-types/mock-errors.d.ts b/node_modules/undici-types/mock-errors.d.ts new file mode 100644 index 000000000..eefeecd62 --- /dev/null +++ b/node_modules/undici-types/mock-errors.d.ts @@ -0,0 +1,12 @@ +import Errors from './errors' + +export default MockErrors + +declare namespace MockErrors { + /** The request does not match any registered mock dispatches. */ + export class MockNotMatchedError extends Errors.UndiciError { + constructor (message?: string) + name: 'MockNotMatchedError' + code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED' + } +} diff --git a/node_modules/undici-types/mock-interceptor.d.ts b/node_modules/undici-types/mock-interceptor.d.ts new file mode 100644 index 000000000..59049768e --- /dev/null +++ b/node_modules/undici-types/mock-interceptor.d.ts @@ -0,0 +1,98 @@ +import { IncomingHttpHeaders } from './header' +import Dispatcher from './dispatcher' +import { BodyInit, Headers } from './fetch' + +/** The scope associated with a mock dispatch. */ +declare class MockScope { + constructor (mockDispatch: MockInterceptor.MockDispatch) + /** Delay a reply by a set amount of time in ms. */ + delay (waitInMs: number): MockScope + /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ + persist (): MockScope + /** Define a reply for a set amount of matching requests. */ + times (repeatTimes: number): MockScope +} + +/** The interceptor for a Mock. */ +declare class MockInterceptor { + constructor (options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]) + /** Mock an undici request with the defined reply. */ + reply(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback): MockScope + reply( + statusCode: number, + data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler, + responseOptions?: MockInterceptor.MockResponseOptions + ): MockScope + /** Mock an undici request by throwing the defined reply error. */ + replyWithError(error: TError): MockScope + /** Set default reply headers on the interceptor for subsequent mocked replies. */ + defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor + /** Set default reply trailers on the interceptor for subsequent mocked replies. */ + defaultReplyTrailers (trailers: Record): MockInterceptor + /** Set automatically calculated content-length header on subsequent mocked replies. */ + replyContentLength (): MockInterceptor +} + +declare namespace MockInterceptor { + /** MockInterceptor options. */ + export interface Options { + /** Path to intercept on. */ + path: string | RegExp | ((path: string) => boolean); + /** Method to intercept on. Defaults to GET. */ + method?: string | RegExp | ((method: string) => boolean); + /** Body to intercept on. */ + body?: string | RegExp | ((body: string) => boolean); + /** Headers to intercept on. */ + headers?: Record boolean)> | ((headers: Record) => boolean); + /** Query params to intercept on */ + query?: Record; + } + export interface MockDispatch extends Options { + times: number | null; + persist: boolean; + consumed: boolean; + data: MockDispatchData; + } + export interface MockDispatchData extends MockResponseOptions { + error: TError | null; + statusCode?: number; + data?: TData | string; + } + export interface MockResponseOptions { + headers?: IncomingHttpHeaders; + trailers?: Record; + } + + export interface MockResponseCallbackOptions { + path: string; + method: string; + headers?: Headers | Record; + origin?: string; + body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; + } + + export type MockResponseDataHandler = ( + opts: MockResponseCallbackOptions + ) => TData | Buffer | string + + export type MockReplyOptions = { + statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions + } + + export type MockReplyOptionsCallback = ( + opts: MockResponseCallbackOptions + ) => MockReplyOptions | Promise> +} + +interface Interceptable extends Dispatcher { + /** Intercepts any matching requests that use the same origin as this mock client. */ + intercept(options: MockInterceptor.Options): MockInterceptor; + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +export { + Interceptable, + MockInterceptor, + MockScope +} diff --git a/node_modules/undici-types/mock-pool.d.ts b/node_modules/undici-types/mock-pool.d.ts new file mode 100644 index 000000000..f35f357bc --- /dev/null +++ b/node_modules/undici-types/mock-pool.d.ts @@ -0,0 +1,27 @@ +import Pool from './pool' +import MockAgent from './mock-agent' +import { Interceptable, MockInterceptor } from './mock-interceptor' +import Dispatcher from './dispatcher' + +export default MockPool + +/** MockPool extends the Pool API and allows one to mock requests. */ +declare class MockPool extends Pool implements Interceptable { + constructor (origin: string, options: MockPool.Options) + /** Intercepts any matching requests that use the same origin as this mock pool. */ + intercept (options: MockInterceptor.Options): MockInterceptor + /** Dispatches a mocked request. */ + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean + /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ + close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +declare namespace MockPool { + /** MockPool options. */ + export interface Options extends Pool.Options { + /** The agent to associate this MockPool with. */ + agent: MockAgent; + } +} diff --git a/node_modules/undici-types/package.json b/node_modules/undici-types/package.json new file mode 100644 index 000000000..aba7c7cf7 --- /dev/null +++ b/node_modules/undici-types/package.json @@ -0,0 +1,55 @@ +{ + "name": "undici-types", + "version": "8.9.0", + "description": "A stand-alone types package for Undici", + "homepage": "https://undici.nodejs.org", + "bugs": { + "url": "https://github.com/nodejs/undici/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nodejs/undici.git" + }, + "license": "MIT", + "types": "index.d.ts", + "files": [ + "*.d.ts" + ], + "contributors": [ + { + "name": "Daniele Belardi", + "url": "https://github.com/dnlup", + "author": true + }, + { + "name": "Ethan Arrowood", + "url": "https://github.com/ethan-arrowood", + "author": true + }, + { + "name": "Matteo Collina", + "url": "https://github.com/mcollina", + "author": true + }, + { + "name": "Matthew Aitken", + "url": "https://github.com/KhafraDev", + "author": true + }, + { + "name": "Robert Nagy", + "url": "https://github.com/ronag", + "author": true + }, + { + "name": "Szymon Marczak", + "url": "https://github.com/szmarczak", + "author": true + }, + { + "name": "Tomas Della Vedova", + "url": "https://github.com/delvedor", + "author": true + } + ] +} \ No newline at end of file diff --git a/node_modules/undici-types/patch.d.ts b/node_modules/undici-types/patch.d.ts new file mode 100644 index 000000000..8f7acbb06 --- /dev/null +++ b/node_modules/undici-types/patch.d.ts @@ -0,0 +1,29 @@ +/// + +// See https://github.com/nodejs/undici/issues/1740 + +export interface EventInit { + bubbles?: boolean + cancelable?: boolean + composed?: boolean +} + +export interface EventListenerOptions { + capture?: boolean +} + +export interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean + passive?: boolean + signal?: AbortSignal +} + +export type EventListenerOrEventListenerObject = EventListener | EventListenerObject + +export interface EventListenerObject { + handleEvent (object: Event): void +} + +export interface EventListener { + (evt: Event): void +} diff --git a/node_modules/undici-types/pool-stats.d.ts b/node_modules/undici-types/pool-stats.d.ts new file mode 100644 index 000000000..f76a5f61d --- /dev/null +++ b/node_modules/undici-types/pool-stats.d.ts @@ -0,0 +1,19 @@ +import Pool from './pool' + +export default PoolStats + +declare class PoolStats { + constructor (pool: Pool) + /** Number of open socket connections in this pool. */ + connected: number + /** Number of open socket connections in this pool that do not have an active request. */ + free: number + /** Number of pending requests across all clients in this pool. */ + pending: number + /** Number of queued requests across all clients in this pool. */ + queued: number + /** Number of currently active requests across all clients in this pool. */ + running: number + /** Number of active, pending, or queued requests across all clients in this pool. */ + size: number +} diff --git a/node_modules/undici-types/pool.d.ts b/node_modules/undici-types/pool.d.ts new file mode 100644 index 000000000..d1e1bcdd6 --- /dev/null +++ b/node_modules/undici-types/pool.d.ts @@ -0,0 +1,39 @@ +import Client from './client' +import TPoolStats from './pool-stats' +import { URL } from 'node:url' +import Dispatcher from './dispatcher' + +export default Pool + +type PoolConnectOptions = Omit + +declare class Pool extends Dispatcher { + constructor (url: string | URL, options?: Pool.Options) + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a Pool. */ + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: PoolConnectOptions + ): Promise + override connect ( + options: PoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +declare namespace Pool { + export type PoolStats = TPoolStats + export interface Options extends Client.Options { + /** Default: `(origin, opts) => new Client(origin, opts)`. */ + factory?(origin: URL, opts: object): Dispatcher; + /** The max number of clients to create. `null` if no limit. Default `null`. */ + connections?: number | null; + /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ + clientTtl?: number | null; + } +} diff --git a/node_modules/undici-types/proxy-agent.d.ts b/node_modules/undici-types/proxy-agent.d.ts new file mode 100644 index 000000000..e6672f78a --- /dev/null +++ b/node_modules/undici-types/proxy-agent.d.ts @@ -0,0 +1,36 @@ +import Agent from './agent' +import buildConnector from './connector' +import Dispatcher from './dispatcher' +import { OutgoingHttpHeaders } from './header' + +export default ProxyAgent + +declare class ProxyAgent extends Dispatcher { + constructor (options: ProxyAgent.Options | string) + + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + close (): Promise +} + +declare namespace ProxyAgent { + export interface Options extends Agent.Options { + uri: string; + /** + * @deprecated use opts.token + */ + auth?: string; + token?: string; + headers?: OutgoingHttpHeaders; + requestTls?: buildConnector.BuildOptions; + proxyTls?: buildConnector.BuildOptions; + clientFactory?(origin: URL, opts: object): Dispatcher; + /** + * Undici tunnels via CONNECT when the target endpoint uses HTTPS, and + * forwards (HTTP/1.1 absolute-form request-target, per RFC 9112 §3.2.2) + * otherwise, regardless of whether the proxy URL is HTTP or HTTPS. The + * non-tunneled forwarding path does not negotiate HTTP/2 with the proxy. + * Set to true to force tunneling for plain HTTP requests as well. + */ + proxyTunnel?: boolean; + } +} diff --git a/node_modules/undici-types/readable.d.ts b/node_modules/undici-types/readable.d.ts new file mode 100644 index 000000000..723ed1f44 --- /dev/null +++ b/node_modules/undici-types/readable.d.ts @@ -0,0 +1,68 @@ +import { Readable } from 'node:stream' +import { Blob } from 'node:buffer' + +export default BodyReadable + +declare class BodyReadable extends Readable { + constructor (opts: { + resume: (this: Readable, size: number) => void | null; + abort: () => void | null; + contentType?: string; + contentLength?: number; + highWaterMark?: number; + }) + + /** Consumes and returns the body as a string + * https://fetch.spec.whatwg.org/#dom-body-text + */ + text (): Promise + + /** Consumes and returns the body as a JavaScript Object + * https://fetch.spec.whatwg.org/#dom-body-json + */ + json (): Promise + + /** Consumes and returns the body as a Blob + * https://fetch.spec.whatwg.org/#dom-body-blob + */ + blob (): Promise + + /** Consumes and returns the body as an Uint8Array + * https://fetch.spec.whatwg.org/#dom-body-bytes + */ + bytes (): Promise + + /** Consumes and returns the body as an ArrayBuffer + * https://fetch.spec.whatwg.org/#dom-body-arraybuffer + */ + arrayBuffer (): Promise + + /** Not implemented + * + * https://fetch.spec.whatwg.org/#dom-body-formdata + */ + formData (): Promise + + /** Returns true if the body is not null and the body has been consumed + * + * Otherwise, returns false + * + * https://fetch.spec.whatwg.org/#dom-body-bodyused + */ + readonly bodyUsed: boolean + + /** + * If body is null, it should return null as the body + * + * If body is not null, should return the body as a ReadableStream + * + * https://fetch.spec.whatwg.org/#dom-body-body + */ + readonly body: never | undefined + + /** Dumps the response body by reading `limit` number of bytes. + * @param opts.limit Number of bytes to read (optional) - Default: 131072 + * @param opts.signal AbortSignal to cancel the operation (optional) + */ + dump (opts?: { limit: number; signal?: AbortSignal }): Promise +} diff --git a/node_modules/undici-types/retry-agent.d.ts b/node_modules/undici-types/retry-agent.d.ts new file mode 100644 index 000000000..82268c373 --- /dev/null +++ b/node_modules/undici-types/retry-agent.d.ts @@ -0,0 +1,8 @@ +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' + +export default RetryAgent + +declare class RetryAgent extends Dispatcher { + constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) +} diff --git a/node_modules/undici-types/retry-handler.d.ts b/node_modules/undici-types/retry-handler.d.ts new file mode 100644 index 000000000..3bc484b2d --- /dev/null +++ b/node_modules/undici-types/retry-handler.d.ts @@ -0,0 +1,125 @@ +import Dispatcher from './dispatcher' + +export default RetryHandler + +declare class RetryHandler implements Dispatcher.DispatchHandler { + constructor ( + options: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }, + retryHandlers: RetryHandler.RetryHandlers + ) +} + +declare namespace RetryHandler { + export type RetryState = { counter: number; } + + export type RetryContext = { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + } + + export type OnRetryCallback = (result?: Error | null) => void + + export type RetryCallback = ( + err: Error, + context: { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + }, + callback: OnRetryCallback + ) => void + + export interface RetryOptions { + /** + * If true, the retry handler will throw an error if the request fails, + * this will prevent the folling handlers from being called, and will destroy the socket. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + throwOnError?: boolean; + /** + * Callback to be invoked on every retry iteration. + * It receives the error, current state of the retry object and the options object + * passed when instantiating the retry handler. + * + * @type {RetryCallback} + * @memberof RetryOptions + */ + retry?: RetryCallback; + /** + * Maximum number of retries to allow. + * + * @type {number} + * @memberof RetryOptions + * @default 5 + */ + maxRetries?: number; + /** + * Max number of milliseconds allow between retries + * + * @type {number} + * @memberof RetryOptions + * @default 30000 + */ + maxTimeout?: number; + /** + * Initial number of milliseconds to wait before retrying for the first time. + * + * @type {number} + * @memberof RetryOptions + * @default 500 + */ + minTimeout?: number; + /** + * Factior to multiply the timeout factor between retries. + * + * @type {number} + * @memberof RetryOptions + * @default 2 + */ + timeoutFactor?: number; + /** + * It enables to automatically infer timeout between retries based on the `Retry-After` header. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + retryAfter?: boolean; + /** + * HTTP methods to retry. + * + * @type {Dispatcher.HttpMethod[]} + * @memberof RetryOptions + * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + */ + methods?: Dispatcher.HttpMethod[]; + /** + * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. + * + * @type {string[]} + * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] + */ + errorCodes?: string[]; + /** + * HTTP status codes to be retried. + * + * @type {number[]} + * @memberof RetryOptions + * @default [500, 502, 503, 504, 429], + */ + statusCodes?: number[]; + } + + export interface RetryHandlers { + dispatch: Dispatcher['dispatch']; + handler: Dispatcher.DispatchHandler; + } +} diff --git a/node_modules/undici-types/round-robin-pool.d.ts b/node_modules/undici-types/round-robin-pool.d.ts new file mode 100644 index 000000000..5129d8633 --- /dev/null +++ b/node_modules/undici-types/round-robin-pool.d.ts @@ -0,0 +1,39 @@ +import Client from './client' +import TPoolStats from './pool-stats' +import { URL } from 'node:url' +import Dispatcher from './dispatcher' + +export default RoundRobinPool + +type RoundRobinPoolConnectOptions = Omit + +declare class RoundRobinPool extends Dispatcher { + constructor (url: string | URL, options?: RoundRobinPool.Options) + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a RoundRobinPool. */ + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: RoundRobinPoolConnectOptions + ): Promise + override connect ( + options: RoundRobinPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +declare namespace RoundRobinPool { + export type RoundRobinPoolStats = TPoolStats + export interface Options extends Client.Options { + /** Default: `(origin, opts) => new Client(origin, opts)`. */ + factory?(origin: URL, opts: object): Dispatcher; + /** The max number of clients to create. `null` if no limit. Default `null`. */ + connections?: number | null; + /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ + clientTtl?: number | null; + } +} diff --git a/node_modules/undici-types/snapshot-agent.d.ts b/node_modules/undici-types/snapshot-agent.d.ts new file mode 100644 index 000000000..9696b604f --- /dev/null +++ b/node_modules/undici-types/snapshot-agent.d.ts @@ -0,0 +1,113 @@ +import MockAgent from './mock-agent' + +declare class SnapshotRecorder { + constructor (options?: SnapshotRecorder.Options) + + record (requestOpts: any, response: any): Promise + findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined + loadSnapshots (filePath?: string): Promise + saveSnapshots (filePath?: string): Promise + clear (): void + getSnapshots (): SnapshotRecorder.Snapshot[] + size (): number + resetCallCounts (): void + deleteSnapshot (requestOpts: any): boolean + getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null + replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void + destroy (): void +} + +declare namespace SnapshotRecorder { + type SnapshotRecorderMode = 'record' | 'playback' | 'update' + + export interface Options { + snapshotPath?: string + mode?: SnapshotRecorderMode + maxSnapshots?: number + autoFlush?: boolean + flushInterval?: number + matchHeaders?: string[] + ignoreHeaders?: string[] + excludeHeaders?: string[] + matchBody?: boolean + normalizeBody?: (body: string | Buffer | null | undefined) => string + matchQuery?: boolean + normalizeQuery?: (query: URLSearchParams) => string + caseSensitive?: boolean + shouldRecord?: (requestOpts: any) => boolean + shouldPlayback?: (requestOpts: any) => boolean + excludeUrls?: (string | RegExp)[] + } + + export interface Snapshot { + request: { + method: string + url: string + headers: Record + body?: string + } + responses: { + statusCode: number + headers: Record + body: string + trailers: Record + }[] + callCount: number + timestamp: string + } + + export interface SnapshotInfo { + hash: string + request: { + method: string + url: string + headers: Record + body?: string + } + responseCount: number + callCount: number + timestamp: string + } + + export interface SnapshotData { + hash: string + snapshot: Snapshot + } +} + +declare class SnapshotAgent extends MockAgent { + constructor (options?: SnapshotAgent.Options) + + saveSnapshots (filePath?: string): Promise + loadSnapshots (filePath?: string): Promise + getRecorder (): SnapshotRecorder + getMode (): SnapshotRecorder.SnapshotRecorderMode + clearSnapshots (): void + resetCallCounts (): void + deleteSnapshot (requestOpts: any): boolean + getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null + replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void +} + +declare namespace SnapshotAgent { + export interface Options extends MockAgent.Options { + mode?: SnapshotRecorder.SnapshotRecorderMode + snapshotPath?: string + maxSnapshots?: number + autoFlush?: boolean + flushInterval?: number + matchHeaders?: string[] + ignoreHeaders?: string[] + excludeHeaders?: string[] + matchBody?: boolean + normalizeBody?: (body: string | Buffer | null | undefined) => string + matchQuery?: boolean + normalizeQuery?: (query: URLSearchParams) => string + caseSensitive?: boolean + shouldRecord?: (requestOpts: any) => boolean + shouldPlayback?: (requestOpts: any) => boolean + excludeUrls?: (string | RegExp)[] + } +} + +export { SnapshotAgent, SnapshotRecorder } diff --git a/node_modules/undici-types/socks5-proxy-agent.d.ts b/node_modules/undici-types/socks5-proxy-agent.d.ts new file mode 100644 index 000000000..05e433167 --- /dev/null +++ b/node_modules/undici-types/socks5-proxy-agent.d.ts @@ -0,0 +1,25 @@ +import Dispatcher from './dispatcher' +import buildConnector from './connector' +import { OutgoingHttpHeaders } from './header' +import Pool from './pool' + +export default Socks5ProxyAgent + +declare class Socks5ProxyAgent extends Dispatcher { + constructor (proxyUrl: string | URL, options?: Socks5ProxyAgent.Options) +} + +declare namespace Socks5ProxyAgent { + export interface Options extends Pool.Options { + /** Additional headers to send with the proxy connection */ + headers?: OutgoingHttpHeaders; + /** SOCKS5 proxy username for authentication */ + username?: string; + /** SOCKS5 proxy password for authentication */ + password?: string; + /** Custom connector function for proxy connection */ + connect?: buildConnector.connector; + /** TLS options for the proxy connection (for SOCKS5 over TLS) */ + proxyTls?: buildConnector.BuildOptions; + } +} diff --git a/node_modules/undici-types/util.d.ts b/node_modules/undici-types/util.d.ts new file mode 100644 index 000000000..8fc50cc42 --- /dev/null +++ b/node_modules/undici-types/util.d.ts @@ -0,0 +1,18 @@ +export namespace util { + /** + * Retrieves a header name and returns its lowercase value. + * @param value Header name + */ + export function headerNameToString (value: string | Buffer): string + + /** + * Receives a header object and returns the parsed value. + * @param headers Header object + * @param obj Object to specify a proxy object. Used to assign parsed values. + * @returns If `obj` is specified, it is equivalent to `obj`. + */ + export function parseHeaders ( + headers: (Buffer | string | (Buffer | string)[])[], + obj?: Record + ): Record +} diff --git a/node_modules/undici-types/utility.d.ts b/node_modules/undici-types/utility.d.ts new file mode 100644 index 000000000..bfb3ca770 --- /dev/null +++ b/node_modules/undici-types/utility.d.ts @@ -0,0 +1,7 @@ +type AutocompletePrimitiveBaseType = + T extends string ? string : + T extends number ? number : + T extends boolean ? boolean : + never + +export type Autocomplete = T | (AutocompletePrimitiveBaseType & Record) diff --git a/node_modules/undici-types/webidl.d.ts b/node_modules/undici-types/webidl.d.ts new file mode 100644 index 000000000..b1873b9e5 --- /dev/null +++ b/node_modules/undici-types/webidl.d.ts @@ -0,0 +1,346 @@ +// These types are not exported, and are only used internally +import { BufferSource } from 'node:stream/web' +import * as undici from './index' + +/** + * Take in an unknown value and return one that is of type T + */ +type Converter = (object: unknown) => T + +type SequenceConverter = (object: unknown, iterable?: IterableIterator) => T[] + +type RecordConverter = (object: unknown) => Record + +interface WebidlErrors { + /** + * @description Instantiate an error + */ + exception (opts: { header: string, message: string }): TypeError + /** + * @description Instantiate an error when conversion from one type to another has failed + */ + conversionFailed (opts: { + prefix: string + argument: string + types: string[] + }): TypeError + /** + * @description Throw an error when an invalid argument is provided + */ + invalidArgument (opts: { + prefix: string + value: string + type: string + }): TypeError +} + +interface WebIDLTypes { + UNDEFINED: 1, + BOOLEAN: 2, + STRING: 3, + SYMBOL: 4, + NUMBER: 5, + BIGINT: 6, + NULL: 7 + OBJECT: 8 +} + +interface WebidlUtil { + /** + * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values + */ + Type (object: unknown): WebIDLTypes[keyof WebIDLTypes] + + TypeValueToString (o: unknown): + | 'Undefined' + | 'Boolean' + | 'String' + | 'Symbol' + | 'Number' + | 'BigInt' + | 'Null' + | 'Object' + + Types: WebIDLTypes + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint + */ + ConvertToInt ( + V: unknown, + bitLength: number, + signedness: 'signed' | 'unsigned', + flags?: number + ): number + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart + */ + IntegerPart (N: number): number + + /** + * Stringifies {@param V} + */ + Stringify (V: any): string + + MakeTypeAssertion (I: I): (arg: any) => arg is I + + /** + * Mark a value as uncloneable for Node.js. + */ + markAsUncloneable (V: any): void + + IsResizableArrayBuffer (V: ArrayBufferLike): boolean + + HasFlag (flag: number, attributes: number): boolean + + /** + * @see https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy + */ + getCopyOfBytesHeldByBufferSource (bufferSource: BufferSource): Uint8Array +} + +interface WebidlConverters { + /** + * @see https://webidl.spec.whatwg.org/#es-DOMString + */ + DOMString (V: unknown, prefix: string, argument: string, flags?: number): string + + /** + * @see https://webidl.spec.whatwg.org/#es-ByteString + */ + ByteString (V: unknown, prefix: string, argument: string): string + + /** + * @see https://webidl.spec.whatwg.org/#es-USVString + */ + USVString (V: unknown): string + + /** + * @see https://webidl.spec.whatwg.org/#es-boolean + */ + boolean (V: unknown): boolean + + /** + * @see https://webidl.spec.whatwg.org/#es-any + */ + any (V: Value): Value + + /** + * @see https://webidl.spec.whatwg.org/#es-long-long + */ + ['long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long + */ + ['unsigned long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long + */ + ['unsigned long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-short + */ + ['unsigned short'] (V: unknown, flags?: number): number + + /** + * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer + */ + ArrayBuffer ( + V: unknown, + prefix: string, + argument: string, + options?: { allowResizable: boolean } + ): ArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer + */ + SharedArrayBuffer ( + V: unknown, + prefix: string, + argument: string, + options?: { allowResizable: boolean } + ): SharedArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + TypedArray ( + V: unknown, + T: new () => NodeJS.TypedArray, + prefix: string, + argument: string, + flags?: number + ): NodeJS.TypedArray + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + DataView ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): DataView + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + ArrayBufferView ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): NodeJS.ArrayBufferView + + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): ArrayBuffer | NodeJS.ArrayBufferView + + /** + * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource + */ + AllowSharedBufferSource ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView + + ['sequence']: SequenceConverter + + ['sequence>']: SequenceConverter + + ['record']: RecordConverter + + /** + * @see https://fetch.spec.whatwg.org/#requestinfo + */ + RequestInfo (V: unknown): undici.Request | string + + /** + * @see https://fetch.spec.whatwg.org/#requestinit + */ + RequestInit (V: unknown): undici.RequestInit + + /** + * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull + */ + EventHandlerNonNull (V: unknown): Function | null + + WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string + + [Key: string]: (...args: any[]) => unknown +} + +type WebidlIsFunction = (arg: any) => arg is T + +interface WebidlIs { + Request: WebidlIsFunction + Response: WebidlIsFunction + ReadableStream: WebidlIsFunction + Blob: WebidlIsFunction + URLSearchParams: WebidlIsFunction + File: WebidlIsFunction + FormData: WebidlIsFunction + URL: WebidlIsFunction + WebSocketError: WebidlIsFunction + AbortSignal: WebidlIsFunction + MessagePort: WebidlIsFunction + USVString: WebidlIsFunction + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource: WebidlIsFunction +} + +export interface Webidl { + errors: WebidlErrors + util: WebidlUtil + converters: WebidlConverters + is: WebidlIs + attributes: WebIDLExtendedAttributes + + /** + * @description Performs a brand-check on {@param V} to ensure it is a + * {@param cls} object. + */ + brandCheck unknown>(V: unknown, cls: Interface): asserts V is Interface + + brandCheckMultiple unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number] + + /** + * @see https://webidl.spec.whatwg.org/#es-sequence + * @description Convert a value, V, to a WebIDL sequence type. + */ + sequenceConverter (C: Converter): SequenceConverter + + illegalConstructor (): never + + /** + * @see https://webidl.spec.whatwg.org/#es-to-record + * @description Convert a value, V, to a WebIDL record type. + */ + recordConverter ( + keyConverter: Converter, + valueConverter: Converter + ): RecordConverter + + /** + * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party + * interfaces are allowed. + */ + interfaceConverter (typeCheck: WebidlIsFunction, name: string): ( + V: unknown, + prefix: string, + argument: string + ) => asserts V is Interface + + // TODO(@KhafraDev): a type could likely be implemented that can infer the return type + // from the converters given? + /** + * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are + * allowed, values allowed, optional and required keys. Auto converts the value to + * a type given a converter. + */ + dictionaryConverter (converters: { + key: string, + defaultValue?: () => unknown, + required?: boolean, + converter: (...args: unknown[]) => unknown, + allowedValues?: unknown[] + }[]): (V: unknown) => Record + + /** + * @see https://webidl.spec.whatwg.org/#idl-nullable-type + * @description allows a type, V, to be null + */ + nullableConverter ( + converter: Converter + ): (V: unknown) => ReturnType | null + + argumentLengthCheck (args: { length: number }, min: number, context: string): void +} + +interface WebIDLExtendedAttributes { + /** https://webidl.spec.whatwg.org/#Clamp */ + Clamp: number + /** https://webidl.spec.whatwg.org/#EnforceRange */ + EnforceRange: number + /** https://webidl.spec.whatwg.org/#AllowShared */ + AllowShared: number + /** https://webidl.spec.whatwg.org/#AllowResizable */ + AllowResizable: number + /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */ + LegacyNullToEmptyString: number +} diff --git a/node_modules/undici-types/websocket.d.ts b/node_modules/undici-types/websocket.d.ts new file mode 100644 index 000000000..d48b9dadc --- /dev/null +++ b/node_modules/undici-types/websocket.d.ts @@ -0,0 +1,188 @@ +/// + +import type { Blob } from 'node:buffer' +import type { ReadableStream, WritableStream } from 'node:stream/web' +import type { MessagePort } from 'node:worker_threads' +import { + EventInit, + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' +import Dispatcher from './dispatcher' +import { HeadersInit } from './fetch' + +export type BinaryType = 'blob' | 'arraybuffer' + +interface WebSocketEventMap { + close: CloseEvent + error: ErrorEvent + message: MessageEvent + open: Event +} + +interface WebSocket extends EventTarget { + binaryType: BinaryType + + readonly bufferedAmount: number + readonly extensions: string + + onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null + onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null + onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null + onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null + + readonly protocol: string + readonly readyState: number + readonly url: string + + close(code?: number, reason?: string): void + send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void + + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number + + addEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const WebSocket: { + prototype: WebSocket + new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number +} + +interface CloseEventInit extends EventInit { + code?: number + reason?: string + wasClean?: boolean +} + +interface CloseEvent extends Event { + readonly code: number + readonly reason: string + readonly wasClean: boolean +} + +export declare const CloseEvent: { + prototype: CloseEvent + new (type: string, eventInitDict?: CloseEventInit): CloseEvent +} + +interface MessageEventInit extends EventInit { + data?: T + lastEventId?: string + origin?: string + ports?: MessagePort[] + source?: MessagePort | null +} + +interface MessageEvent extends Event { + readonly data: T + readonly lastEventId: string + readonly origin: string + readonly ports: readonly MessagePort[] + readonly source: MessagePort | null + initMessageEvent( + type: string, + bubbles?: boolean, + cancelable?: boolean, + data?: any, + origin?: string, + lastEventId?: string, + source?: MessagePort | null, + ports?: MessagePort[] + ): void; +} + +export declare const MessageEvent: { + prototype: MessageEvent + new(type: string, eventInitDict?: MessageEventInit): MessageEvent +} + +interface ErrorEventInit extends EventInit { + message?: string + filename?: string + lineno?: number + colno?: number + error?: any +} + +interface ErrorEvent extends Event { + readonly message: string + readonly filename: string + readonly lineno: number + readonly colno: number + readonly error: Error +} + +export declare const ErrorEvent: { + prototype: ErrorEvent + new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent +} + +interface WebSocketInit { + protocols?: string | string[], + dispatcher?: Dispatcher, + headers?: HeadersInit +} + +interface WebSocketStreamOptions { + protocols?: string | string[] + signal?: AbortSignal +} + +interface WebSocketCloseInfo { + closeCode: number + reason: string +} + +interface WebSocketStream { + closed: Promise + opened: Promise<{ + extensions: string + protocol: string + readable: ReadableStream + writable: WritableStream + }> + url: string + + close(options?: Partial): void +} + +export declare const WebSocketStream: { + prototype: WebSocketStream + new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream +} + +interface WebSocketError extends Event, WebSocketCloseInfo {} + +export declare const WebSocketError: { + prototype: WebSocketError + new (type: string, init?: WebSocketCloseInfo): WebSocketError +} + +export declare const ping: (ws: WebSocket, body?: Buffer) => void diff --git a/node_modules/util-extend/LICENSE b/node_modules/util-extend/LICENSE new file mode 100644 index 000000000..e3d4e695a --- /dev/null +++ b/node_modules/util-extend/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. 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. diff --git a/node_modules/util-extend/README.md b/node_modules/util-extend/README.md new file mode 100644 index 000000000..be03922ab --- /dev/null +++ b/node_modules/util-extend/README.md @@ -0,0 +1,13 @@ +# util-extend + +The Node object extending function that Node uses for Node! + +## Usage + +```js +var extend = require('util-extend'); +function functionThatTakesOptions(options) { + var options = extend(defaults, options); + // now any unset options are set to the defaults. +} +``` diff --git a/node_modules/util-extend/extend.js b/node_modules/util-extend/extend.js new file mode 100644 index 000000000..de9fcf471 --- /dev/null +++ b/node_modules/util-extend/extend.js @@ -0,0 +1,33 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +module.exports = extend; +function extend(origin, add) { + // Don't do anything if add isn't an object + if (!add || typeof add !== 'object') return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +} diff --git a/node_modules/util-extend/package.json b/node_modules/util-extend/package.json new file mode 100644 index 000000000..09bffc78c --- /dev/null +++ b/node_modules/util-extend/package.json @@ -0,0 +1,16 @@ +{ + "name": "util-extend", + "version": "1.0.3", + "description": "Node's internal object extension function", + "main": "extend.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/util-extend" + }, + "author": "", + "license": "MIT", + "readmeFilename": "README.md" +} diff --git a/node_modules/util-extend/test.js b/node_modules/util-extend/test.js new file mode 100644 index 000000000..fbee2b1e1 --- /dev/null +++ b/node_modules/util-extend/test.js @@ -0,0 +1,10 @@ +var assert = require('assert'); +var extend = require('./'); +assert.deepEqual(extend({a:1}), {a:1}); +assert.deepEqual(extend({a:1}, []), {a:1}); +assert.deepEqual(extend({a:1}, null), {a:1}); +assert.deepEqual(extend({a:1}, true), {a:1}); +assert.deepEqual(extend({a:1}, false), {a:1}); +assert.deepEqual(extend({a:1}, {b:2}), {a:1, b:2}); +assert.deepEqual(extend({a:1, b:2}, {b:3}), {a:1, b:3}); +console.log('ok'); diff --git a/node_modules/validate-npm-package-license/LICENSE b/node_modules/validate-npm-package-license/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/node_modules/validate-npm-package-license/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/validate-npm-package-license/README.md b/node_modules/validate-npm-package-license/README.md new file mode 100644 index 000000000..702bc7b4f --- /dev/null +++ b/node_modules/validate-npm-package-license/README.md @@ -0,0 +1,113 @@ +validate-npm-package-license +============================ + +Give me a string and I'll tell you if it's a valid npm package license string. + +```javascript +var valid = require('validate-npm-package-license'); +``` + +SPDX license identifiers are valid license strings: + +```javascript + +var assert = require('assert'); +var validSPDXExpression = { + validForNewPackages: true, + validForOldPackages: true, + spdx: true +}; + +assert.deepEqual(valid('MIT'), validSPDXExpression); +assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); +assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); +assert.deepEqual(valid('ISC'), validSPDXExpression); +``` +The function will return a warning and suggestion for nearly-correct license identifiers: + +```javascript +assert.deepEqual( + valid('Apache 2.0'), + { + validForOldPackages: false, + validForNewPackages: false, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + 'license is similar to the valid expression "Apache-2.0"' + ] + } +); +``` + +SPDX expressions are valid, too ... + +```javascript +// Simple SPDX license expression for dual licensing +assert.deepEqual( + valid('(GPL-3.0-only OR BSD-2-Clause)'), + validSPDXExpression +); +``` + +... except if they contain `LicenseRef`: + +```javascript +var warningAboutLicenseRef = { + validForOldPackages: false, + validForNewPackages: false, + spdx: true, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + ] +}; + +assert.deepEqual( + valid('LicenseRef-Made-Up'), + warningAboutLicenseRef +); + +assert.deepEqual( + valid('(MIT OR LicenseRef-Made-Up)'), + warningAboutLicenseRef +); +``` + +If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: + +```javascript +assert.deepEqual( + valid('SEE LICENSE IN LICENSE.txt'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'LICENSE.txt' + } +); + +assert.deepEqual( + valid('SEE LICENSE IN license.md'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'license.md' + } +); +``` + +If there aren't any licensing terms, use `UNLICENSED`: + +```javascript +var unlicensed = { + validForNewPackages: true, + validForOldPackages: true, + unlicensed: true +}; +assert.deepEqual(valid('UNLICENSED'), unlicensed); +assert.deepEqual(valid('UNLICENCED'), unlicensed); +``` diff --git a/node_modules/validate-npm-package-license/index.js b/node_modules/validate-npm-package-license/index.js new file mode 100644 index 000000000..35eaa7325 --- /dev/null +++ b/node_modules/validate-npm-package-license/index.js @@ -0,0 +1,86 @@ +var parse = require('spdx-expression-parse'); +var correct = require('spdx-correct'); + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +module.exports = function(argument) { + var ast; + + try { + ast = parse(argument); + } catch (e) { + var match + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + if (argument.trim().length !== 0) { + var corrected = correct(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; diff --git a/node_modules/validate-npm-package-license/package.json b/node_modules/validate-npm-package-license/package.json new file mode 100644 index 000000000..9e92af4f4 --- /dev/null +++ b/node_modules/validate-npm-package-license/package.json @@ -0,0 +1,28 @@ +{ + "name": "validate-npm-package-license", + "description": "Give me a string and I'll tell you if it's a valid npm package license string", + "version": "3.0.4", + "author": "Kyle E. Mitchell (https://kemitchell.com)", + "contributors": [ + "Mark Stacey " + ], + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^2.0.1", + "replace-require-self": "^1.0.0" + }, + "keywords": [ + "license", + "npm", + "package", + "validation" + ], + "license": "Apache-2.0", + "repository": "kemitchell/validate-npm-package-license.js", + "scripts": { + "test": "defence README.md | replace-require-self | node" + } +} diff --git a/node_modules/verkit/LICENSE b/node_modules/verkit/LICENSE new file mode 100644 index 000000000..003c8d60f --- /dev/null +++ b/node_modules/verkit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2026-PRESENT Kevin Deng (https://github.com/sxzz) + +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. diff --git a/node_modules/verkit/README.md b/node_modules/verkit/README.md new file mode 100644 index 000000000..a53e532de --- /dev/null +++ b/node_modules/verkit/README.md @@ -0,0 +1,220 @@ +# verkit + +[![Open on npmx][npmx-version-src]][npmx-href] +[![npm downloads][npmx-downloads-src]][npmx-href] +[![Unit Test][unit-test-src]][unit-test-href] +[![Codecov][codecov-src]][codecov-href] + +Fast, zero-dependency SemVer for ESM and TypeScript, with functional, +tree-shakeable APIs. + +## Features + +- ✅ Complete SemVer version and range toolkit. +- 🚀 Faster than [node-semver] across tested operations. +- 📦 Pure ESM with zero runtime dependencies. +- 💙 First-class TypeScript declarations. +- 🌳 Functional, tree-shakeable named exports. +- 🔁 Mutable `SemVer` and `SemVerRange` records. +- ⚡ 26.0% smaller for full CDN imports. +- 🪶 61.4% smaller with common bundled imports. +- 🛡️ Immutable collection operations. + +## Install + +```bash +npm add verkit +``` + +## Versions + +```ts +import { + coerce, + increment, + normalize, + normalizeFull, + parse, + truncate, +} from 'verkit' + +const version = parse('1.2.3-rc.1+sha.abc') +const coerced = coerce('release 42.6.7.9', { rtl: true }) +version.patch = 4 + +normalizeFull(version) // '1.2.4-rc.1+sha.abc' +normalize(version) // '1.2.4-rc.1' +increment(version, 'minor') // '1.3.0' +truncate(version, 'patch') // '1.2.4' +coerced?.major // 6 +``` + +Version APIs accept strings or mutable `SemVer` objects returned by `parse` or +`coerce`. +`normalizeFull` keeps build metadata; normalized, incremented, and truncated +versions omit it. + +## Comparison + +```ts +import { compare, compareBuild, isGreaterThan, sortReversed } from 'verkit' + +compare('1.0.0+one', '1.0.0+two') // 0 +compareBuild('1.0.0+one', '1.0.0+two') // -1 +isGreaterThan('2.0.0', '1.0.0') // true +sortReversed(['1.0.0', '2.0.0']) // ['2.0.0', '1.0.0'] +``` + +`compare` ignores build metadata; `compareBuild` uses it as a tie-breaker. + +## Ranges + +```ts +import { + findMaxSatisfying, + normalizeRange, + parseRange, + satisfies, +} from 'verkit' + +const range = parseRange('^1.2.3') + +normalizeRange(range) // '>=1.2.3 <2.0.0-0' +satisfies('1.5.0', range) // true +findMaxSatisfying(['1.2.3', '1.5.0', '2.0.0'], range) // '1.5.0' +``` + +Range APIs accept strings or mutable `SemVerRange` objects. They support +comparators, unions, hyphens, wildcards, tilde, caret, loose parsing, and +prereleases. + +Range options are fixed when a `SemVerRange` is created. APIs that receive a +parsed range use its stored options and do not accept another options argument: + +```ts +const prereleases = parseRange('1.x', { includePrerelease: true }) + +satisfies('1.0.0-rc.1', prereleases) // true +``` + +To use different options, pass the original range string again or create +another parsed range. + +## API + +See the [API reference](https://npmx.dev/package-docs/verkit). + +## Invalid input behavior + +`parse`, `parseComparator`, and `parseRange` throw detailed `TypeError`s. Their +`tryParse*` wrappers return `null`; other safe transforms and predicates keep +their documented `null`/`false` behavior. + +## Migrating from node-semver + +Only renamed or reshaped [node-semver] APIs are listed; same-named functions +such as `clean`, `coerce`, `compare`, and `satisfies` are omitted. + +| node-semver | verkit | +| ---------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `SemVer` | `parse` | +| `parse` | `tryParse` | +| `valid` | `normalize` | +| `inc`, `diff` | `increment`, `difference` | +| `major`, `minor`, `patch`, `prerelease` | `getMajor`, `getMinor`, `getPatch`, `getPrerelease` | +| `rcompare`, `compareLoose`, `cmp` | `compareReversed`, `compare` with `{ loose: true }`, `compareWithOperator` | +| `eq`, `neq`, `gt`, `gte`, `lt`, `lte` | `isEqual`, `isNotEqual`, `isGreaterThan`, `isGreaterThanOrEqual`, `isLessThan`, `isLessThanOrEqual` | +| `rsort` | `sortReversed` | +| `rcompareIdentifiers` | `compareIdentifiersReversed` | +| `Comparator` | `SemVerComparator`, `parseComparator`, `tryParseComparator` | +| Comparator formatting, test, and intersection | `normalizeComparator`, `satisfiesComparator`, `comparatorsIntersect` | +| `Range` | `parseRange` | +| `toComparators`, `validRange` | `rangeToComparators`, `normalizeRange` | +| `maxSatisfying`, `minSatisfying`, `minVersion` | `findMaxSatisfying`, `findMinSatisfying`, `findMinimumForRange` | +| `outside`, `gtr`, `ltr` | `isOutsideRange`, `isGreaterThanRange`, `isLessThanRange` | +| `intersects`, `subset` | `rangesIntersect`, `isRangeSubset` | +| `RELEASE_TYPES` | `INCREMENT_TYPES` (also includes `release`) | + +`valid` returns a normalized `string | null` in node-semver, so its equivalent +is `normalize`. Use `isValid` when you only need a boolean. + +Use options objects such as `{ loose: true }` and `{ identifier, identifierBase }`. +Range options belong to the string-parsing step; parsed `SemVerRange` objects +already contain them. + +## Differences from node-semver + +verkit follows [node-semver] semantics with four user-visible differences: + +- Array helpers never mutate their inputs. +- Parsed `SemVerRange` objects retain their parse-time options. node-semver + helpers may reparse a `Range` from `raw` using call-site options. +- verkit is ESM-only, with no CommonJS, CLI, or `NODE_DEBUG=semver` output. +- Error text, stack traces, and supported runtimes may differ. + +## Bundle size + +Full package imports, minified with Rolldown: + +| Package | Minified | gzip | Brotli | +| --------------------- | -------: | ------: | ------: | +| verkit | 18,820 B | 5,914 B | 5,375 B | +| [semver][node-semver] | 24,424 B | 7,427 B | 6,765 B | +| verkit reduction | 26.0% | 20.4% | 20.5% | + +Common validation, range, comparison, increment, and coercion imports, +tree-shaken and minified with Rolldown: + +| Package | Minified | gzip | Brotli | +| --------------------- | -------: | ------: | ------: | +| verkit | 9,872 B | 3,401 B | 3,121 B | +| [semver][node-semver] | 25,577 B | 7,500 B | 6,835 B | +| verkit reduction | 61.4% | 54.7% | 54.3% | + +Run `pnpm test:size` to reproduce the comparison. + +## Benchmarks + +Measured on a MacBook Pro with an Apple M1 Max and 32 GB RAM. Higher is +better. + +| Operation | verkit ops/s | semver ops/s | Faster | +| ------------------------- | -----------: | -----------: | ------------ | +| Parse and normalize | 3.67M | 3.26M | verkit 1.13× | +| Compare | 3.09M | 2.36M | verkit 1.31× | +| Compare parsed versions | 40.59M | 28.62M | verkit 1.42× | +| Increment | 3.38M | 2.03M | verkit 1.66× | +| Coerce | 2.77M | 2.32M | verkit 1.19× | +| Satisfy uncached ranges | 148.5K | 122.3K | verkit 1.21× | +| Satisfy pre-parsed inputs | 22.91M | 7.20M | verkit 3.18× | + +Range benchmarks either cycle through 1,001 inputs to avoid cache hits or +parse once and reuse the resulting objects. + +Run runtime benchmarks with `pnpm bench`. + +## Sponsors + +

+ + Sponsors + +

+ +## License + +[MIT](./LICENSE) © 2026-PRESENT [Kevin Deng](https://github.com/sxzz). + +Parts of the implementation and test fixtures are derived from [node-semver] +under the ISC license; see [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md). + + + +[npmx-version-src]: https://npmx.dev/api/registry/badge/version/verkit +[npmx-downloads-src]: https://npmx.dev/api/registry/badge/downloads-month/verkit +[npmx-href]: https://npmx.dev/verkit +[node-semver]: https://github.com/npm/node-semver +[unit-test-src]: https://github.com/sxzz/verkit/actions/workflows/unit-test.yml/badge.svg +[unit-test-href]: https://github.com/sxzz/verkit/actions/workflows/unit-test.yml +[codecov-src]: https://codecov.io/gh/sxzz/verkit/graph/badge.svg?token=hBBtxizmt9 +[codecov-href]: https://codecov.io/gh/sxzz/verkit diff --git a/node_modules/verkit/dist/comparator-F14Ralgk.d.ts b/node_modules/verkit/dist/comparator-F14Ralgk.d.ts new file mode 100644 index 000000000..a9ebdc151 --- /dev/null +++ b/node_modules/verkit/dist/comparator-F14Ralgk.d.ts @@ -0,0 +1,17 @@ +import { u as VersionInput } from "./types-DFgCt4bK.js"; +import { n as RangeOptions, r as SemVerComparator, t as ComparatorInput } from "./types-B9fN1_x1.js"; +//#region src/comparator/operations.d.ts +declare function normalizeComparator(comparator: string, options?: RangeOptions): string; +declare function normalizeComparator(comparator: ComparatorInput): string; +declare function satisfiesComparator(version: VersionInput, comparator: string, options?: RangeOptions): boolean; +declare function satisfiesComparator(version: VersionInput, comparator: ComparatorInput): boolean; +declare function comparatorsIntersect(left: string, right: string, options?: RangeOptions): boolean; +declare function comparatorsIntersect(left: ComparatorInput, right: ComparatorInput): boolean; +//#endregion +//#region src/comparator/parse.d.ts +declare function parseComparator(comparator: string, options?: RangeOptions): SemVerComparator; +declare function parseComparator(comparator: ComparatorInput): SemVerComparator; +declare function tryParseComparator(comparator: string, options?: RangeOptions): SemVerComparator | null; +declare function tryParseComparator(comparator: ComparatorInput): SemVerComparator | null; +//#endregion +export { satisfiesComparator as a, normalizeComparator as i, tryParseComparator as n, comparatorsIntersect as r, parseComparator as t }; \ No newline at end of file diff --git a/node_modules/verkit/dist/comparator-Yw-UaBys.js b/node_modules/verkit/dist/comparator-Yw-UaBys.js new file mode 100644 index 000000000..1392e781c --- /dev/null +++ b/node_modules/verkit/dist/comparator-Yw-UaBys.js @@ -0,0 +1,22 @@ +import { i as testComparatorVersion, n as parsedComparatorsIntersect, o as formatComparator, s as parseComparator } from "./set-BGFWKKE8.js"; +//#region src/comparator/operations.ts +function resolveComparator(comparator, options) { + return typeof comparator === "string" ? parseComparator(comparator, options) : comparator; +} +function normalizeComparator(comparator, options = {}) { + return formatComparator(resolveComparator(comparator, options)); +} +function satisfiesComparator(version, comparator, options = {}) { + return testComparatorVersion(resolveComparator(comparator, options), version); +} +function comparatorsIntersect(left, right, options = {}) { + const parsedLeft = resolveComparator(left, options); + const parsedRight = resolveComparator(right, options); + return parsedComparatorsIntersect(parsedLeft, parsedRight, { + ...parsedLeft.options, + ...parsedRight.options, + ...options + }); +} +//#endregion +export { normalizeComparator as n, satisfiesComparator as r, comparatorsIntersect as t }; diff --git a/node_modules/verkit/dist/comparator.d.ts b/node_modules/verkit/dist/comparator.d.ts new file mode 100644 index 000000000..d247b7bc1 --- /dev/null +++ b/node_modules/verkit/dist/comparator.d.ts @@ -0,0 +1,3 @@ +import { n as RangeOptions, r as SemVerComparator, t as ComparatorInput } from "./types-B9fN1_x1.js"; +import { a as satisfiesComparator, i as normalizeComparator, n as tryParseComparator, r as comparatorsIntersect, t as parseComparator } from "./comparator-F14Ralgk.js"; +export { type ComparatorInput, type RangeOptions, type SemVerComparator, comparatorsIntersect, normalizeComparator, parseComparator, satisfiesComparator, tryParseComparator }; \ No newline at end of file diff --git a/node_modules/verkit/dist/comparator.js b/node_modules/verkit/dist/comparator.js new file mode 100644 index 000000000..52acde261 --- /dev/null +++ b/node_modules/verkit/dist/comparator.js @@ -0,0 +1,3 @@ +import { c as tryParseComparator, s as parseComparator } from "./set-BGFWKKE8.js"; +import { n as normalizeComparator, r as satisfiesComparator, t as comparatorsIntersect } from "./comparator-Yw-UaBys.js"; +export { comparatorsIntersect, normalizeComparator, parseComparator, satisfiesComparator, tryParseComparator }; diff --git a/node_modules/verkit/dist/comparison-CmVirWIW.js b/node_modules/verkit/dist/comparison-CmVirWIW.js new file mode 100644 index 000000000..517f0b182 --- /dev/null +++ b/node_modules/verkit/dist/comparison-CmVirWIW.js @@ -0,0 +1,211 @@ +//#region src/version/constants.ts +const SEMVER_SPEC_VERSION = "2.0.0"; +const INCREMENT_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease", + "release" +]; +const TRUNCATION_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" +]; +//#endregion +//#region src/version/patterns.ts +const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]"; +const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`; +const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`; +const NON_NUMERIC_IDENTIFIER = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER}*`; +const MAIN_VERSION = String.raw`(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})`; +const MAIN_VERSION_LOOSE = String.raw`(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})`; +const PRERELEASE_IDENTIFIER = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER})`; +const PRERELEASE_IDENTIFIER_LOOSE = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER_LOOSE})`; +const PRERELEASE = String.raw`(?:-(${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*))`; +const PRERELEASE_LOOSE = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE}(?:\.${PRERELEASE_IDENTIFIER_LOOSE})*))`; +const BUILD_IDENTIFIER = `${LETTER_DASH_NUMBER}+`; +const BUILD = String.raw`(?:\+(${BUILD_IDENTIFIER}(?:\.${BUILD_IDENTIFIER})*))`; +const FULL_PLAIN = `v?${MAIN_VERSION}${PRERELEASE}?${BUILD}?`; +const LOOSE_PLAIN = String.raw`[v=\s]*${MAIN_VERSION_LOOSE}${PRERELEASE_LOOSE}?${BUILD}?`; +const GREATER_LESS_THAN = "((?:<|>)?=?)"; +const XRANGE_IDENTIFIER = String.raw`${NUMERIC_IDENTIFIER}|x|X|\*`; +const XRANGE_IDENTIFIER_LOOSE = String.raw`${NUMERIC_IDENTIFIER_LOOSE}|x|X|\*`; +const XRANGE_PLAIN = String.raw`[v=\s]*(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:${PRERELEASE})?${BUILD}?)?)?`; +const XRANGE_PLAIN_LOOSE = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:${PRERELEASE_LOOSE})?${BUILD}?)?)?`; +const LONE_TILDE = "(?:~>?)"; +const LONE_CARET = String.raw`(?:\^)`; +const COERCE_PLAIN = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`; +const COERCE = String.raw`${COERCE_PLAIN}(?:$|[^\d])`; +const COERCE_FULL = String.raw`${COERCE_PLAIN}(?:${PRERELEASE})?(?:${BUILD})?(?:$|[^\d])`; +function makeSafeRegexSource(source) { + const replacements = [ + [String.raw`\s`, 1], + [String.raw`\d`, 256], + [LETTER_DASH_NUMBER, 250] + ]; + for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`); + return source; +} +function safeRegex(source, flags) { + return new RegExp(makeSafeRegexSource(source), flags); +} +//#endregion +//#region src/version/parse.ts +const FULL = safeRegex(`^${FULL_PLAIN}$`); +const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`); +const NUMERIC$1 = /^\d+$/; +function formatComparableVersion(version) { + const base = `${version.major}.${version.minor}.${version.patch}`; + return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base; +} +function formatFullVersion(version) { + const comparable = formatComparableVersion(version); + return version.build?.length ? `${comparable}+${version.build.join(".")}` : comparable; +} +function parse(version, options = {}) { + if (typeof version !== "string") return version; + if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`); + const match = version.trim().match(options.loose ? LOOSE : FULL); + if (!match) throw new TypeError(`Invalid version syntax: ${version}`); + const major = Number(match[1]); + const minor = Number(match[2]); + const patch = Number(match[3]); + if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`); + if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`); + if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`); + const prerelease = match[4] ? match[4].split(".").map((identifier) => { + if (NUMERIC$1.test(identifier)) { + const numeric = Number(identifier); + if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric; + } + return identifier; + }) : void 0; + return { + build: match[5]?.split("."), + major, + minor, + patch, + prerelease + }; +} +function tryParse(version, options = {}) { + try { + return parse(version, options); + } catch { + return null; + } +} +//#endregion +//#region src/version/identifiers.ts +const NUMERIC = /^\d+$/; +function compareIdentifiers(left, right) { + if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1; + const leftNumeric = NUMERIC.test(String(left)); + const rightNumeric = NUMERIC.test(String(right)); + const normalizedLeft = leftNumeric ? Number(left) : left; + const normalizedRight = rightNumeric ? Number(right) : right; + return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1; +} +function compareIdentifiersReversed(left, right) { + return compareIdentifiers(right, left); +} +//#endregion +//#region src/version/comparison.ts +function compareMainParsed(left, right) { + return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1; +} +function comparePrereleaseParsed(left, right) { + const leftPrerelease = left.prerelease; + const rightPrerelease = right.prerelease; + if (leftPrerelease?.length && !rightPrerelease?.length) return -1; + if (!leftPrerelease?.length && rightPrerelease?.length) return 1; + if (!leftPrerelease?.length && !rightPrerelease?.length) return 0; + for (let index = 0;; index++) { + const leftIdentifier = leftPrerelease?.[index]; + const rightIdentifier = rightPrerelease?.[index]; + if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0; + if (rightIdentifier === void 0) return 1; + if (leftIdentifier === void 0) return -1; + if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier); + } +} +function compareParsed(left, right) { + return compareMainParsed(left, right) || comparePrereleaseParsed(left, right); +} +function compareBuildParsed(left, right) { + const precedence = compareParsed(left, right); + if (precedence !== 0) return precedence; + for (let index = 0;; index++) { + const leftIdentifier = left.build?.[index]; + const rightIdentifier = right.build?.[index]; + if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0; + if (rightIdentifier === void 0) return 1; + if (leftIdentifier === void 0) return -1; + if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier); + } +} +function compare(left, right, options = {}) { + return compareParsed(parse(left, options), parse(right, options)); +} +function compareReversed(left, right, options = {}) { + return compare(right, left, options); +} +function compareMain(left, right, options = {}) { + return compareMainParsed(parse(left, options), parse(right, options)); +} +function comparePrerelease(left, right, options = {}) { + return comparePrereleaseParsed(parse(left, options), parse(right, options)); +} +function compareBuild(left, right, options = {}) { + return compareBuildParsed(parse(left, options), parse(right, options)); +} +function compareWithOperator(left, operator, right, options = {}) { + if (operator === "===") return left === right; + if (operator === "!==") return left !== right; + const comparison = compare(left, right, options); + switch (operator) { + case "": + case "=": + case "==": return comparison === 0; + case "!=": return comparison !== 0; + case ">": return comparison > 0; + case ">=": return comparison >= 0; + case "<": return comparison < 0; + case "<=": return comparison <= 0; + default: throw new TypeError(`Invalid operator: ${operator}`); + } +} +function isEqual(left, right, options = {}) { + return compare(left, right, options) === 0; +} +function isNotEqual(left, right, options = {}) { + return compare(left, right, options) !== 0; +} +function isGreaterThan(left, right, options = {}) { + return compare(left, right, options) > 0; +} +function isGreaterThanOrEqual(left, right, options = {}) { + return compare(left, right, options) >= 0; +} +function isLessThan(left, right, options = {}) { + return compare(left, right, options) < 0; +} +function isLessThanOrEqual(left, right, options = {}) { + return compare(left, right, options) <= 0; +} +function sort(versions, options = {}) { + return [...versions].sort((left, right) => compareBuild(left, right, options)); +} +function sortReversed(versions, options = {}) { + return [...versions].sort((left, right) => compareBuild(right, left, options)); +} +//#endregion +export { LOOSE_PLAIN as A, BUILD as C, GREATER_LESS_THAN as D, FULL_PLAIN as E, safeRegex as F, INCREMENT_TYPES as I, SEMVER_SPEC_VERSION as L, PRERELEASE_LOOSE as M, XRANGE_PLAIN as N, LONE_CARET as O, XRANGE_PLAIN_LOOSE as P, TRUNCATION_TYPES as R, tryParse as S, COERCE_FULL as T, compareIdentifiers as _, compareParsed as a, formatFullVersion as b, compareWithOperator as c, isGreaterThanOrEqual as d, isLessThan as f, sortReversed as g, sort as h, compareMainParsed as i, PRERELEASE as j, LONE_TILDE as k, isEqual as l, isNotEqual as m, compareBuild as n, comparePrerelease as o, isLessThanOrEqual as p, compareMain as r, compareReversed as s, compare as t, isGreaterThan as u, compareIdentifiersReversed as v, COERCE as w, parse as x, formatComparableVersion as y }; diff --git a/node_modules/verkit/dist/index.d.ts b/node_modules/verkit/dist/index.d.ts new file mode 100644 index 000000000..f5c53acd4 --- /dev/null +++ b/node_modules/verkit/dist/index.d.ts @@ -0,0 +1,6 @@ +import { a as IncrementType, c as TruncationType, d as VersionOptions, i as IncrementOptions, l as VersionDifference, n as Comparison, o as PrereleaseIdentifier, r as ComparisonOperator, s as SemVer, t as CoerceOptions, u as VersionInput } from "./types-DFgCt4bK.js"; +import { n as RangeOptions, r as SemVerComparator, t as ComparatorInput } from "./types-B9fN1_x1.js"; +import { a as satisfiesComparator, i as normalizeComparator, n as tryParseComparator, r as comparatorsIntersect, t as parseComparator } from "./comparator-F14Ralgk.js"; +import { _ as RangeInput, a as findMinSatisfying, c as isLessThanRange, d as normalizeRange, f as rangeToComparators, g as RangeDirection, h as simplifyRange, i as findMaxSatisfying, l as isOutsideRange, m as satisfies, n as parseRange, o as findMinimumForRange, p as rangesIntersect, r as tryParseRange, s as isGreaterThanRange, t as isRangeSubset, u as isValidRange, v as SemVerRange } from "./range-0TBbI_f4.js"; +import { A as isGreaterThan, C as compare, D as compareReversed, E as comparePrerelease, F as sort, I as sortReversed, M as isLessThan, N as isLessThanOrEqual, O as compareWithOperator, P as isNotEqual, S as TRUNCATION_TYPES, T as compareMain, _ as truncate, a as difference, b as INCREMENT_TYPES, c as getMinor, d as increment, f as isPrerelease, g as normalizeFull, h as normalize, i as coerce, j as isGreaterThanOrEqual, k as isEqual, l as getPatch, m as isValid, n as tryParse, o as getBuild, p as isStable, r as clean, s as getMajor, t as parse, u as getPrerelease, v as compareIdentifiers, w as compareBuild, x as SEMVER_SPEC_VERSION, y as compareIdentifiersReversed } from "./version-CmBARfpx.js"; +export { type CoerceOptions, type ComparatorInput, type Comparison, type ComparisonOperator, INCREMENT_TYPES, type IncrementOptions, type IncrementType, type PrereleaseIdentifier, type RangeDirection, type RangeInput, type RangeOptions, SEMVER_SPEC_VERSION, type SemVer, type SemVerComparator, type SemVerRange, TRUNCATION_TYPES, type TruncationType, type VersionDifference, type VersionInput, type VersionOptions, clean, coerce, comparatorsIntersect, compare, compareBuild, compareIdentifiers, compareIdentifiersReversed, compareMain, comparePrerelease, compareReversed, compareWithOperator, difference, findMaxSatisfying, findMinSatisfying, findMinimumForRange, getBuild, getMajor, getMinor, getPatch, getPrerelease, increment, isEqual, isGreaterThan, isGreaterThanOrEqual, isGreaterThanRange, isLessThan, isLessThanOrEqual, isLessThanRange, isNotEqual, isOutsideRange, isPrerelease, isRangeSubset, isStable, isValid, isValidRange, normalize, normalizeComparator, normalizeFull, normalizeRange, parse, parseComparator, parseRange, rangeToComparators, rangesIntersect, satisfies, satisfiesComparator, simplifyRange, sort, sortReversed, truncate, tryParse, tryParseComparator, tryParseRange }; \ No newline at end of file diff --git a/node_modules/verkit/dist/index.js b/node_modules/verkit/dist/index.js new file mode 100644 index 000000000..e5f6ed8ce --- /dev/null +++ b/node_modules/verkit/dist/index.js @@ -0,0 +1,6 @@ +import { I as INCREMENT_TYPES, L as SEMVER_SPEC_VERSION, R as TRUNCATION_TYPES, S as tryParse, _ as compareIdentifiers, c as compareWithOperator, d as isGreaterThanOrEqual, f as isLessThan, g as sortReversed, h as sort, l as isEqual, m as isNotEqual, n as compareBuild, o as comparePrerelease, p as isLessThanOrEqual, r as compareMain, s as compareReversed, t as compare, u as isGreaterThan, v as compareIdentifiersReversed, x as parse } from "./comparison-CmVirWIW.js"; +import { c as tryParseComparator, s as parseComparator } from "./set-BGFWKKE8.js"; +import { n as normalizeComparator, r as satisfiesComparator, t as comparatorsIntersect } from "./comparator-Yw-UaBys.js"; +import { a as isGreaterThanRange, c as isValidRange, d as rangesIntersect, f as satisfies, h as tryParseRange, i as findMinimumForRange, l as normalizeRange, m as parseRange, n as findMaxSatisfying, o as isLessThanRange, p as simplifyRange, r as findMinSatisfying, s as isOutsideRange, t as isRangeSubset, u as rangeToComparators } from "./range-C5wjdo9a.js"; +import { a as getMajor, c as getPrerelease, d as isStable, f as isValid, h as truncate, i as getBuild, l as increment, m as normalizeFull, n as coerce, o as getMinor, p as normalize, r as difference, s as getPatch, t as clean, u as isPrerelease } from "./version-Co1j9Tpq.js"; +export { INCREMENT_TYPES, SEMVER_SPEC_VERSION, TRUNCATION_TYPES, clean, coerce, comparatorsIntersect, compare, compareBuild, compareIdentifiers, compareIdentifiersReversed, compareMain, comparePrerelease, compareReversed, compareWithOperator, difference, findMaxSatisfying, findMinSatisfying, findMinimumForRange, getBuild, getMajor, getMinor, getPatch, getPrerelease, increment, isEqual, isGreaterThan, isGreaterThanOrEqual, isGreaterThanRange, isLessThan, isLessThanOrEqual, isLessThanRange, isNotEqual, isOutsideRange, isPrerelease, isRangeSubset, isStable, isValid, isValidRange, normalize, normalizeComparator, normalizeFull, normalizeRange, parse, parseComparator, parseRange, rangeToComparators, rangesIntersect, satisfies, satisfiesComparator, simplifyRange, sort, sortReversed, truncate, tryParse, tryParseComparator, tryParseRange }; diff --git a/node_modules/verkit/dist/range-0TBbI_f4.d.ts b/node_modules/verkit/dist/range-0TBbI_f4.d.ts new file mode 100644 index 000000000..87717aee3 --- /dev/null +++ b/node_modules/verkit/dist/range-0TBbI_f4.d.ts @@ -0,0 +1,47 @@ +import { s as SemVer, u as VersionInput } from "./types-DFgCt4bK.js"; +import { n as RangeOptions, r as SemVerComparator } from "./types-B9fN1_x1.js"; +//#region src/range/types.d.ts +interface SemVerRange { + options: RangeOptions; + sets: SemVerComparator[][]; +} +type RangeInput = SemVerRange | string; +type RangeDirection = "<" | ">"; +//#endregion +//#region src/range/operations.d.ts +declare function isValidRange(range: string, options?: RangeOptions): boolean; +declare function isValidRange(range: RangeInput): boolean; +declare function normalizeRange(range: string, options?: RangeOptions): string | null; +declare function normalizeRange(range: RangeInput): string | null; +declare function satisfies(version: VersionInput, range: string, options?: RangeOptions): boolean; +declare function satisfies(version: VersionInput, range: RangeInput): boolean; +declare function rangeToComparators(range: string, options?: RangeOptions): string[][]; +declare function rangeToComparators(range: RangeInput): string[][]; +declare function findMaxSatisfying(versions: readonly T[], range: string, options?: RangeOptions): T | null; +declare function findMaxSatisfying(versions: readonly T[], range: RangeInput): T | null; +declare function findMinSatisfying(versions: readonly T[], range: string, options?: RangeOptions): T | null; +declare function findMinSatisfying(versions: readonly T[], range: RangeInput): T | null; +declare function findMinimumForRange(range: string, options?: RangeOptions): SemVer | null; +declare function findMinimumForRange(range: RangeInput): SemVer | null; +declare function isOutsideRange(version: VersionInput, range: string, direction: RangeDirection, options?: RangeOptions): boolean; +declare function isOutsideRange(version: VersionInput, range: RangeInput, direction: RangeDirection): boolean; +declare function isGreaterThanRange(version: VersionInput, range: string, options?: RangeOptions): boolean; +declare function isGreaterThanRange(version: VersionInput, range: RangeInput): boolean; +declare function isLessThanRange(version: VersionInput, range: string, options?: RangeOptions): boolean; +declare function isLessThanRange(version: VersionInput, range: RangeInput): boolean; +declare function rangesIntersect(left: string, right: string, options?: RangeOptions): boolean; +declare function rangesIntersect(left: RangeInput, right: RangeInput): boolean; +declare function simplifyRange(versions: readonly T[], range: string, options?: RangeOptions): string; +declare function simplifyRange(versions: readonly T[], range: RangeInput): string; +//#endregion +//#region src/range/parse.d.ts +declare function parseRange(range: string, options?: RangeOptions): SemVerRange; +declare function parseRange(range: RangeInput): SemVerRange; +declare function tryParseRange(range: string, options?: RangeOptions): SemVerRange | null; +declare function tryParseRange(range: RangeInput): SemVerRange | null; +//#endregion +//#region src/range/subset.d.ts +declare function isRangeSubset(subset: string, superset: string, options?: RangeOptions): boolean; +declare function isRangeSubset(subset: RangeInput, superset: RangeInput): boolean; +//#endregion +export { RangeInput as _, findMinSatisfying as a, isLessThanRange as c, normalizeRange as d, rangeToComparators as f, RangeDirection as g, simplifyRange as h, findMaxSatisfying as i, isOutsideRange as l, satisfies as m, parseRange as n, findMinimumForRange as o, rangesIntersect as p, tryParseRange as r, isGreaterThanRange as s, isRangeSubset as t, isValidRange as u, SemVerRange as v }; \ No newline at end of file diff --git a/node_modules/verkit/dist/range-C5wjdo9a.js b/node_modules/verkit/dist/range-C5wjdo9a.js new file mode 100644 index 000000000..bd7770287 --- /dev/null +++ b/node_modules/verkit/dist/range-C5wjdo9a.js @@ -0,0 +1,441 @@ +import { A as LOOSE_PLAIN, C as BUILD, D as GREATER_LESS_THAN, F as safeRegex, N as XRANGE_PLAIN, O as LONE_CARET, P as XRANGE_PLAIN_LOOSE, S as tryParse, a as compareParsed, h as sort, k as LONE_TILDE, x as parse, y as formatComparableVersion } from "./comparison-CmVirWIW.js"; +import { a as testParsedComparator, n as parsedComparatorsIntersect, o as formatComparator, r as testComparatorSet, s as parseComparator, t as comparatorAllowsPrerelease } from "./set-BGFWKKE8.js"; +//#region src/range/parse.ts +function formatRange(range) { + return range.sets.map((set) => set.map(formatComparator).join(" ")).join("||"); +} +const BUILD_STRIP = new RegExp(BUILD, "g"); +const BUILD_SAFE = safeRegex(BUILD); +const STRICT_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN})\s+-\s+(${XRANGE_PLAIN})\s*$`); +const LOOSE_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN_LOOSE})\s+-\s+(${XRANGE_PLAIN_LOOSE})\s*$`); +const COMPARATOR_TRIM = safeRegex(String.raw`(\s*)${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN}|${XRANGE_PLAIN})`, "g"); +const TILDE_TRIM = safeRegex(String.raw`(\s*)${LONE_TILDE}\s+`, "g"); +const CARET_TRIM = safeRegex(String.raw`(\s*)${LONE_CARET}\s+`, "g"); +const STRICT_TILDE = safeRegex(`^${LONE_TILDE}${XRANGE_PLAIN}$`); +const LOOSE_TILDE = safeRegex(`^${LONE_TILDE}${XRANGE_PLAIN_LOOSE}$`); +const STRICT_CARET = safeRegex(`^${LONE_CARET}${XRANGE_PLAIN}$`); +const LOOSE_CARET = safeRegex(`^${LONE_CARET}${XRANGE_PLAIN_LOOSE}$`); +const STRICT_XRANGE = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*${XRANGE_PLAIN}$`); +const LOOSE_XRANGE = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*${XRANGE_PLAIN_LOOSE}$`); +const STAR = safeRegex(String.raw`(<|>)?=?\s*\*`); +const GTE_ZERO = /^\s*>=\s*0\.0\.0\s*$/; +const GTE_ZERO_PRERELEASE = /^\s*>=\s*0\.0\.0-0\s*$/; +const LOOSE_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`); +function isWildcard(value) { + return !value || String(value).toLowerCase() === "x" || String(value) === "*"; +} +function hasInvalidWildcardOrder(major, minor, patch) { + return isWildcard(major) && !isWildcard(minor) || isWildcard(minor) && Boolean(patch) && !isWildcard(patch); +} +function replaceTilde(comparator, options) { + const expression = options.loose ? LOOSE_TILDE : STRICT_TILDE; + const lowerPrerelease = options.includePrerelease ? "-0" : ""; + return comparator.replace(expression, (_match, major, minor, patch, prerelease) => { + if (isWildcard(major)) return ""; + if (isWildcard(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`; + if (isWildcard(patch)) return `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0`; + return prerelease ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`; + }); +} +function replaceTildes(comparator, options) { + return comparator.trim().split(/\s+/).map((part) => replaceTilde(part, options)).join(" "); +} +function replaceCaret(comparator, options) { + const expression = options.loose ? LOOSE_CARET : STRICT_CARET; + const lowerPrerelease = options.includePrerelease ? "-0" : ""; + return comparator.replace(expression, (_match, major, minor, patch, prerelease) => { + if (isWildcard(major)) return ""; + if (isWildcard(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`; + if (isWildcard(patch)) return major === "0" ? `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`; + if (prerelease) return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch}-${prerelease} <${Number(major) + 1}.0.0-0`; + return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${Number(major) + 1}.0.0-0`; + }); +} +function replaceCarets(comparator, options) { + return comparator.trim().split(/\s+/).map((part) => replaceCaret(part, options)).join(" "); +} +function replaceXRange(comparator, options) { + const expression = options.loose ? LOOSE_XRANGE : STRICT_XRANGE; + return comparator.trim().replace(expression, (match, rawOperator, rawMajor, rawMinor, rawPatch) => { + let operator = rawOperator; + let major = rawMajor; + let minor = rawMinor; + let patch = rawPatch; + if (hasInvalidWildcardOrder(String(major), minor === void 0 ? void 0 : String(minor), patch === void 0 ? void 0 : String(patch))) return comparator; + const wildcardMajor = isWildcard(major); + const wildcardMinor = wildcardMajor || isWildcard(minor); + const wildcardPatch = wildcardMinor || isWildcard(patch); + if (operator === "=" && wildcardPatch) operator = ""; + if (wildcardMajor) return operator === ">" || operator === "<" ? "<0.0.0-0" : "*"; + let prerelease = options.includePrerelease ? "-0" : ""; + if (operator && wildcardPatch) { + if (wildcardMinor) minor = 0; + patch = 0; + if (operator === ">") { + operator = ">="; + if (wildcardMinor) { + major = Number(major) + 1; + minor = 0; + } else minor = Number(minor) + 1; + } else if (operator === "<=") { + operator = "<"; + if (wildcardMinor) major = Number(major) + 1; + else minor = Number(minor) + 1; + } + if (operator === "<") prerelease = "-0"; + return `${operator}${major}.${minor}.${patch}${prerelease}`; + } + if (wildcardMinor) return `>=${major}.0.0${prerelease} <${Number(major) + 1}.0.0-0`; + if (wildcardPatch) return `>=${major}.${minor}.0${prerelease} <${major}.${Number(minor) + 1}.0-0`; + return match; + }); +} +function replaceXRanges(comparator, options) { + return comparator.split(/\s+/).map((part) => replaceXRange(part, options)).join(" "); +} +function replaceHyphenRange(range, options) { + const expression = options.loose ? LOOSE_HYPHEN : STRICT_HYPHEN; + return range.replace(expression, (_match, rawFrom, fromMajor, fromMinor, fromPatch, fromPrerelease, _fromBuild, rawTo, toMajor, toMinor, toPatch, toPrerelease) => { + let from = rawFrom; + let to = rawTo; + if (isWildcard(fromMajor)) from = ""; + else if (isWildcard(fromMinor)) from = `>=${fromMajor}.0.0${options.includePrerelease ? "-0" : ""}`; + else if (isWildcard(fromPatch)) from = `>=${fromMajor}.${fromMinor}.0${options.includePrerelease ? "-0" : ""}`; + else if (fromPrerelease) from = `>=${from}`; + else from = `>=${from}${options.includePrerelease ? "-0" : ""}`; + if (isWildcard(toMajor)) to = ""; + else if (isWildcard(toMinor)) to = `<${Number(toMajor) + 1}.0.0-0`; + else if (isWildcard(toPatch)) to = `<${toMajor}.${Number(toMinor) + 1}.0-0`; + else if (toPrerelease) to = `<=${toMajor}.${toMinor}.${toPatch}-${toPrerelease}`; + else if (options.includePrerelease) to = `<${toMajor}.${toMinor}.${Number(toPatch) + 1}-0`; + else to = `<=${to}`; + return `${from} ${to}`.trim(); + }); +} +function expandComparator(comparator, options) { + return replaceXRanges(replaceTildes(replaceCarets(comparator.replace(BUILD_SAFE, ""), options), options), options).trim().replace(STAR, ""); +} +function parseSimpleRange(input, options) { + let parts = replaceHyphenRange(input.replace(BUILD_STRIP, ""), options).replace(COMPARATOR_TRIM, "$1$2$3").replace(TILDE_TRIM, "$1~").replace(CARET_TRIM, "$1^").split(" ").map((part) => expandComparator(part, options)).join(" ").split(/\s+/).map((part) => part.trim().replace(options.includePrerelease ? GTE_ZERO_PRERELEASE : GTE_ZERO, "")); + if (options.loose) parts = parts.filter((part) => LOOSE_COMPARATOR.test(part)); + const unique = /* @__PURE__ */ new Map(); + for (const comparator of parts.map((part) => parseComparator(part, options))) { + if (comparator.value === "<0.0.0-0") return [comparator]; + unique.set(comparator.value, comparator); + } + if (unique.size > 1) unique.delete(""); + return [...unique.values()]; +} +function parseRange(range, options = {}) { + if (typeof range !== "string") return range; + const parsedOptions = { ...options }; + const normalizedRange = range.trim().replaceAll(/\s+/g, " "); + let sets = normalizedRange.split("||").map((part) => parseSimpleRange(part.trim(), parsedOptions)).filter((set) => set.length); + if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${normalizedRange}`); + if (sets.length > 1) { + const first = sets[0]; + sets = sets.filter((set) => set[0]?.value !== "<0.0.0-0"); + if (!sets.length) sets = [first]; + else if (sets.length > 1) { + const any = sets.find((set) => set.length === 1 && set[0]?.value === ""); + if (any) sets = [any]; + } + } + return { + options: parsedOptions, + sets + }; +} +function tryParseRange(range, options = {}) { + try { + return parseRange(range, options); + } catch { + return null; + } +} +function testParsedRange(range, version) { + return range.sets.some((set) => testComparatorSet(set, version, range.options)); +} +function testRangeVersion(range, version) { + const parsed = tryParse(version, range.options); + return parsed ? testParsedRange(range, parsed) : false; +} +function exactVersion(set) { + for (const comparator of set) if (comparator.operator === "" && comparator.version) return comparator.version; + return null; +} +function isSatisfiable(comparators, options) { + const exact = exactVersion(comparators); + if (exact) return testComparatorSet(comparators, exact, options); + const remaining = [...comparators]; + let current = remaining.pop(); + while (current && remaining.length) { + if (remaining.some((other) => !parsedComparatorsIntersect(current, other, options))) return false; + current = remaining.pop(); + } + return true; +} +function setsIntersect(left, right, options) { + const leftExact = exactVersion(left); + if (leftExact) return testComparatorSet(right, leftExact, options); + const rightExact = exactVersion(right); + if (rightExact) return testComparatorSet(left, rightExact, options); + return left.every((leftComparator) => right.every((rightComparator) => parsedComparatorsIntersect(leftComparator, rightComparator, options))); +} +function parsedRangesIntersect(left, right, options = {}) { + return left.sets.some((leftSet) => isSatisfiable(leftSet, options) && right.sets.some((rightSet) => isSatisfiable(rightSet, options) && setsIntersect(leftSet, rightSet, options))); +} +//#endregion +//#region src/range/operations.ts +function isValidRange(range, options = {}) { + return tryParseRange(range, options) !== null; +} +function normalizeRange(range, options = {}) { + const parsed = tryParseRange(range, options); + return parsed ? formatRange(parsed) || "*" : null; +} +function satisfies(version, range, options = {}) { + const parsed = tryParseRange(range, options); + return parsed ? testRangeVersion(parsed, version) : false; +} +function rangeToComparators(range, options = {}) { + return parseRange(range, options).sets.map((set) => set.map(formatComparator).join(" ").trim().split(" ")); +} +function findMaxSatisfying(versions, range, options = {}) { + const parsedRange = tryParseRange(range, options); + if (!parsedRange) return null; + let maximum = null; + let maximumParsed = null; + for (const version of versions) { + const parsedVersion = tryParse(version, parsedRange.options); + if (!parsedVersion || !testParsedRange(parsedRange, parsedVersion)) continue; + if (!maximumParsed || compareParsed(maximumParsed, parsedVersion) < 0) { + maximum = version; + maximumParsed = parsedVersion; + } + } + return maximum; +} +function findMinSatisfying(versions, range, options = {}) { + const parsedRange = tryParseRange(range, options); + if (!parsedRange) return null; + let minimum = null; + let minimumParsed = null; + for (const version of versions) { + const parsedVersion = tryParse(version, parsedRange.options); + if (!parsedVersion || !testParsedRange(parsedRange, parsedVersion)) continue; + if (!minimumParsed || compareParsed(minimumParsed, parsedVersion) > 0) { + minimum = version; + minimumParsed = parsedVersion; + } + } + return minimum; +} +function nextVersionAfter(version) { + const { prerelease } = version; + return prerelease?.length ? { + major: version.major, + minor: version.minor, + patch: version.patch, + prerelease: [...prerelease, 0] + } : { + major: version.major, + minor: version.minor, + patch: version.patch + 1 + }; +} +function findMinimumForRange(range, options = {}) { + const parsedRange = parseRange(range, options); + const zero = { + major: 0, + minor: 0, + patch: 0 + }; + if (testParsedRange(parsedRange, zero)) return zero; + const zeroPrerelease = { + ...zero, + prerelease: [0] + }; + if (testParsedRange(parsedRange, zeroPrerelease)) return zeroPrerelease; + let minimum = null; + for (const set of parsedRange.sets) { + let setMinimum = null; + for (const comparator of set) { + if (!comparator.version) continue; + const candidate = comparator.operator === ">" ? nextVersionAfter(comparator.version) : comparator.operator === "" || comparator.operator === ">=" ? structuredClone(comparator.version) : null; + if (candidate && (!setMinimum || compareParsed(candidate, setMinimum) > 0)) setMinimum = candidate; + } + if (setMinimum && (!minimum || compareParsed(minimum, setMinimum) > 0)) minimum = setMinimum; + } + return minimum && testParsedRange(parsedRange, minimum) ? minimum : null; +} +function compareInDirection(left, right, direction) { + const comparison = compareParsed(left, right); + return direction === ">" ? comparison > 0 : comparison < 0; +} +function compareOppositeOrEqual(left, right, direction) { + const comparison = compareParsed(left, right); + return direction === ">" ? comparison <= 0 : comparison >= 0; +} +function compareOpposite(left, right, direction) { + const comparison = compareParsed(left, right); + return direction === ">" ? comparison < 0 : comparison > 0; +} +function isOutsideRange(version, range, direction, options = {}) { + if (direction !== ">" && direction !== "<") throw new TypeError("Must provide a direction of \"<\" or \">\""); + const parsedRange = parseRange(range, options); + const parsedVersion = parse(version, parsedRange.options); + if (testParsedRange(parsedRange, parsedVersion)) return false; + const inclusiveDirection = direction === ">" ? ">=" : "<="; + for (const set of parsedRange.sets) { + const concrete = set.map((comparator) => comparator.version ? comparator : parseComparator(">=0.0.0")); + let high = concrete[0]; + let low = concrete[0]; + for (const comparator of concrete) if (compareInDirection(comparator.version, high.version, direction)) high = comparator; + else if (compareOpposite(comparator.version, low.version, direction)) low = comparator; + if (high.operator === direction || high.operator === inclusiveDirection) return false; + if ((!low.operator || low.operator === direction) && compareOppositeOrEqual(parsedVersion, low.version, direction)) return false; + if (low.operator === inclusiveDirection && compareOpposite(parsedVersion, low.version, direction)) return false; + } + return true; +} +function isGreaterThanRange(version, range, options = {}) { + return isOutsideRange(version, range, ">", options); +} +function isLessThanRange(version, range, options = {}) { + return isOutsideRange(version, range, "<", options); +} +function rangesIntersect(left, right, options = {}) { + const parsedLeft = parseRange(left, options); + const parsedRight = parseRange(right, options); + return parsedRangesIntersect(parsedLeft, parsedRight, { + ...parsedLeft.options, + ...parsedRight.options, + ...options + }); +} +function simplifyRange(versions, range, options = {}) { + const parsedRange = parseRange(range, options); + const sorted = sort(versions, parsedRange.options); + const sets = []; + let first = null; + let previous = null; + for (const version of sorted) if (testRangeVersion(parsedRange, version)) { + previous = version; + first ??= version; + } else if (previous) { + sets.push([first, previous]); + first = null; + previous = null; + } + if (first) sets.push([first, null]); + const simplified = sets.map(([minimum, maximum]) => { + const minimumValue = formatComparableVersion(parse(minimum, parsedRange.options)); + const maximumValue = maximum ? formatComparableVersion(parse(maximum, parsedRange.options)) : null; + if (minimumValue === maximumValue) return minimumValue; + if (!maximum && minimum === sorted[0]) return "*"; + if (!maximumValue) return `>=${minimumValue}`; + if (minimum === sorted[0]) return `<=${maximumValue}`; + return `${minimumValue} - ${maximumValue}`; + }).join(" || "); + const original = typeof range === "string" ? range : formatRange(parsedRange) || "*"; + return simplified.length < original.length ? simplified : original; +} +//#endregion +//#region src/range/subset.ts +function higherLowerBound(left, right) { + if (!left) return right; + const comparison = compareParsed(left.version, right.version); + return comparison > 0 ? left : comparison < 0 || right.operator === ">" && left.operator === ">=" ? right : left; +} +function lowerUpperBound(left, right) { + if (!left) return right; + const comparison = compareParsed(left.version, right.version); + return comparison < 0 ? left : comparison > 0 || right.operator === "<" && left.operator === "<=" ? right : left; +} +function simpleRangeSubset(rawSubset, rawSuperset, options) { + let subset = rawSubset; + let superset = rawSuperset; + const subsetAny = subset.length === 1 && !subset[0].version; + const supersetAny = superset.length === 1 && !superset[0].version; + if (subsetAny) { + if (supersetAny) return true; + subset = [parseComparator(options.includePrerelease ? ">=0.0.0-0" : ">=0.0.0")]; + } + if (supersetAny) { + if (options.includePrerelease) return true; + superset = [parseComparator(">=0.0.0")]; + } + const equal = /* @__PURE__ */ new Map(); + let lower; + let upper; + for (const comparator of subset) if (comparator.operator === ">" || comparator.operator === ">=") lower = higherLowerBound(lower, comparator); + else if (comparator.operator === "<" || comparator.operator === "<=") upper = lowerUpperBound(upper, comparator); + else if (comparator.version) equal.set(formatComparableVersion(comparator.version), comparator.version); + if (equal.size > 1) return null; + let boundsComparison; + if (lower && upper) { + boundsComparison = compareParsed(lower.version, upper.version); + if (boundsComparison > 0) return null; + if (boundsComparison === 0 && (lower.operator !== ">=" || upper.operator !== "<=")) return null; + } + for (const version of equal.values()) { + if (lower && !testParsedComparator(lower, version)) return null; + if (upper && !testParsedComparator(upper, version)) return null; + return testComparatorSet(superset, version, options); + } + let needsLowerPrerelease = lower && !options.includePrerelease && lower.version.prerelease?.length ? lower.version : null; + let needsUpperPrerelease = upper && !options.includePrerelease && upper.version.prerelease?.length ? upper.version : null; + const upperPrerelease = needsUpperPrerelease?.prerelease; + if (upperPrerelease?.length === 1 && upper?.operator === "<" && upperPrerelease[0] === 0) needsUpperPrerelease = null; + let hasSupersetLower = false; + let hasSupersetUpper = false; + for (const comparator of superset) { + hasSupersetLower ||= comparator.operator === ">" || comparator.operator === ">="; + hasSupersetUpper ||= comparator.operator === "<" || comparator.operator === "<="; + if (lower) { + if (needsLowerPrerelease && comparatorAllowsPrerelease(comparator, needsLowerPrerelease)) needsLowerPrerelease = null; + if (comparator.operator === ">" || comparator.operator === ">=") { + const higher = higherLowerBound(lower, comparator); + if (higher === comparator && higher !== lower) return false; + } else if (lower.operator === ">=" && !testParsedComparator(comparator, lower.version)) return false; + } + if (upper) { + if (needsUpperPrerelease && comparatorAllowsPrerelease(comparator, needsUpperPrerelease)) needsUpperPrerelease = null; + if (comparator.operator === "<" || comparator.operator === "<=") { + const lowerBound = lowerUpperBound(upper, comparator); + if (lowerBound === comparator && lowerBound !== upper) return false; + } else if (upper.operator === "<=" && !testParsedComparator(comparator, upper.version)) return false; + } + if (comparator.operator === "" && (lower || upper) && boundsComparison !== 0) return false; + } + if (lower && hasSupersetUpper && !upper && boundsComparison !== 0) return false; + if (upper && hasSupersetLower && !lower && boundsComparison !== 0) return false; + return !needsLowerPrerelease && !needsUpperPrerelease; +} +function isRangeSubset(subset, superset, options = {}) { + if (subset === superset) return true; + const parsedSubset = parseRange(subset, options); + const parsedSuperset = parseRange(superset, options); + const effectiveOptions = { + ...parsedSubset.options, + ...parsedSuperset.options, + ...options + }; + let sawNonNull = false; + for (const subsetSet of parsedSubset.sets) { + let matched = false; + for (const supersetSet of parsedSuperset.sets) { + const result = simpleRangeSubset(subsetSet, supersetSet, effectiveOptions); + sawNonNull ||= result !== null; + if (result) { + matched = true; + break; + } + } + if (!matched && sawNonNull) return false; + } + return true; +} +//#endregion +export { isGreaterThanRange as a, isValidRange as c, rangesIntersect as d, satisfies as f, tryParseRange as h, findMinimumForRange as i, normalizeRange as l, parseRange as m, findMaxSatisfying as n, isLessThanRange as o, simplifyRange as p, findMinSatisfying as r, isOutsideRange as s, isRangeSubset as t, rangeToComparators as u }; diff --git a/node_modules/verkit/dist/range.d.ts b/node_modules/verkit/dist/range.d.ts new file mode 100644 index 000000000..f474dfeb0 --- /dev/null +++ b/node_modules/verkit/dist/range.d.ts @@ -0,0 +1,2 @@ +import { _ as RangeInput, a as findMinSatisfying, c as isLessThanRange, d as normalizeRange, f as rangeToComparators, g as RangeDirection, h as simplifyRange, i as findMaxSatisfying, l as isOutsideRange, m as satisfies, n as parseRange, o as findMinimumForRange, p as rangesIntersect, r as tryParseRange, s as isGreaterThanRange, t as isRangeSubset, u as isValidRange, v as SemVerRange } from "./range-0TBbI_f4.js"; +export { type RangeDirection, type RangeInput, type SemVerRange, findMaxSatisfying, findMinSatisfying, findMinimumForRange, isGreaterThanRange, isLessThanRange, isOutsideRange, isRangeSubset, isValidRange, normalizeRange, parseRange, rangeToComparators, rangesIntersect, satisfies, simplifyRange, tryParseRange }; \ No newline at end of file diff --git a/node_modules/verkit/dist/range.js b/node_modules/verkit/dist/range.js new file mode 100644 index 000000000..53bfc6341 --- /dev/null +++ b/node_modules/verkit/dist/range.js @@ -0,0 +1,2 @@ +import { a as isGreaterThanRange, c as isValidRange, d as rangesIntersect, f as satisfies, h as tryParseRange, i as findMinimumForRange, l as normalizeRange, m as parseRange, n as findMaxSatisfying, o as isLessThanRange, p as simplifyRange, r as findMinSatisfying, s as isOutsideRange, t as isRangeSubset, u as rangeToComparators } from "./range-C5wjdo9a.js"; +export { findMaxSatisfying, findMinSatisfying, findMinimumForRange, isGreaterThanRange, isLessThanRange, isOutsideRange, isRangeSubset, isValidRange, normalizeRange, parseRange, rangeToComparators, rangesIntersect, satisfies, simplifyRange, tryParseRange }; diff --git a/node_modules/verkit/dist/set-BGFWKKE8.js b/node_modules/verkit/dist/set-BGFWKKE8.js new file mode 100644 index 000000000..a9d0773c6 --- /dev/null +++ b/node_modules/verkit/dist/set-BGFWKKE8.js @@ -0,0 +1,70 @@ +import { A as LOOSE_PLAIN, D as GREATER_LESS_THAN, E as FULL_PLAIN, F as safeRegex, S as tryParse, a as compareParsed, x as parse, y as formatComparableVersion } from "./comparison-CmVirWIW.js"; +//#region src/comparator/parse.ts +const STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`); +const LOOSE_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`); +function formatComparator(comparator) { + return comparator.version ? `${comparator.operator}${formatComparableVersion(comparator.version)}` : ""; +} +function parseComparator(comparator, options = {}) { + if (typeof comparator !== "string") return comparator; + const normalized = comparator.trim().replaceAll(/\s+/g, " "); + const match = normalized.match(options.loose ? LOOSE_COMPARATOR : STRICT_COMPARATOR); + if (!match) throw new TypeError(`Invalid comparator: ${normalized}`); + const operator = match[1] === "=" ? "" : match[1] || ""; + const version = match[2] ? parse(match[2], options) : null; + return { + operator, + options, + value: version ? `${operator}${formatComparableVersion(version)}` : "", + version + }; +} +function tryParseComparator(comparator, options = {}) { + try { + return typeof comparator === "string" ? parseComparator(comparator, options) : comparator; + } catch { + return null; + } +} +//#endregion +//#region src/comparator/set.ts +function testParsedComparator(comparator, version) { + if (!comparator.version) return true; + const comparison = compareParsed(version, comparator.version); + switch (comparator.operator) { + case "": return comparison === 0; + case ">": return comparison > 0; + case ">=": return comparison >= 0; + case "<": return comparison < 0; + case "<=": return comparison <= 0; + } +} +function testComparatorVersion(comparator, version) { + const parsed = tryParse(version, comparator.options); + return parsed ? testParsedComparator(comparator, parsed) : false; +} +function comparatorAllowsPrerelease(comparator, version) { + const allowed = comparator.version; + return allowed !== null && !!allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch; +} +function testComparatorSet(set, version, options) { + if (set.some((comparator) => !testParsedComparator(comparator, version))) return false; + return !version.prerelease?.length || !!options.includePrerelease || set.some((comparator) => comparatorAllowsPrerelease(comparator, version)); +} +function parsedComparatorsIntersect(left, right, options = {}) { + if (!left.version || !right.version) return true; + if (left.operator === "") return testComparatorSet([right], left.version, options); + if (right.operator === "") return testComparatorSet([left], right.version, options); + const leftValue = formatComparator(left); + const rightValue = formatComparator(right); + if (options.includePrerelease && (leftValue === "<0.0.0-0" || rightValue === "<0.0.0-0")) return false; + if (!options.includePrerelease && (leftValue.startsWith("<0.0.0") || rightValue.startsWith("<0.0.0"))) return false; + if (left.operator.startsWith(">") && right.operator.startsWith(">")) return true; + if (left.operator.startsWith("<") && right.operator.startsWith("<")) return true; + const comparison = compareParsed(left.version, right.version); + if (comparison === 0 && left.operator.includes("=") && right.operator.includes("=")) return true; + if (comparison < 0 && left.operator.startsWith(">") && right.operator.startsWith("<")) return true; + return comparison > 0 && left.operator.startsWith("<") && right.operator.startsWith(">"); +} +//#endregion +export { testParsedComparator as a, tryParseComparator as c, testComparatorVersion as i, parsedComparatorsIntersect as n, formatComparator as o, testComparatorSet as r, parseComparator as s, comparatorAllowsPrerelease as t }; diff --git a/node_modules/verkit/dist/types-B9fN1_x1.d.ts b/node_modules/verkit/dist/types-B9fN1_x1.d.ts new file mode 100644 index 000000000..e2a14ff96 --- /dev/null +++ b/node_modules/verkit/dist/types-B9fN1_x1.d.ts @@ -0,0 +1,14 @@ +import { d as VersionOptions, s as SemVer } from "./types-DFgCt4bK.js"; +//#region src/comparator/types.d.ts +interface RangeOptions extends VersionOptions { + includePrerelease?: boolean; +} +interface SemVerComparator { + operator: "" | "<" | "<=" | ">" | ">="; + options: RangeOptions; + value: string; + version: SemVer | null; +} +type ComparatorInput = SemVerComparator | string; +//#endregion +export { RangeOptions as n, SemVerComparator as r, ComparatorInput as t }; \ No newline at end of file diff --git a/node_modules/verkit/dist/types-DFgCt4bK.d.ts b/node_modules/verkit/dist/types-DFgCt4bK.d.ts new file mode 100644 index 000000000..9cf180496 --- /dev/null +++ b/node_modules/verkit/dist/types-DFgCt4bK.d.ts @@ -0,0 +1,28 @@ +//#region src/version/types.d.ts +interface VersionOptions { + loose?: boolean; +} +interface CoerceOptions extends VersionOptions { + includePrerelease?: boolean; + rtl?: boolean; +} +interface IncrementOptions extends VersionOptions { + identifier?: string; + identifierBase?: 0 | 1 | false; +} +type PrereleaseIdentifier = number | string; +interface SemVer { + major: number; + minor: number; + patch: number; + prerelease?: PrereleaseIdentifier[] | undefined; + build?: string[] | undefined; +} +type VersionInput = SemVer | string; +type Comparison = -1 | 0 | 1; +type ComparisonOperator = "" | "!=" | "!==" | "<" | "<=" | "=" | "==" | "===" | ">" | ">="; +type IncrementType = "major" | "minor" | "patch" | "premajor" | "preminor" | "prepatch" | "prerelease" | "release"; +type TruncationType = Exclude; +type VersionDifference = "major" | "minor" | "patch" | "premajor" | "preminor" | "prepatch" | "prerelease"; +//#endregion +export { IncrementType as a, TruncationType as c, VersionOptions as d, IncrementOptions as i, VersionDifference as l, Comparison as n, PrereleaseIdentifier as o, ComparisonOperator as r, SemVer as s, CoerceOptions as t, VersionInput as u }; \ No newline at end of file diff --git a/node_modules/verkit/dist/version-CmBARfpx.d.ts b/node_modules/verkit/dist/version-CmBARfpx.d.ts new file mode 100644 index 000000000..7b09e74c6 --- /dev/null +++ b/node_modules/verkit/dist/version-CmBARfpx.d.ts @@ -0,0 +1,48 @@ +import { a as IncrementType, c as TruncationType, d as VersionOptions, i as IncrementOptions, l as VersionDifference, n as Comparison, o as PrereleaseIdentifier, r as ComparisonOperator, s as SemVer, t as CoerceOptions, u as VersionInput } from "./types-DFgCt4bK.js"; +//#region src/version/comparison.d.ts +declare function compare(left: VersionInput, right: VersionInput, options?: VersionOptions): Comparison; +declare function compareReversed(left: VersionInput, right: VersionInput, options?: VersionOptions): Comparison; +declare function compareMain(left: VersionInput, right: VersionInput, options?: VersionOptions): Comparison; +declare function comparePrerelease(left: VersionInput, right: VersionInput, options?: VersionOptions): Comparison; +declare function compareBuild(left: VersionInput, right: VersionInput, options?: VersionOptions): Comparison; +declare function compareWithOperator(left: VersionInput, operator: ComparisonOperator, right: VersionInput, options?: VersionOptions): boolean; +declare function isEqual(left: VersionInput, right: VersionInput, options?: VersionOptions): boolean; +declare function isNotEqual(left: VersionInput, right: VersionInput, options?: VersionOptions): boolean; +declare function isGreaterThan(left: VersionInput, right: VersionInput, options?: VersionOptions): boolean; +declare function isGreaterThanOrEqual(left: VersionInput, right: VersionInput, options?: VersionOptions): boolean; +declare function isLessThan(left: VersionInput, right: VersionInput, options?: VersionOptions): boolean; +declare function isLessThanOrEqual(left: VersionInput, right: VersionInput, options?: VersionOptions): boolean; +declare function sort(versions: readonly T[], options?: VersionOptions): T[]; +declare function sortReversed(versions: readonly T[], options?: VersionOptions): T[]; +//#endregion +//#region src/version/constants.d.ts +declare const SEMVER_SPEC_VERSION: string; +declare const INCREMENT_TYPES: readonly IncrementType[]; +declare const TRUNCATION_TYPES: readonly TruncationType[]; +//#endregion +//#region src/version/identifiers.d.ts +declare function compareIdentifiers(left: PrereleaseIdentifier, right: PrereleaseIdentifier): Comparison; +declare function compareIdentifiersReversed(left: PrereleaseIdentifier, right: PrereleaseIdentifier): Comparison; +//#endregion +//#region src/version/operations.d.ts +declare function isValid(version: VersionInput, options?: VersionOptions): boolean; +declare function isPrerelease(version: VersionInput, options?: VersionOptions): boolean | null; +declare function isStable(version: VersionInput, options?: VersionOptions): boolean | null; +declare function normalizeFull(version: VersionInput, options?: VersionOptions): string | null; +declare function normalize(version: VersionInput, options?: VersionOptions): string | null; +declare function clean(version: VersionInput, options?: VersionOptions): string | null; +declare function coerce(value: number | VersionInput, options?: CoerceOptions): SemVer | null; +declare function increment(version: VersionInput, release: IncrementType, options?: IncrementOptions): string | null; +declare function truncate(version: VersionInput, truncation: TruncationType, options?: VersionOptions): string | null; +declare function difference(left: VersionInput, right: VersionInput): VersionDifference | null; +declare function getMajor(version: VersionInput, options?: VersionOptions): number; +declare function getMinor(version: VersionInput, options?: VersionOptions): number; +declare function getPatch(version: VersionInput, options?: VersionOptions): number; +declare function getPrerelease(version: VersionInput, options?: VersionOptions): PrereleaseIdentifier[] | null; +declare function getBuild(version: VersionInput, options?: VersionOptions): string[] | null; +//#endregion +//#region src/version/parse.d.ts +declare function parse(version: VersionInput, options?: VersionOptions): SemVer; +declare function tryParse(version: VersionInput, options?: VersionOptions): SemVer | null; +//#endregion +export { isGreaterThan as A, compare as C, compareReversed as D, comparePrerelease as E, sort as F, sortReversed as I, isLessThan as M, isLessThanOrEqual as N, compareWithOperator as O, isNotEqual as P, TRUNCATION_TYPES as S, compareMain as T, truncate as _, difference as a, INCREMENT_TYPES as b, getMinor as c, increment as d, isPrerelease as f, normalizeFull as g, normalize as h, coerce as i, isGreaterThanOrEqual as j, isEqual as k, getPatch as l, isValid as m, tryParse as n, getBuild as o, isStable as p, clean as r, getMajor as s, parse as t, getPrerelease as u, compareIdentifiers as v, compareBuild as w, SEMVER_SPEC_VERSION as x, compareIdentifiersReversed as y }; \ No newline at end of file diff --git a/node_modules/verkit/dist/version-Co1j9Tpq.js b/node_modules/verkit/dist/version-Co1j9Tpq.js new file mode 100644 index 000000000..e8ce3cd27 --- /dev/null +++ b/node_modules/verkit/dist/version-Co1j9Tpq.js @@ -0,0 +1,205 @@ +import { F as safeRegex, M as PRERELEASE_LOOSE, R as TRUNCATION_TYPES, S as tryParse, T as COERCE_FULL, _ as compareIdentifiers, a as compareParsed, b as formatFullVersion, i as compareMainParsed, j as PRERELEASE, w as COERCE, x as parse, y as formatComparableVersion } from "./comparison-CmVirWIW.js"; +//#region src/version/operations.ts +const COERCE_EXACT = safeRegex(COERCE); +const COERCE_FULL_EXACT = safeRegex(COERCE_FULL); +const PRERELEASE_EXACT = safeRegex(`^${PRERELEASE}$`); +const PRERELEASE_LOOSE_EXACT = safeRegex(`^${PRERELEASE_LOOSE}$`); +function isValid(version, options = {}) { + return tryParse(version, options) !== null; +} +function isPrerelease(version, options = {}) { + const parsed = tryParse(version, options); + if (!parsed) return null; + return !!parsed.prerelease?.length; +} +function isStable(version, options = {}) { + const parsed = tryParse(version, options); + if (!parsed) return null; + return !parsed.prerelease?.length; +} +function normalizeFull(version, options = {}) { + const parsed = tryParse(version, options); + return parsed ? formatFullVersion(parsed) : null; +} +function normalize(version, options = {}) { + const parsed = tryParse(version, options); + return parsed ? formatComparableVersion(parsed) : null; +} +function clean(version, options = {}) { + if (typeof version !== "string") return normalize(version, options); + return normalize(version.trim().replace(/^[=v]+/, ""), options); +} +function coerce(value, options = {}) { + if (typeof value === "object") return value; + const input = typeof value === "number" ? String(value) : value; + let match = null; + if (options.rtl) { + const source = options.includePrerelease ? COERCE_FULL : COERCE; + const expression = safeRegex(source, "g"); + let next; + while ((next = expression.exec(input)) && (!match || match.index + match[0].length !== input.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; + expression.lastIndex = next.index + next[1].length + next[2].length; + } + } else match = (options.includePrerelease ? COERCE_FULL_EXACT : COERCE_EXACT).exec(input); + if (!match) return null; + const major = match[2]; + const minor = match[3] || "0"; + const patch = match[4] || "0"; + const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; + const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; + return tryParse(`${major}.${minor}.${patch}${prerelease}${build}`, options); +} +function isPrereleasePrefix(prerelease, identifier) { + const identifiers = identifier.split("."); + return identifiers.length <= prerelease.length && identifiers.every((part, index) => compareIdentifiers(prerelease[index], part) === 0); +} +function incrementPrerelease(version, identifier, identifierBase) { + const base = Number(identifierBase) ? 1 : 0; + let prerelease = version.prerelease; + if (prerelease?.length) { + let foundNumeric = false; + for (let index = prerelease.length - 1; index >= 0; index--) if (typeof prerelease[index] === "number") { + prerelease[index] = Number(prerelease[index]) + 1; + foundNumeric = true; + break; + } + if (!foundNumeric) { + if (identifier === prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists"); + prerelease.push(base); + } + } else { + prerelease = [base]; + version.prerelease = prerelease; + } + if (!identifier) return; + const reset = identifierBase === false ? [identifier] : [identifier, base]; + if (isPrereleasePrefix(prerelease, identifier)) { + const next = prerelease[identifier.split(".").length]; + if (Number.isNaN(Number(next))) version.prerelease = reset; + } else version.prerelease = reset; +} +function incrementMutable(version, release, identifier, identifierBase) { + switch (release) { + case "premajor": + version.prerelease = void 0; + version.patch = 0; + version.minor = 0; + version.major++; + incrementPrerelease(version, identifier, identifierBase); + break; + case "preminor": + version.prerelease = void 0; + version.patch = 0; + version.minor++; + incrementPrerelease(version, identifier, identifierBase); + break; + case "prepatch": + version.prerelease = void 0; + incrementMutable(version, "patch", identifier, identifierBase); + incrementPrerelease(version, identifier, identifierBase); + break; + case "prerelease": + if (!version.prerelease?.length) incrementMutable(version, "patch", identifier, identifierBase); + incrementPrerelease(version, identifier, identifierBase); + break; + case "release": + if (!version.prerelease?.length) throw new Error(`version ${formatFullVersion(version)} is not a prerelease`); + version.prerelease = void 0; + break; + case "major": + if (version.minor !== 0 || version.patch !== 0 || !version.prerelease?.length) version.major++; + version.minor = 0; + version.patch = 0; + version.prerelease = void 0; + break; + case "minor": + if (version.patch !== 0 || !version.prerelease?.length) version.minor++; + version.patch = 0; + version.prerelease = void 0; + break; + case "patch": + if (!version.prerelease?.length) version.patch++; + version.prerelease = void 0; + break; + /* v8 ignore next */ + case "pre": + incrementPrerelease(version, identifier, identifierBase); + break; + default: throw new Error(`invalid increment argument: ${release}`); + } +} +function incrementParsedVersion(parsed, release, identifier, identifierBase, loose = false) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty"); + if (identifier) { + const expression = loose ? PRERELEASE_LOOSE_EXACT : PRERELEASE_EXACT; + const match = `-${identifier}`.match(expression); + if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`); + } + } + const mutable = { + build: parsed.build ? [...parsed.build] : void 0, + major: parsed.major, + minor: parsed.minor, + patch: parsed.patch, + prerelease: parsed.prerelease ? [...parsed.prerelease] : void 0 + }; + incrementMutable(mutable, release, identifier, identifierBase); + return formatComparableVersion(mutable); +} +function increment(version, release, options = {}) { + try { + return incrementParsedVersion(parse(version, options), release, options.identifier, options.identifierBase, options.loose); + } catch { + return null; + } +} +function truncate(version, truncation, options = {}) { + if (!TRUNCATION_TYPES.includes(truncation)) return null; + const parsed = tryParse(version, options); + if (!parsed) return null; + if (truncation.startsWith("pre")) return formatComparableVersion(parsed); + return formatComparableVersion({ + major: parsed.major, + minor: truncation === "major" ? 0 : parsed.minor, + patch: truncation === "major" || truncation === "minor" ? 0 : parsed.patch + }); +} +function difference(left, right) { + const leftVersion = parse(left); + const rightVersion = parse(right); + const comparison = compareParsed(leftVersion, rightVersion); + if (comparison === 0) return null; + const high = comparison > 0 ? leftVersion : rightVersion; + const low = comparison > 0 ? rightVersion : leftVersion; + const highHasPrerelease = high.prerelease?.length; + if (low.prerelease?.length && !highHasPrerelease) { + if (low.patch === 0 && low.minor === 0) return "major"; + if (compareMainParsed(low, high) === 0) return low.minor !== 0 && low.patch === 0 ? "minor" : "patch"; + } + const prefix = highHasPrerelease ? "pre" : ""; + if (leftVersion.major !== rightVersion.major) return `${prefix}major`; + if (leftVersion.minor !== rightVersion.minor) return `${prefix}minor`; + if (leftVersion.patch !== rightVersion.patch) return `${prefix}patch`; + return "prerelease"; +} +function getMajor(version, options = {}) { + return parse(version, options).major; +} +function getMinor(version, options = {}) { + return parse(version, options).minor; +} +function getPatch(version, options = {}) { + return parse(version, options).patch; +} +function getPrerelease(version, options = {}) { + const parsed = tryParse(version, options); + return parsed ? [...parsed.prerelease || []] : null; +} +function getBuild(version, options = {}) { + const parsed = tryParse(version, options); + return parsed ? [...parsed.build || []] : null; +} +//#endregion +export { getMajor as a, getPrerelease as c, isStable as d, isValid as f, truncate as h, getBuild as i, increment as l, normalizeFull as m, coerce as n, getMinor as o, normalize as p, difference as r, getPatch as s, clean as t, isPrerelease as u }; diff --git a/node_modules/verkit/dist/version.d.ts b/node_modules/verkit/dist/version.d.ts new file mode 100644 index 000000000..9de4e5ee6 --- /dev/null +++ b/node_modules/verkit/dist/version.d.ts @@ -0,0 +1,3 @@ +import { a as IncrementType, c as TruncationType, d as VersionOptions, i as IncrementOptions, l as VersionDifference, n as Comparison, o as PrereleaseIdentifier, r as ComparisonOperator, s as SemVer, t as CoerceOptions, u as VersionInput } from "./types-DFgCt4bK.js"; +import { A as isGreaterThan, C as compare, D as compareReversed, E as comparePrerelease, F as sort, I as sortReversed, M as isLessThan, N as isLessThanOrEqual, O as compareWithOperator, P as isNotEqual, S as TRUNCATION_TYPES, T as compareMain, _ as truncate, a as difference, b as INCREMENT_TYPES, c as getMinor, d as increment, f as isPrerelease, g as normalizeFull, h as normalize, i as coerce, j as isGreaterThanOrEqual, k as isEqual, l as getPatch, m as isValid, n as tryParse, o as getBuild, p as isStable, r as clean, s as getMajor, t as parse, u as getPrerelease, v as compareIdentifiers, w as compareBuild, x as SEMVER_SPEC_VERSION, y as compareIdentifiersReversed } from "./version-CmBARfpx.js"; +export { type CoerceOptions, type Comparison, type ComparisonOperator, INCREMENT_TYPES, type IncrementOptions, type IncrementType, type PrereleaseIdentifier, SEMVER_SPEC_VERSION, type SemVer, TRUNCATION_TYPES, type TruncationType, type VersionDifference, type VersionInput, type VersionOptions, clean, coerce, compare, compareBuild, compareIdentifiers, compareIdentifiersReversed, compareMain, comparePrerelease, compareReversed, compareWithOperator, difference, getBuild, getMajor, getMinor, getPatch, getPrerelease, increment, isEqual, isGreaterThan, isGreaterThanOrEqual, isLessThan, isLessThanOrEqual, isNotEqual, isPrerelease, isStable, isValid, normalize, normalizeFull, parse, sort, sortReversed, truncate, tryParse }; \ No newline at end of file diff --git a/node_modules/verkit/dist/version.js b/node_modules/verkit/dist/version.js new file mode 100644 index 000000000..36104d2a5 --- /dev/null +++ b/node_modules/verkit/dist/version.js @@ -0,0 +1,3 @@ +import { I as INCREMENT_TYPES, L as SEMVER_SPEC_VERSION, R as TRUNCATION_TYPES, S as tryParse, _ as compareIdentifiers, c as compareWithOperator, d as isGreaterThanOrEqual, f as isLessThan, g as sortReversed, h as sort, l as isEqual, m as isNotEqual, n as compareBuild, o as comparePrerelease, p as isLessThanOrEqual, r as compareMain, s as compareReversed, t as compare, u as isGreaterThan, v as compareIdentifiersReversed, x as parse } from "./comparison-CmVirWIW.js"; +import { a as getMajor, c as getPrerelease, d as isStable, f as isValid, h as truncate, i as getBuild, l as increment, m as normalizeFull, n as coerce, o as getMinor, p as normalize, r as difference, s as getPatch, t as clean, u as isPrerelease } from "./version-Co1j9Tpq.js"; +export { INCREMENT_TYPES, SEMVER_SPEC_VERSION, TRUNCATION_TYPES, clean, coerce, compare, compareBuild, compareIdentifiers, compareIdentifiersReversed, compareMain, comparePrerelease, compareReversed, compareWithOperator, difference, getBuild, getMajor, getMinor, getPatch, getPrerelease, increment, isEqual, isGreaterThan, isGreaterThanOrEqual, isLessThan, isLessThanOrEqual, isNotEqual, isPrerelease, isStable, isValid, normalize, normalizeFull, parse, sort, sortReversed, truncate, tryParse }; diff --git a/node_modules/verkit/package.json b/node_modules/verkit/package.json new file mode 100644 index 000000000..8715f4bfd --- /dev/null +++ b/node_modules/verkit/package.json @@ -0,0 +1,81 @@ +{ + "name": "verkit", + "type": "module", + "version": "0.5.0", + "description": "Fast, zero-dependency SemVer for ESM and TypeScript, with functional, tree-shakeable APIs.", + "author": "Kevin Deng ", + "license": "MIT", + "funding": "https://github.com/sponsors/sxzz", + "homepage": "https://github.com/sxzz/verkit#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/sxzz/verkit.git" + }, + "bugs": { + "url": "https://github.com/sxzz/verkit/issues" + }, + "keywords": [ + "semver", + "semantic-versioning", + "version", + "range", + "esm", + "typescript", + "functional", + "immutable" + ], + "sideEffects": false, + "exports": { + ".": "./dist/index.js", + "./comparator": "./dist/comparator.js", + "./range": "./dist/range.js", + "./version": "./dist/version.js", + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=18.12.0" + }, + "devEngines": { + "packageManager": { + "name": "pnpm", + "version": "12.4.2", + "onFail": "download" + } + }, + "devDependencies": { + "@sxzz/eslint-config": "^8.6.0", + "@sxzz/prettier-config": "^2.3.3", + "@types/node": "^26.6.1", + "@types/semver": "^7.8.0", + "@typescript/native-preview": "npm:typescript@7.0.2", + "@vitest/coverage-v8": "^5.0.1", + "bumpp": "^12.3.0", + "eslint": "^10.10.0", + "prettier": "^3.9.8", + "rolldown": "^1.2.9", + "semver": "^7.8.5", + "tsdown": "^0.23.0", + "tsdown-preset-sxzz": "^0.7.1", + "typescript": "~6.0.3", + "vitest": "5.0.1" + }, + "prettier": "@sxzz/prettier-config", + "scripts": { + "lint": "eslint --cache .", + "lint:fix": "pnpm run lint --fix", + "build": "tsdown", + "bench": "vitest bench --run --experimental.viteModuleRunner=false", + "dev": "tsdown --watch", + "test": "vitest", + "test:size": "vitest run tests/bundle-size.test.ts", + "typecheck": "tsc --noEmit", + "format": "prettier --cache --write .", + "release": "bumpp" + } +} \ No newline at end of file diff --git a/node_modules/wrap-ansi/index.d.ts b/node_modules/wrap-ansi/index.d.ts new file mode 100644 index 000000000..ba9833829 --- /dev/null +++ b/node_modules/wrap-ansi/index.d.ts @@ -0,0 +1,41 @@ +export type Options = { + /** + By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. + + @default false + */ + readonly hard?: boolean; + + /** + By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. + + @default true + */ + readonly wordWrap?: boolean; + + /** + Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + + @default true + */ + readonly trim?: boolean; +}; + +/** +Wrap words to the specified column width. + +@param string - A string with ANSI escape codes, like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. +@param columns - The number of columns to wrap the text to. + +@example +``` +import chalk from 'chalk'; +import wrapAnsi from 'wrap-ansi'; + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(wrapAnsi(input, 20)); +``` +*/ +export default function wrapAnsi(string: string, columns: number, options?: Options): string; diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js new file mode 100755 index 000000000..10bd0bf71 --- /dev/null +++ b/node_modules/wrap-ansi/index.js @@ -0,0 +1,222 @@ +import stringWidth from 'string-width'; +import stripAnsi from 'strip-ansi'; +import ansiStyles from 'ansi-styles'; + +const ESCAPES = new Set([ + '\u001B', + '\u009B', +]); + +const END_CODE = 39; +const ANSI_ESCAPE_BELL = '\u0007'; +const ANSI_CSI = '['; +const ANSI_OSC = ']'; +const ANSI_SGR_TERMINATOR = 'm'; +const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; + +const wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; +const wrapAnsiHyperlink = url => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`; + +// Calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes +const wordLengths = string => string.split(' ').map(character => stringWidth(character)); + +// Wrap a long word across multiple rows +// Ansi escape codes do not count towards length +const wrapWord = (rows, word, columns) => { + const characters = [...word]; + + let isInsideEscape = false; + let isInsideLinkEscape = false; + let visible = stringWidth(stripAnsi(rows.at(-1))); + + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); + + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } + + if (ESCAPES.has(character)) { + isInsideEscape = true; + + const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join(''); + isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK; + } + + if (isInsideEscape) { + if (isInsideLinkEscape) { + if (character === ANSI_ESCAPE_BELL) { + isInsideEscape = false; + isInsideLinkEscape = false; + } + } else if (character === ANSI_SGR_TERMINATOR) { + isInsideEscape = false; + } + + continue; + } + + visible += characterLength; + + if (visible === columns && index < characters.length - 1) { + rows.push(''); + visible = 0; + } + } + + // It's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case + if (!visible && rows.at(-1).length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } +}; + +// Trims spaces from a string ignoring invisible sequences +const stringVisibleTrimSpacesRight = string => { + const words = string.split(' '); + let last = words.length; + + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + + last--; + } + + if (last === words.length) { + return string; + } + + return words.slice(0, last).join(' ') + words.slice(last).join(''); +}; + +// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode. +// +// 'hard' will never allow a string to take up more than columns characters. +// +// 'soft' allows long words to expand past the column length. +const exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === '') { + return ''; + } + + let returnValue = ''; + let escapeCode; + let escapeUrl; + + const lengths = wordLengths(string); + let rows = ['']; + + for (const [index, word] of string.split(' ').entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows.at(-1).trimStart(); + } + + let rowLength = stringWidth(rows.at(-1)); + + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + // If we start with a new word but the current row length equals the length of the columns, add a new row + rows.push(''); + rowLength = 0; + } + + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += ' '; + rowLength++; + } + } + + // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' + if (options.hard && lengths[index] > columns) { + const remainingColumns = (columns - rowLength); + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { + rows.push(''); + } + + wrapWord(rows, word, columns); + continue; + } + + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); + continue; + } + + rows.push(''); + } + + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + + rows[rows.length - 1] += word; + } + + if (options.trim !== false) { + rows = rows.map(row => stringVisibleTrimSpacesRight(row)); + } + + const preString = rows.join('\n'); + const pre = [...preString]; + + // We need to keep a separate index as `String#slice()` works on Unicode code units, while `pre` is an array of codepoints. + let preStringIndex = 0; + + for (const [index, character] of pre.entries()) { + returnValue += character; + + if (ESCAPES.has(character)) { + const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || {groups: {}}; + if (groups.code !== undefined) { + const code = Number.parseFloat(groups.code); + escapeCode = code === END_CODE ? undefined : code; + } else if (groups.uri !== undefined) { + escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; + } + } + + const code = ansiStyles.codes.get(Number(escapeCode)); + + if (pre[index + 1] === '\n') { + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(''); + } + + if (escapeCode && code) { + returnValue += wrapAnsiCode(code); + } + } else if (character === '\n') { + if (escapeCode && code) { + returnValue += wrapAnsiCode(escapeCode); + } + + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(escapeUrl); + } + } + + preStringIndex += character.length; + } + + return returnValue; +}; + +// For each newline, invoke the method separately +export default function wrapAnsi(string, columns, options) { + return String(string) + .normalize() + .replaceAll('\r\n', '\n') + .split('\n') + .map(line => exec(line, columns, options)) + .join('\n'); +} diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license new file mode 100644 index 000000000..fa7ceba3e --- /dev/null +++ b/node_modules/wrap-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +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. diff --git a/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts b/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts new file mode 100644 index 000000000..ee8bc27ca --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts @@ -0,0 +1,236 @@ +export type CSPair = { // eslint-disable-line @typescript-eslint/naming-convention + /** + The ANSI terminal control sequence for starting this style. + */ + readonly open: string; + + /** + The ANSI terminal control sequence for ending this style. + */ + readonly close: string; +}; + +export type ColorBase = { + /** + The ANSI terminal control sequence for ending this color. + */ + readonly close: string; + + ansi(code: number): string; + + ansi256(code: number): string; + + ansi16m(red: number, green: number, blue: number): string; +}; + +export type Modifier = { + /** + Resets the current color chain. + */ + readonly reset: CSPair; + + /** + Make text bold. + */ + readonly bold: CSPair; + + /** + Emitting only a small amount of light. + */ + readonly dim: CSPair; + + /** + Make text italic. (Not widely supported) + */ + readonly italic: CSPair; + + /** + Make text underline. (Not widely supported) + */ + readonly underline: CSPair; + + /** + Make text overline. + + Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash. + */ + readonly overline: CSPair; + + /** + Inverse background and foreground colors. + */ + readonly inverse: CSPair; + + /** + Prints the text, but makes it invisible. + */ + readonly hidden: CSPair; + + /** + Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: CSPair; +}; + +export type ForegroundColor = { + readonly black: CSPair; + readonly red: CSPair; + readonly green: CSPair; + readonly yellow: CSPair; + readonly blue: CSPair; + readonly cyan: CSPair; + readonly magenta: CSPair; + readonly white: CSPair; + + /** + Alias for `blackBright`. + */ + readonly gray: CSPair; + + /** + Alias for `blackBright`. + */ + readonly grey: CSPair; + + readonly blackBright: CSPair; + readonly redBright: CSPair; + readonly greenBright: CSPair; + readonly yellowBright: CSPair; + readonly blueBright: CSPair; + readonly cyanBright: CSPair; + readonly magentaBright: CSPair; + readonly whiteBright: CSPair; +}; + +export type BackgroundColor = { + readonly bgBlack: CSPair; + readonly bgRed: CSPair; + readonly bgGreen: CSPair; + readonly bgYellow: CSPair; + readonly bgBlue: CSPair; + readonly bgCyan: CSPair; + readonly bgMagenta: CSPair; + readonly bgWhite: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGray: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGrey: CSPair; + + readonly bgBlackBright: CSPair; + readonly bgRedBright: CSPair; + readonly bgGreenBright: CSPair; + readonly bgYellowBright: CSPair; + readonly bgBlueBright: CSPair; + readonly bgCyanBright: CSPair; + readonly bgMagentaBright: CSPair; + readonly bgWhiteBright: CSPair; +}; + +export type ConvertColor = { + /** + Convert from the RGB color space to the ANSI 256 color space. + + @param red - (`0...255`) + @param green - (`0...255`) + @param blue - (`0...255`) + */ + rgbToAnsi256(red: number, green: number, blue: number): number; + + /** + Convert from the RGB HEX color space to the RGB color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hexToRgb(hex: string): [red: number, green: number, blue: number]; + + /** + Convert from the RGB HEX color space to the ANSI 256 color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hexToAnsi256(hex: string): number; + + /** + Convert from the ANSI 256 color space to the ANSI 16 color space. + + @param code - A number representing the ANSI 256 color. + */ + ansi256ToAnsi(code: number): number; + + /** + Convert from the RGB color space to the ANSI 16 color space. + + @param red - (`0...255`) + @param green - (`0...255`) + @param blue - (`0...255`) + */ + rgbToAnsi(red: number, green: number, blue: number): number; + + /** + Convert from the RGB HEX color space to the ANSI 16 color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hexToAnsi(hex: string): number; +}; + +/** +Basic modifier names. +*/ +export type ModifierName = keyof Modifier; + +/** +Basic foreground color names. + +[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) +*/ +export type ForegroundColorName = keyof ForegroundColor; + +/** +Basic background color names. + +[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) +*/ +export type BackgroundColorName = keyof BackgroundColor; + +/** +Basic color names. The combination of foreground and background color names. + +[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) +*/ +export type ColorName = ForegroundColorName | BackgroundColorName; + +/** +Basic modifier names. +*/ +export const modifierNames: readonly ModifierName[]; + +/** +Basic foreground color names. +*/ +export const foregroundColorNames: readonly ForegroundColorName[]; + +/** +Basic background color names. +*/ +export const backgroundColorNames: readonly BackgroundColorName[]; + +/* +Basic color names. The combination of foreground and background color names. +*/ +export const colorNames: readonly ColorName[]; + +declare const ansiStyles: { + readonly modifier: Modifier; + readonly color: ColorBase & ForegroundColor; + readonly bgColor: ColorBase & BackgroundColor; + readonly codes: ReadonlyMap; +} & ForegroundColor & BackgroundColor & Modifier & ConvertColor; + +export default ansiStyles; diff --git a/node_modules/wrap-ansi/node_modules/ansi-styles/index.js b/node_modules/wrap-ansi/node_modules/ansi-styles/index.js new file mode 100644 index 000000000..eaa7bed6c --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-styles/index.js @@ -0,0 +1,223 @@ +const ANSI_BACKGROUND_OFFSET = 10; + +const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; + +const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; + +const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; + +const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + gray: [90, 39], // Alias of `blackBright` + grey: [90, 39], // Alias of `blackBright` + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39], + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgGray: [100, 49], // Alias of `bgBlackBright` + bgGrey: [100, 49], // Alias of `bgBlackBright` + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49], + }, +}; + +export const modifierNames = Object.keys(styles.modifier); +export const foregroundColorNames = Object.keys(styles.color); +export const backgroundColorNames = Object.keys(styles.bgColor); +export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; + +function assembleStyles() { + const codes = new Map(); + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m`, + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false, + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false, + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = wrapAnsi16(); + styles.color.ansi256 = wrapAnsi256(); + styles.color.ansi16m = wrapAnsi16m(); + styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); + + // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js + Object.defineProperties(styles, { + rgbToAnsi256: { + value(red, green, blue) { + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (red === green && green === blue) { + if (red < 8) { + return 16; + } + + if (red > 248) { + return 231; + } + + return Math.round(((red - 8) / 247) * 24) + 232; + } + + return 16 + + (36 * Math.round(red / 255 * 5)) + + (6 * Math.round(green / 255 * 5)) + + Math.round(blue / 255 * 5); + }, + enumerable: false, + }, + hexToRgb: { + value(hex) { + const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); + if (!matches) { + return [0, 0, 0]; + } + + let [colorString] = matches; + + if (colorString.length === 3) { + colorString = [...colorString].map(character => character + character).join(''); + } + + const integer = Number.parseInt(colorString, 16); + + return [ + /* eslint-disable no-bitwise */ + (integer >> 16) & 0xFF, + (integer >> 8) & 0xFF, + integer & 0xFF, + /* eslint-enable no-bitwise */ + ]; + }, + enumerable: false, + }, + hexToAnsi256: { + value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), + enumerable: false, + }, + ansi256ToAnsi: { + value(code) { + if (code < 8) { + return 30 + code; + } + + if (code < 16) { + return 90 + (code - 8); + } + + let red; + let green; + let blue; + + if (code >= 232) { + red = (((code - 232) * 10) + 8) / 255; + green = red; + blue = red; + } else { + code -= 16; + + const remainder = code % 36; + + red = Math.floor(code / 36) / 5; + green = Math.floor(remainder / 6) / 5; + blue = (remainder % 6) / 5; + } + + const value = Math.max(red, green, blue) * 2; + + if (value === 0) { + return 30; + } + + // eslint-disable-next-line no-bitwise + let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); + + if (value === 2) { + result += 60; + } + + return result; + }, + enumerable: false, + }, + rgbToAnsi: { + value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), + enumerable: false, + }, + hexToAnsi: { + value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), + enumerable: false, + }, + }); + + return styles; +} + +const ansiStyles = assembleStyles(); + +export default ansiStyles; diff --git a/node_modules/wrap-ansi/node_modules/ansi-styles/license b/node_modules/wrap-ansi/node_modules/ansi-styles/license new file mode 100644 index 000000000..fa7ceba3e --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +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. diff --git a/node_modules/wrap-ansi/node_modules/ansi-styles/package.json b/node_modules/wrap-ansi/node_modules/ansi-styles/package.json new file mode 100644 index 000000000..16b508f0f --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-styles/package.json @@ -0,0 +1,54 @@ +{ + "name": "ansi-styles", + "version": "6.2.3", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && ava && tsd", + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "ava": "^6.1.3", + "svg-term-cli": "^2.1.1", + "tsd": "^0.31.1", + "xo": "^0.58.0" + } +} diff --git a/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md b/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md new file mode 100644 index 000000000..6d04183f0 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md @@ -0,0 +1,173 @@ +# ansi-styles + +> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + +## Install + +```sh +npm install ansi-styles +``` + +## Usage + +```js +import styles from 'ansi-styles'; + +console.log(`${styles.green.open}Hello world!${styles.green.close}`); + + +// Color conversion between 256/truecolor +// NOTE: When converting from truecolor to 256 colors, the original color +// may be degraded to fit the new color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(`${styles.color.ansi(styles.rgbToAnsi(199, 20, 250))}Hello World${styles.color.close}`) +console.log(`${styles.color.ansi256(styles.rgbToAnsi256(199, 20, 250))}Hello World${styles.color.close}`) +console.log(`${styles.color.ansi16m(...styles.hexToRgb('#abcdef'))}Hello World${styles.color.close}`) +``` + +## API + +### `open` and `close` + +Each style has an `open` and `close` property. + +### `modifierNames`, `foregroundColorNames`, `backgroundColorNames`, and `colorNames` + +All supported style strings are exposed as an array of strings for convenience. `colorNames` is the combination of `foregroundColorNames` and `backgroundColorNames`. + +This can be useful if you need to validate input: + +```js +import {modifierNames, foregroundColorNames} from 'ansi-styles'; + +console.log(modifierNames.includes('bold')); +//=> true + +console.log(foregroundColorNames.includes('pink')); +//=> false +``` + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.* +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `blackBright` (alias: `gray`, `grey`) +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` (alias: `bgGray`, `bgGrey`) +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `styles.modifier` +- `styles.color` +- `styles.bgColor` + +###### Example + +```js +import styles from 'ansi-styles'; + +console.log(styles.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `styles.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +import styles from 'ansi-styles'; + +console.log(styles.codes.get(36)); +//=> 39 +``` + +## 16 / 256 / 16 million (TrueColor) support + +`ansi-styles` allows converting between various color formats and ANSI escapes, with support for 16, 256 and [16 million colors](https://gist.github.com/XVilka/8346728). + +The following color spaces are supported: + +- `rgb` +- `hex` +- `ansi256` +- `ansi` + +To use these, call the associated conversion function with the intended output, for example: + +```js +import styles from 'ansi-styles'; + +styles.color.ansi(styles.rgbToAnsi(100, 200, 15)); // RGB to 16 color ansi foreground code +styles.bgColor.ansi(styles.hexToAnsi('#C0FFEE')); // HEX to 16 color ansi foreground code + +styles.color.ansi256(styles.rgbToAnsi256(100, 200, 15)); // RGB to 256 color ansi foreground code +styles.bgColor.ansi256(styles.hexToAnsi256('#C0FFEE')); // HEX to 256 color ansi foreground code + +styles.color.ansi16m(100, 200, 15); // RGB to 16 million color foreground code +styles.bgColor.ansi16m(...styles.hexToRgb('#C0FFEE')); // Hex (RGB) to 16 million color foreground code +``` + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + +## For enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/wrap-ansi/node_modules/string-width/index.d.ts b/node_modules/wrap-ansi/node_modules/string-width/index.d.ts new file mode 100644 index 000000000..459f9b84c --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/index.d.ts @@ -0,0 +1,39 @@ +export type Options = { + /** + Count [ambiguous width characters](https://www.unicode.org/reports/tr11/#Ambiguous) as having narrow width (count of 1) instead of wide width (count of 2). + + @default true + + > Ambiguous characters behave like wide or narrow characters depending on the context (language tag, script identification, associated font, source of data, or explicit markup; all can provide the context). __If the context cannot be established reliably, they should be treated as narrow characters by default.__ + > - http://www.unicode.org/reports/tr11/ + */ + readonly ambiguousIsNarrow?: boolean; + + /** + Whether [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) should be counted. + + @default false + */ + readonly countAnsiEscapeCodes?: boolean; +}; + +/** +Get the visual width of a string - the number of columns required to display it. + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +@example +``` +import stringWidth from 'string-width'; + +stringWidth('a'); +//=> 1 + +stringWidth('古'); +//=> 2 + +stringWidth('\u001B[1m古\u001B[22m'); +//=> 2 +``` +*/ +export default function stringWidth(string: string, options?: Options): number; diff --git a/node_modules/wrap-ansi/node_modules/string-width/index.js b/node_modules/wrap-ansi/node_modules/string-width/index.js new file mode 100644 index 000000000..8a24115ce --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/index.js @@ -0,0 +1,82 @@ +import stripAnsi from 'strip-ansi'; +import {eastAsianWidth} from 'get-east-asian-width'; +import emojiRegex from 'emoji-regex'; + +const segmenter = new Intl.Segmenter(); + +const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u; + +export default function stringWidth(string, options = {}) { + if (typeof string !== 'string' || string.length === 0) { + return 0; + } + + const { + ambiguousIsNarrow = true, + countAnsiEscapeCodes = false, + } = options; + + if (!countAnsiEscapeCodes) { + string = stripAnsi(string); + } + + if (string.length === 0) { + return 0; + } + + let width = 0; + const eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow}; + + for (const {segment: character} of segmenter.segment(string)) { + const codePoint = character.codePointAt(0); + + // Ignore control characters + if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { + continue; + } + + // Ignore zero-width characters + if ( + (codePoint >= 0x20_0B && codePoint <= 0x20_0F) // Zero-width space, non-joiner, joiner, left-to-right mark, right-to-left mark + || codePoint === 0xFE_FF // Zero-width no-break space + ) { + continue; + } + + // Ignore combining characters + if ( + (codePoint >= 0x3_00 && codePoint <= 0x3_6F) // Combining diacritical marks + || (codePoint >= 0x1A_B0 && codePoint <= 0x1A_FF) // Combining diacritical marks extended + || (codePoint >= 0x1D_C0 && codePoint <= 0x1D_FF) // Combining diacritical marks supplement + || (codePoint >= 0x20_D0 && codePoint <= 0x20_FF) // Combining diacritical marks for symbols + || (codePoint >= 0xFE_20 && codePoint <= 0xFE_2F) // Combining half marks + ) { + continue; + } + + // Ignore surrogate pairs + if (codePoint >= 0xD8_00 && codePoint <= 0xDF_FF) { + continue; + } + + // Ignore variation selectors + if (codePoint >= 0xFE_00 && codePoint <= 0xFE_0F) { + continue; + } + + // This covers some of the above cases, but we still keep them for performance reasons. + if (defaultIgnorableCodePointRegex.test(character)) { + continue; + } + + // TODO: Use `/\p{RGI_Emoji}/v` when targeting Node.js 20. + if (emojiRegex().test(character)) { + width += 2; + continue; + } + + width += eastAsianWidth(codePoint, eastAsianWidthOptions); + } + + return width; +} diff --git a/node_modules/wrap-ansi/node_modules/string-width/license b/node_modules/wrap-ansi/node_modules/string-width/license new file mode 100644 index 000000000..fa7ceba3e --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +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. diff --git a/node_modules/wrap-ansi/node_modules/string-width/package.json b/node_modules/wrap-ansi/node_modules/string-width/package.json new file mode 100644 index 000000000..cafec041e --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/package.json @@ -0,0 +1,64 @@ +{ + "name": "string-width", + "version": "7.2.0", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "sideEffects": false, + "engines": { + "node": ">=18" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "string", + "character", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width", + "east-asian-width" + ], + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "devDependencies": { + "ava": "^5.3.1", + "tsd": "^0.29.0", + "xo": "^0.56.0" + } +} diff --git a/node_modules/wrap-ansi/node_modules/string-width/readme.md b/node_modules/wrap-ansi/node_modules/string-width/readme.md new file mode 100644 index 000000000..1cccd008c --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/readme.md @@ -0,0 +1,66 @@ +# string-width + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + +## Install + +```sh +npm install string-width +``` + +## Usage + +```js +import stringWidth from 'string-width'; + +stringWidth('a'); +//=> 1 + +stringWidth('古'); +//=> 2 + +stringWidth('\u001B[1m古\u001B[22m'); +//=> 2 +``` + +## API + +### stringWidth(string, options?) + +#### string + +Type: `string` + +The string to be counted. + +#### options + +Type: `object` + +##### ambiguousIsNarrow + +Type: `boolean`\ +Default: `true` + +Count [ambiguous width characters](https://www.unicode.org/reports/tr11/#Ambiguous) as having narrow width (count of 1) instead of wide width (count of 2). + +> Ambiguous characters behave like wide or narrow characters depending on the context (language tag, script identification, associated font, source of data, or explicit markup; all can provide the context). **If the context cannot be established reliably, they should be treated as narrow characters by default.** +> - http://www.unicode.org/reports/tr11/ + +##### countAnsiEscapeCodes + +Type: `boolean`\ +Default: `false` + +Whether [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) should be counted. + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string +- [get-east-asian-width](https://github.com/sindresorhus/get-east-asian-width) - Determine the East Asian Width of a Unicode character diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json new file mode 100644 index 000000000..9c9695f14 --- /dev/null +++ b/node_modules/wrap-ansi/package.json @@ -0,0 +1,69 @@ +{ + "name": "wrap-ansi", + "version": "9.0.2", + "description": "Wordwrap a string with ANSI escape codes", + "license": "MIT", + "repository": "chalk/wrap-ansi", + "funding": "https://github.com/chalk/wrap-ansi?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "engines": { + "node": ">=18" + }, + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "wrap", + "break", + "wordwrap", + "wordbreak", + "linewrap", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "devDependencies": { + "ava": "^5.3.1", + "chalk": "^5.3.0", + "coveralls": "^3.1.1", + "has-ansi": "^5.0.1", + "nyc": "^15.1.0", + "tsd": "^0.29.0", + "xo": "^0.56.0" + } +} diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md new file mode 100644 index 000000000..86327dcd6 --- /dev/null +++ b/node_modules/wrap-ansi/readme.md @@ -0,0 +1,75 @@ +# wrap-ansi + +> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) + +## Install + +```sh +npm install wrap-ansi +``` + +## Usage + +```js +import chalk from 'chalk'; +import wrapAnsi from 'wrap-ansi'; + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(wrapAnsi(input, 20)); +``` + + + +## API + +### wrapAnsi(string, columns, options?) + +Wrap words to the specified column width. + +#### string + +Type: `string` + +A string with ANSI escape codes, like one styled by [`chalk`](https://github.com/chalk/chalk). + +Newline characters will be normalized to `\n`. + +#### columns + +Type: `number` + +The number of columns to wrap the text to. + +#### options + +Type: `object` + +##### hard + +Type: `boolean`\ +Default: `false` + +By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. + +##### wordWrap + +Type: `boolean`\ +Default: `true` + +By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. + +##### trim + +Type: `boolean`\ +Default: `true` + +Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + +## Related + +- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes +- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right +- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md new file mode 100644 index 000000000..98eab2522 --- /dev/null +++ b/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json new file mode 100644 index 000000000..130752046 --- /dev/null +++ b/node_modules/wrappy/package.json @@ -0,0 +1,29 @@ +{ + "name": "wrappy", + "version": "1.0.2", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "files": [ + "wrappy.js" + ], + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/wrappy" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy" +} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js new file mode 100644 index 000000000..bb7e7d6fc --- /dev/null +++ b/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/node_modules/y18n/CHANGELOG.md b/node_modules/y18n/CHANGELOG.md new file mode 100644 index 000000000..244d83850 --- /dev/null +++ b/node_modules/y18n/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [5.0.8](https://www.github.com/yargs/y18n/compare/v5.0.7...v5.0.8) (2021-04-07) + + +### Bug Fixes + +* **deno:** force modern release for Deno ([b1c215a](https://www.github.com/yargs/y18n/commit/b1c215aed714bee5830e76de3e335504dc2c4dab)) + +### [5.0.7](https://www.github.com/yargs/y18n/compare/v5.0.6...v5.0.7) (2021-04-07) + + +### Bug Fixes + +* **deno:** force release for deno ([#121](https://www.github.com/yargs/y18n/issues/121)) ([d3f2560](https://www.github.com/yargs/y18n/commit/d3f2560e6cedf2bfa2352e9eec044da53f9a06b2)) + +### [5.0.6](https://www.github.com/yargs/y18n/compare/v5.0.5...v5.0.6) (2021-04-05) + + +### Bug Fixes + +* **webpack:** skip readFileSync if not defined ([#117](https://www.github.com/yargs/y18n/issues/117)) ([6966fa9](https://www.github.com/yargs/y18n/commit/6966fa91d2881cc6a6c531e836099e01f4da1616)) + +### [5.0.5](https://www.github.com/yargs/y18n/compare/v5.0.4...v5.0.5) (2020-10-25) + + +### Bug Fixes + +* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) + +### [5.0.4](https://www.github.com/yargs/y18n/compare/v5.0.3...v5.0.4) (2020-10-16) + + +### Bug Fixes + +* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#105](https://www.github.com/yargs/y18n/issues/105)) ([4f85d80](https://www.github.com/yargs/y18n/commit/4f85d80dbaae6d2c7899ae394f7ad97805df4886)) + +### [5.0.3](https://www.github.com/yargs/y18n/compare/v5.0.2...v5.0.3) (2020-10-16) + + +### Bug Fixes + +* **exports:** node 13.0-13.6 require a string fallback ([#103](https://www.github.com/yargs/y18n/issues/103)) ([e39921e](https://www.github.com/yargs/y18n/commit/e39921e1017f88f5d8ea97ddea854ffe92d68e74)) + +### [5.0.2](https://www.github.com/yargs/y18n/compare/v5.0.1...v5.0.2) (2020-10-01) + + +### Bug Fixes + +* **deno:** update types for deno ^1.4.0 ([#100](https://www.github.com/yargs/y18n/issues/100)) ([3834d9a](https://www.github.com/yargs/y18n/commit/3834d9ab1332f2937c935ada5e76623290efae81)) + +### [5.0.1](https://www.github.com/yargs/y18n/compare/v5.0.0...v5.0.1) (2020-09-05) + + +### Bug Fixes + +* main had old index path ([#98](https://www.github.com/yargs/y18n/issues/98)) ([124f7b0](https://www.github.com/yargs/y18n/commit/124f7b047ba9596bdbdf64459988304e77f3de1b)) + +## [5.0.0](https://www.github.com/yargs/y18n/compare/v4.0.0...v5.0.0) (2020-09-05) + + +### ⚠ BREAKING CHANGES + +* exports maps are now used, which modifies import behavior. +* drops Node 6 and 4. begin following Node.js LTS schedule (#89) + +### Features + +* add support for ESM and Deno [#95](https://www.github.com/yargs/y18n/issues/95)) ([4d7ae94](https://www.github.com/yargs/y18n/commit/4d7ae94bcb42e84164e2180366474b1cd321ed94)) + + +### Build System + +* drops Node 6 and 4. begin following Node.js LTS schedule ([#89](https://www.github.com/yargs/y18n/issues/89)) ([3cc0c28](https://www.github.com/yargs/y18n/commit/3cc0c287240727b84eaf1927f903612ec80f5e43)) + +### 4.0.1 (2020-10-25) + + +### Bug Fixes + +* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/7de58ca0d315990cdb38234e97fc66254cdbcd71)) + +## [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) + + +### Bug Fixes + +* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) + + +### Features + +* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf)) + + +### BREAKING CHANGES + +* **__:** dropping Node 0.10/Node 0.12 support diff --git a/node_modules/y18n/LICENSE b/node_modules/y18n/LICENSE new file mode 100644 index 000000000..3c157f0b9 --- /dev/null +++ b/node_modules/y18n/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/y18n/README.md b/node_modules/y18n/README.md new file mode 100644 index 000000000..5102bb17d --- /dev/null +++ b/node_modules/y18n/README.md @@ -0,0 +1,127 @@ +# y18n + +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) + +The bare-bones internationalization library used by yargs. + +Inspired by [i18n](https://www.npmjs.com/package/i18n). + +## Examples + +_simple string translation:_ + +```js +const __ = require('y18n')().__; + +console.log(__('my awesome string %s', 'foo')); +``` + +output: + +`my awesome string foo` + +_using tagged template literals_ + +```js +const __ = require('y18n')().__; + +const str = 'foo'; + +console.log(__`my awesome string ${str}`); +``` + +output: + +`my awesome string foo` + +_pluralization support:_ + +```js +const __n = require('y18n')().__n; + +console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')); +``` + +output: + +`2 fishes foo` + +## Deno Example + +As of `v5` `y18n` supports [Deno](https://github.com/denoland/deno): + +```typescript +import y18n from "https://deno.land/x/y18n/deno.ts"; + +const __ = y18n({ + locale: 'pirate', + directory: './test/locales' +}).__ + +console.info(__`Hi, ${'Ben'} ${'Coe'}!`) +``` + +You will need to run with `--allow-read` to load alternative locales. + +## JSON Language Files + +The JSON language files should be stored in a `./locales` folder. +File names correspond to locales, e.g., `en.json`, `pirate.json`. + +When strings are observed for the first time they will be +added to the JSON file corresponding to the current locale. + +## Methods + +### require('y18n')(config) + +Create an instance of y18n with the config provided, options include: + +* `directory`: the locale directory, default `./locales`. +* `updateFiles`: should newly observed strings be updated in file, default `true`. +* `locale`: what locale should be used. +* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) + be allowed if a file matching the locale does not exist (e.g. `en_US.json`), + default `true`. + +### y18n.\_\_(str, arg, arg, arg) + +Print a localized string, `%s` will be replaced with `arg`s. + +This function can also be used as a tag for a template literal. You can use it +like this: __`hello ${'world'}`. This will be equivalent to +`__('hello %s', 'world')`. + +### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) + +Print a localized string with appropriate pluralization. If `%d` is provided +in the string, the `count` will replace this placeholder. + +### y18n.setLocale(str) + +Set the current locale being used. + +### y18n.getLocale() + +What locale is currently being used? + +### y18n.updateLocale(obj) + +Update the current locale with the key value pairs in `obj`. + +## Supported Node.js Versions + +Libraries in this ecosystem make a best effort to track +[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a +post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). + +## License + +ISC + +[npm-url]: https://npmjs.org/package/y18n +[npm-image]: https://img.shields.io/npm/v/y18n.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: https://github.com/feross/standard diff --git a/node_modules/y18n/build/index.cjs b/node_modules/y18n/build/index.cjs new file mode 100644 index 000000000..b2731e1a5 --- /dev/null +++ b/node_modules/y18n/build/index.cjs @@ -0,0 +1,203 @@ +'use strict'; + +var fs = require('fs'); +var util = require('util'); +var path = require('path'); + +let shim; +class Y18N { + constructor(opts) { + // configurable options. + opts = opts || {}; + this.directory = opts.directory || './locales'; + this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; + this.locale = opts.locale || 'en'; + this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; + // internal stuff. + this.cache = Object.create(null); + this.writeQueue = []; + } + __(...args) { + if (typeof arguments[0] !== 'string') { + return this._taggedLiteral(arguments[0], ...arguments); + } + const str = args.shift(); + let cb = function () { }; // start with noop. + if (typeof args[args.length - 1] === 'function') + cb = args.pop(); + cb = cb || function () { }; // noop. + if (!this.cache[this.locale]) + this._readLocaleFile(); + // we've observed a new string, update the language file. + if (!this.cache[this.locale][str] && this.updateFiles) { + this.cache[this.locale][str] = str; + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite({ + directory: this.directory, + locale: this.locale, + cb + }); + } + else { + cb(); + } + return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); + } + __n() { + const args = Array.prototype.slice.call(arguments); + const singular = args.shift(); + const plural = args.shift(); + const quantity = args.shift(); + let cb = function () { }; // start with noop. + if (typeof args[args.length - 1] === 'function') + cb = args.pop(); + if (!this.cache[this.locale]) + this._readLocaleFile(); + let str = quantity === 1 ? singular : plural; + if (this.cache[this.locale][singular]) { + const entry = this.cache[this.locale][singular]; + str = entry[quantity === 1 ? 'one' : 'other']; + } + // we've observed a new string, update the language file. + if (!this.cache[this.locale][singular] && this.updateFiles) { + this.cache[this.locale][singular] = { + one: singular, + other: plural + }; + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite({ + directory: this.directory, + locale: this.locale, + cb + }); + } + else { + cb(); + } + // if a %d placeholder is provided, add quantity + // to the arguments expanded by util.format. + const values = [str]; + if (~str.indexOf('%d')) + values.push(quantity); + return shim.format.apply(shim.format, values.concat(args)); + } + setLocale(locale) { + this.locale = locale; + } + getLocale() { + return this.locale; + } + updateLocale(obj) { + if (!this.cache[this.locale]) + this._readLocaleFile(); + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + this.cache[this.locale][key] = obj[key]; + } + } + } + _taggedLiteral(parts, ...args) { + let str = ''; + parts.forEach(function (part, i) { + const arg = args[i + 1]; + str += part; + if (typeof arg !== 'undefined') { + str += '%s'; + } + }); + return this.__.apply(this, [str].concat([].slice.call(args, 1))); + } + _enqueueWrite(work) { + this.writeQueue.push(work); + if (this.writeQueue.length === 1) + this._processWriteQueue(); + } + _processWriteQueue() { + const _this = this; + const work = this.writeQueue[0]; + // destructure the enqueued work. + const directory = work.directory; + const locale = work.locale; + const cb = work.cb; + const languageFile = this._resolveLocaleFile(directory, locale); + const serializedLocale = JSON.stringify(this.cache[locale], null, 2); + shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { + _this.writeQueue.shift(); + if (_this.writeQueue.length > 0) + _this._processWriteQueue(); + cb(err); + }); + } + _readLocaleFile() { + let localeLookup = {}; + const languageFile = this._resolveLocaleFile(this.directory, this.locale); + try { + // When using a bundler such as webpack, readFileSync may not be defined: + if (shim.fs.readFileSync) { + localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); + } + } + catch (err) { + if (err instanceof SyntaxError) { + err.message = 'syntax error in ' + languageFile; + } + if (err.code === 'ENOENT') + localeLookup = {}; + else + throw err; + } + this.cache[this.locale] = localeLookup; + } + _resolveLocaleFile(directory, locale) { + let file = shim.resolve(directory, './', locale + '.json'); + if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { + // attempt fallback to language only + const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); + if (this._fileExistsSync(languageFile)) + file = languageFile; + } + return file; + } + _fileExistsSync(file) { + return shim.exists(file); + } +} +function y18n$1(opts, _shim) { + shim = _shim; + const y18n = new Y18N(opts); + return { + __: y18n.__.bind(y18n), + __n: y18n.__n.bind(y18n), + setLocale: y18n.setLocale.bind(y18n), + getLocale: y18n.getLocale.bind(y18n), + updateLocale: y18n.updateLocale.bind(y18n), + locale: y18n.locale + }; +} + +var nodePlatformShim = { + fs: { + readFileSync: fs.readFileSync, + writeFile: fs.writeFile + }, + format: util.format, + resolve: path.resolve, + exists: (file) => { + try { + return fs.statSync(file).isFile(); + } + catch (err) { + return false; + } + } +}; + +const y18n = (opts) => { + return y18n$1(opts, nodePlatformShim); +}; + +module.exports = y18n; diff --git a/node_modules/y18n/build/lib/cjs.js b/node_modules/y18n/build/lib/cjs.js new file mode 100644 index 000000000..ff5847093 --- /dev/null +++ b/node_modules/y18n/build/lib/cjs.js @@ -0,0 +1,6 @@ +import { y18n as _y18n } from './index.js'; +import nodePlatformShim from './platform-shims/node.js'; +const y18n = (opts) => { + return _y18n(opts, nodePlatformShim); +}; +export default y18n; diff --git a/node_modules/y18n/build/lib/index.js b/node_modules/y18n/build/lib/index.js new file mode 100644 index 000000000..e38f33594 --- /dev/null +++ b/node_modules/y18n/build/lib/index.js @@ -0,0 +1,174 @@ +let shim; +class Y18N { + constructor(opts) { + // configurable options. + opts = opts || {}; + this.directory = opts.directory || './locales'; + this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; + this.locale = opts.locale || 'en'; + this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; + // internal stuff. + this.cache = Object.create(null); + this.writeQueue = []; + } + __(...args) { + if (typeof arguments[0] !== 'string') { + return this._taggedLiteral(arguments[0], ...arguments); + } + const str = args.shift(); + let cb = function () { }; // start with noop. + if (typeof args[args.length - 1] === 'function') + cb = args.pop(); + cb = cb || function () { }; // noop. + if (!this.cache[this.locale]) + this._readLocaleFile(); + // we've observed a new string, update the language file. + if (!this.cache[this.locale][str] && this.updateFiles) { + this.cache[this.locale][str] = str; + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite({ + directory: this.directory, + locale: this.locale, + cb + }); + } + else { + cb(); + } + return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); + } + __n() { + const args = Array.prototype.slice.call(arguments); + const singular = args.shift(); + const plural = args.shift(); + const quantity = args.shift(); + let cb = function () { }; // start with noop. + if (typeof args[args.length - 1] === 'function') + cb = args.pop(); + if (!this.cache[this.locale]) + this._readLocaleFile(); + let str = quantity === 1 ? singular : plural; + if (this.cache[this.locale][singular]) { + const entry = this.cache[this.locale][singular]; + str = entry[quantity === 1 ? 'one' : 'other']; + } + // we've observed a new string, update the language file. + if (!this.cache[this.locale][singular] && this.updateFiles) { + this.cache[this.locale][singular] = { + one: singular, + other: plural + }; + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite({ + directory: this.directory, + locale: this.locale, + cb + }); + } + else { + cb(); + } + // if a %d placeholder is provided, add quantity + // to the arguments expanded by util.format. + const values = [str]; + if (~str.indexOf('%d')) + values.push(quantity); + return shim.format.apply(shim.format, values.concat(args)); + } + setLocale(locale) { + this.locale = locale; + } + getLocale() { + return this.locale; + } + updateLocale(obj) { + if (!this.cache[this.locale]) + this._readLocaleFile(); + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + this.cache[this.locale][key] = obj[key]; + } + } + } + _taggedLiteral(parts, ...args) { + let str = ''; + parts.forEach(function (part, i) { + const arg = args[i + 1]; + str += part; + if (typeof arg !== 'undefined') { + str += '%s'; + } + }); + return this.__.apply(this, [str].concat([].slice.call(args, 1))); + } + _enqueueWrite(work) { + this.writeQueue.push(work); + if (this.writeQueue.length === 1) + this._processWriteQueue(); + } + _processWriteQueue() { + const _this = this; + const work = this.writeQueue[0]; + // destructure the enqueued work. + const directory = work.directory; + const locale = work.locale; + const cb = work.cb; + const languageFile = this._resolveLocaleFile(directory, locale); + const serializedLocale = JSON.stringify(this.cache[locale], null, 2); + shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { + _this.writeQueue.shift(); + if (_this.writeQueue.length > 0) + _this._processWriteQueue(); + cb(err); + }); + } + _readLocaleFile() { + let localeLookup = {}; + const languageFile = this._resolveLocaleFile(this.directory, this.locale); + try { + // When using a bundler such as webpack, readFileSync may not be defined: + if (shim.fs.readFileSync) { + localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); + } + } + catch (err) { + if (err instanceof SyntaxError) { + err.message = 'syntax error in ' + languageFile; + } + if (err.code === 'ENOENT') + localeLookup = {}; + else + throw err; + } + this.cache[this.locale] = localeLookup; + } + _resolveLocaleFile(directory, locale) { + let file = shim.resolve(directory, './', locale + '.json'); + if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { + // attempt fallback to language only + const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); + if (this._fileExistsSync(languageFile)) + file = languageFile; + } + return file; + } + _fileExistsSync(file) { + return shim.exists(file); + } +} +export function y18n(opts, _shim) { + shim = _shim; + const y18n = new Y18N(opts); + return { + __: y18n.__.bind(y18n), + __n: y18n.__n.bind(y18n), + setLocale: y18n.setLocale.bind(y18n), + getLocale: y18n.getLocale.bind(y18n), + updateLocale: y18n.updateLocale.bind(y18n), + locale: y18n.locale + }; +} diff --git a/node_modules/y18n/build/lib/platform-shims/node.js b/node_modules/y18n/build/lib/platform-shims/node.js new file mode 100644 index 000000000..181208b81 --- /dev/null +++ b/node_modules/y18n/build/lib/platform-shims/node.js @@ -0,0 +1,19 @@ +import { readFileSync, statSync, writeFile } from 'fs'; +import { format } from 'util'; +import { resolve } from 'path'; +export default { + fs: { + readFileSync, + writeFile + }, + format, + resolve, + exists: (file) => { + try { + return statSync(file).isFile(); + } + catch (err) { + return false; + } + } +}; diff --git a/node_modules/y18n/index.mjs b/node_modules/y18n/index.mjs new file mode 100644 index 000000000..46c82133c --- /dev/null +++ b/node_modules/y18n/index.mjs @@ -0,0 +1,8 @@ +import shim from './build/lib/platform-shims/node.js' +import { y18n as _y18n } from './build/lib/index.js' + +const y18n = (opts) => { + return _y18n(opts, shim) +} + +export default y18n diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json new file mode 100644 index 000000000..4e5c1ca60 --- /dev/null +++ b/node_modules/y18n/package.json @@ -0,0 +1,70 @@ +{ + "name": "y18n", + "version": "5.0.8", + "description": "the bare-bones internationalization library used by yargs", + "exports": { + ".": [ + { + "import": "./index.mjs", + "require": "./build/index.cjs" + }, + "./build/index.cjs" + ] + }, + "type": "module", + "module": "./build/lib/index.js", + "keywords": [ + "i18n", + "internationalization", + "yargs" + ], + "homepage": "https://github.com/yargs/y18n", + "bugs": { + "url": "https://github.com/yargs/y18n/issues" + }, + "repository": "yargs/y18n", + "license": "ISC", + "author": "Ben Coe ", + "main": "./build/index.cjs", + "scripts": { + "check": "standardx **/*.ts **/*.cjs **/*.mjs", + "fix": "standardx --fix **/*.ts **/*.cjs **/*.mjs", + "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", + "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", + "test:esm": "c8 --reporter=text --reporter=html mocha test/esm/*.mjs", + "posttest": "npm run check", + "coverage": "c8 report --check-coverage", + "precompile": "rimraf build", + "compile": "tsc", + "postcompile": "npm run build:cjs", + "build:cjs": "rollup -c", + "prepare": "npm run compile" + }, + "devDependencies": { + "@types/node": "^14.6.4", + "@wessberg/rollup-plugin-ts": "^1.3.1", + "c8": "^7.3.0", + "chai": "^4.0.1", + "cross-env": "^7.0.2", + "gts": "^3.0.0", + "mocha": "^8.0.0", + "rimraf": "^3.0.2", + "rollup": "^2.26.10", + "standardx": "^7.0.0", + "ts-transform-default-export": "^1.0.2", + "typescript": "^4.0.0" + }, + "files": [ + "build", + "index.mjs", + "!*.d.ts" + ], + "engines": { + "node": ">=10" + }, + "standardx": { + "ignore": [ + "build" + ] + } +} diff --git a/node_modules/yaml/LICENSE b/node_modules/yaml/LICENSE new file mode 100644 index 000000000..e060aaa1f --- /dev/null +++ b/node_modules/yaml/LICENSE @@ -0,0 +1,13 @@ +Copyright Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/yaml/README.md b/node_modules/yaml/README.md new file mode 100644 index 000000000..1613c1d64 --- /dev/null +++ b/node_modules/yaml/README.md @@ -0,0 +1,172 @@ +# YAML + +`yaml` is a definitive library for [YAML](https://yaml.org/), the human friendly data serialization standard. +This library: + +- Supports both YAML 1.1 and YAML 1.2 and all common data schemas, +- Passes all of the [yaml-test-suite](https://github.com/yaml/yaml-test-suite) tests, +- Can accept any string as input without throwing, parsing as much YAML out of it as it can, and +- Supports parsing, modifying, and writing YAML comments and blank lines. + +The library is released under the ISC open source license, and the code is [available on GitHub](https://github.com/eemeli/yaml/). +It has no external dependencies and runs on Node.js as well as modern browsers. + +For the purposes of versioning, any changes that break any of the documented endpoints or APIs will be considered semver-major breaking changes. +Undocumented library internals may change between minor versions, and previous APIs may be deprecated (but not removed). + +The minimum supported TypeScript version of the included typings is 3.9; +for use in earlier versions you may need to set `skipLibCheck: true` in your config. +This requirement may be updated between minor versions of the library. + +For more information, see the project's documentation site: [**eemeli.org/yaml**](https://eemeli.org/yaml/) + +For build instructions and contribution guidelines, see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md). + +To install: + +```sh +npm install yaml +# or +deno add jsr:@eemeli/yaml +``` + +**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation. + +## API Overview + +The API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](https://eemeli.org/yaml/#parse-amp-stringify), [Documents](https://eemeli.org/yaml/#documents), and the underlying [Lexer/Parser/Composer](https://eemeli.org/yaml/#parsing-yaml). +The first has the simplest API and "just works", the second gets you all the bells and whistles supported by the library along with a decent [AST](https://eemeli.org/yaml/#content-nodes), and the third lets you get progressively closer to YAML source, if that's your thing. + +A [command-line tool](https://eemeli.org/yaml/#command-line-tool) is also included. + +### Parse & Stringify + +```js +import { parse, stringify } from 'yaml' +``` + +- [`parse(str, reviver?, options?): value`](https://eemeli.org/yaml/#yaml-parse) +- [`stringify(value, replacer?, options?): string`](https://eemeli.org/yaml/#yaml-stringify) + +### Documents + + +```js +import { + Document, + isDocument, + parseAllDocuments, + parseDocument +} from 'yaml' +``` + +- [`Document`](https://eemeli.org/yaml/#documents) + - [`constructor(value, replacer?, options?)`](https://eemeli.org/yaml/#creating-documents) + - [`#contents`](https://eemeli.org/yaml/#content-nodes) + - [`#directives`](https://eemeli.org/yaml/#stream-directives) + - [`#errors`](https://eemeli.org/yaml/#errors) + - [`#warnings`](https://eemeli.org/yaml/#errors) +- [`isDocument(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`parseAllDocuments(str, options?): Document[]`](https://eemeli.org/yaml/#parsing-documents) +- [`parseDocument(str, options?): Document`](https://eemeli.org/yaml/#parsing-documents) + +### Content Nodes + + +```js +import { + isAlias, isCollection, isMap, isNode, + isPair, isScalar, isSeq, Scalar, + visit, visitAsync, YAMLMap, YAMLSeq +} from 'yaml' +``` + +- [`isAlias(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isCollection(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isMap(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isNode(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isPair(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isScalar(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`isSeq(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types) +- [`new Scalar(value)`](https://eemeli.org/yaml/#scalar-values) +- [`new YAMLMap()`](https://eemeli.org/yaml/#collections) +- [`new YAMLSeq()`](https://eemeli.org/yaml/#collections) +- [`doc.createAlias(node, name?): Alias`](https://eemeli.org/yaml/#creating-nodes) +- [`doc.createNode(value, options?): Node`](https://eemeli.org/yaml/#creating-nodes) +- [`doc.createPair(key, value): Pair`](https://eemeli.org/yaml/#creating-nodes) +- [`visit(node, visitor)`](https://eemeli.org/yaml/#finding-and-modifying-nodes) +- [`visitAsync(node, visitor)`](https://eemeli.org/yaml/#finding-and-modifying-nodes) + +### Parsing YAML + +```js +import { Composer, Lexer, Parser } from 'yaml' +``` + +- [`new Lexer().lex(src)`](https://eemeli.org/yaml/#lexer) +- [`new Parser(onNewLine?).parse(src)`](https://eemeli.org/yaml/#parser) +- [`new Composer(options?).compose(tokens)`](https://eemeli.org/yaml/#composer) + +## YAML.parse + +```yaml +# file.yml +YAML: + - A human-readable data serialization language + - https://en.wikipedia.org/wiki/YAML +yaml: + - A complete JavaScript implementation + - https://www.npmjs.com/package/yaml +``` + +```js +import fs from 'fs' +import YAML from 'yaml' + +YAML.parse('3.14159') +// 3.14159 + +YAML.parse('[ true, false, maybe, null ]\n') +// [ true, false, 'maybe', null ] + +const file = fs.readFileSync('./file.yml', 'utf8') +YAML.parse(file) +// { YAML: +// [ 'A human-readable data serialization language', +// 'https://en.wikipedia.org/wiki/YAML' ], +// yaml: +// [ 'A complete JavaScript implementation', +// 'https://www.npmjs.com/package/yaml' ] } +``` + +## YAML.stringify + +```js +import YAML from 'yaml' + +YAML.stringify(3.14159) +// '3.14159\n' + +YAML.stringify([true, false, 'maybe', null]) +// `- true +// - false +// - maybe +// - null +// ` + +YAML.stringify({ number: 3, plain: 'string', block: 'two\nlines\n' }) +// `number: 3 +// plain: string +// block: | +// two +// lines +// ` +``` + +--- + +Browser testing provided by: + + +BrowserStack + diff --git a/node_modules/yaml/bin.mjs b/node_modules/yaml/bin.mjs new file mode 100755 index 000000000..7504ae13b --- /dev/null +++ b/node_modules/yaml/bin.mjs @@ -0,0 +1,11 @@ +#!/usr/bin/env node + +import { UserError, cli, help } from './dist/cli.mjs' + +cli(process.stdin, error => { + if (error instanceof UserError) { + if (error.code === UserError.ARGS) console.error(`${help}\n`) + console.error(error.message) + process.exitCode = error.code + } else if (error) throw error +}) diff --git a/node_modules/yaml/browser/dist/compose/compose-collection.js b/node_modules/yaml/browser/dist/compose/compose-collection.js new file mode 100644 index 000000000..cb8eff768 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/compose-collection.js @@ -0,0 +1,88 @@ +import { isNode } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import { resolveBlockMap } from './resolve-block-map.js'; +import { resolveBlockSeq } from './resolve-block-seq.js'; +import { resolveFlowCollection } from './resolve-flow-collection.js'; + +function resolveCollection(CN, ctx, token, onError, tagName, tag) { + const coll = token.type === 'block-map' + ? resolveBlockMap(CN, ctx, token, onError, tag) + : token.type === 'block-seq' + ? resolveBlockSeq(CN, ctx, token, onError, tag) + : resolveFlowCollection(CN, ctx, token, onError, tag); + const Coll = coll.constructor; + // If we got a tagName matching the class, or the tag name is '!', + // then use the tagName from the node class used to create it. + if (tagName === '!' || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; +} +function composeCollection(CN, ctx, token, props, onError) { + const tagToken = props.tag; + const tagName = !tagToken + ? null + : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)); + if (token.type === 'block-seq') { + const { anchor, newlineAfterProp: nl } = props; + const lastProp = anchor && tagToken + ? anchor.offset > tagToken.offset + ? anchor + : tagToken + : (anchor ?? tagToken); + if (lastProp && (!nl || nl.offset < lastProp.offset)) { + const message = 'Missing newline after block sequence props'; + onError(lastProp, 'MISSING_CHAR', message); + } + } + const expType = token.type === 'block-map' + ? 'map' + : token.type === 'block-seq' + ? 'seq' + : token.start.source === '{' + ? 'map' + : 'seq'; + // shortcut: check if it's a generic YAMLMap or YAMLSeq + // before jumping into the custom tag logic. + if (!tagToken || + !tagName || + tagName === '!' || + (tagName === YAMLMap.tagName && expType === 'map') || + (tagName === YAMLSeq.tagName && expType === 'seq')) { + return resolveCollection(CN, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt?.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } + else { + if (kt) { + onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true); + } + else { + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true); + } + return resolveCollection(CN, ctx, token, onError, tagName); + } + } + const coll = resolveCollection(CN, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll; + const node = isNode(res) + ? res + : new Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; +} + +export { composeCollection }; diff --git a/node_modules/yaml/browser/dist/compose/compose-doc.js b/node_modules/yaml/browser/dist/compose/compose-doc.js new file mode 100644 index 000000000..9827b53ca --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/compose-doc.js @@ -0,0 +1,43 @@ +import { Document } from '../doc/Document.js'; +import { composeNode, composeEmptyNode } from './compose-node.js'; +import { resolveEnd } from './resolve-end.js'; +import { resolveProps } from './resolve-props.js'; + +function composeDoc(options, directives, { offset, start, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document(undefined, opts); + const ctx = { + atKey: false, + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps(start, { + indicator: 'doc-start', + next: value ?? end?.[0], + offset, + onError, + parentIndent: 0, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value && + (value.type === 'block-map' || value.type === 'block-seq') && + !props.hasNewline) + onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker'); + } + // @ts-expect-error If Contents is set, let's trust the user + doc.contents = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re = resolveEnd(end, contentEnd, false, onError); + if (re.comment) + doc.comment = re.comment; + doc.range = [offset, contentEnd, re.offset]; + return doc; +} + +export { composeDoc }; diff --git a/node_modules/yaml/browser/dist/compose/compose-node.js b/node_modules/yaml/browser/dist/compose/compose-node.js new file mode 100644 index 000000000..147801d94 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/compose-node.js @@ -0,0 +1,109 @@ +import { Alias } from '../nodes/Alias.js'; +import { isScalar } from '../nodes/identity.js'; +import { composeCollection } from './compose-collection.js'; +import { composeScalar } from './compose-scalar.js'; +import { resolveEnd } from './resolve-end.js'; +import { emptyScalarPosition } from './util-empty-scalar-position.js'; + +const CN = { composeNode, composeEmptyNode }; +function composeNode(ctx, token, props, onError) { + const atKey = ctx.atKey; + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case 'alias': + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties'); + break; + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'block-scalar': + node = composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case 'block-map': + case 'block-seq': + case 'flow-collection': + try { + node = composeCollection(CN, ctx, token, props, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + } + catch (error) { + // Almost certainly here due to a stack overflow + const message = error instanceof Error ? error.message : String(error); + onError(token, 'RESOURCE_EXHAUSTION', message); + } + break; + default: { + const message = token.type === 'error' + ? token.message + : `Unsupported token (type: ${token.type})`; + onError(token, 'UNEXPECTED_TOKEN', message); + isSrcToken = false; + } + } + node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError)); + if (anchor && node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + if (atKey && + ctx.options.stringKeys && + (!isScalar(node) || + typeof node.value !== 'string' || + (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) { + const msg = 'With stringKeys, all keys must be strings'; + onError(tag ?? token, 'NON_STRING_KEY', msg); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === 'scalar' && token.source === '') + node.comment = comment; + else + node.commentBefore = comment; + } + // @ts-expect-error Type checking misses meaning of isSrcToken + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; +} +function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: 'scalar', + offset: emptyScalarPosition(offset, before, pos), + indent: -1, + source: '' + }; + const node = composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; +} +function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias(source.substring(1)); + if (alias.source === '') + onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string'); + if (alias.source.endsWith(':')) + onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true); + const valueEnd = offset + source.length; + const re = resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re.offset]; + if (re.comment) + alias.comment = re.comment; + return alias; +} + +export { composeEmptyNode, composeNode }; diff --git a/node_modules/yaml/browser/dist/compose/compose-scalar.js b/node_modules/yaml/browser/dist/compose/compose-scalar.js new file mode 100644 index 000000000..13ceda554 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/compose-scalar.js @@ -0,0 +1,86 @@ +import { isScalar, SCALAR } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; +import { resolveBlockScalar } from './resolve-block-scalar.js'; +import { resolveFlowScalar } from './resolve-flow-scalar.js'; + +function composeScalar(ctx, token, tagToken, onError) { + const { value, type, comment, range } = token.type === 'block-scalar' + ? resolveBlockScalar(ctx, token, onError) + : resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken + ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) + : null; + let tag; + if (ctx.options.stringKeys && ctx.atKey) { + tag = ctx.schema[SCALAR]; + } + else if (tagName) + tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError); + else if (token.type === 'scalar') + tag = findScalarTagByTest(ctx, value, token, onError); + else + tag = ctx.schema[SCALAR]; + let scalar; + try { + const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options); + scalar = isScalar(res) ? res : new Scalar(res); + } + catch (error) { + const msg = error instanceof Error ? error.message : String(error); + onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg); + scalar = new Scalar(value); + } + scalar.range = range; + scalar.source = value; + if (type) + scalar.type = type; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; +} +function findScalarTagByName(schema, value, tagName, tagToken, onError) { + if (tagName === '!') + return schema[SCALAR]; // non-specific tag + const matchWithTest = []; + for (const tag of schema.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; + } + } + for (const tag of matchWithTest) + if (tag.test?.test(value)) + return tag; + const kt = schema.knownTags[tagName]; + if (kt && !kt.collection) { + // Ensure that the known tag is available for stringifying, + // but does not get used by default. + schema.tags.push(Object.assign({}, kt, { default: false, test: undefined })); + return kt; + } + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str'); + return schema[SCALAR]; +} +function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) { + const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) && + tag.test?.test(value)) || schema[SCALAR]; + if (schema.compat) { + const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? + schema[SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, 'TAG_RESOLVE_FAILED', msg, true); + } + } + return tag; +} + +export { composeScalar }; diff --git a/node_modules/yaml/browser/dist/compose/composer.js b/node_modules/yaml/browser/dist/compose/composer.js new file mode 100644 index 000000000..ccd139ef6 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/composer.js @@ -0,0 +1,219 @@ +import { Directives } from '../doc/directives.js'; +import { Document } from '../doc/Document.js'; +import { YAMLWarning, YAMLParseError } from '../errors.js'; +import { isCollection, isPair } from '../nodes/identity.js'; +import { composeDoc } from './compose-doc.js'; +import { resolveEnd } from './resolve-end.js'; + +function getErrorPos(src) { + if (typeof src === 'number') + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === 'string' ? source.length : 1)]; +} +function parsePrelude(prelude) { + let comment = ''; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case '#': + comment += + (comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') + + (source.substring(1) || ' '); + atComment = true; + afterEmptyLine = false; + break; + case '%': + if (prelude[i + 1]?.[0] !== '#') + i += 1; + atComment = false; + break; + default: + // This may be wrong after doc-end, but in that case it doesn't matter + if (!atComment) + afterEmptyLine = true; + atComment = false; + } + } + return { comment, afterEmptyLine }; +} +/** + * Compose a stream of CST nodes into a stream of YAML Documents. + * + * ```ts + * import { Composer, Parser } from 'yaml' + * + * const src: string = ... + * const tokens = new Parser().parse(src) + * const docs = new Composer().compose(tokens) + * ``` + */ +class Composer { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new YAMLWarning(pos, code, message)); + else + this.errors.push(new YAMLParseError(pos, code, message)); + }; + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + this.directives = new Directives({ version: options.version || '1.2' }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + //console.log({ dc: doc.comment, prelude, comment }) + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment; + } + else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } + else if (isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it = dc.items[0]; + if (isPair(it)) + it = it.key; + const cb = it.commentBefore; + it.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + } + if (afterDoc) { + for (let i = 0; i < this.errors.length; ++i) + doc.errors.push(this.errors[i]); + for (let i = 0; i < this.warnings.length; ++i) + doc.warnings.push(this.warnings[i]); + } + else { + doc.errors = this.errors; + doc.warnings = this.warnings; + } + this.prelude = []; + this.errors = []; + this.warnings = []; + } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + switch (token.type) { + case 'directive': + this.directives.add(token.source, (offset, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, 'BAD_DIRECTIVE', message, warning); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case 'document': { + const doc = composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line'); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; + break; + } + case 'byte-order-mark': + case 'space': + break; + case 'comment': + case 'newline': + this.prelude.push(token.source); + break; + case 'error': { + const msg = token.source + ? `${token.message}: ${JSON.stringify(token.source)}` + : token.message; + const error = new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg); + if (this.atDirectives || !this.doc) + this.errors.push(error); + else + this.doc.errors.push(error); + break; + } + case 'doc-end': { + if (!this.doc) { + const msg = 'Unexpected doc-end without preceding document'; + this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg)); + break; + } + this.doc.directives.docEnd = true; + const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; + } + default: + this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`)); + } + } + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } + else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document(undefined, opts); + if (this.atDirectives) + this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line'); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; + } + } +} + +export { Composer }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-block-map.js b/node_modules/yaml/browser/dist/compose/resolve-block-map.js new file mode 100644 index 000000000..d9b965d16 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-block-map.js @@ -0,0 +1,115 @@ +import { Pair } from '../nodes/Pair.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { resolveProps } from './resolve-props.js'; +import { containsNewline } from './util-contains-newline.js'; +import { flowIndentCheck } from './util-flow-indent-check.js'; +import { mapIncludes } from './util-map-includes.js'; + +const startColMsg = 'All mapping items must start at the same column'; +function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap; + const map = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep, value } = collItem; + // key properties + const keyProps = resolveProps(start, { + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + parentIndent: bm.indent, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === 'block-seq') + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key'); + else if ('indent' in key && key.indent !== bm.indent) + onError(offset, 'BAD_INDENT', startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map.comment) + map.comment += '\n' + keyProps.comment; + else + map.comment = keyProps.comment; + } + continue; + } + if (keyProps.newlineAfterProp || containsNewline(key)) { + onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line'); + } + } + else if (keyProps.found?.indent !== bm.indent) { + onError(offset, 'BAD_INDENT', startColMsg); + } + // key value + ctx.atKey = true; + const keyStart = keyProps.end; + const keyNode = key + ? composeNode(ctx, key, keyProps, onError) + : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + flowIndentCheck(bm.indent, key, onError); + ctx.atKey = false; + if (mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + // value properties + const valueProps = resolveProps(sep ?? [], { + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + parentIndent: bm.indent, + startOnNewline: !key || key.type === 'block-scalar' + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === 'block-map' && !valueProps.hasNewline) + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings'); + if (ctx.options.strict && + keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key'); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : composeEmptyNode(ctx, offset, sep, null, valueProps, onError); + if (ctx.schema.compat) + flowIndentCheck(bm.indent, value, onError); + offset = valueNode.range[2]; + const pair = new Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + else { + // key with no value + if (implicitKey) + onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values'); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + } + if (commentEnd && commentEnd < offset) + onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content'); + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; +} + +export { resolveBlockMap }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js b/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js new file mode 100644 index 000000000..9b7b7b558 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js @@ -0,0 +1,198 @@ +import { Scalar } from '../nodes/Scalar.js'; + +function resolveBlockScalar(ctx, scalar, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); + if (!header) + return { value: '', type: null, comment: '', range: [start, start, start] }; + const type = header.mode === '>' ? Scalar.BLOCK_FOLDED : Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + // determine the end of content & start of chomping + let chompStart = lines.length; + for (let i = lines.length - 1; i >= 0; --i) { + const content = lines[i][1]; + if (content === '' || content === '\r') + chompStart = i; + else + break; + } + // shortcut for empty contents + if (chompStart === 0) { + const value = header.chomp === '+' && lines.length > 0 + ? '\n'.repeat(Math.max(1, lines.length - 1)) + : ''; + let end = start + header.length; + if (scalar.source) + end += scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; + } + // find the indentation level to trim from start + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent, content] = lines[i]; + if (content === '' || content === '\r') { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; + } + else { + if (indent.length < trimIndent) { + const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator'; + onError(offset + indent.length, 'MISSING_CHAR', message); + } + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i; + if (trimIndent === 0 && !ctx.atRoot) { + const message = 'Block scalar values in collections must be indented'; + onError(offset, 'BAD_INDENT', message); + } + break; + } + offset += indent.length + content.length + 1; + } + // include trailing more-indented empty lines in content + for (let i = lines.length - 1; i >= chompStart; --i) { + if (lines[i][0].length > trimIndent) + chompStart = i + 1; + } + let value = ''; + let sep = ''; + let prevMoreIndented = false; + // leading whitespace is kept intact + for (let i = 0; i < contentStart; ++i) + value += lines[i][0].slice(trimIndent) + '\n'; + for (let i = contentStart; i < chompStart; ++i) { + let [indent, content] = lines[i]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === '\r'; + if (crlf) + content = content.slice(0, -1); + /* istanbul ignore if already caught in lexer */ + if (content && indent.length < trimIndent) { + const src = header.indent + ? 'explicit indentation indicator' + : 'first line'; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message); + indent = ''; + } + if (type === Scalar.BLOCK_LITERAL) { + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + } + else if (indent.length > trimIndent || content[0] === '\t') { + // more-indented content within a folded block + if (sep === ' ') + sep = '\n'; + else if (!prevMoreIndented && sep === '\n') + sep = '\n\n'; + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + prevMoreIndented = true; + } + else if (content === '') { + // empty line + if (sep === '\n') + value += '\n'; + else + sep = '\n'; + } + else { + value += sep + content; + sep = ' '; + prevMoreIndented = false; + } + } + switch (header.chomp) { + case '-': + break; + case '+': + for (let i = chompStart; i < lines.length; ++i) + value += '\n' + lines[i][0].slice(trimIndent); + if (value[value.length - 1] !== '\n') + value += '\n'; + break; + default: + value += '\n'; + } + const end = start + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; +} +function parseBlockScalarHeader({ offset, props }, strict, onError) { + /* istanbul ignore if should not happen */ + if (props[0].type !== 'block-scalar-header') { + onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found'); + return null; + } + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ''; + let error = -1; + for (let i = 1; i < source.length; ++i) { + const ch = source[i]; + if (!chomp && (ch === '-' || ch === '+')) + chomp = ch; + else { + const n = Number(ch); + if (!indent && n) + indent = n; + else if (error === -1) + error = offset + i; + } + } + if (error !== -1) + onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ''; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case 'space': + hasSpace = true; + // fallthrough + case 'newline': + length += token.source.length; + break; + case 'comment': + if (strict && !hasSpace) { + const message = 'Comments must be separated from other tokens by white space characters'; + onError(token, 'MISSING_CHAR', message); + } + length += token.source.length; + comment = token.source.substring(1); + break; + case 'error': + onError(token, 'UNEXPECTED_TOKEN', token.message); + length += token.source.length; + break; + /* istanbul ignore next should not happen */ + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, 'UNEXPECTED_TOKEN', message); + const ts = token.source; + if (ts && typeof ts === 'string') + length += ts.length; + } + } + } + return { mode, indent, chomp, comment, length }; +} +/** @returns Array of lines split up as `[indent, content]` */ +function splitLines(source) { + const split = source.split(/\n( *)/); + const first = split[0]; + const m = first.match(/^( *)/); + const line0 = m?.[1] + ? [m[1], first.slice(m[1].length)] + : ['', first]; + const lines = [line0]; + for (let i = 1; i < split.length; i += 2) + lines.push([split[i], split[i + 1]]); + return lines; +} + +export { resolveBlockScalar }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-block-seq.js b/node_modules/yaml/browser/dist/compose/resolve-block-seq.js new file mode 100644 index 000000000..ffc5289ac --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-block-seq.js @@ -0,0 +1,49 @@ +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import { resolveProps } from './resolve-props.js'; +import { flowIndentCheck } from './util-flow-indent-check.js'; + +function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq; + const seq = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value } of bs.items) { + const props = resolveProps(start, { + indicator: 'seq-item-ind', + next: value, + offset, + onError, + parentIndent: bs.indent, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value?.type === 'block-seq') + onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column'); + else + onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator'); + } + else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } + } + const node = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + flowIndentCheck(bs.indent, value, onError); + offset = node.range[2]; + seq.items.push(node); + } + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; +} + +export { resolveBlockSeq }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-end.js b/node_modules/yaml/browser/dist/compose/resolve-end.js new file mode 100644 index 000000000..d5c65d7e8 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-end.js @@ -0,0 +1,37 @@ +function resolveEnd(end, offset, reqSpace, onError) { + let comment = ''; + if (end) { + let hasSpace = false; + let sep = ''; + for (const token of end) { + const { source, type } = token; + switch (type) { + case 'space': + hasSpace = true; + break; + case 'comment': { + if (reqSpace && !hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += sep + cb; + sep = ''; + break; + } + case 'newline': + if (comment) + sep += source; + hasSpace = true; + break; + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`); + } + offset += source.length; + } + } + return { comment, offset }; +} + +export { resolveEnd }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js b/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js new file mode 100644 index 000000000..866efb75b --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js @@ -0,0 +1,207 @@ +import { isPair } from '../nodes/identity.js'; +import { Pair } from '../nodes/Pair.js'; +import { YAMLMap } from '../nodes/YAMLMap.js'; +import { YAMLSeq } from '../nodes/YAMLSeq.js'; +import { resolveEnd } from './resolve-end.js'; +import { resolveProps } from './resolve-props.js'; +import { containsNewline } from './util-contains-newline.js'; +import { mapIncludes } from './util-map-includes.js'; + +const blockMsg = 'Block collections are not allowed within flow collections'; +const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq'); +function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) { + const isMap = fc.start.source === '{'; + const fcName = isMap ? 'flow map' : 'flow sequence'; + const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq)); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; + let offset = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start, key, sep, value } = collItem; + const props = resolveProps(start, { + flow: fcName, + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep && !value) { + if (i === 0 && props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + else if (i < fc.items.length - 1) + onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += '\n' + props.comment; + else + coll.comment = props.comment; + } + offset = props.end; + continue; + } + if (!isMap && ctx.options.strict && containsNewline(key)) + onError(key, // checked by containsNewline() + 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + } + if (i === 0) { + if (props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + } + else { + if (!props.comma) + onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ''; + loop: for (const st of start) { + switch (st.type) { + case 'comma': + case 'space': + break; + case 'comment': + prevItemComment = st.source.substring(1); + break loop; + default: + break loop; + } + } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += '\n' + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); + } + } + } + if (!isMap && !sep && !props.found) { + // item is a value in a seq + // → key & sep are empty, start does not include ? or : + const valueNode = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, sep, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else { + // item is a key+value pair + // key value + ctx.atKey = true; + const keyStart = props.end; + const keyNode = key + ? composeNode(ctx, key, props, onError) + : composeEmptyNode(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg); + ctx.atKey = false; + // value properties + const valueProps = resolveProps(sep ?? [], { + flow: fcName, + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap && !props.found && ctx.options.strict) { + if (sep) + for (const st of sep) { + if (st === valueProps.found) + break; + if (st.type === 'newline') { + onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + break; + } + } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key'); + } + } + else if (value) { + if ('source' in value && value.source?.[0] === ':') + onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`); + else + onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : valueProps.found + ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) + : null; + if (valueNode) { + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap) { + const map = coll; + if (mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + map.items.push(pair); + } + else { + const map = new YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); + const endRange = (valueNode ?? keyNode).range; + map.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map); + } + offset = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap ? '}' : ']'; + const [ce, ...ee] = fc.end; + let cePos = offset; + if (ce?.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot + ? `${name} must end with a ${expectedEnd}` + : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg); + if (ce && ce.source.length !== 1) + ee.unshift(ce); + } + if (ee.length > 0) { + const end = resolveEnd(ee, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += '\n' + end.comment; + else + coll.comment = end.comment; + } + coll.range = [fc.offset, cePos, end.offset]; + } + else { + coll.range = [fc.offset, cePos, cePos]; + } + return coll; +} + +export { resolveFlowCollection }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js b/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js new file mode 100644 index 000000000..60c0ce15f --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js @@ -0,0 +1,226 @@ +import { Scalar } from '../nodes/Scalar.js'; +import { resolveEnd } from './resolve-end.js'; + +function resolveFlowScalar(scalar, strict, onError) { + const { offset, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type) { + case 'scalar': + _type = Scalar.PLAIN; + value = plainValue(source, _onError); + break; + case 'single-quoted-scalar': + _type = Scalar.QUOTE_SINGLE; + value = singleQuotedValue(source, _onError); + break; + case 'double-quoted-scalar': + _type = Scalar.QUOTE_DOUBLE; + value = doubleQuotedValue(source, _onError); + break; + /* istanbul ignore next should not happen */ + default: + onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`); + return { + value: '', + type: null, + comment: '', + range: [offset, offset + source.length, offset + source.length] + }; + } + const valueEnd = offset + source.length; + const re = resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re.comment, + range: [offset, valueEnd, re.offset] + }; +} +function plainValue(source, onError) { + let badChar = ''; + switch (source[0]) { + /* istanbul ignore next should not happen */ + case '\t': + badChar = 'a tab character'; + break; + case ',': + badChar = 'flow indicator character ,'; + break; + case '%': + badChar = 'directive indicator character %'; + break; + case '|': + case '>': { + badChar = `block scalar indicator ${source[0]}`; + break; + } + case '@': + case '`': { + badChar = `reserved character ${source[0]}`; + break; + } + } + if (badChar) + onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`); + return unfoldLines(source); +} +function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, 'MISSING_CHAR', "Missing closing 'quote"); + return unfoldLines(source.slice(1, -1)).replace(/''/g, "'"); +} +function unfoldLines(source) { + const line = /(.*?)\r?\n/sy; + let match = line.exec(source); + if (!match) + return source; + /** + * The negative lookbehinds in these RegExps are to + * prevent causing a polynomial search time in certain cases. + * + * The try-catch is for Safari < 16.4 and other old browsers: + * https://caniuse.com/js-regexp-lookbehind + */ + let trimEnd, trimBoth; + try { + trimEnd = new RegExp('(? wsStart ? source.slice(wsStart, i + 1) : ch; + } + else { + res += ch; + } + } + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, 'MISSING_CHAR', 'Missing closing "quote'); + return res; +} +/** + * Fold a single newline into a space, multiple newlines to N - 1 newlines. + * Presumes `source[offset] === '\n'` + */ +function foldNewline(source, offset) { + let fold = ''; + let ch = source[offset + 1]; + while (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') { + if (ch === '\r' && source[offset + 2] !== '\n') + break; + if (ch === '\n') + fold += '\n'; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = ' '; + return { fold, offset }; +} +const escapeCodes = { + '0': '\0', // null character + a: '\x07', // bell character + b: '\b', // backspace + e: '\x1b', // escape character + f: '\f', // form feed + n: '\n', // line feed + r: '\r', // carriage return + t: '\t', // horizontal tab + v: '\v', // vertical tab + N: '\u0085', // Unicode next line + _: '\u00a0', // Unicode non-breaking space + L: '\u2028', // Unicode line separator + P: '\u2029', // Unicode paragraph separator + ' ': ' ', + '"': '"', + '/': '/', + '\\': '\\', + '\t': '\t' +}; +function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + try { + return String.fromCodePoint(code); + } + catch { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`); + return raw; + } +} + +export { resolveFlowScalar }; diff --git a/node_modules/yaml/browser/dist/compose/resolve-props.js b/node_modules/yaml/browser/dist/compose/resolve-props.js new file mode 100644 index 000000000..b6336e1eb --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/resolve-props.js @@ -0,0 +1,146 @@ +function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ''; + let commentSep = ''; + let hasNewline = false; + let reqSpace = false; + let tab = null; + let anchor = null; + let tag = null; + let newlineAfterProp = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== 'space' && + token.type !== 'newline' && + token.type !== 'comma') + onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + reqSpace = false; + } + if (tab) { + if (atNewline && token.type !== 'comment' && token.type !== 'newline') { + onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + } + tab = null; + } + switch (token.type) { + case 'space': + // At the doc level, tabs at line start may be parsed + // as leading white space rather than indentation. + // In a flow collection, only the parser handles indent. + if (!flow && + (indicator !== 'doc-start' || next?.type !== 'flow-collection') && + token.source.includes('\t')) { + tab = token; + } + hasSpace = true; + break; + case 'comment': { + if (!hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = token.source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += commentSep + cb; + commentSep = ''; + atNewline = false; + break; + } + case 'newline': + if (atNewline) { + if (comment) + comment += token.source; + else if (!found || indicator !== 'seq-item-ind') + spaceBefore = true; + } + else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + newlineAfterProp = token; + hasSpace = true; + break; + case 'anchor': + if (anchor) + onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor'); + if (token.source.endsWith(':')) + onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true); + anchor = token; + start ?? (start = token.offset); + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case 'tag': { + if (tag) + onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag'); + tag = token; + start ?? (start = token.offset); + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + } + case indicator: + // Could here handle preceding comments differently + if (anchor || tag) + onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`); + found = token; + atNewline = + indicator === 'seq-item-ind' || indicator === 'explicit-key-ind'; + hasSpace = false; + break; + case 'comma': + if (flow) { + if (comma) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + // else fallthrough + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; + } + } + const last = tokens[tokens.length - 1]; + const end = last ? last.offset + last.source.length : offset; + if (reqSpace && + next && + next.type !== 'space' && + next.type !== 'newline' && + next.type !== 'comma' && + (next.type !== 'scalar' || next.source !== '')) { + onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + } + if (tab && + ((atNewline && tab.indent <= parentIndent) || + next?.type === 'block-map' || + next?.type === 'block-seq')) + onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + anchor, + tag, + newlineAfterProp, + end, + start: start ?? end + }; +} + +export { resolveProps }; diff --git a/node_modules/yaml/browser/dist/compose/util-contains-newline.js b/node_modules/yaml/browser/dist/compose/util-contains-newline.js new file mode 100644 index 000000000..2d65390d6 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/util-contains-newline.js @@ -0,0 +1,34 @@ +function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case 'alias': + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + if (key.source.includes('\n')) + return true; + if (key.end) + for (const st of key.end) + if (st.type === 'newline') + return true; + return false; + case 'flow-collection': + for (const it of key.items) { + for (const st of it.start) + if (st.type === 'newline') + return true; + if (it.sep) + for (const st of it.sep) + if (st.type === 'newline') + return true; + if (containsNewline(it.key) || containsNewline(it.value)) + return true; + } + return false; + default: + return true; + } +} + +export { containsNewline }; diff --git a/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js b/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js new file mode 100644 index 000000000..26f238c5f --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js @@ -0,0 +1,26 @@ +function emptyScalarPosition(offset, before, pos) { + if (before) { + pos ?? (pos = before.length); + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case 'space': + case 'comment': + case 'newline': + offset -= st.source.length; + continue; + } + // Technically, an empty scalar is immediately after the last non-empty + // node, but it's more useful to place it after any whitespace. + st = before[++i]; + while (st?.type === 'space') { + offset += st.source.length; + st = before[++i]; + } + break; + } + } + return offset; +} + +export { emptyScalarPosition }; diff --git a/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js b/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js new file mode 100644 index 000000000..c20e67019 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js @@ -0,0 +1,15 @@ +import { containsNewline } from './util-contains-newline.js'; + +function flowIndentCheck(indent, fc, onError) { + if (fc?.type === 'flow-collection') { + const end = fc.end[0]; + if (end.indent === indent && + (end.source === ']' || end.source === '}') && + containsNewline(fc)) { + const msg = 'Flow end indicator should be more indented than parent'; + onError(end, 'BAD_INDENT', msg, true); + } + } +} + +export { flowIndentCheck }; diff --git a/node_modules/yaml/browser/dist/compose/util-map-includes.js b/node_modules/yaml/browser/dist/compose/util-map-includes.js new file mode 100644 index 000000000..48444b641 --- /dev/null +++ b/node_modules/yaml/browser/dist/compose/util-map-includes.js @@ -0,0 +1,13 @@ +import { isScalar } from '../nodes/identity.js'; + +function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual = typeof uniqueKeys === 'function' + ? uniqueKeys + : (a, b) => a === b || (isScalar(a) && isScalar(b) && a.value === b.value); + return items.some(pair => isEqual(pair.key, search)); +} + +export { mapIncludes }; diff --git a/node_modules/yaml/browser/dist/doc/Document.js b/node_modules/yaml/browser/dist/doc/Document.js new file mode 100644 index 000000000..f1f427807 --- /dev/null +++ b/node_modules/yaml/browser/dist/doc/Document.js @@ -0,0 +1,335 @@ +import { Alias } from '../nodes/Alias.js'; +import { isEmptyPath, collectionFromPath } from '../nodes/Collection.js'; +import { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/identity.js'; +import { Pair } from '../nodes/Pair.js'; +import { toJS } from '../nodes/toJS.js'; +import { Schema } from '../schema/Schema.js'; +import { stringifyDocument } from '../stringify/stringifyDocument.js'; +import { anchorNames, findNewAnchor, createNodeAnchors } from './anchors.js'; +import { applyReviver } from './applyReviver.js'; +import { createNode } from './createNode.js'; +import { Directives } from './directives.js'; + +class Document { + constructor(value, replacer, options) { + /** A comment before this Document */ + this.commentBefore = null; + /** A comment immediately after this Document */ + this.comment = null; + /** Errors encountered during parsing. */ + this.errors = []; + /** Warnings encountered during parsing. */ + this.warnings = []; + Object.defineProperty(this, NODE_TYPE, { value: DOC }); + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: 'warn', + prettyErrors: true, + strict: true, + stringKeys: false, + uniqueKeys: true, + version: '1.2' + }, options); + this.options = opt; + let { version } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version = this.directives.yaml.version; + } + else + this.directives = new Directives({ version }); + this.setSchema(version, options); + // @ts-expect-error We can't really know that this matches Contents. + this.contents = + value === undefined ? null : this.createNode(value, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy = Object.create(Document.prototype, { + [NODE_TYPE]: { value: DOC } + }); + copy.commentBefore = this.commentBefore; + copy.comment = this.comment; + copy.errors = this.errors.slice(); + copy.warnings = this.warnings.slice(); + copy.options = Object.assign({}, this.options); + if (this.directives) + copy.directives = this.directives.clone(); + copy.schema = this.schema.clone(); + // @ts-expect-error We can't really know that this matches Contents. + copy.contents = isNode(this.contents) + ? this.contents.clone(copy.schema) + : this.contents; + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** Adds a value to the document. */ + add(value) { + if (assertCollection(this.contents)) + this.contents.add(value); + } + /** Adds a value to the document. */ + addIn(path, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path, value); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name) { + if (!node.anchor) { + const prev = anchorNames(this); + node.anchor = + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name || prev.has(name) ? findNewAnchor(name || 'a', prev) : name; + } + return new Alias(node.anchor); + } + createNode(value, replacer, options) { + let _replacer = undefined; + if (typeof replacer === 'function') { + value = replacer.call({ '': value }, '', value); + _replacer = replacer; + } + else if (Array.isArray(replacer)) { + const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors(this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || 'a'); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode(value, tag, ctx); + if (flow && isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value, options = {}) { + const k = this.createNode(key, null, options); + const v = this.createNode(value, null, options); + return new Pair(k, v); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + if (isEmptyPath(path)) { + if (this.contents == null) + return false; + // @ts-expect-error Presumed impossible if Strict extends false + this.contents = null; + return true; + } + return assertCollection(this.contents) + ? this.contents.deleteIn(path) + : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return isCollection(this.contents) + ? this.contents.get(key, keepScalar) + : undefined; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + if (isEmptyPath(path)) + return !keepScalar && isScalar(this.contents) + ? this.contents.value + : this.contents; + return isCollection(this.contents) + ? this.contents.getIn(path, keepScalar) + : undefined; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path) { + if (isEmptyPath(path)) + return this.contents !== undefined; + return isCollection(this.contents) ? this.contents.hasIn(path) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value) { + if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = collectionFromPath(this.schema, [key], value); + } + else if (assertCollection(this.contents)) { + this.contents.set(key, value); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + if (isEmptyPath(path)) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = value; + } + else if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = collectionFromPath(this.schema, Array.from(path), value); + } + else if (assertCollection(this.contents)) { + this.contents.setIn(path, value); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version, options = {}) { + if (typeof version === 'number') + version = String(version); + let opt; + switch (version) { + case '1.1': + if (this.directives) + this.directives.yaml.version = '1.1'; + else + this.directives = new Directives({ version: '1.1' }); + opt = { resolveKnownTags: false, schema: 'yaml-1.1' }; + break; + case '1.2': + case 'next': + if (this.directives) + this.directives.yaml.version = version; + else + this.directives = new Directives({ version }); + opt = { resolveKnownTags: true, schema: 'core' }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + // Not using `instanceof Schema` to allow for duck typing + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: new Map(), + doc: this, + keep: !json, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS(this.contents, jsonArg ?? '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver(reviver, { '': res }, '', res) + : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error('Document with errors cannot be stringified'); + if ('indent' in options && + (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument(this, options); + } +} +function assertCollection(contents) { + if (isCollection(contents)) + return true; + throw new Error('Expected a YAML collection as document contents'); +} + +export { Document }; diff --git a/node_modules/yaml/browser/dist/doc/anchors.js b/node_modules/yaml/browser/dist/doc/anchors.js new file mode 100644 index 000000000..64810d144 --- /dev/null +++ b/node_modules/yaml/browser/dist/doc/anchors.js @@ -0,0 +1,71 @@ +import { isScalar, isCollection } from '../nodes/identity.js'; +import { visit } from '../visit.js'; + +/** + * Verify that the input string is a valid anchor. + * + * Will throw on errors. + */ +function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); + } + return true; +} +function anchorNames(root) { + const anchors = new Set(); + visit(root, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); + } + }); + return anchors; +} +/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ +function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!exclude.has(name)) + return name; + } +} +function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + prevAnchors ?? (prevAnchors = anchorNames(doc)); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === 'object' && + ref.anchor && + (isScalar(ref.node) || isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } + else { + const error = new Error('Failed to resolve repeated object (this should not happen)'); + error.source = source; + throw error; + } + } + }, + sourceObjects + }; +} + +export { anchorIsValid, anchorNames, createNodeAnchors, findNewAnchor }; diff --git a/node_modules/yaml/browser/dist/doc/applyReviver.js b/node_modules/yaml/browser/dist/doc/applyReviver.js new file mode 100644 index 000000000..6e77336ea --- /dev/null +++ b/node_modules/yaml/browser/dist/doc/applyReviver.js @@ -0,0 +1,55 @@ +/** + * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, + * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the + * 2021 edition: https://tc39.es/ecma262/#sec-json.parse + * + * Includes extensions for handling Map and Set objects. + */ +function applyReviver(reviver, obj, key, val) { + if (val && typeof val === 'object') { + if (Array.isArray(val)) { + for (let i = 0, len = val.length; i < len; ++i) { + const v0 = val[i]; + const v1 = applyReviver(reviver, val, String(i), v0); + // eslint-disable-next-line @typescript-eslint/no-array-delete + if (v1 === undefined) + delete val[i]; + else if (v1 !== v0) + val[i] = v1; + } + } + else if (val instanceof Map) { + for (const k of Array.from(val.keys())) { + const v0 = val.get(k); + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + val.delete(k); + else if (v1 !== v0) + val.set(k, v1); + } + } + else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v1 = applyReviver(reviver, val, v0, v0); + if (v1 === undefined) + val.delete(v0); + else if (v1 !== v0) { + val.delete(v0); + val.add(v1); + } + } + } + else { + for (const [k, v0] of Object.entries(val)) { + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + delete val[k]; + else if (v1 !== v0) + val[k] = v1; + } + } + } + return reviver.call(obj, key, val); +} + +export { applyReviver }; diff --git a/node_modules/yaml/browser/dist/doc/createNode.js b/node_modules/yaml/browser/dist/doc/createNode.js new file mode 100644 index 000000000..ddcc2111f --- /dev/null +++ b/node_modules/yaml/browser/dist/doc/createNode.js @@ -0,0 +1,88 @@ +import { Alias } from '../nodes/Alias.js'; +import { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; + +const defaultTagPrefix = 'tag:yaml.org,2002:'; +function findTagObject(value, tagName, tags) { + if (tagName) { + const match = tags.filter(t => t.tag === tagName); + const tagObj = match.find(t => !t.format) ?? match[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags.find(t => t.identify?.(value) && !t.format); +} +function createNode(value, tagName, ctx) { + if (isDocument(value)) + value = value.contents; + if (isNode(value)) + return value; + if (isPair(value)) { + const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; + } + if (value instanceof String || + value instanceof Number || + value instanceof Boolean || + (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere + ) { + // https://tc39.es/ecma262/#sec-serializejsonproperty + value = value.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; + // Detect duplicate references to the same object & use Alias nodes for all + // after first. The `ref` wrapper allows for circular references to resolve. + let ref = undefined; + if (aliasDuplicateObjects && value && typeof value === 'object') { + ref = sourceObjects.get(value); + if (ref) { + ref.anchor ?? (ref.anchor = onAnchor(value)); + return new Alias(ref.anchor); + } + else { + ref = { anchor: null, node: null }; + sourceObjects.set(value, ref); + } + } + if (tagName?.startsWith('!!')) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema.tags); + if (!tagObj) { + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + value = value.toJSON(); + } + if (!value || typeof value !== 'object') { + const node = new Scalar(value); + if (ref) + ref.node = node; + return node; + } + tagObj = + value instanceof Map + ? schema[MAP] + : Symbol.iterator in Object(value) + ? schema[SEQ] + : schema[MAP]; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const node = tagObj?.createNode + ? tagObj.createNode(ctx.schema, value, ctx) + : typeof tagObj?.nodeClass?.from === 'function' + ? tagObj.nodeClass.from(ctx.schema, value, ctx) + : new Scalar(value); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; +} + +export { createNode }; diff --git a/node_modules/yaml/browser/dist/doc/directives.js b/node_modules/yaml/browser/dist/doc/directives.js new file mode 100644 index 000000000..c66e61203 --- /dev/null +++ b/node_modules/yaml/browser/dist/doc/directives.js @@ -0,0 +1,176 @@ +import { isNode } from '../nodes/identity.js'; +import { visit } from '../visit.js'; + +const escapeChars = { + '!': '%21', + ',': '%2C', + '[': '%5B', + ']': '%5D', + '{': '%7B', + '}': '%7D' +}; +const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]); +class Directives { + constructor(yaml, tags) { + /** + * The directives-end/doc-start marker `---`. If `null`, a marker may still be + * included in the document's stringified representation. + */ + this.docStart = null; + /** The doc-end marker `...`. */ + this.docEnd = false; + this.yaml = Object.assign({}, Directives.defaultYaml, yaml); + this.tags = Object.assign({}, Directives.defaultTags, tags); + } + clone() { + const copy = new Directives(this.yaml, this.tags); + copy.docStart = this.docStart; + return copy; + } + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case '1.1': + this.atNextDocument = true; + break; + case '1.2': + this.atNextDocument = false; + this.yaml = { + explicit: Directives.defaultYaml.explicit, + version: '1.2' + }; + this.tags = Object.assign({}, Directives.defaultTags); + break; + } + return res; + } + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' }; + this.tags = Object.assign({}, Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name = parts.shift(); + switch (name) { + case '%TAG': { + if (parts.length !== 2) { + onError(0, '%TAG directive should contain exactly two parts'); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case '%YAML': { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, '%YAML directive should contain exactly one part'); + return false; + } + const [version] = parts; + if (version === '1.1' || version === '1.2') { + this.yaml.version = version; + return true; + } + else { + const isValid = /^\d+\.\d+$/.test(version); + onError(6, `Unsupported YAML version ${version}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name}`, true); + return false; + } + } + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === '!') + return '!'; // non-specific tag + if (source[0] !== '!') { + onError(`Not a valid tag: ${source}`); + return null; + } + if (source[1] === '<') { + const verbatim = source.slice(2, -1); + if (verbatim === '!' || verbatim === '!!') { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== '>') + onError('Verbatim tags must end with a >'); + return verbatim; + } + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } + catch (error) { + onError(String(error)); + return null; + } + } + if (handle === '!') + return source; // local tag + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === '!' ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit + ? [`%YAML ${this.yaml.version || '1.2'}`] + : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && isNode(doc.contents)) { + const tags = {}; + visit(doc.contents, (_key, node) => { + if (isNode(node) && node.tag) + tags[node.tag] = true; + }); + tagNames = Object.keys(tags); + } + else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === '!!' && prefix === 'tag:yaml.org,2002:') + continue; + if (!doc || tagNames.some(tn => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); + } + return lines.join('\n'); + } +} +Directives.defaultYaml = { explicit: false, version: '1.2' }; +Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' }; + +export { Directives }; diff --git a/node_modules/yaml/browser/dist/errors.js b/node_modules/yaml/browser/dist/errors.js new file mode 100644 index 000000000..06f05fa30 --- /dev/null +++ b/node_modules/yaml/browser/dist/errors.js @@ -0,0 +1,57 @@ +class YAMLError extends Error { + constructor(name, pos, code, message) { + super(); + this.name = name; + this.code = code; + this.message = message; + this.pos = pos; + } +} +class YAMLParseError extends YAMLError { + constructor(pos, code, message) { + super('YAMLParseError', pos, code, message); + } +} +class YAMLWarning extends YAMLError { + constructor(pos, code, message) { + super('YAMLWarning', pos, code, message); + } +} +const prettifyError = (src, lc) => (error) => { + if (error.pos[0] === -1) + return; + error.linePos = error.pos.map(pos => lc.linePos(pos)); + const { line, col } = error.linePos[0]; + error.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src + .substring(lc.lineStarts[line - 1], lc.lineStarts[line]) + .replace(/[\n\r]+$/, ''); + // Trim to max 80 chars, keeping col position near the middle + if (ci >= 60 && lineStr.length > 80) { + const trimStart = Math.min(ci - 39, lineStr.length - 79); + lineStr = '…' + lineStr.substring(trimStart); + ci -= trimStart - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + '…'; + // Include previous line in context if pointing at line start + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + // Regexp won't match if start is trimmed + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + '…\n'; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count = 1; + const end = error.linePos[1]; + if (end?.line === line && end.col > col) { + count = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = ' '.repeat(ci) + '^'.repeat(count); + error.message += `:\n\n${lineStr}\n${pointer}\n`; + } +}; + +export { YAMLError, YAMLParseError, YAMLWarning, prettifyError }; diff --git a/node_modules/yaml/browser/dist/index.js b/node_modules/yaml/browser/dist/index.js new file mode 100644 index 000000000..097bf249f --- /dev/null +++ b/node_modules/yaml/browser/dist/index.js @@ -0,0 +1,17 @@ +export { Composer } from './compose/composer.js'; +export { Document } from './doc/Document.js'; +export { Schema } from './schema/Schema.js'; +export { YAMLError, YAMLParseError, YAMLWarning } from './errors.js'; +export { Alias } from './nodes/Alias.js'; +export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity.js'; +export { Pair } from './nodes/Pair.js'; +export { Scalar } from './nodes/Scalar.js'; +export { YAMLMap } from './nodes/YAMLMap.js'; +export { YAMLSeq } from './nodes/YAMLSeq.js'; +import * as cst from './parse/cst.js'; +export { cst as CST }; +export { Lexer } from './parse/lexer.js'; +export { LineCounter } from './parse/line-counter.js'; +export { Parser } from './parse/parser.js'; +export { parse, parseAllDocuments, parseDocument, stringify } from './public-api.js'; +export { visit, visitAsync } from './visit.js'; diff --git a/node_modules/yaml/browser/dist/log.js b/node_modules/yaml/browser/dist/log.js new file mode 100644 index 000000000..d9ec3578e --- /dev/null +++ b/node_modules/yaml/browser/dist/log.js @@ -0,0 +1,11 @@ +function debug(logLevel, ...messages) { + if (logLevel === 'debug') + console.log(...messages); +} +function warn(logLevel, warning) { + if (logLevel === 'debug' || logLevel === 'warn') { + console.warn(warning); + } +} + +export { debug, warn }; diff --git a/node_modules/yaml/browser/dist/nodes/Alias.js b/node_modules/yaml/browser/dist/nodes/Alias.js new file mode 100644 index 000000000..3fcf2ddac --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/Alias.js @@ -0,0 +1,118 @@ +import { anchorIsValid } from '../doc/anchors.js'; +import { visit } from '../visit.js'; +import { ALIAS, isAlias, isCollection, isPair, hasAnchor } from './identity.js'; +import { NodeBase } from './Node.js'; +import { toJS } from './toJS.js'; + +class Alias extends NodeBase { + constructor(source) { + super(ALIAS); + this.source = source; + Object.defineProperty(this, 'tag', { + set() { + throw new Error('Alias nodes cannot have tags'); + } + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc, ctx) { + if (ctx?.maxAliasCount === 0) + throw new ReferenceError('Alias resolution is disabled'); + let nodes; + if (ctx?.aliasResolveCache) { + nodes = ctx.aliasResolveCache; + } + else { + nodes = []; + visit(doc, { + Node: (_key, node) => { + if (isAlias(node) || hasAnchor(node)) + nodes.push(node); + } + }); + if (ctx) + ctx.aliasResolveCache = nodes; + } + let found = undefined; + for (const node of nodes) { + if (node === this) + break; + if (node.anchor === this.source) + found = node; + } + if (found && ctx) { + const { anchors, doc, maxAliasCount } = ctx; + let data = anchors.get(found); + if (!data) { + // Resolve anchors for Node.prototype.toJS() + toJS(found, null, ctx); + data = anchors.get(found); + } + /* istanbul ignore if */ + if (data?.res === undefined) { + const msg = 'This should not happen: Alias anchor was not resolved?'; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, found, anchors); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = 'Excessive alias count indicates a resource exhaustion attack'; + throw new ReferenceError(msg); + } + } + } + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const source = this.resolve(ctx.doc, ctx); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + return ctx.anchors.get(source).res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } +} +function getAliasCount(doc, node, anchors) { + if (isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors && source && anchors.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } + else if (isCollection(node)) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(doc, item, anchors); + if (c > count) + count = c; + } + return count; + } + else if (isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors); + const vc = getAliasCount(doc, node.value, anchors); + return Math.max(kc, vc); + } + return 1; +} + +export { Alias }; diff --git a/node_modules/yaml/browser/dist/nodes/Collection.js b/node_modules/yaml/browser/dist/nodes/Collection.js new file mode 100644 index 000000000..0ebdeda03 --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/Collection.js @@ -0,0 +1,147 @@ +import { createNode } from '../doc/createNode.js'; +import { isNode, isPair, isCollection, isScalar } from './identity.js'; +import { NodeBase } from './Node.js'; + +function collectionFromPath(schema, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (typeof k === 'number' && Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } + else { + v = new Map([[k, v]]); + } + } + return createNode(v, undefined, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error('This should not happen, please report a bug.'); + }, + schema, + sourceObjects: new Map() + }); +} +// Type guard is intentionally a little wrong so as to be more useful, +// as it does not cover untypable empty non-string iterables (e.g. []). +const isEmptyPath = (path) => path == null || + (typeof path === 'object' && !!path[Symbol.iterator]().next().done); +class Collection extends NodeBase { + constructor(type, schema) { + super(type); + Object.defineProperty(this, 'schema', { + value: schema, + configurable: true, + enumerable: false, + writable: true + }); + } + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema) { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema) + copy.schema = schema; + copy.items = copy.items.map(it => isNode(it) || isPair(it) ? it.clone(schema) : it); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path, value) { + if (isEmptyPath(path)) + this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (isCollection(node)) + node.addIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (isCollection(node)) + return node.deleteIn(rest); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + const [key, ...rest] = path; + const node = this.get(key, true); + if (rest.length === 0) + return !keepScalar && isScalar(node) ? node.value : node; + else + return isCollection(node) ? node.getIn(rest, keepScalar) : undefined; + } + hasAllNullValues(allowScalar) { + return this.items.every(node => { + if (!isPair(node)) + return false; + const n = node.value; + return (n == null || + (allowScalar && + isScalar(n) && + n.value == null && + !n.commentBefore && + !n.comment && + !n.tag)); + }); + } + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.has(key); + const node = this.get(key, true); + return isCollection(node) ? node.hasIn(rest) : false; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + const [key, ...rest] = path; + if (rest.length === 0) { + this.set(key, value); + } + else { + const node = this.get(key, true); + if (isCollection(node)) + node.setIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } +} + +export { Collection, collectionFromPath, isEmptyPath }; diff --git a/node_modules/yaml/browser/dist/nodes/Node.js b/node_modules/yaml/browser/dist/nodes/Node.js new file mode 100644 index 000000000..b0eb96b2d --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/Node.js @@ -0,0 +1,38 @@ +import { applyReviver } from '../doc/applyReviver.js'; +import { NODE_TYPE, isDocument } from './identity.js'; +import { toJS } from './toJS.js'; + +class NodeBase { + constructor(type) { + Object.defineProperty(this, NODE_TYPE, { value: type }); + } + /** Create a copy of this node. */ + clone() { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!isDocument(doc)) + throw new TypeError('A document argument is required'); + const ctx = { + anchors: new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS(this, '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver(reviver, { '': res }, '', res) + : res; + } +} + +export { NodeBase }; diff --git a/node_modules/yaml/browser/dist/nodes/Pair.js b/node_modules/yaml/browser/dist/nodes/Pair.js new file mode 100644 index 000000000..6e419f6b1 --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/Pair.js @@ -0,0 +1,36 @@ +import { createNode } from '../doc/createNode.js'; +import { stringifyPair } from '../stringify/stringifyPair.js'; +import { addPairToJSMap } from './addPairToJSMap.js'; +import { NODE_TYPE, PAIR, isNode } from './identity.js'; + +function createPair(key, value, ctx) { + const k = createNode(key, undefined, ctx); + const v = createNode(value, undefined, ctx); + return new Pair(k, v); +} +class Pair { + constructor(key, value = null) { + Object.defineProperty(this, NODE_TYPE, { value: PAIR }); + this.key = key; + this.value = value; + } + clone(schema) { + let { key, value } = this; + if (isNode(key)) + key = key.clone(schema); + if (isNode(value)) + value = value.clone(schema); + return new Pair(key, value); + } + toJSON(_, ctx) { + const pair = ctx?.mapAsMap ? new Map() : {}; + return addPairToJSMap(ctx, pair, this); + } + toString(ctx, onComment, onChompKeep) { + return ctx?.doc + ? stringifyPair(this, ctx, onComment, onChompKeep) + : JSON.stringify(this); + } +} + +export { Pair, createPair }; diff --git a/node_modules/yaml/browser/dist/nodes/Scalar.js b/node_modules/yaml/browser/dist/nodes/Scalar.js new file mode 100644 index 000000000..a9f2673b2 --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/Scalar.js @@ -0,0 +1,24 @@ +import { SCALAR } from './identity.js'; +import { NodeBase } from './Node.js'; +import { toJS } from './toJS.js'; + +const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); +class Scalar extends NodeBase { + constructor(value) { + super(SCALAR); + this.value = value; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } +} +Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; +Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; +Scalar.PLAIN = 'PLAIN'; +Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; +Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; + +export { Scalar, isScalarValue }; diff --git a/node_modules/yaml/browser/dist/nodes/YAMLMap.js b/node_modules/yaml/browser/dist/nodes/YAMLMap.js new file mode 100644 index 000000000..6c6a50470 --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/YAMLMap.js @@ -0,0 +1,144 @@ +import { stringifyCollection } from '../stringify/stringifyCollection.js'; +import { addPairToJSMap } from './addPairToJSMap.js'; +import { Collection } from './Collection.js'; +import { MAP, isPair, isScalar } from './identity.js'; +import { Pair, createPair } from './Pair.js'; +import { isScalarValue } from './Scalar.js'; + +function findPair(items, key) { + const k = isScalar(key) ? key.value : key; + for (const it of items) { + if (isPair(it)) { + if (it.key === key || it.key === k) + return it; + if (isScalar(it.key) && it.key.value === k) + return it; + } + } + return undefined; +} +class YAMLMap extends Collection { + static get tagName() { + return 'tag:yaml.org,2002:map'; + } + constructor(schema) { + super(MAP, schema); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map = new this(schema); + const add = (key, value) => { + if (typeof replacer === 'function') + value = replacer.call(obj, key, value); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value !== undefined || keepUndefined) + map.items.push(createPair(key, value, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value] of obj) + add(key, value); + } + else if (obj && typeof obj === 'object') { + for (const key of Object.keys(obj)) + add(key, obj[key]); + } + if (typeof schema.sortMapEntries === 'function') { + map.items.sort(schema.sortMapEntries); + } + return map; + } + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== 'object' || !('key' in pair)) { + // In TypeScript, this never happens. + _pair = new Pair(pair, pair?.value); + } + else + _pair = new Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + // For scalars, keep the old node & its comments and anchors + if (isScalar(prev.value) && isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } + else if (sortEntries) { + const i = this.items.findIndex(item => sortEntries(_pair, item) < 0); + if (i === -1) + this.items.push(_pair); + else + this.items.splice(i, 0, _pair); + } + else { + this.items.push(_pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) + return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it?.value; + return (!keepScalar && isScalar(node) ? node.value : node) ?? undefined; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair(key, value), true); + } + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_, ctx, Type) { + const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map); + for (const item of this.items) + addPairToJSMap(ctx, map, item); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection(this, ctx, { + blockItemPrefix: '', + flowChars: { start: '{', end: '}' }, + itemIndent: ctx.indent || '', + onChompKeep, + onComment + }); + } +} + +export { YAMLMap, findPair }; diff --git a/node_modules/yaml/browser/dist/nodes/YAMLSeq.js b/node_modules/yaml/browser/dist/nodes/YAMLSeq.js new file mode 100644 index 000000000..b80de40a2 --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/YAMLSeq.js @@ -0,0 +1,113 @@ +import { createNode } from '../doc/createNode.js'; +import { stringifyCollection } from '../stringify/stringifyCollection.js'; +import { Collection } from './Collection.js'; +import { SEQ, isScalar } from './identity.js'; +import { isScalarValue } from './Scalar.js'; +import { toJS } from './toJS.js'; + +class YAMLSeq extends Collection { + static get tagName() { + return 'tag:yaml.org,2002:seq'; + } + constructor(schema) { + super(SEQ, schema); + this.items = []; + } + add(value) { + this.items.push(value); + } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return undefined; + const it = this.items[idx]; + return !keepScalar && isScalar(it) ? it.value : it; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx = asItemIndex(key); + return typeof idx === 'number' && idx < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx]; + if (isScalar(prev) && isScalarValue(value)) + prev.value = value; + else + this.items[idx] = value; + } + toJSON(_, ctx) { + const seq = []; + if (ctx?.onCreate) + ctx.onCreate(seq); + let i = 0; + for (const item of this.items) + seq.push(toJS(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection(this, ctx, { + blockItemPrefix: '- ', + flowChars: { start: '[', end: ']' }, + itemIndent: (ctx.indent || '') + ' ', + onChompKeep, + onComment + }); + } + static from(schema, obj, ctx) { + const { replacer } = ctx; + const seq = new this(schema); + if (obj && Symbol.iterator in Object(obj)) { + let i = 0; + for (let it of obj) { + if (typeof replacer === 'function') { + const key = obj instanceof Set ? it : String(i++); + it = replacer.call(obj, key, it); + } + seq.items.push(createNode(it, undefined, ctx)); + } + } + return seq; + } +} +function asItemIndex(key) { + let idx = isScalar(key) ? key.value : key; + if (idx && typeof idx === 'string') + idx = Number(idx); + return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0 + ? idx + : null; +} + +export { YAMLSeq }; diff --git a/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js b/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js new file mode 100644 index 000000000..8e671cb4f --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js @@ -0,0 +1,63 @@ +import { warn } from '../log.js'; +import { isMergeKey, addMergeToJSMap } from '../schema/yaml-1.1/merge.js'; +import { createStringifyContext } from '../stringify/stringify.js'; +import { isNode } from './identity.js'; +import { toJS } from './toJS.js'; + +function addPairToJSMap(ctx, map, { key, value }) { + if (isNode(key) && key.addToJSMap) + key.addToJSMap(ctx, map, value); + // TODO: Should drop this special case for bare << handling + else if (isMergeKey(ctx, key)) + addMergeToJSMap(ctx, map, value); + else { + const jsKey = toJS(key, '', ctx); + if (map instanceof Map) { + map.set(jsKey, toJS(value, jsKey, ctx)); + } + else if (map instanceof Set) { + map.add(jsKey); + } + else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS(value, stringKey, ctx); + if (stringKey in map) + Object.defineProperty(map, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map[stringKey] = jsValue; + } + } + return map; +} +function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ''; + // eslint-disable-next-line @typescript-eslint/no-base-to-string + if (typeof jsKey !== 'object') + return String(jsKey); + if (isNode(key) && ctx?.doc) { + const strCtx = createStringifyContext(ctx.doc, {}); + strCtx.anchors = new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); +} + +export { addPairToJSMap }; diff --git a/node_modules/yaml/browser/dist/nodes/identity.js b/node_modules/yaml/browser/dist/nodes/identity.js new file mode 100644 index 000000000..7b79920dc --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/identity.js @@ -0,0 +1,36 @@ +const ALIAS = Symbol.for('yaml.alias'); +const DOC = Symbol.for('yaml.document'); +const MAP = Symbol.for('yaml.map'); +const PAIR = Symbol.for('yaml.pair'); +const SCALAR = Symbol.for('yaml.scalar'); +const SEQ = Symbol.for('yaml.seq'); +const NODE_TYPE = Symbol.for('yaml.node.type'); +const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS; +const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC; +const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP; +const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR; +const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR; +const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ; +function isCollection(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; +} +function isNode(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; +} +const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + +export { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq }; diff --git a/node_modules/yaml/browser/dist/nodes/toJS.js b/node_modules/yaml/browser/dist/nodes/toJS.js new file mode 100644 index 000000000..0ca625095 --- /dev/null +++ b/node_modules/yaml/browser/dist/nodes/toJS.js @@ -0,0 +1,37 @@ +import { hasAnchor } from './identity.js'; + +/** + * Recursively convert any node or its contents to native JavaScript + * + * @param value - The input value + * @param arg - If `value` defines a `toJSON()` method, use this + * as its first argument + * @param ctx - Conversion context, originally set in Document#toJS(). If + * `{ keep: true }` is not set, output should be suitable for JSON + * stringification. + */ +function toJS(value, arg, ctx) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + if (Array.isArray(value)) + return value.map((v, i) => toJS(v, String(i), ctx)); + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + if (!ctx || !hasAnchor(value)) + return value.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: undefined }; + ctx.anchors.set(value, data); + ctx.onCreate = res => { + data.res = res; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; + } + if (typeof value === 'bigint' && !ctx?.keep) + return Number(value); + return value; +} + +export { toJS }; diff --git a/node_modules/yaml/browser/dist/parse/cst-scalar.js b/node_modules/yaml/browser/dist/parse/cst-scalar.js new file mode 100644 index 000000000..29ab354b5 --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/cst-scalar.js @@ -0,0 +1,214 @@ +import { resolveBlockScalar } from '../compose/resolve-block-scalar.js'; +import { resolveFlowScalar } from '../compose/resolve-flow-scalar.js'; +import { YAMLParseError } from '../errors.js'; +import { stringifyString } from '../stringify/stringifyString.js'; + +function resolveAsScalar(token, strict = true, onError) { + if (token) { + const _onError = (pos, code, message) => { + const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset, code, message); + else + throw new YAMLParseError([offset, offset + 1], code, message); + }; + switch (token.type) { + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return resolveFlowScalar(token, strict, _onError); + case 'block-scalar': + return resolveBlockScalar({ options: { strict } }, token, _onError); + } + } + return null; +} +/** + * Create a new scalar token with `value` + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param value The string representation of the value, which will have its content properly indented. + * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.indent The indent level of the token. + * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value. + * @param context.offset The offset position of the token. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function createScalarToken(value, context) { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context; + const source = stringifyString({ type, value }, { + implicitKey, + indent: indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: 'newline', offset: -1, indent, source: '\n' } + ]; + switch (source[0]) { + case '|': + case '>': { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + return { type: 'block-scalar', offset, indent, props, source: body }; + } + case '"': + return { type: 'double-quoted-scalar', offset, indent, source, end }; + case "'": + return { type: 'single-quoted-scalar', offset, indent, source, end }; + default: + return { type: 'scalar', offset, indent, source, end }; + } +} +/** + * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have. + * + * Best efforts are made to retain any comments previously associated with the `token`, + * though all contents within a collection's `items` will be overwritten. + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key. + * @param value The string representation of the value, which will have its content properly indented. + * @param context.afterKey In most cases, values after a key should have an additional level of indentation. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent = 'indent' in token ? token.indent : null; + if (afterKey && typeof indent === 'number') + indent += 2; + if (!type) + switch (token.type) { + case 'single-quoted-scalar': + type = 'QUOTE_SINGLE'; + break; + case 'double-quoted-scalar': + type = 'QUOTE_DOUBLE'; + break; + case 'block-scalar': { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL'; + break; + } + default: + type = 'PLAIN'; + } + const source = stringifyString({ type, value }, { + implicitKey: implicitKey || indent === null, + indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + switch (source[0]) { + case '|': + case '>': + setBlockScalarValue(token, source); + break; + case '"': + setFlowScalarValue(token, source, 'double-quoted-scalar'); + break; + case "'": + setFlowScalarValue(token, source, 'single-quoted-scalar'); + break; + default: + setFlowScalarValue(token, source, 'scalar'); + } +} +function setBlockScalarValue(token, source) { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + if (token.type === 'block-scalar') { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + header.source = head; + token.source = body; + } + else { + const { offset } = token; + const indent = 'indent' in token ? token.indent : -1; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type: 'block-scalar', indent, props, source: body }); + } +} +/** @returns `true` if last token is a newline */ +function addEndtoBlockProps(props, end) { + if (end) + for (const st of end) + switch (st.type) { + case 'space': + case 'comment': + props.push(st); + break; + case 'newline': + props.push(st); + return true; + } + return false; +} +function setFlowScalarValue(token, source, type) { + switch (token.type) { + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + token.type = type; + token.source = source; + break; + case 'block-scalar': { + const end = token.props.slice(1); + let oa = source.length; + if (token.props[0].type === 'block-scalar-header') + oa -= token.props[0].source.length; + for (const tok of end) + tok.offset += oa; + delete token.props; + Object.assign(token, { type, source, end }); + break; + } + case 'block-map': + case 'block-seq': { + const offset = token.offset + source.length; + const nl = { type: 'newline', offset, indent: token.indent, source: '\n' }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent = 'indent' in token ? token.indent : -1; + const end = 'end' in token && Array.isArray(token.end) + ? token.end.filter(st => st.type === 'space' || + st.type === 'comment' || + st.type === 'newline') + : []; + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type, indent, source, end }); + } + } +} + +export { createScalarToken, resolveAsScalar, setScalarValue }; diff --git a/node_modules/yaml/browser/dist/parse/cst-stringify.js b/node_modules/yaml/browser/dist/parse/cst-stringify.js new file mode 100644 index 000000000..d6ab58c3a --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/cst-stringify.js @@ -0,0 +1,61 @@ +/** + * Stringify a CST document, token, or collection item + * + * Fair warning: This applies no validation whatsoever, and + * simply concatenates the sources in their logical order. + */ +const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst); +function stringifyToken(token) { + switch (token.type) { + case 'block-scalar': { + let res = ''; + for (const tok of token.props) + res += stringifyToken(tok); + return res + token.source; + } + case 'block-map': + case 'block-seq': { + let res = ''; + for (const item of token.items) + res += stringifyItem(item); + return res; + } + case 'flow-collection': { + let res = token.start.source; + for (const item of token.items) + res += stringifyItem(item); + for (const st of token.end) + res += st.source; + return res; + } + case 'document': { + let res = stringifyItem(token); + if (token.end) + for (const st of token.end) + res += st.source; + return res; + } + default: { + let res = token.source; + if ('end' in token && token.end) + for (const st of token.end) + res += st.source; + return res; + } + } +} +function stringifyItem({ start, key, sep, value }) { + let res = ''; + for (const st of start) + res += st.source; + if (key) + res += stringifyToken(key); + if (sep) + for (const st of sep) + res += st.source; + if (value) + res += stringifyToken(value); + return res; +} + +export { stringify }; diff --git a/node_modules/yaml/browser/dist/parse/cst-visit.js b/node_modules/yaml/browser/dist/parse/cst-visit.js new file mode 100644 index 000000000..deca086b7 --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/cst-visit.js @@ -0,0 +1,97 @@ +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove item'); +/** + * Apply a visitor to a CST document or item. + * + * Walks through the tree (depth-first) starting from the root, calling a + * `visitor` function with two arguments when entering each item: + * - `item`: The current item, which included the following members: + * - `start: SourceToken[]` – Source tokens before the key or value, + * possibly including its anchor or tag. + * - `key?: Token | null` – Set for pair values. May then be `null`, if + * the key before the `:` separator is empty. + * - `sep?: SourceToken[]` – Source tokens between the key and the value, + * which should include the `:` map value indicator if `value` is set. + * - `value?: Token` – The value of a sequence item, or of a map pair. + * - `path`: The steps from the root to the current node, as an array of + * `['key' | 'value', number]` tuples. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this token, continue with + * next sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current item, then continue with the next one + * - `number`: Set the index of the next step. This is useful especially if + * the index of the current token has changed. + * - `function`: Define the next visitor for this item. After the original + * visitor is called on item entry, next visitors are called after handling + * a non-empty `key` and when exiting the item. + */ +function visit(cst, visitor) { + if ('type' in cst && cst.type === 'document') + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current item */ +visit.SKIP = SKIP; +/** Remove the current item */ +visit.REMOVE = REMOVE; +/** Find the item at `path` from `cst` as the root */ +visit.itemAtPath = (cst, path) => { + let item = cst; + for (const [field, index] of path) { + const tok = item?.[field]; + if (tok && 'items' in tok) { + item = tok.items[index]; + } + else + return undefined; + } + return item; +}; +/** + * Get the immediate parent collection of the item at `path` from `cst` as the root. + * + * Throws an error if the collection is not found, which should never happen if the item itself exists. + */ +visit.parentCollection = (cst, path) => { + const parent = visit.itemAtPath(cst, path.slice(0, -1)); + const field = path[path.length - 1][0]; + const coll = parent?.[field]; + if (coll && 'items' in coll) + return coll; + throw new Error('Parent collection not found'); +}; +function _visit(path, item, visitor) { + let ctrl = visitor(item, path); + if (typeof ctrl === 'symbol') + return ctrl; + for (const field of ['key', 'value']) { + const token = item[field]; + if (token && 'items' in token) { + for (let i = 0; i < token.items.length; ++i) { + const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + token.items.splice(i, 1); + i -= 1; + } + } + if (typeof ctrl === 'function' && field === 'key') + ctrl = ctrl(item, path); + } + } + return typeof ctrl === 'function' ? ctrl(item, path) : ctrl; +} + +export { visit }; diff --git a/node_modules/yaml/browser/dist/parse/cst.js b/node_modules/yaml/browser/dist/parse/cst.js new file mode 100644 index 000000000..8bb2f4ad9 --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/cst.js @@ -0,0 +1,98 @@ +export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar.js'; +export { stringify } from './cst-stringify.js'; +export { visit } from './cst-visit.js'; + +/** The byte order mark */ +const BOM = '\u{FEFF}'; +/** Start of doc-mode */ +const DOCUMENT = '\x02'; // C0: Start of Text +/** Unexpected end of flow-mode */ +const FLOW_END = '\x18'; // C0: Cancel +/** Next token is a scalar value */ +const SCALAR = '\x1f'; // C0: Unit Separator +/** @returns `true` if `token` is a flow or block collection */ +const isCollection = (token) => !!token && 'items' in token; +/** @returns `true` if `token` is a flow or block scalar; not an alias */ +const isScalar = (token) => !!token && + (token.type === 'scalar' || + token.type === 'single-quoted-scalar' || + token.type === 'double-quoted-scalar' || + token.type === 'block-scalar'); +/* istanbul ignore next */ +/** Get a printable representation of a lexer token */ +function prettyToken(token) { + switch (token) { + case BOM: + return ''; + case DOCUMENT: + return ''; + case FLOW_END: + return ''; + case SCALAR: + return ''; + default: + return JSON.stringify(token); + } +} +/** Identify the type of a lexer token. May return `null` for unknown tokens. */ +function tokenType(source) { + switch (source) { + case BOM: + return 'byte-order-mark'; + case DOCUMENT: + return 'doc-mode'; + case FLOW_END: + return 'flow-error-end'; + case SCALAR: + return 'scalar'; + case '---': + return 'doc-start'; + case '...': + return 'doc-end'; + case '': + case '\n': + case '\r\n': + return 'newline'; + case '-': + return 'seq-item-ind'; + case '?': + return 'explicit-key-ind'; + case ':': + return 'map-value-ind'; + case '{': + return 'flow-map-start'; + case '}': + return 'flow-map-end'; + case '[': + return 'flow-seq-start'; + case ']': + return 'flow-seq-end'; + case ',': + return 'comma'; + } + switch (source[0]) { + case ' ': + case '\t': + return 'space'; + case '#': + return 'comment'; + case '%': + return 'directive-line'; + case '*': + return 'alias'; + case '&': + return 'anchor'; + case '!': + return 'tag'; + case "'": + return 'single-quoted-scalar'; + case '"': + return 'double-quoted-scalar'; + case '|': + case '>': + return 'block-scalar-header'; + } + return null; +} + +export { BOM, DOCUMENT, FLOW_END, SCALAR, isCollection, isScalar, prettyToken, tokenType }; diff --git a/node_modules/yaml/browser/dist/parse/lexer.js b/node_modules/yaml/browser/dist/parse/lexer.js new file mode 100644 index 000000000..6a8fc1b15 --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/lexer.js @@ -0,0 +1,721 @@ +import { BOM, DOCUMENT, FLOW_END, SCALAR } from './cst.js'; + +/* +START -> stream + +stream + directive -> line-end -> stream + indent + line-end -> stream + [else] -> line-start + +line-end + comment -> line-end + newline -> . + input-end -> END + +line-start + doc-start -> doc + doc-end -> stream + [else] -> indent -> block-start + +block-start + seq-item-start -> block-start + explicit-key-start -> block-start + map-value-start -> block-start + [else] -> doc + +doc + line-end -> line-start + spaces -> doc + anchor -> doc + tag -> doc + flow-start -> flow -> doc + flow-end -> error -> doc + seq-item-start -> error -> doc + explicit-key-start -> error -> doc + map-value-start -> doc + alias -> doc + quote-start -> quoted-scalar -> doc + block-scalar-header -> line-end -> block-scalar(min) -> line-start + [else] -> plain-scalar(false, min) -> doc + +flow + line-end -> flow + spaces -> flow + anchor -> flow + tag -> flow + flow-start -> flow -> flow + flow-end -> . + seq-item-start -> error -> flow + explicit-key-start -> flow + map-value-start -> flow + alias -> flow + quote-start -> quoted-scalar -> flow + comma -> flow + [else] -> plain-scalar(true, 0) -> flow + +quoted-scalar + quote-end -> . + [else] -> quoted-scalar + +block-scalar(min) + newline + peek(indent < min) -> . + [else] -> block-scalar(min) + +plain-scalar(is-flow, min) + scalar-end(is-flow) -> . + peek(newline + (indent < min)) -> . + [else] -> plain-scalar(min) +*/ +function isEmpty(ch) { + switch (ch) { + case undefined: + case ' ': + case '\n': + case '\r': + case '\t': + return true; + default: + return false; + } +} +const hexDigits = new Set('0123456789ABCDEFabcdef'); +const tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"); +const flowIndicatorChars = new Set(',[]{}'); +const invalidAnchorChars = new Set(' ,[]{}\n\r\t'); +const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch); +/** + * Splits an input string into lexical tokens, i.e. smaller strings that are + * easily identifiable by `tokens.tokenType()`. + * + * Lexing starts always in a "stream" context. Incomplete input may be buffered + * until a complete token can be emitted. + * + * In addition to slices of the original input, the following control characters + * may also be emitted: + * + * - `\x02` (Start of Text): A document starts with the next token + * - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error) + * - `\x1f` (Unit Separator): Next token is a scalar value + * - `\u{FEFF}` (Byte order mark): Emitted separately outside documents + */ +class Lexer { + constructor() { + /** + * Flag indicating whether the end of the current buffer marks the end of + * all input + */ + this.atEnd = false; + /** + * Explicit indent set in block scalar header, as an offset from the current + * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not + * explicitly set. + */ + this.blockScalarIndent = -1; + /** + * Block scalars that include a + (keep) chomping indicator in their header + * include trailing empty lines, which are otherwise excluded from the + * scalar's contents. + */ + this.blockScalarKeep = false; + /** Current input */ + this.buffer = ''; + /** + * Flag noting whether the map value indicator : can immediately follow this + * node within a flow context. + */ + this.flowKey = false; + /** Count of surrounding flow collection levels. */ + this.flowLevel = 0; + /** + * Minimum level of indentation required for next lines to be parsed as a + * part of the current scalar value. + */ + this.indentNext = 0; + /** Indentation level of the current line. */ + this.indentValue = 0; + /** Position of the next \n character. */ + this.lineEndPos = null; + /** Stores the state of the lexer if reaching the end of incpomplete input */ + this.next = null; + /** A pointer to `buffer`; the current position of the lexer. */ + this.pos = 0; + } + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + if (typeof source !== 'string') + throw TypeError('source is not a string'); + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? 'stream'; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i = this.pos; + let ch = this.buffer[i]; + while (ch === ' ' || ch === '\t') + ch = this.buffer[++i]; + if (!ch || ch === '#' || ch === '\n') + return true; + if (ch === '\r') + return this.buffer[i + 1] === '\n'; + return false; + } + charAt(n) { + return this.buffer[this.pos + n]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === ' ') + ch = this.buffer[++indent + offset]; + if (ch === '\r') { + const next = this.buffer[indent + offset + 1]; + if (next === '\n' || (!next && !this.atEnd)) + return offset + indent + 1; + } + return ch === '\n' || indent >= this.indentNext || (!ch && !this.atEnd) + ? offset + indent + : -1; + } + if (ch === '-' || ch === '.') { + const dt = this.buffer.substr(offset, 3); + if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3])) + return -1; + } + return offset; + } + getLine() { + let end = this.lineEndPos; + if (typeof end !== 'number' || (end !== -1 && end < this.pos)) { + end = this.buffer.indexOf('\n', this.pos); + this.lineEndPos = end; + } + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === '\r') + end -= 1; + return this.buffer.substring(this.pos, end); + } + hasChars(n) { + return this.pos + n <= this.buffer.length; + } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; + } + peek(n) { + return this.buffer.substr(this.pos, n); + } + *parseNext(next) { + switch (next) { + case 'stream': + return yield* this.parseStream(); + case 'line-start': + return yield* this.parseLineStart(); + case 'block-start': + return yield* this.parseBlockStart(); + case 'doc': + return yield* this.parseDocument(); + case 'flow': + return yield* this.parseFlowCollection(); + case 'quoted-scalar': + return yield* this.parseQuotedScalar(); + case 'block-scalar': + return yield* this.parseBlockScalar(); + case 'plain-scalar': + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext('stream'); + if (line[0] === BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === '%') { + let dirEnd = line.length; + let cs = line.indexOf('#'); + while (cs !== -1) { + const ch = line[cs - 1]; + if (ch === ' ' || ch === '\t') { + dirEnd = cs - 1; + break; + } + else { + cs = line.indexOf('#', cs + 1); + } + } + while (true) { + const ch = line[dirEnd - 1]; + if (ch === ' ' || ch === '\t') + dirEnd -= 1; + else + break; + } + const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n); // possible comment + this.pushNewline(); + return 'stream'; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return 'stream'; + } + yield DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext('line-start'); + if (ch === '-' || ch === '.') { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext('line-start'); + const s = this.peek(3); + if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return s === '---' ? 'doc' : 'stream'; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext('block-start'); + if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) { + const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n; + return 'block-start'; + } + return 'doc'; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext('doc'); + let n = yield* this.pushIndicators(); + switch (line[n]) { + case '#': + yield* this.pushCount(line.length - n); + // fallthrough + case undefined: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return 'flow'; + case '}': + case ']': + // this is an error + yield* this.pushCount(1); + return 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'doc'; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case '|': + case '>': + n += yield* this.parseBlockScalarHeader(); + n += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); + } + } + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; + } + else { + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext('flow'); + if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') || + (indent === 0 && + (line.startsWith('---') || line.startsWith('...')) && + isEmpty(line[3]))) { + // Allowing for the terminal ] or } at the same (rather than greater) + // indent level as the initial [ or { is technically invalid, but + // failing here would be surprising to users. + const atFlowEndMarker = indent === this.indentNext - 1 && + this.flowLevel === 1 && + (line[0] === ']' || line[0] === '}'); + if (!atFlowEndMarker) { + // this is an error + this.flowLevel = 0; + yield FLOW_END; + return yield* this.parseLineStart(); + } + } + let n = 0; + while (line[n] === ',') { + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + this.flowKey = false; + } + n += yield* this.pushIndicators(); + switch (line[n]) { + case undefined: + return 'flow'; + case '#': + yield* this.pushCount(line.length - n); + return 'flow'; + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return 'flow'; + case '}': + case ']': + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? 'flow' : 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'flow'; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ':': { + const next = this.charAt(1); + if (this.flowKey || isEmpty(next) || next === ',') { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return 'flow'; + } + } + // fallthrough + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); + } + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); + } + else { + // double-quote + while (end !== -1) { + let n = 0; + while (this.buffer[end - 1 - n] === '\\') + n += 1; + if (n % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); + } + } + // Only looking for newlines within the quotes + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf('\n', this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf('\n', cs); + } + if (nl !== -1) { + // this is an error caused by an unexpected unindent + end = nl - (qb[nl - 1] === '\r' ? 2 : 1); + } + } + if (end === -1) { + if (!this.atEnd) + return this.setNext('quoted-scalar'); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? 'flow' : 'doc'; + } + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i = this.pos; + while (true) { + const ch = this.buffer[++i]; + if (ch === '+') + this.blockScalarKeep = true; + else if (ch > '0' && ch <= '9') + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== '-') + break; + } + return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#'); + } + *parseBlockScalar() { + let nl = this.pos - 1; // may be -1 if this.pos === 0 + let indent = 0; + let ch; + loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) { + switch (ch) { + case ' ': + indent += 1; + break; + case '\n': + nl = i; + indent = 0; + break; + case '\r': { + const next = this.buffer[i + 1]; + if (!next && !this.atEnd) + return this.setNext('block-scalar'); + if (next === '\n') + break; + } // fallthrough + default: + break loop; + } + } + if (!ch && !this.atEnd) + return this.setNext('block-scalar'); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else { + this.indentNext = + this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext); + } + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf('\n', cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext('block-scalar'); + nl = this.buffer.length; + } + } + // Trailing insufficiently indented tabs are invalid. + // To catch that during parsing, we include them in the block scalar value. + let i = nl + 1; + ch = this.buffer[i]; + while (ch === ' ') + ch = this.buffer[++i]; + if (ch === '\t') { + while (ch === '\t' || ch === ' ' || ch === '\r' || ch === '\n') + ch = this.buffer[++i]; + nl = i - 1; + } + else if (!this.blockScalarKeep) { + do { + let i = nl - 1; + let ch = this.buffer[i]; + if (ch === '\r') + ch = this.buffer[--i]; + const lastChar = i; // Drop the line if last char not more indented + while (ch === ' ') + ch = this.buffer[--i]; + if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar) + nl = i; + else + break; + } while (true); + } + yield SCALAR; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i = this.pos - 1; + let ch; + while ((ch = this.buffer[++i])) { + if (ch === ':') { + const next = this.buffer[i + 1]; + if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next))) + break; + end = i; + } + else if (isEmpty(ch)) { + let next = this.buffer[i + 1]; + if (ch === '\r') { + if (next === '\n') { + i += 1; + ch = '\n'; + next = this.buffer[i + 1]; + } + else + end = i; + } + if (next === '#' || (inFlow && flowIndicatorChars.has(next))) + break; + if (ch === '\n') { + const cs = this.continueScalar(i + 1); + if (cs === -1) + break; + i = Math.max(i, cs - 2); // to advance, but still account for ' #' + } + } + else { + if (inFlow && flowIndicatorChars.has(ch)) + break; + end = i; + } + } + if (!ch && !this.atEnd) + return this.setNext('plain-scalar'); + yield SCALAR; + yield* this.pushToIndex(end + 1, true); + return inFlow ? 'flow' : 'doc'; + } + *pushCount(n) { + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos += n; + return n; + } + return 0; + } + *pushToIndex(i, allowEmpty) { + const s = this.buffer.slice(this.pos, i); + if (s) { + yield s; + this.pos += s.length; + return s.length; + } + else if (allowEmpty) + yield ''; + return 0; + } + *pushIndicators() { + let n = 0; + loop: while (true) { + switch (this.charAt(0)) { + case '!': + n += yield* this.pushTag(); + n += yield* this.pushSpaces(true); + continue loop; + case '&': + n += yield* this.pushUntil(isNotAnchorChar); + n += yield* this.pushSpaces(true); + continue loop; + case '-': // this is an error + case '?': // this is an error outside flow collections + case ':': { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + continue loop; + } + } + } + break loop; + } + return n; + } + *pushTag() { + if (this.charAt(1) === '<') { + let i = this.pos + 2; + let ch = this.buffer[i]; + while (!isEmpty(ch) && ch !== '>') + ch = this.buffer[++i]; + return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false); + } + else { + let i = this.pos + 1; + let ch = this.buffer[i]; + while (ch) { + if (tagChars.has(ch)) + ch = this.buffer[++i]; + else if (ch === '%' && + hexDigits.has(this.buffer[i + 1]) && + hexDigits.has(this.buffer[i + 2])) { + ch = this.buffer[(i += 3)]; + } + else + break; + } + return yield* this.pushToIndex(i, false); + } + } + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === '\n') + return yield* this.pushCount(1); + else if (ch === '\r' && this.charAt(1) === '\n') + return yield* this.pushCount(2); + else + return 0; + } + *pushSpaces(allowTabs) { + let i = this.pos - 1; + let ch; + do { + ch = this.buffer[++i]; + } while (ch === ' ' || (allowTabs && ch === '\t')); + const n = i - this.pos; + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos = i; + } + return n; + } + *pushUntil(test) { + let i = this.pos; + let ch = this.buffer[i]; + while (!test(ch)) + ch = this.buffer[++i]; + return yield* this.pushToIndex(i, false); + } +} + +export { Lexer }; diff --git a/node_modules/yaml/browser/dist/parse/line-counter.js b/node_modules/yaml/browser/dist/parse/line-counter.js new file mode 100644 index 000000000..002ce246d --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/line-counter.js @@ -0,0 +1,39 @@ +/** + * Tracks newlines during parsing in order to provide an efficient API for + * determining the one-indexed `{ line, col }` position for any offset + * within the input. + */ +class LineCounter { + constructor() { + this.lineStarts = []; + /** + * Should be called in ascending order. Otherwise, call + * `lineCounter.lineStarts.sort()` before calling `linePos()`. + */ + this.addNewLine = (offset) => this.lineStarts.push(offset); + /** + * Performs a binary search and returns the 1-indexed { line, col } + * position of `offset`. If `line === 0`, `addNewLine` has never been + * called or `offset` is before the first known newline. + */ + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = (low + high) >> 1; // Math.floor((low + high) / 2) + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; + }; + } +} + +export { LineCounter }; diff --git a/node_modules/yaml/browser/dist/parse/parser.js b/node_modules/yaml/browser/dist/parse/parser.js new file mode 100644 index 000000000..2009ddc2b --- /dev/null +++ b/node_modules/yaml/browser/dist/parse/parser.js @@ -0,0 +1,975 @@ +import { tokenType } from './cst.js'; +import { Lexer } from './lexer.js'; + +function includesToken(list, type) { + for (let i = 0; i < list.length; ++i) + if (list[i].type === type) + return true; + return false; +} +function findNonEmptyIndex(list) { + for (let i = 0; i < list.length; ++i) { + switch (list[i].type) { + case 'space': + case 'comment': + case 'newline': + break; + default: + return i; + } + } + return -1; +} +function isFlowToken(token) { + switch (token?.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'flow-collection': + return true; + default: + return false; + } +} +function getPrevProps(parent) { + switch (parent.type) { + case 'document': + return parent.start; + case 'block-map': { + const it = parent.items[parent.items.length - 1]; + return it.sep ?? it.start; + } + case 'block-seq': + return parent.items[parent.items.length - 1].start; + /* istanbul ignore next should not happen */ + default: + return []; + } +} +/** Note: May modify input array */ +function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i = prev.length; + loop: while (--i >= 0) { + switch (prev[i].type) { + case 'doc-start': + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + case 'newline': + break loop; + } + } + while (prev[++i]?.type === 'space') { + /* loop */ + } + return prev.splice(i, prev.length); +} +function arrayPushArray(target, source) { + // May exhaust call stack with large `source` array + if (source.length < 1e5) + Array.prototype.push.apply(target, source); + else + for (let i = 0; i < source.length; ++i) + target.push(source[i]); +} +function fixFlowSeqItems(fc) { + if (fc.start.type === 'flow-seq-start') { + for (const it of fc.items) { + if (it.sep && + !it.value && + !includesToken(it.start, 'explicit-key-ind') && + !includesToken(it.sep, 'map-value-ind')) { + if (it.key) + it.value = it.key; + delete it.key; + if (isFlowToken(it.value)) { + if (it.value.end) + arrayPushArray(it.value.end, it.sep); + else + it.value.end = it.sep; + } + else + arrayPushArray(it.start, it.sep); + delete it.sep; + } + } + } +} +/** + * A YAML concrete syntax tree (CST) parser + * + * ```ts + * const src: string = ... + * for (const token of new Parser().parse(src)) { + * // token: Token + * } + * ``` + * + * To use the parser with a user-provided lexer: + * + * ```ts + * function* parse(source: string, lexer: Lexer) { + * const parser = new Parser() + * for (const lexeme of lexer.lex(source)) + * yield* parser.next(lexeme) + * yield* parser.end() + * } + * + * const src: string = ... + * const lexer = new Lexer() + * for (const token of parse(src, lexer)) { + * // token: Token + * } + * ``` + */ +class Parser { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + /** If true, space and sequence indicators count as indentation */ + this.atNewLine = true; + /** If true, next token is a scalar value */ + this.atScalar = false; + /** Current indentation level */ + this.indent = 0; + /** Current offset since the start of parsing */ + this.offset = 0; + /** On the same line with a block map key */ + this.onKeyLine = false; + /** Top indicates the node that's currently being built */ + this.stack = []; + /** The source of the current token, set in parse() */ + this.source = ''; + /** The type of the current token, set in parse() */ + this.type = ''; + // Must be defined after `next()` + this.lexer = new Lexer(); + this.onNewLine = onNewLine; + } + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; + } + const type = tokenType(source); + if (!type) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: 'error', offset: this.offset, message, source }); + this.offset += source.length; + } + else if (type === 'scalar') { + this.atNewLine = false; + this.atScalar = true; + this.type = 'scalar'; + } + else { + this.type = type; + yield* this.step(); + switch (type) { + case 'newline': + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case 'space': + if (this.atNewLine && source[0] === ' ') + this.indent += source.length; + break; + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + if (this.atNewLine) + this.indent += source.length; + break; + case 'doc-mode': + case 'flow-error-end': + return; + default: + this.atNewLine = false; + } + this.offset += source.length; + } + } + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); + } + get sourceToken() { + const st = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + return st; + } + *step() { + const top = this.peek(1); + if (this.type === 'doc-end' && top?.type !== 'doc-end') { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: 'doc-end', + offset: this.offset, + source: this.source + }); + return; + } + if (!top) + return yield* this.stream(); + switch (top.type) { + case 'document': + return yield* this.document(top); + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return yield* this.scalar(top); + case 'block-scalar': + return yield* this.blockScalar(top); + case 'block-map': + return yield* this.blockMap(top); + case 'block-seq': + return yield* this.blockSequence(top); + case 'flow-collection': + return yield* this.flowCollection(top); + case 'doc-end': + return yield* this.documentEnd(top); + } + /* istanbul ignore next should not happen */ + yield* this.pop(); + } + peek(n) { + return this.stack[this.stack.length - n]; + } + *pop(error) { + const token = error ?? this.stack.pop(); + /* istanbul ignore if should not happen */ + if (!token) { + const message = 'Tried to pop an empty stack'; + yield { type: 'error', offset: this.offset, source: '', message }; + } + else if (this.stack.length === 0) { + yield token; + } + else { + const top = this.peek(1); + if (token.type === 'block-scalar') { + // Block scalars use their parent rather than header indent + token.indent = 'indent' in top ? top.indent : 0; + } + else if (token.type === 'flow-collection' && top.type === 'document') { + // Ignore all indent for top-level flow collections + token.indent = 0; + } + if (token.type === 'flow-collection') + fixFlowSeqItems(token); + switch (top.type) { + case 'document': + top.value = token; + break; + case 'block-scalar': + top.props.push(token); // error + break; + case 'block-map': { + const it = top.items[top.items.length - 1]; + if (it.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } + else if (it.sep) { + it.value = token; + } + else { + Object.assign(it, { key: token, sep: [] }); + this.onKeyLine = !it.explicitKey; + return; + } + break; + } + case 'block-seq': { + const it = top.items[top.items.length - 1]; + if (it.value) + top.items.push({ start: [], value: token }); + else + it.value = token; + break; + } + case 'flow-collection': { + const it = top.items[top.items.length - 1]; + if (!it || it.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it.sep) + it.value = token; + else + Object.assign(it, { key: token, sep: [] }); + return; + } + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.pop(token); + } + if ((top.type === 'document' || + top.type === 'block-map' || + top.type === 'block-seq') && + (token.type === 'block-map' || token.type === 'block-seq')) { + const last = token.items[token.items.length - 1]; + if (last && + !last.sep && + !last.value && + last.start.length > 0 && + findNonEmptyIndex(last.start) === -1 && + (token.indent === 0 || + last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) { + if (top.type === 'document') + top.end = last.start; + else + top.items.push({ start: last.start }); + token.items.splice(-1, 1); + } + } + } + } + *stream() { + switch (this.type) { + case 'directive-line': + yield { type: 'directive', offset: this.offset, source: this.source }; + return; + case 'byte-order-mark': + case 'space': + case 'comment': + case 'newline': + yield this.sourceToken; + return; + case 'doc-mode': + case 'doc-start': { + const doc = { + type: 'document', + offset: this.offset, + start: [] + }; + if (this.type === 'doc-start') + doc.start.push(this.sourceToken); + this.stack.push(doc); + return; + } + } + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source + }; + } + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case 'doc-start': { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } + else + doc.start.push(this.sourceToken); + return; + } + case 'anchor': + case 'tag': + case 'space': + case 'comment': + case 'newline': + doc.start.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; + } + } + *scalar(scalar) { + if (this.type === 'map-value-ind') { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep; + if (scalar.end) { + sep = scalar.end; + sep.push(this.sourceToken); + delete scalar.end; + } + else + sep = [this.sourceToken]; + const map = { + type: 'block-map', + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case 'space': + case 'comment': + case 'newline': + scalar.props.push(this.sourceToken); + return; + case 'scalar': + scalar.source = this.source; + // block-scalar source includes trailing newline + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + yield* this.pop(); + break; + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map) { + const it = map.items[map.items.length - 1]; + // it.sep is true-ish if pair already has key or : separator + switch (this.type) { + case 'newline': + this.onKeyLine = false; + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'space': + case 'comment': + if (it.value) { + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + arrayPushArray(end, it.start); + end.push(this.sourceToken); + map.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + } + if (this.indent >= map.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map.indent; + const atNextItem = atMapIndent && + (it.sep || it.explicitKey) && + this.type !== 'seq-item-ind'; + // For empty nodes, assign newline-separated not indented empty tokens to following node + let start = []; + if (atNextItem && it.sep && !it.value) { + const nl = []; + for (let i = 0; i < it.sep.length; ++i) { + const st = it.sep[i]; + switch (st.type) { + case 'newline': + nl.push(i); + break; + case 'space': + break; + case 'comment': + if (st.indent > map.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start = it.sep.splice(nl[1]); + } + switch (this.type) { + case 'anchor': + case 'tag': + if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + this.onKeyLine = true; + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'explicit-key-ind': + if (!it.sep && !it.explicitKey) { + it.start.push(this.sourceToken); + it.explicitKey = true; + } + else if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start, explicitKey: true }); + } + else { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken], explicitKey: true }] + }); + } + this.onKeyLine = true; + return; + case 'map-value-ind': + if (it.explicitKey) { + if (!it.sep) { + if (includesToken(it.start, 'newline')) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else { + const start = getFirstKeyStartProps(it.start); + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + } + else if (it.value) { + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + else if (isFlowToken(it.key) && + !includesToken(it.sep, 'newline')) { + const start = getFirstKeyStartProps(it.start); + const key = it.key; + const sep = it.sep; + sep.push(this.sourceToken); + // @ts-expect-error type guard is wrong here + delete it.key; + // @ts-expect-error type guard is wrong here + delete it.sep; + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key, sep }] + }); + } + else if (start.length > 0) { + // Not actually at next item + it.sep = it.sep.concat(start, this.sourceToken); + } + else { + it.sep.push(this.sourceToken); + } + } + else { + if (!it.sep) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else if (it.value || atNextItem) { + map.items.push({ start, key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } + else { + it.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (atNextItem || it.value) { + map.items.push({ start, key: fs, sep: [] }); + this.onKeyLine = true; + } + else if (it.sep) { + this.stack.push(fs); + } + else { + Object.assign(it, { key: fs, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map); + if (bv) { + if (bv.type === 'block-seq') { + if (!it.explicitKey && + it.sep && + !includesToken(it.sep, 'newline')) { + yield* this.pop({ + type: 'error', + offset: this.offset, + message: 'Unexpected block-seq-ind on same line with key', + source: this.source + }); + return; + } + } + else if (atMapIndent) { + map.items.push({ start }); + } + this.stack.push(bv); + return; + } + } + } + } + yield* this.pop(); + yield* this.step(); + } + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; + switch (this.type) { + case 'newline': + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + seq.items.push({ start: [this.sourceToken] }); + } + else + it.start.push(this.sourceToken); + return; + case 'space': + case 'comment': + if (it.value) + seq.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + arrayPushArray(end, it.start); + end.push(this.sourceToken); + seq.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + case 'anchor': + case 'tag': + if (it.value || this.indent <= seq.indent) + break; + it.start.push(this.sourceToken); + return; + case 'seq-item-ind': + if (this.indent !== seq.indent) + break; + if (it.value || includesToken(it.start, 'seq-item-ind')) + seq.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + } + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); + if (bv) { + this.stack.push(bv); + return; + } + } + yield* this.pop(); + yield* this.step(); + } + *flowCollection(fc) { + const it = fc.items[fc.items.length - 1]; + if (this.type === 'flow-error-end') { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top?.type === 'flow-collection'); + } + else if (fc.end.length === 0) { + switch (this.type) { + case 'comma': + case 'explicit-key-ind': + if (!it || it.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + case 'map-value-ind': + if (!it || it.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + Object.assign(it, { key: null, sep: [this.sourceToken] }); + return; + case 'space': + case 'comment': + case 'newline': + case 'anchor': + case 'tag': + if (!it || it.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + it.start.push(this.sourceToken); + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs, sep: [] }); + else if (it.sep) + this.stack.push(fs); + else + Object.assign(it, { key: fs, sep: [] }); + return; + } + case 'flow-map-end': + case 'flow-seq-end': + fc.end.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(fc); + /* istanbul ignore else should not happen */ + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); + } + } + else { + const parent = this.peek(2); + if (parent.type === 'block-map' && + ((this.type === 'map-value-ind' && parent.indent === fc.indent) || + (this.type === 'newline' && + !parent.items[parent.items.length - 1].sep))) { + yield* this.pop(); + yield* this.step(); + } + else if (this.type === 'map-value-ind' && + parent.type !== 'flow-collection') { + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep = fc.end.splice(1, fc.end.length); + sep.push(this.sourceToken); + const map = { + type: 'block-map', + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else { + yield* this.lineEnd(fc); + } + } + } + flowScalar(type) { + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + return { + type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + } + startBlockValue(parent) { + switch (this.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return this.flowScalar(this.type); + case 'block-scalar-header': + return { + type: 'block-scalar', + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: '' + }; + case 'flow-map-start': + case 'flow-seq-start': + return { + type: 'flow-collection', + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case 'seq-item-ind': + return { + type: 'block-seq', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case 'explicit-key-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, explicitKey: true }] + }; + } + case 'map-value-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; + } + } + return null; + } + atIndentedComment(start, indent) { + if (this.type !== 'comment') + return false; + if (this.indent <= indent) + return false; + return start.every(st => st.type === 'newline' || st.type === 'space'); + } + *documentEnd(docEnd) { + if (this.type !== 'doc-mode') { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } + *lineEnd(token) { + switch (this.type) { + case 'comma': + case 'doc-start': + case 'doc-end': + case 'flow-seq-end': + case 'flow-map-end': + case 'map-value-ind': + yield* this.pop(); + yield* this.step(); + break; + case 'newline': + this.onKeyLine = false; + // fallthrough + case 'space': + case 'comment': + default: + // all other values are errors + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } +} + +export { Parser }; diff --git a/node_modules/yaml/browser/dist/public-api.js b/node_modules/yaml/browser/dist/public-api.js new file mode 100644 index 000000000..116f6eebc --- /dev/null +++ b/node_modules/yaml/browser/dist/public-api.js @@ -0,0 +1,102 @@ +import { Composer } from './compose/composer.js'; +import { Document } from './doc/Document.js'; +import { prettifyError, YAMLParseError } from './errors.js'; +import { warn } from './log.js'; +import { isDocument } from './nodes/identity.js'; +import { LineCounter } from './parse/line-counter.js'; +import { Parser } from './parse/parser.js'; + +function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter = options.lineCounter || (prettyErrors && new LineCounter()) || null; + return { lineCounter, prettyErrors }; +} +/** + * Parse the input as a stream of YAML documents. + * + * Documents should be separated from each other by `...` or `---` marker lines. + * + * @returns If an empty `docs` array is returned, it will be of type + * EmptyStream and contain additional stream information. In + * TypeScript, you should use `'empty' in docs` as a type guard for it. + */ +function parseAllDocuments(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser = new Parser(lineCounter?.addNewLine); + const composer = new Composer(options); + const docs = Array.from(composer.compose(parser.parse(source))); + if (prettyErrors && lineCounter) + for (const doc of docs) { + doc.errors.forEach(prettifyError(source, lineCounter)); + doc.warnings.forEach(prettifyError(source, lineCounter)); + } + if (docs.length > 0) + return docs; + return Object.assign([], { empty: true }, composer.streamInfo()); +} +/** Parse an input string into a single YAML.Document */ +function parseDocument(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser = new Parser(lineCounter?.addNewLine); + const composer = new Composer(options); + // `doc` is always set by compose.end(true) at the very latest + let doc = null; + for (const _doc of composer.compose(parser.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== 'silent') { + doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()')); + break; + } + } + if (prettyErrors && lineCounter) { + doc.errors.forEach(prettifyError(source, lineCounter)); + doc.warnings.forEach(prettifyError(source, lineCounter)); + } + return doc; +} +function parse(src, reviver, options) { + let _reviver = undefined; + if (typeof reviver === 'function') { + _reviver = reviver; + } + else if (options === undefined && reviver && typeof reviver === 'object') { + options = reviver; + } + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach(warning => warn(doc.options.logLevel, warning)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== 'silent') + throw doc.errors[0]; + else + doc.errors = []; + } + return doc.toJS(Object.assign({ reviver: _reviver }, options)); +} +function stringify(value, replacer, options) { + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + } + if (typeof options === 'string') + options = options.length; + if (typeof options === 'number') { + const indent = Math.round(options); + options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent }; + } + if (value === undefined) { + const { keepUndefined } = options ?? replacer ?? {}; + if (!keepUndefined) + return undefined; + } + if (isDocument(value) && !_replacer) + return value.toString(options); + return new Document(value, _replacer, options).toString(options); +} + +export { parse, parseAllDocuments, parseDocument, stringify }; diff --git a/node_modules/yaml/browser/dist/schema/Schema.js b/node_modules/yaml/browser/dist/schema/Schema.js new file mode 100644 index 000000000..60a85c532 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/Schema.js @@ -0,0 +1,37 @@ +import { MAP, SCALAR, SEQ } from '../nodes/identity.js'; +import { map } from './common/map.js'; +import { seq } from './common/seq.js'; +import { string } from './common/string.js'; +import { getTags, coreKnownTags } from './tags.js'; + +const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; +class Schema { + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) + ? getTags(compat, 'compat') + : compat + ? getTags(null, compat) + : null; + this.name = (typeof schema === 'string' && schema) || 'core'; + this.knownTags = resolveKnownTags ? coreKnownTags : {}; + this.tags = getTags(customTags, this.name, merge); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, MAP, { value: map }); + Object.defineProperty(this, SCALAR, { value: string }); + Object.defineProperty(this, SEQ, { value: seq }); + // Used by createMap() + this.sortMapEntries = + typeof sortMapEntries === 'function' + ? sortMapEntries + : sortMapEntries === true + ? sortMapEntriesByKey + : null; + } + clone() { + const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy.tags = this.tags.slice(); + return copy; + } +} + +export { Schema }; diff --git a/node_modules/yaml/browser/dist/schema/common/map.js b/node_modules/yaml/browser/dist/schema/common/map.js new file mode 100644 index 000000000..af97b787e --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/common/map.js @@ -0,0 +1,17 @@ +import { isMap } from '../../nodes/identity.js'; +import { YAMLMap } from '../../nodes/YAMLMap.js'; + +const map = { + collection: 'map', + default: true, + nodeClass: YAMLMap, + tag: 'tag:yaml.org,2002:map', + resolve(map, onError) { + if (!isMap(map)) + onError('Expected a mapping for this tag'); + return map; + }, + createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx) +}; + +export { map }; diff --git a/node_modules/yaml/browser/dist/schema/common/null.js b/node_modules/yaml/browser/dist/schema/common/null.js new file mode 100644 index 000000000..fcbe1b7a5 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/common/null.js @@ -0,0 +1,15 @@ +import { Scalar } from '../../nodes/Scalar.js'; + +const nullTag = { + identify: value => value == null, + createNode: () => new Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar(null), + stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source) + ? source + : ctx.options.nullStr +}; + +export { nullTag }; diff --git a/node_modules/yaml/browser/dist/schema/common/seq.js b/node_modules/yaml/browser/dist/schema/common/seq.js new file mode 100644 index 000000000..1915b6059 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/common/seq.js @@ -0,0 +1,17 @@ +import { isSeq } from '../../nodes/identity.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; + +const seq = { + collection: 'seq', + default: true, + nodeClass: YAMLSeq, + tag: 'tag:yaml.org,2002:seq', + resolve(seq, onError) { + if (!isSeq(seq)) + onError('Expected a sequence for this tag'); + return seq; + }, + createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx) +}; + +export { seq }; diff --git a/node_modules/yaml/browser/dist/schema/common/string.js b/node_modules/yaml/browser/dist/schema/common/string.js new file mode 100644 index 000000000..a064f7b31 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/common/string.js @@ -0,0 +1,14 @@ +import { stringifyString } from '../../stringify/stringifyString.js'; + +const string = { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString(item, ctx, onComment, onChompKeep); + } +}; + +export { string }; diff --git a/node_modules/yaml/browser/dist/schema/core/bool.js b/node_modules/yaml/browser/dist/schema/core/bool.js new file mode 100644 index 000000000..ab3c9430a --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/core/bool.js @@ -0,0 +1,19 @@ +import { Scalar } from '../../nodes/Scalar.js'; + +const boolTag = { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: str => new Scalar(str[0] === 't' || str[0] === 'T'), + stringify({ source, value }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === 't' || source[0] === 'T'; + if (value === sv) + return source; + } + return value ? ctx.options.trueStr : ctx.options.falseStr; + } +}; + +export { boolTag }; diff --git a/node_modules/yaml/browser/dist/schema/core/float.js b/node_modules/yaml/browser/dist/schema/core/float.js new file mode 100644 index 000000000..3fa9cf85c --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/core/float.js @@ -0,0 +1,43 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: str => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: str => parseFloat(str), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str) { + const node = new Scalar(parseFloat(str)); + const dot = str.indexOf('.'); + if (dot !== -1 && str[str.length - 1] === '0') + node.minFractionDigits = str.length - dot - 1; + return node; + }, + stringify: stringifyNumber +}; + +export { float, floatExp, floatNaN }; diff --git a/node_modules/yaml/browser/dist/schema/core/int.js b/node_modules/yaml/browser/dist/schema/core/int.js new file mode 100644 index 000000000..7091235ff --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/core/int.js @@ -0,0 +1,38 @@ +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber(node); +} +const intOct = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^0o[0-7]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), + stringify: node => intStringify(node, 8, '0o') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9]+$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber +}; +const intHex = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^0x[0-9a-fA-F]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +export { int, intHex, intOct }; diff --git a/node_modules/yaml/browser/dist/schema/core/schema.js b/node_modules/yaml/browser/dist/schema/core/schema.js new file mode 100644 index 000000000..dd02b2e3d --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/core/schema.js @@ -0,0 +1,23 @@ +import { map } from '../common/map.js'; +import { nullTag } from '../common/null.js'; +import { seq } from '../common/seq.js'; +import { string } from '../common/string.js'; +import { boolTag } from './bool.js'; +import { floatNaN, floatExp, float } from './float.js'; +import { intOct, int, intHex } from './int.js'; + +const schema = [ + map, + seq, + string, + nullTag, + boolTag, + intOct, + int, + intHex, + floatNaN, + floatExp, + float +]; + +export { schema }; diff --git a/node_modules/yaml/browser/dist/schema/json/schema.js b/node_modules/yaml/browser/dist/schema/json/schema.js new file mode 100644 index 000000000..ada1c6349 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/json/schema.js @@ -0,0 +1,62 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { map } from '../common/map.js'; +import { seq } from '../common/seq.js'; + +function intIdentify(value) { + return typeof value === 'bigint' || Number.isInteger(value); +} +const stringifyJSON = ({ value }) => JSON.stringify(value); +const jsonScalars = [ + { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify: stringifyJSON + }, + { + identify: value => value == null, + createNode: () => new Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^true$|^false$/, + resolve: str => str === 'true', + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value) + }, + { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: str => parseFloat(str), + stringify: stringifyJSON + } +]; +const jsonError = { + default: true, + tag: '', + test: /^/, + resolve(str, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; + } +}; +const schema = [map, seq].concat(jsonScalars, jsonError); + +export { schema }; diff --git a/node_modules/yaml/browser/dist/schema/tags.js b/node_modules/yaml/browser/dist/schema/tags.js new file mode 100644 index 000000000..5acd99f71 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/tags.js @@ -0,0 +1,96 @@ +import { map } from './common/map.js'; +import { nullTag } from './common/null.js'; +import { seq } from './common/seq.js'; +import { string } from './common/string.js'; +import { boolTag } from './core/bool.js'; +import { floatNaN, floatExp, float } from './core/float.js'; +import { intOct, intHex, int } from './core/int.js'; +import { schema } from './core/schema.js'; +import { schema as schema$1 } from './json/schema.js'; +import { binary } from './yaml-1.1/binary.js'; +import { merge } from './yaml-1.1/merge.js'; +import { omap } from './yaml-1.1/omap.js'; +import { pairs } from './yaml-1.1/pairs.js'; +import { schema as schema$2 } from './yaml-1.1/schema.js'; +import { set } from './yaml-1.1/set.js'; +import { timestamp, intTime, floatTime } from './yaml-1.1/timestamp.js'; + +const schemas = new Map([ + ['core', schema], + ['failsafe', [map, seq, string]], + ['json', schema$1], + ['yaml11', schema$2], + ['yaml-1.1', schema$2] +]); +const tagsByName = { + binary, + bool: boolTag, + float, + floatExp, + floatNaN, + floatTime, + int, + intHex, + intOct, + intTime, + map, + merge, + null: nullTag, + omap, + pairs, + seq, + set, + timestamp +}; +const coreKnownTags = { + 'tag:yaml.org,2002:binary': binary, + 'tag:yaml.org,2002:merge': merge, + 'tag:yaml.org,2002:omap': omap, + 'tag:yaml.org,2002:pairs': pairs, + 'tag:yaml.org,2002:set': set, + 'tag:yaml.org,2002:timestamp': timestamp +}; +function getTags(customTags, schemaName, addMergeTag) { + const schemaTags = schemas.get(schemaName); + if (schemaTags && !customTags) { + return addMergeTag && !schemaTags.includes(merge) + ? schemaTags.concat(merge) + : schemaTags.slice(); + } + let tags = schemaTags; + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys = Array.from(schemas.keys()) + .filter(key => key !== 'yaml11') + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags = tags.concat(tag); + } + else if (typeof customTags === 'function') { + tags = customTags(tags.slice()); + } + if (addMergeTag) + tags = tags.concat(merge); + return tags.reduce((tags, tag) => { + const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag; + if (!tagObj) { + const tagName = JSON.stringify(tag); + const keys = Object.keys(tagsByName) + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`); + } + if (!tags.includes(tagObj)) + tags.push(tagObj); + return tags; + }, []); +} + +export { coreKnownTags, getTags }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js new file mode 100644 index 000000000..2deda7a61 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js @@ -0,0 +1,58 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { stringifyString } from '../../stringify/stringifyString.js'; + +const binary = { + identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array + default: false, + tag: 'tag:yaml.org,2002:binary', + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof atob === 'function') { + // On IE 11, atob() can't handle newlines + const str = atob(src.replace(/[\n\r]/g, '')); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) + buffer[i] = str.charCodeAt(i); + return buffer; + } + else { + onError('This environment does not support reading binary tags; either Buffer or atob is required'); + return src; + } + }, + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { + if (!value) + return ''; + const buf = value; // checked earlier by binary.identify() + let str; + if (typeof btoa === 'function') { + let s = ''; + for (let i = 0; i < buf.length; ++i) + s += String.fromCharCode(buf[i]); + str = btoa(s); + } + else { + throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required'); + } + type ?? (type = Scalar.BLOCK_LITERAL); + if (type !== Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n = Math.ceil(str.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str.substr(o, lineWidth); + } + str = lines.join(type === Scalar.BLOCK_LITERAL ? '\n' : ' '); + } + return stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); + } +}; + +export { binary }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js new file mode 100644 index 000000000..999b59d46 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js @@ -0,0 +1,26 @@ +import { Scalar } from '../../nodes/Scalar.js'; + +function boolStringify({ value, source }, ctx) { + const boolObj = value ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value ? ctx.options.trueStr : ctx.options.falseStr; +} +const trueTag = { + identify: value => value === true, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar(true), + stringify: boolStringify +}; +const falseTag = { + identify: value => value === false, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, + resolve: () => new Scalar(false), + stringify: boolStringify +}; + +export { falseTag, trueTag }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js new file mode 100644 index 000000000..2f06117ed --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js @@ -0,0 +1,46 @@ +import { Scalar } from '../../nodes/Scalar.js'; +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, '')), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str) { + const node = new Scalar(parseFloat(str.replace(/_/g, ''))); + const dot = str.indexOf('.'); + if (dot !== -1) { + const f = str.substring(dot + 1).replace(/_/g, ''); + if (f[f.length - 1] === '0') + node.minFractionDigits = f.length; + } + return node; + }, + stringify: stringifyNumber +}; + +export { float, floatExp, floatNaN }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js new file mode 100644 index 000000000..f572823f9 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js @@ -0,0 +1,71 @@ +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; + if (sign === '-' || sign === '+') + offset += 1; + str = str.substring(offset).replace(/_/g, ''); + if (intAsBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n = BigInt(str); + return sign === '-' ? BigInt(-1) * n : n; + } + const n = parseInt(str, radix); + return sign === '-' ? -1 * n : n; +} +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? '-' + prefix + str.substr(1) : prefix + str; + } + return stringifyNumber(node); +} +const intBin = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'BIN', + test: /^[-+]?0b[0-1_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), + stringify: node => intStringify(node, 2, '0b') +}; +const intOct = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^[-+]?0[0-7_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), + stringify: node => intStringify(node, 8, '0') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber +}; +const intHex = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +export { int, intBin, intHex, intOct }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js new file mode 100644 index 000000000..2a8d80a35 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js @@ -0,0 +1,67 @@ +import { isScalar, isSeq, isAlias, isMap } from '../../nodes/identity.js'; +import { Scalar } from '../../nodes/Scalar.js'; + +// If the value associated with a merge key is a single mapping node, each of +// its key/value pairs is inserted into the current mapping, unless the key +// already exists in it. If the value associated with the merge key is a +// sequence, then this sequence is expected to contain mapping nodes and each +// of these nodes is merged in turn according to its order in the sequence. +// Keys in mapping nodes earlier in the sequence override keys specified in +// later mapping nodes. -- http://yaml.org/type/merge.html +const MERGE_KEY = '<<'; +const merge = { + identify: value => value === MERGE_KEY || + (typeof value === 'symbol' && value.description === MERGE_KEY), + default: 'key', + tag: 'tag:yaml.org,2002:merge', + test: /^<<$/, + resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), { + addToJSMap: addMergeToJSMap + }), + stringify: () => MERGE_KEY +}; +const isMergeKey = (ctx, key) => (merge.identify(key) || + (isScalar(key) && + (!key.type || key.type === Scalar.PLAIN) && + merge.identify(key.value))) && + ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default); +function addMergeToJSMap(ctx, map, value) { + const source = resolveAliasValue(ctx, value); + if (isSeq(source)) + for (const it of source.items) + mergeValue(ctx, map, it); + else if (Array.isArray(source)) + for (const it of source) + mergeValue(ctx, map, it); + else + mergeValue(ctx, map, source); +} +function mergeValue(ctx, map, value) { + const source = resolveAliasValue(ctx, value); + if (!isMap(source)) + throw new Error('Merge sources must be maps or map aliases'); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value); + } + else if (map instanceof Set) { + map.add(key); + } + else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map; +} +function resolveAliasValue(ctx, value) { + return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value; +} + +export { addMergeToJSMap, isMergeKey, merge }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js new file mode 100644 index 000000000..5574ac5ec --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js @@ -0,0 +1,74 @@ +import { isScalar, isPair } from '../../nodes/identity.js'; +import { toJS } from '../../nodes/toJS.js'; +import { YAMLMap } from '../../nodes/YAMLMap.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; +import { resolvePairs, createPairs } from './pairs.js'; + +class YAMLOMap extends YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.prototype.set.bind(this); + this.tag = YAMLOMap.tag; + } + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_, ctx) { + if (!ctx) + return super.toJSON(_); + const map = new Map(); + if (ctx?.onCreate) + ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (isPair(pair)) { + key = toJS(pair.key, '', ctx); + value = toJS(pair.value, key, ctx); + } + else { + key = toJS(pair, '', ctx); + } + if (map.has(key)) + throw new Error('Ordered maps must not include duplicate keys'); + map.set(key, value); + } + return map; + } + static from(schema, iterable, ctx) { + const pairs = createPairs(schema, iterable, ctx); + const omap = new this(); + omap.items = pairs.items; + return omap; + } +} +YAMLOMap.tag = 'tag:yaml.org,2002:omap'; +const omap = { + collection: 'seq', + identify: value => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: 'tag:yaml.org,2002:omap', + resolve(seq, onError) { + const pairs = resolvePairs(seq, onError); + const seenKeys = []; + for (const { key } of pairs.items) { + if (isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } + else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs); + }, + createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) +}; + +export { YAMLOMap, omap }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js new file mode 100644 index 000000000..579f08020 --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js @@ -0,0 +1,78 @@ +import { isSeq, isPair, isMap } from '../../nodes/identity.js'; +import { createPair, Pair } from '../../nodes/Pair.js'; +import { Scalar } from '../../nodes/Scalar.js'; +import { YAMLSeq } from '../../nodes/YAMLSeq.js'; + +function resolvePairs(seq, onError) { + if (isSeq(seq)) { + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (isPair(item)) + continue; + else if (isMap(item)) { + if (item.items.length > 1) + onError('Each pair must have its own sequence indicator'); + const pair = item.items[0] || new Pair(new Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore + ? `${item.commentBefore}\n${pair.key.commentBefore}` + : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment + ? `${item.comment}\n${cn.comment}` + : item.comment; + } + item = pair; + } + seq.items[i] = isPair(item) ? item : new Pair(item); + } + } + else + onError('Expected a sequence for this tag'); + return seq; +} +function createPairs(schema, iterable, ctx) { + const { replacer } = ctx; + const pairs = new YAMLSeq(schema); + pairs.tag = 'tag:yaml.org,2002:pairs'; + let i = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it of iterable) { + if (typeof replacer === 'function') + it = replacer.call(iterable, String(i++), it); + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } + else + throw new TypeError(`Expected [key, value] tuple: ${it}`); + } + else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } + else { + throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`); + } + } + else { + key = it; + } + pairs.items.push(createPair(key, value, ctx)); + } + return pairs; +} +const pairs = { + collection: 'seq', + default: false, + tag: 'tag:yaml.org,2002:pairs', + resolve: resolvePairs, + createNode: createPairs +}; + +export { createPairs, pairs, resolvePairs }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js new file mode 100644 index 000000000..e516ced2b --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js @@ -0,0 +1,39 @@ +import { map } from '../common/map.js'; +import { nullTag } from '../common/null.js'; +import { seq } from '../common/seq.js'; +import { string } from '../common/string.js'; +import { binary } from './binary.js'; +import { trueTag, falseTag } from './bool.js'; +import { floatNaN, floatExp, float } from './float.js'; +import { intBin, intOct, int, intHex } from './int.js'; +import { merge } from './merge.js'; +import { omap } from './omap.js'; +import { pairs } from './pairs.js'; +import { set } from './set.js'; +import { intTime, floatTime, timestamp } from './timestamp.js'; + +const schema = [ + map, + seq, + string, + nullTag, + trueTag, + falseTag, + intBin, + intOct, + int, + intHex, + floatNaN, + floatExp, + float, + binary, + merge, + omap, + pairs, + set, + intTime, + floatTime, + timestamp +]; + +export { schema }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js new file mode 100644 index 000000000..a3cf4ecfa --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js @@ -0,0 +1,93 @@ +import { isMap, isPair, isScalar } from '../../nodes/identity.js'; +import { Pair, createPair } from '../../nodes/Pair.js'; +import { YAMLMap, findPair } from '../../nodes/YAMLMap.js'; + +class YAMLSet extends YAMLMap { + constructor(schema) { + super(schema); + this.tag = YAMLSet.tag; + } + add(key) { + let pair; + if (isPair(key)) + pair = key; + else if (key && + typeof key === 'object' && + 'key' in key && + 'value' in key && + key.value === null) + pair = new Pair(key.key, null); + else + pair = new Pair(key, null); + const prev = findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); + } + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = findPair(this.items, key); + return !keepPair && isPair(pair) + ? isScalar(pair.key) + ? pair.key.value + : pair.key + : pair; + } + set(key, value) { + if (typeof value !== 'boolean') + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } + else if (!prev && value) { + this.items.push(new Pair(key)); + } + } + toJSON(_, ctx) { + return super.toJSON(_, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error('Set items must all have null values'); + } + static from(schema, iterable, ctx) { + const { replacer } = ctx; + const set = new this(schema); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value of iterable) { + if (typeof replacer === 'function') + value = replacer.call(iterable, value, value); + set.items.push(createPair(value, null, ctx)); + } + return set; + } +} +YAMLSet.tag = 'tag:yaml.org,2002:set'; +const set = { + collection: 'map', + identify: value => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: 'tag:yaml.org,2002:set', + createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), + resolve(map, onError) { + if (isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); + else + onError('Set items must all have null values'); + } + else + onError('Expected a mapping for this tag'); + return map; + } +}; + +export { YAMLSet, set }; diff --git a/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js b/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js new file mode 100644 index 000000000..77e3dbe3b --- /dev/null +++ b/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js @@ -0,0 +1,101 @@ +import { stringifyNumber } from '../../stringify/stringifyNumber.js'; + +/** Internal types handle bigint as number, because TS can't figure it out. */ +function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === '-' || sign === '+' ? str.substring(1) : str; + const num = (n) => asBigInt ? BigInt(n) : Number(n); + const res = parts + .replace(/_/g, '') + .split(':') + .reduce((res, p) => res * num(60) + num(p), num(0)); + return (sign === '-' ? num(-1) * res : res); +} +/** + * hhhh:mm:ss.sss + * + * Internal types handle bigint as number, because TS can't figure it out. + */ +function stringifySexagesimal(node) { + let { value } = node; + let num = (n) => n; + if (typeof value === 'bigint') + num = n => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber(node); + let sign = ''; + if (value < 0) { + sign = '-'; + value *= num(-1); + } + const _60 = num(60); + const parts = [value % _60]; // seconds, including ms + if (value < 60) { + parts.unshift(0); // at least one : is required + } + else { + value = (value - parts[0]) / _60; + parts.unshift(value % _60); // minutes + if (value >= 60) { + value = (value - parts[0]) / _60; + parts.unshift(value); // hours + } + } + return (sign + + parts + .map(n => String(n).padStart(2, '0')) + .join(':') + .replace(/000000\d*$/, '') // % 60 may introduce error + ); +} +const intTime = { + identify: value => typeof value === 'bigint' || Number.isInteger(value), + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), + stringify: stringifySexagesimal +}; +const floatTime = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: str => parseSexagesimal(str, false), + stringify: stringifySexagesimal +}; +const timestamp = { + identify: value => value instanceof Date, + default: true, + tag: 'tag:yaml.org,2002:timestamp', + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd + '(?:' + // time is optional + '(?:t|T|[ \\t]+)' + // t | T | whitespace + '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)? + '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30 + ')?$'), + resolve(str) { + const match = str.match(timestamp.test); + if (!match) + throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); + const [, year, month, day, hour, minute, second] = match.map(Number); + const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match[8]; + if (tz && tz !== 'Z') { + let d = parseSexagesimal(tz, false); + if (Math.abs(d) < 30) + d *= 60; + date -= 60000 * d; + } + return new Date(date); + }, + stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? '' +}; + +export { floatTime, intTime, timestamp }; diff --git a/node_modules/yaml/browser/dist/stringify/foldFlowLines.js b/node_modules/yaml/browser/dist/stringify/foldFlowLines.js new file mode 100644 index 000000000..2f0bd0775 --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/foldFlowLines.js @@ -0,0 +1,146 @@ +const FOLD_FLOW = 'flow'; +const FOLD_BLOCK = 'block'; +const FOLD_QUOTED = 'quoted'; +/** + * Tries to keep input at up to `lineWidth` characters, splitting only on spaces + * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are + * terminated with `\n` and started with `indent`. + */ +function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + if (lineWidth < minContentWidth) + minContentWidth = 0; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === 'number') { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split = undefined; + let prev = undefined; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i, indent.length); + if (i !== -1) + end = i + endStep; + } + for (let ch; (ch = text[(i += 1)]);) { + if (mode === FOLD_QUOTED && ch === '\\') { + escStart = i; + switch (text[i + 1]) { + case 'x': + i += 3; + break; + case 'u': + i += 5; + break; + case 'U': + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === '\n') { + if (mode === FOLD_BLOCK) + i = consumeMoreIndentedLines(text, i, indent.length); + end = i + indent.length + endStep; + split = undefined; + } + else { + if (ch === ' ' && + prev && + prev !== ' ' && + prev !== '\n' && + prev !== '\t') { + // space surrounded by non-space can be replaced with newline + indent + const next = text[i + 1]; + if (next && next !== ' ' && next !== '\n' && next !== '\t') + split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = undefined; + } + else if (mode === FOLD_QUOTED) { + // white-space collected at end may stretch past lineWidth + while (prev === ' ' || prev === '\t') { + prev = ch; + ch = text[(i += 1)]; + overflow = true; + } + // Account for newline escape, but don't break preceding escape + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + // Bail out if lineWidth & minContentWidth are shorter than an escape string + if (escapedFolds[j]) + return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = undefined; + } + else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i = 0; i < folds.length; ++i) { + const fold = folds[i]; + const end = folds[i + 1] || text.length; + if (fold === 0) + res = `\n${indent}${text.slice(0, end)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += `\n${indent}${text.slice(fold + 1, end)}`; + } + } + return res; +} +/** + * Presumes `i + 1` is at the start of a line + * @returns index of last newline in more-indented block + */ +function consumeMoreIndentedLines(text, i, indent) { + let end = i; + let start = i + 1; + let ch = text[start]; + while (ch === ' ' || ch === '\t') { + if (i < start + indent) { + ch = text[++i]; + } + else { + do { + ch = text[++i]; + } while (ch && ch !== '\n'); + end = i; + start = i + 1; + ch = text[start]; + } + } + return end; +} + +export { FOLD_BLOCK, FOLD_FLOW, FOLD_QUOTED, foldFlowLines }; diff --git a/node_modules/yaml/browser/dist/stringify/stringify.js b/node_modules/yaml/browser/dist/stringify/stringify.js new file mode 100644 index 000000000..cfe1d0c87 --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringify.js @@ -0,0 +1,129 @@ +import { anchorIsValid } from '../doc/anchors.js'; +import { isPair, isAlias, isNode, isScalar, isCollection } from '../nodes/identity.js'; +import { stringifyComment } from './stringifyComment.js'; +import { stringifyString } from './stringifyString.js'; + +function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment, + defaultKeyType: null, + defaultStringType: 'PLAIN', + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: 'false', + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: 'null', + simpleKeys: false, + singleQuote: null, + trailingComma: false, + trueStr: 'true', + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case 'block': + inFlow = false; + break; + case 'flow': + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '', + indent: '', + indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ', + inFlow, + options: opt + }; +} +function getTagObject(tags, item) { + if (item.tag) { + const match = tags.filter(t => t.tag === item.tag); + if (match.length > 0) + return match.find(t => t.format === item.format) ?? match[0]; + } + let tagObj = undefined; + let obj; + if (isScalar(item)) { + obj = item.value; + let match = tags.filter(t => t.identify?.(obj)); + if (match.length > 1) { + const testMatch = match.filter(t => t.test); + if (testMatch.length > 0) + match = testMatch; + } + tagObj = + match.find(t => t.format === item.format) ?? match.find(t => !t.format); + } + else { + obj = item; + tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj); + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; +} +// needs to be called before value stringifier to allow for circular anchor refs +function stringifyProps(node, tagObj, { anchors, doc }) { + if (!doc.directives) + return ''; + const props = []; + const anchor = (isScalar(node) || isCollection(node)) && node.anchor; + if (anchor && anchorIsValid(anchor)) { + anchors.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ?? (tagObj.default ? null : tagObj.tag); + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(' '); +} +function stringify(item, ctx, onComment, onChompKeep) { + if (isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } + else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = undefined; + const node = isNode(item) + ? item + : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) }); + tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node)); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str = typeof tagObj.stringify === 'function' + ? tagObj.stringify(node, ctx, onComment, onChompKeep) + : isScalar(node) + ? stringifyString(node, ctx, onComment, onChompKeep) + : node.toString(ctx, onComment, onChompKeep); + if (!props) + return str; + return isScalar(node) || str[0] === '{' || str[0] === '[' + ? `${props} ${str}` + : `${props}\n${ctx.indent}${str}`; +} + +export { createStringifyContext, stringify }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyCollection.js b/node_modules/yaml/browser/dist/stringify/stringifyCollection.js new file mode 100644 index 000000000..4cdf9ace6 --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringifyCollection.js @@ -0,0 +1,153 @@ +import { isNode, isPair } from '../nodes/identity.js'; +import { stringify } from './stringify.js'; +import { lineComment, indentComment } from './stringifyComment.js'; + +function stringifyCollection(collection, ctx, options) { + const flow = ctx.inFlow ?? collection.flow; + const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection; + return stringify(collection, ctx, options); +} +function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; // flag for the preceding node's status + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment = item.comment; + } + else if (isPair(item)) { + const ik = isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str = stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true)); + if (comment) + str += lineComment(str, itemIndent, commentString(comment)); + if (chompKeep && comment) + chompKeep = false; + lines.push(blockItemPrefix + str); + } + let str; + if (lines.length === 0) { + str = flowChars.start + flowChars.end; + } + else { + str = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str += line ? `\n${indent}${line}` : '\n'; + } + } + if (comment) { + str += '\n' + indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; +} +function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (isNode(item)) { + if (item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment = item.comment; + } + else if (isPair(item)) { + const ik = isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } + else if (item.value == null && ik?.comment) { + comment = ik.comment; + } + } + if (comment) + reqNewline = true; + let str = stringify(item, itemCtx, () => (comment = null)); + reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\n')); + if (i < items.length - 1) { + str += ','; + } + else if (ctx.options.trailingComma) { + if (ctx.options.lineWidth > 0) { + reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + + (str.length + 2) > + ctx.options.lineWidth); + } + if (reqNewline) { + str += ','; + } + } + if (comment) + str += lineComment(str, itemIndent, commentString(comment)); + lines.push(str); + linesAtValue = lines.length; + } + const { start, end } = flowChars; + if (lines.length === 0) { + return start + end; + } + else { + if (!reqNewline) { + const len = lines.reduce((sum, line) => sum + line.length + 2, 2); + reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; + } + if (reqNewline) { + let str = start; + for (const line of lines) + str += line ? `\n${indentStep}${indent}${line}` : '\n'; + return `${str}\n${indent}${end}`; + } + else { + return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + } + } +} +function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ''); + if (comment) { + const ic = indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); // Avoid double indent on first line + } +} + +export { stringifyCollection }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyComment.js b/node_modules/yaml/browser/dist/stringify/stringifyComment.js new file mode 100644 index 000000000..f16fc917a --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringifyComment.js @@ -0,0 +1,20 @@ +/** + * Stringifies a comment. + * + * Empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ +const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#'); +function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; +} +const lineComment = (str, indent, comment) => str.endsWith('\n') + ? indentComment(comment, indent) + : comment.includes('\n') + ? '\n' + indentComment(comment, indent) + : (str.endsWith(' ') ? '' : ' ') + comment; + +export { indentComment, lineComment, stringifyComment }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyDocument.js b/node_modules/yaml/browser/dist/stringify/stringifyDocument.js new file mode 100644 index 000000000..2a9defa2a --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringifyDocument.js @@ -0,0 +1,85 @@ +import { isNode } from '../nodes/identity.js'; +import { createStringifyContext, stringify } from './stringify.js'; +import { indentComment, lineComment } from './stringifyComment.js'; + +function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir = doc.directives.toString(doc); + if (dir) { + lines.push(dir); + hasDirectives = true; + } + else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push('---'); + const ctx = createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(''); + const cs = commentString(doc.commentBefore); + lines.unshift(indentComment(cs, '')); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(''); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(indentComment(cs, '')); + } + // top-level block scalars need to be indented if followed by a comment + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? undefined : () => (chompKeep = true); + let body = stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep); + if (contentComment) + body += lineComment(body, '', commentString(contentComment)); + if ((body[0] === '|' || body[0] === '>') && + lines[lines.length - 1] === '---') { + // Top-level block scalars with a preceding doc marker ought to use the + // same line for their header. + lines[lines.length - 1] = `--- ${body}`; + } + else + lines.push(body); + } + else { + lines.push(stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes('\n')) { + lines.push('...'); + lines.push(indentComment(cs, '')); + } + else { + lines.push(`... ${cs}`); + } + } + else { + lines.push('...'); + } + } + else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ''); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') + lines.push(''); + lines.push(indentComment(commentString(dc), '')); + } + } + return lines.join('\n') + '\n'; +} + +export { stringifyDocument }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyNumber.js b/node_modules/yaml/browser/dist/stringify/stringifyNumber.js new file mode 100644 index 000000000..a07104417 --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringifyNumber.js @@ -0,0 +1,25 @@ +function stringifyNumber({ format, minFractionDigits, tag, value }) { + if (typeof value === 'bigint') + return String(value); + const num = typeof value === 'number' ? value : Number(value); + if (!isFinite(num)) + return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf'; + let n = Object.is(value, -0) ? '-0' : JSON.stringify(value); + if (!format && + minFractionDigits && + (!tag || tag === 'tag:yaml.org,2002:float') && + /^-?\d/.test(n) && + !n.includes('e')) { + let i = n.indexOf('.'); + if (i < 0) { + i = n.length; + n += '.'; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) + n += '0'; + } + return n; +} + +export { stringifyNumber }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyPair.js b/node_modules/yaml/browser/dist/stringify/stringifyPair.js new file mode 100644 index 000000000..d299f08dd --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringifyPair.js @@ -0,0 +1,150 @@ +import { isCollection, isNode, isScalar, isSeq } from '../nodes/identity.js'; +import { Scalar } from '../nodes/Scalar.js'; +import { stringify } from './stringify.js'; +import { lineComment, indentComment } from './stringifyComment.js'; + +function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = (isNode(key) && key.comment) || null; + if (simpleKeys) { + if (keyComment) { + throw new Error('With simple keys, key nodes cannot have comments'); + } + if (isCollection(key) || (!isNode(key) && typeof key === 'object')) { + const msg = 'With simple keys, collection cannot be used as a key value'; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && + (!key || + (keyComment && value == null && !ctx.inFlow) || + isCollection(key) || + (isScalar(key) + ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL + : typeof key === 'object')); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str = stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true)); + if (!explicitKey && !ctx.inFlow && str.length > 1024) { + if (simpleKeys) + throw new Error('With simple keys, single line scalar must not span more than 1024 characters'); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value == null) { + if (keyCommentDone && onComment) + onComment(); + return str === '' ? '?' : explicitKey ? `? ${str}` : str; + } + } + else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) { + str = `? ${str}`; + if (keyComment && !keyCommentDone) { + str += lineComment(str, ctx.indent, commentString(keyComment)); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str += lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str}\n${indent}:`; + } + else { + str = `${str}:`; + if (keyComment) + str += lineComment(str, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (isNode(value)) { + vsb = !!value.spaceBefore; + vcb = value.commentBefore; + valueComment = value.comment; + } + else { + vsb = false; + vcb = null; + valueComment = null; + if (value && typeof value === 'object') + value = doc.createNode(value); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && isScalar(value)) + ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && + indentStep.length >= 2 && + !ctx.inFlow && + !explicitKey && + isSeq(value) && + !value.flow && + !value.tag && + !value.anchor) { + // If indentSeq === false, consider '- ' as part of indentation where possible + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true)); + let ws = ' '; + if (keyComment || vsb || vcb) { + ws = vsb ? '\n' : ''; + if (vcb) { + const cs = commentString(vcb); + ws += `\n${indentComment(cs, ctx.indent)}`; + } + if (valueStr === '' && !ctx.inFlow) { + if (ws === '\n' && valueComment) + ws = '\n\n'; + } + else { + ws += `\n${ctx.indent}`; + } + } + else if (!explicitKey && isCollection(value)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf('\n'); + const hasNewline = nl0 !== -1; + const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow) { + let hasPropsLine = false; + if (hasNewline && (vs0 === '&' || vs0 === '!')) { + let sp0 = valueStr.indexOf(' '); + if (vs0 === '&' && + sp0 !== -1 && + sp0 < nl0 && + valueStr[sp0 + 1] === '!') { + sp0 = valueStr.indexOf(' ', sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = `\n${ctx.indent}`; + } + } + else if (valueStr === '' || valueStr[0] === '\n') { + ws = ''; + } + str += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } + else if (valueComment && !valueCommentDone) { + str += lineComment(str, ctx.indent, commentString(valueComment)); + } + else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str; +} + +export { stringifyPair }; diff --git a/node_modules/yaml/browser/dist/stringify/stringifyString.js b/node_modules/yaml/browser/dist/stringify/stringifyString.js new file mode 100644 index 000000000..1591ce6bf --- /dev/null +++ b/node_modules/yaml/browser/dist/stringify/stringifyString.js @@ -0,0 +1,336 @@ +import { Scalar } from '../nodes/Scalar.js'; +import { foldFlowLines, FOLD_FLOW, FOLD_QUOTED, FOLD_BLOCK } from './foldFlowLines.js'; + +const getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth +}); +// Also checks for lines starting with %, as parsing the output as YAML 1.1 will +// presume that's starting a new document. +const containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); +function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) + return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === '\n') { + if (i - start > limit) + return true; + start = i + 1; + if (strLen - start <= limit) + return false; + } + } + return true; +} +function doubleQuotedString(value, ctx) { + const json = JSON.stringify(value); + if (ctx.options.doubleQuotedAsJSON) + return json; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + let str = ''; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === ' ' && json[i + 1] === '\\' && json[i + 2] === 'n') { + // space before newline needs to be escaped to not be folded + str += json.slice(start, i) + '\\ '; + i += 1; + start = i; + ch = '\\'; + } + if (ch === '\\') + switch (json[i + 1]) { + case 'u': + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case '0000': + str += '\\0'; + break; + case '0007': + str += '\\a'; + break; + case '000b': + str += '\\v'; + break; + case '001b': + str += '\\e'; + break; + case '0085': + str += '\\N'; + break; + case '00a0': + str += '\\_'; + break; + case '2028': + str += '\\L'; + break; + case '2029': + str += '\\P'; + break; + default: + if (code.substr(0, 2) === '00') + str += '\\x' + code.substr(2); + else + str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case 'n': + if (implicitKey || + json[i + 2] === '"' || + json.length < minMultiLineLength) { + i += 1; + } + else { + // folding will eat first newline + str += json.slice(start, i) + '\n\n'; + while (json[i + 2] === '\\' && + json[i + 3] === 'n' && + json[i + 4] !== '"') { + str += '\n'; + i += 2; + } + str += indent; + // space after newline needs to be escaped to not be folded + if (json[i + 2] === ' ') + str += '\\'; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey + ? str + : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false)); +} +function singleQuotedString(value, ctx) { + if (ctx.options.singleQuote === false || + (ctx.implicitKey && value.includes('\n')) || + /[ \t]\n|\n[ \t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline + ) + return doubleQuotedString(value, ctx); + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'"; + return ctx.implicitKey + ? res + : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false)); +} +function quotedString(value, ctx) { + const { singleQuote } = ctx.options; + let qs; + if (singleQuote === false) + qs = doubleQuotedString; + else { + const hasDouble = value.includes('"'); + const hasSingle = value.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote ? singleQuotedString : doubleQuotedString; + } + return qs(value, ctx); +} +// The negative lookbehind avoids a polynomial search, +// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind +let blockEndNewlines; +try { + blockEndNewlines = new RegExp('(^|(?\n'; + // determine chomping from whitespace at value end + let chomp; + let endStart; + for (endStart = value.length; endStart > 0; --endStart) { + const ch = value[endStart - 1]; + if (ch !== '\n' && ch !== '\t' && ch !== ' ') + break; + } + let end = value.substring(endStart); + const endNlPos = end.indexOf('\n'); + if (endNlPos === -1) { + chomp = '-'; // strip + } + else if (value === end || endNlPos !== end.length - 1) { + chomp = '+'; // keep + if (onChompKeep) + onChompKeep(); + } + else { + chomp = ''; // clip + } + if (end) { + value = value.slice(0, -end.length); + if (end[end.length - 1] === '\n') + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + // determine indent indicator from whitespace at value start + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value.length; ++startEnd) { + const ch = value[startEnd]; + if (ch === ' ') + startWithSpace = true; + else if (ch === '\n') + startNlPos = startEnd; + else + break; + } + let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value = value.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? '2' : '1'; // root is at -1 + // Leading | or > is added later + let header = (startWithSpace ? indentSize : '') + chomp; + if (comment) { + header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' ')); + if (onComment) + onComment(); + } + if (!literal) { + const foldedValue = value + .replace(/\n+/g, '\n$&') + .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded + // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent + .replace(/\n+/g, `$&${indent}`); + let literalFallback = false; + const foldOptions = getFoldOptions(ctx, true); + if (blockQuote !== 'folded' && type !== Scalar.BLOCK_FOLDED) { + foldOptions.onOverflow = () => { + literalFallback = true; + }; + } + const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions); + if (!literalFallback) + return `>${header}\n${indent}${body}`; + } + value = value.replace(/\n+/g, `$&${indent}`); + return `|${header}\n${indent}${start}${value}${end}`; +} +function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if ((implicitKey && value.includes('\n')) || + (inFlow && /[[\]{},]/.test(value))) { + return quotedString(value, ctx); + } + if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + // not allowed: + // - '-' or '?' + // - start with an indicator character (except [?:-]) or /[?-] / + // - '\n ', ': ' or ' \n' anywhere + // - '#' not preceded by a non-space char + // - end with ' ' or ':' + return implicitKey || inFlow || !value.includes('\n') + ? quotedString(value, ctx) + : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && + !inFlow && + type !== Scalar.PLAIN && + value.includes('\n')) { + // Where allowed & type not set explicitly, prefer block style for multiline strings + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value)) { + if (indent === '') { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + else if (implicitKey && indent === indentStep) { + return quotedString(value, ctx); + } + } + const str = value.replace(/\n+/g, `$&\n${indent}`); + // Verify that output will be parsed as a string, as e.g. plain numbers and + // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'), + // and others in v1.1. + if (actualString) { + const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey + ? str + : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false)); +} +function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === 'string' + ? item + : Object.assign({}, item, { value: String(item.value) }); + let { type } = item; + if (type !== Scalar.QUOTE_DOUBLE) { + // force double quotes on control characters & unpaired surrogates + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type = Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.BLOCK_FOLDED: + case Scalar.BLOCK_LITERAL: + return implicitKey || inFlow + ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers + : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; + } + }; + let res = _stringify(type); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t = (implicitKey && defaultKeyType) || defaultStringType; + res = _stringify(t); + if (res === null) + throw new Error(`Unsupported default string type ${t}`); + } + return res; +} + +export { stringifyString }; diff --git a/node_modules/yaml/browser/dist/util.js b/node_modules/yaml/browser/dist/util.js new file mode 100644 index 000000000..dfb18ed73 --- /dev/null +++ b/node_modules/yaml/browser/dist/util.js @@ -0,0 +1,11 @@ +export { createNode } from './doc/createNode.js'; +export { debug, warn } from './log.js'; +export { createPair } from './nodes/Pair.js'; +export { toJS } from './nodes/toJS.js'; +export { findPair } from './nodes/YAMLMap.js'; +export { map as mapTag } from './schema/common/map.js'; +export { seq as seqTag } from './schema/common/seq.js'; +export { string as stringTag } from './schema/common/string.js'; +export { foldFlowLines } from './stringify/foldFlowLines.js'; +export { stringifyNumber } from './stringify/stringifyNumber.js'; +export { stringifyString } from './stringify/stringifyString.js'; diff --git a/node_modules/yaml/browser/dist/visit.js b/node_modules/yaml/browser/dist/visit.js new file mode 100644 index 000000000..b5eef41df --- /dev/null +++ b/node_modules/yaml/browser/dist/visit.js @@ -0,0 +1,233 @@ +import { isDocument, isNode, isPair, isCollection, isMap, isSeq, isScalar, isAlias } from './nodes/identity.js'; + +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove node'); +/** + * Apply a visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + visit_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current node */ +visit.SKIP = SKIP; +/** Remove the current node */ +visit.REMOVE = REMOVE; +function visit_(key, node, visitor, path) { + const ctrl = callVisitor(key, node, visitor, path); + if (isNode(ctrl) || isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visit_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = visit_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = visit_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +/** + * Apply an async visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `Promise`: Must resolve to one of the following values + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + await visitAsync_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visitAsync.BREAK = BREAK; +/** Do not visit the children of the current node */ +visitAsync.SKIP = SKIP; +/** Remove the current node */ +visitAsync.REMOVE = REMOVE; +async function visitAsync_(key, node, visitor, path) { + const ctrl = await callVisitor(key, node, visitor, path); + if (isNode(ctrl) || isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visitAsync_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = await visitAsync_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = await visitAsync_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +function initVisitor(visitor) { + if (typeof visitor === 'object' && + (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; +} +function callVisitor(key, node, visitor, path) { + if (typeof visitor === 'function') + return visitor(key, node, path); + if (isMap(node)) + return visitor.Map?.(key, node, path); + if (isSeq(node)) + return visitor.Seq?.(key, node, path); + if (isPair(node)) + return visitor.Pair?.(key, node, path); + if (isScalar(node)) + return visitor.Scalar?.(key, node, path); + if (isAlias(node)) + return visitor.Alias?.(key, node, path); + return undefined; +} +function replaceNode(key, path, node) { + const parent = path[path.length - 1]; + if (isCollection(parent)) { + parent.items[key] = node; + } + else if (isPair(parent)) { + if (key === 'key') + parent.key = node; + else + parent.value = node; + } + else if (isDocument(parent)) { + parent.contents = node; + } + else { + const pt = isAlias(parent) ? 'alias' : 'scalar'; + throw new Error(`Cannot replace node with ${pt} parent`); + } +} + +export { visit, visitAsync }; diff --git a/node_modules/yaml/browser/index.js b/node_modules/yaml/browser/index.js new file mode 100644 index 000000000..5f7327183 --- /dev/null +++ b/node_modules/yaml/browser/index.js @@ -0,0 +1,5 @@ +// `export * as default from ...` fails on Webpack v4 +// https://github.com/eemeli/yaml/issues/228 +import * as YAML from './dist/index.js' +export default YAML +export * from './dist/index.js' diff --git a/node_modules/yaml/browser/package.json b/node_modules/yaml/browser/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/node_modules/yaml/browser/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/yaml/dist/cli.d.ts b/node_modules/yaml/dist/cli.d.ts new file mode 100644 index 000000000..4007923da --- /dev/null +++ b/node_modules/yaml/dist/cli.d.ts @@ -0,0 +1,8 @@ +export declare const help = "yaml: A command-line YAML processor and inspector\n\nReads stdin and writes output to stdout and errors & warnings to stderr.\n\nUsage:\n yaml Process a YAML stream, outputting it as YAML\n yaml cst Parse the CST of a YAML stream\n yaml lex Parse the lexical tokens of a YAML stream\n yaml valid Validate a YAML stream, returning 0 on success\n\nOptions:\n --help, -h Show this message.\n --json, -j Output JSON.\n --indent 2 Output pretty-printed data, indented by the given number of spaces.\n --merge, -m Enable support for \"<<\" merge keys.\n\nAdditional options for bare \"yaml\" command:\n --doc, -d Output pretty-printed JS Document objects.\n --single, -1 Require the input to consist of a single YAML document.\n --strict, -s Stop on errors.\n --visit, -v Apply a visitor to each document (requires a path to import)\n --yaml 1.1 Set the YAML version. (default: 1.2)"; +export declare class UserError extends Error { + static ARGS: number; + static SINGLE: number; + code: number; + constructor(code: number, message: string); +} +export declare function cli(stdin: NodeJS.ReadableStream, done: (error?: Error) => void, argv?: string[]): Promise; diff --git a/node_modules/yaml/dist/cli.mjs b/node_modules/yaml/dist/cli.mjs new file mode 100644 index 000000000..639cca4b6 --- /dev/null +++ b/node_modules/yaml/dist/cli.mjs @@ -0,0 +1,201 @@ +import { resolve } from 'path'; +import { parseArgs } from 'util'; +import { prettyToken } from './parse/cst.js'; +import { Lexer } from './parse/lexer.js'; +import { Parser } from './parse/parser.js'; +import { Composer } from './compose/composer.js'; +import { LineCounter } from './parse/line-counter.js'; +import { prettifyError } from './errors.js'; +import { visit } from './visit.js'; + +const help = `\ +yaml: A command-line YAML processor and inspector + +Reads stdin and writes output to stdout and errors & warnings to stderr. + +Usage: + yaml Process a YAML stream, outputting it as YAML + yaml cst Parse the CST of a YAML stream + yaml lex Parse the lexical tokens of a YAML stream + yaml valid Validate a YAML stream, returning 0 on success + +Options: + --help, -h Show this message. + --json, -j Output JSON. + --indent 2 Output pretty-printed data, indented by the given number of spaces. + --merge, -m Enable support for "<<" merge keys. + +Additional options for bare "yaml" command: + --doc, -d Output pretty-printed JS Document objects. + --single, -1 Require the input to consist of a single YAML document. + --strict, -s Stop on errors. + --visit, -v Apply a visitor to each document (requires a path to import) + --yaml 1.1 Set the YAML version. (default: 1.2)`; +class UserError extends Error { + constructor(code, message) { + super(`Error: ${message}`); + this.code = code; + } +} +UserError.ARGS = 2; +UserError.SINGLE = 3; +async function cli(stdin, done, argv) { + let args; + try { + args = parseArgs({ + args: argv, + allowPositionals: true, + options: { + doc: { type: 'boolean', short: 'd' }, + help: { type: 'boolean', short: 'h' }, + indent: { type: 'string', short: 'i' }, + merge: { type: 'boolean', short: 'm' }, + json: { type: 'boolean', short: 'j' }, + single: { type: 'boolean', short: '1' }, + strict: { type: 'boolean', short: 's' }, + visit: { type: 'string', short: 'v' }, + yaml: { type: 'string', default: '1.2' } + } + }); + } + catch (error) { + return done(new UserError(UserError.ARGS, error.message)); + } + const { positionals: [mode], values: opt } = args; + let indent = Number(opt.indent); + stdin.setEncoding('utf-8'); + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + switch (opt.help || mode) { + /* istanbul ignore next */ + case true: // --help + console.log(help); + break; + case 'lex': { + const lexer = new Lexer(); + const data = []; + const add = (tok) => { + if (opt.json) + data.push(tok); + else + console.log(prettyToken(tok)); + }; + stdin.on('data', (chunk) => { + for (const tok of lexer.lex(chunk, true)) + add(tok); + }); + stdin.on('end', () => { + for (const tok of lexer.lex('', false)) + add(tok); + if (opt.json) + console.log(JSON.stringify(data, null, indent)); + done(); + }); + break; + } + case 'cst': { + const parser = new Parser(); + const data = []; + const add = (tok) => { + if (opt.json) + data.push(tok); + else + console.dir(tok, { depth: null }); + }; + stdin.on('data', (chunk) => { + for (const tok of parser.parse(chunk, true)) + add(tok); + }); + stdin.on('end', () => { + for (const tok of parser.parse('', false)) + add(tok); + if (opt.json) + console.log(JSON.stringify(data, null, indent)); + done(); + }); + break; + } + case undefined: + case 'valid': { + const lineCounter = new LineCounter(); + const parser = new Parser(lineCounter.addNewLine); + // @ts-expect-error Version is validated at runtime + const composer = new Composer({ version: opt.yaml, merge: opt.merge }); + const visitor = opt.visit + ? (await import(resolve(opt.visit))).default + : null; + let source = ''; + let hasDoc = false; + let reqDocEnd = false; + const data = []; + const add = (doc) => { + if (hasDoc && opt.single) { + return done(new UserError(UserError.SINGLE, 'Input stream contains multiple documents')); + } + for (const error of doc.errors) { + prettifyError(source, lineCounter)(error); + if (opt.strict || mode === 'valid') + return done(error); + console.error(error); + } + for (const warning of doc.warnings) { + prettifyError(source, lineCounter)(warning); + console.error(warning); + } + if (visitor) + visit(doc, visitor); + if (mode === 'valid') + doc.toJS(); + else if (opt.json) + data.push(doc); + else if (opt.doc) { + Object.defineProperties(doc, { + options: { enumerable: false }, + schema: { enumerable: false } + }); + console.dir(doc, { depth: null }); + } + else { + if (reqDocEnd) + console.log('...'); + try { + indent || (indent = 2); + const str = doc.toString({ indent }); + console.log(str.endsWith('\n') ? str.slice(0, -1) : str); + } + catch (error) { + done(error); + } + } + hasDoc = true; + reqDocEnd = !doc.directives?.docEnd; + }; + stdin.on('data', (chunk) => { + source += chunk; + for (const tok of parser.parse(chunk, true)) { + for (const doc of composer.next(tok)) + add(doc); + } + }); + stdin.on('end', () => { + for (const tok of parser.parse('', false)) { + for (const doc of composer.next(tok)) + add(doc); + } + for (const doc of composer.end(false)) + add(doc); + if (opt.single && !hasDoc) { + return done(new UserError(UserError.SINGLE, 'Input stream contained no documents')); + } + if (mode !== 'valid' && opt.json) { + console.log(JSON.stringify(opt.single ? data[0] : data, null, indent)); + } + done(); + }); + break; + } + default: + done(new UserError(UserError.ARGS, `Unknown command: ${JSON.stringify(mode)}`)); + } +} + +export { UserError, cli, help }; diff --git a/node_modules/yaml/dist/compose/compose-collection.d.ts b/node_modules/yaml/dist/compose/compose-collection.d.ts new file mode 100644 index 000000000..ecbd9e0f9 --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-collection.d.ts @@ -0,0 +1,11 @@ +import type { ParsedNode } from '../nodes/Node'; +import type { BlockMap, BlockSequence, FlowCollection, SourceToken } from '../parse/cst'; +import type { ComposeContext, ComposeNode } from './compose-node'; +import type { ComposeErrorHandler } from './composer'; +interface Props { + anchor: SourceToken | null; + tag: SourceToken | null; + newlineAfterProp: SourceToken | null; +} +export declare function composeCollection(CN: ComposeNode, ctx: ComposeContext, token: BlockMap | BlockSequence | FlowCollection, props: Props, onError: ComposeErrorHandler): ParsedNode; +export {}; diff --git a/node_modules/yaml/dist/compose/compose-collection.js b/node_modules/yaml/dist/compose/compose-collection.js new file mode 100644 index 000000000..852efe2a4 --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-collection.js @@ -0,0 +1,90 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); +var YAMLMap = require('../nodes/YAMLMap.js'); +var YAMLSeq = require('../nodes/YAMLSeq.js'); +var resolveBlockMap = require('./resolve-block-map.js'); +var resolveBlockSeq = require('./resolve-block-seq.js'); +var resolveFlowCollection = require('./resolve-flow-collection.js'); + +function resolveCollection(CN, ctx, token, onError, tagName, tag) { + const coll = token.type === 'block-map' + ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag) + : token.type === 'block-seq' + ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag) + : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag); + const Coll = coll.constructor; + // If we got a tagName matching the class, or the tag name is '!', + // then use the tagName from the node class used to create it. + if (tagName === '!' || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; +} +function composeCollection(CN, ctx, token, props, onError) { + const tagToken = props.tag; + const tagName = !tagToken + ? null + : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)); + if (token.type === 'block-seq') { + const { anchor, newlineAfterProp: nl } = props; + const lastProp = anchor && tagToken + ? anchor.offset > tagToken.offset + ? anchor + : tagToken + : (anchor ?? tagToken); + if (lastProp && (!nl || nl.offset < lastProp.offset)) { + const message = 'Missing newline after block sequence props'; + onError(lastProp, 'MISSING_CHAR', message); + } + } + const expType = token.type === 'block-map' + ? 'map' + : token.type === 'block-seq' + ? 'seq' + : token.start.source === '{' + ? 'map' + : 'seq'; + // shortcut: check if it's a generic YAMLMap or YAMLSeq + // before jumping into the custom tag logic. + if (!tagToken || + !tagName || + tagName === '!' || + (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') || + (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) { + return resolveCollection(CN, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt?.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } + else { + if (kt) { + onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true); + } + else { + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true); + } + return resolveCollection(CN, ctx, token, onError, tagName); + } + } + const coll = resolveCollection(CN, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll; + const node = identity.isNode(res) + ? res + : new Scalar.Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; +} + +exports.composeCollection = composeCollection; diff --git a/node_modules/yaml/dist/compose/compose-doc.d.ts b/node_modules/yaml/dist/compose/compose-doc.d.ts new file mode 100644 index 000000000..5ffcc38b8 --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-doc.d.ts @@ -0,0 +1,7 @@ +import type { Directives } from '../doc/directives'; +import { Document } from '../doc/Document'; +import type { ParsedNode } from '../nodes/Node'; +import type { DocumentOptions, ParseOptions, SchemaOptions } from '../options'; +import type * as CST from '../parse/cst'; +import type { ComposeErrorHandler } from './composer'; +export declare function composeDoc(options: ParseOptions & DocumentOptions & SchemaOptions, directives: Directives, { offset, start, value, end }: CST.Document, onError: ComposeErrorHandler): Document.Parsed; diff --git a/node_modules/yaml/dist/compose/compose-doc.js b/node_modules/yaml/dist/compose/compose-doc.js new file mode 100644 index 000000000..63c949518 --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-doc.js @@ -0,0 +1,45 @@ +'use strict'; + +var Document = require('../doc/Document.js'); +var composeNode = require('./compose-node.js'); +var resolveEnd = require('./resolve-end.js'); +var resolveProps = require('./resolve-props.js'); + +function composeDoc(options, directives, { offset, start, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document.Document(undefined, opts); + const ctx = { + atKey: false, + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps.resolveProps(start, { + indicator: 'doc-start', + next: value ?? end?.[0], + offset, + onError, + parentIndent: 0, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value && + (value.type === 'block-map' || value.type === 'block-seq') && + !props.hasNewline) + onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker'); + } + // @ts-expect-error If Contents is set, let's trust the user + doc.contents = value + ? composeNode.composeNode(ctx, value, props, onError) + : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re = resolveEnd.resolveEnd(end, contentEnd, false, onError); + if (re.comment) + doc.comment = re.comment; + doc.range = [offset, contentEnd, re.offset]; + return doc; +} + +exports.composeDoc = composeDoc; diff --git a/node_modules/yaml/dist/compose/compose-node.d.ts b/node_modules/yaml/dist/compose/compose-node.d.ts new file mode 100644 index 000000000..fa5085de6 --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-node.d.ts @@ -0,0 +1,29 @@ +import type { Directives } from '../doc/directives'; +import type { ParsedNode } from '../nodes/Node'; +import type { ParseOptions } from '../options'; +import type { SourceToken, Token } from '../parse/cst'; +import type { Schema } from '../schema/Schema'; +import type { ComposeErrorHandler } from './composer'; +export interface ComposeContext { + atKey: boolean; + atRoot: boolean; + directives: Directives; + options: Readonly>>; + schema: Readonly; +} +interface Props { + spaceBefore: boolean; + comment: string; + anchor: SourceToken | null; + tag: SourceToken | null; + newlineAfterProp: SourceToken | null; + end: number; +} +declare const CN: { + composeNode: typeof composeNode; + composeEmptyNode: typeof composeEmptyNode; +}; +export type ComposeNode = typeof CN; +export declare function composeNode(ctx: ComposeContext, token: Token, props: Props, onError: ComposeErrorHandler): ParsedNode; +export declare function composeEmptyNode(ctx: ComposeContext, offset: number, before: Token[] | undefined, pos: number | null, { spaceBefore, comment, anchor, tag, end }: Props, onError: ComposeErrorHandler): import('../index').Scalar.Parsed; +export {}; diff --git a/node_modules/yaml/dist/compose/compose-node.js b/node_modules/yaml/dist/compose/compose-node.js new file mode 100644 index 000000000..cf7047e9b --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-node.js @@ -0,0 +1,112 @@ +'use strict'; + +var Alias = require('../nodes/Alias.js'); +var identity = require('../nodes/identity.js'); +var composeCollection = require('./compose-collection.js'); +var composeScalar = require('./compose-scalar.js'); +var resolveEnd = require('./resolve-end.js'); +var utilEmptyScalarPosition = require('./util-empty-scalar-position.js'); + +const CN = { composeNode, composeEmptyNode }; +function composeNode(ctx, token, props, onError) { + const atKey = ctx.atKey; + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case 'alias': + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties'); + break; + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'block-scalar': + node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case 'block-map': + case 'block-seq': + case 'flow-collection': + try { + node = composeCollection.composeCollection(CN, ctx, token, props, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + } + catch (error) { + // Almost certainly here due to a stack overflow + const message = error instanceof Error ? error.message : String(error); + onError(token, 'RESOURCE_EXHAUSTION', message); + } + break; + default: { + const message = token.type === 'error' + ? token.message + : `Unsupported token (type: ${token.type})`; + onError(token, 'UNEXPECTED_TOKEN', message); + isSrcToken = false; + } + } + node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError)); + if (anchor && node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + if (atKey && + ctx.options.stringKeys && + (!identity.isScalar(node) || + typeof node.value !== 'string' || + (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) { + const msg = 'With stringKeys, all keys must be strings'; + onError(tag ?? token, 'NON_STRING_KEY', msg); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === 'scalar' && token.source === '') + node.comment = comment; + else + node.commentBefore = comment; + } + // @ts-expect-error Type checking misses meaning of isSrcToken + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; +} +function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: 'scalar', + offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos), + indent: -1, + source: '' + }; + const node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === '') + onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; +} +function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias.Alias(source.substring(1)); + if (alias.source === '') + onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string'); + if (alias.source.endsWith(':')) + onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true); + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re.offset]; + if (re.comment) + alias.comment = re.comment; + return alias; +} + +exports.composeEmptyNode = composeEmptyNode; +exports.composeNode = composeNode; diff --git a/node_modules/yaml/dist/compose/compose-scalar.d.ts b/node_modules/yaml/dist/compose/compose-scalar.d.ts new file mode 100644 index 000000000..f2b5ffa3c --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-scalar.d.ts @@ -0,0 +1,5 @@ +import { Scalar } from '../nodes/Scalar'; +import type { BlockScalar, FlowScalar, SourceToken } from '../parse/cst'; +import type { ComposeContext } from './compose-node'; +import type { ComposeErrorHandler } from './composer'; +export declare function composeScalar(ctx: ComposeContext, token: FlowScalar | BlockScalar, tagToken: SourceToken | null, onError: ComposeErrorHandler): Scalar.Parsed; diff --git a/node_modules/yaml/dist/compose/compose-scalar.js b/node_modules/yaml/dist/compose/compose-scalar.js new file mode 100644 index 000000000..7fc7ed4d8 --- /dev/null +++ b/node_modules/yaml/dist/compose/compose-scalar.js @@ -0,0 +1,88 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); +var resolveBlockScalar = require('./resolve-block-scalar.js'); +var resolveFlowScalar = require('./resolve-flow-scalar.js'); + +function composeScalar(ctx, token, tagToken, onError) { + const { value, type, comment, range } = token.type === 'block-scalar' + ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) + : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken + ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) + : null; + let tag; + if (ctx.options.stringKeys && ctx.atKey) { + tag = ctx.schema[identity.SCALAR]; + } + else if (tagName) + tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError); + else if (token.type === 'scalar') + tag = findScalarTagByTest(ctx, value, token, onError); + else + tag = ctx.schema[identity.SCALAR]; + let scalar; + try { + const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options); + scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res); + } + catch (error) { + const msg = error instanceof Error ? error.message : String(error); + onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg); + scalar = new Scalar.Scalar(value); + } + scalar.range = range; + scalar.source = value; + if (type) + scalar.type = type; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; +} +function findScalarTagByName(schema, value, tagName, tagToken, onError) { + if (tagName === '!') + return schema[identity.SCALAR]; // non-specific tag + const matchWithTest = []; + for (const tag of schema.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; + } + } + for (const tag of matchWithTest) + if (tag.test?.test(value)) + return tag; + const kt = schema.knownTags[tagName]; + if (kt && !kt.collection) { + // Ensure that the known tag is available for stringifying, + // but does not get used by default. + schema.tags.push(Object.assign({}, kt, { default: false, test: undefined })); + return kt; + } + onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str'); + return schema[identity.SCALAR]; +} +function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) { + const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) && + tag.test?.test(value)) || schema[identity.SCALAR]; + if (schema.compat) { + const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? + schema[identity.SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, 'TAG_RESOLVE_FAILED', msg, true); + } + } + return tag; +} + +exports.composeScalar = composeScalar; diff --git a/node_modules/yaml/dist/compose/composer.d.ts b/node_modules/yaml/dist/compose/composer.d.ts new file mode 100644 index 000000000..94c28c704 --- /dev/null +++ b/node_modules/yaml/dist/compose/composer.d.ts @@ -0,0 +1,63 @@ +import { Directives } from '../doc/directives'; +import { Document } from '../doc/Document'; +import type { ErrorCode } from '../errors'; +import { YAMLParseError, YAMLWarning } from '../errors'; +import type { ParsedNode, Range } from '../nodes/Node'; +import type { DocumentOptions, ParseOptions, SchemaOptions } from '../options'; +import type { Token } from '../parse/cst'; +type ErrorSource = number | [number, number] | Range | { + offset: number; + source?: string; +}; +export type ComposeErrorHandler = (source: ErrorSource, code: ErrorCode, message: string, warning?: boolean) => void; +/** + * Compose a stream of CST nodes into a stream of YAML Documents. + * + * ```ts + * import { Composer, Parser } from 'yaml' + * + * const src: string = ... + * const tokens = new Parser().parse(src) + * const docs = new Composer().compose(tokens) + * ``` + */ +export declare class Composer { + private directives; + private doc; + private options; + private atDirectives; + private prelude; + private errors; + private warnings; + constructor(options?: ParseOptions & DocumentOptions & SchemaOptions); + private onError; + private decorate; + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo(): { + comment: string; + directives: Directives; + errors: YAMLParseError[]; + warnings: YAMLWarning[]; + }; + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + compose(tokens: Iterable, forceDoc?: boolean, endOffset?: number): Generator, void, unknown>; + /** Advance the composer by one CST token. */ + next(token: Token): Generator, void, unknown>; + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + end(forceDoc?: boolean, endOffset?: number): Generator, void, unknown>; +} +export {}; diff --git a/node_modules/yaml/dist/compose/composer.js b/node_modules/yaml/dist/compose/composer.js new file mode 100644 index 000000000..f552d69ad --- /dev/null +++ b/node_modules/yaml/dist/compose/composer.js @@ -0,0 +1,224 @@ +'use strict'; + +var node_process = require('process'); +var directives = require('../doc/directives.js'); +var Document = require('../doc/Document.js'); +var errors = require('../errors.js'); +var identity = require('../nodes/identity.js'); +var composeDoc = require('./compose-doc.js'); +var resolveEnd = require('./resolve-end.js'); + +function getErrorPos(src) { + if (typeof src === 'number') + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === 'string' ? source.length : 1)]; +} +function parsePrelude(prelude) { + let comment = ''; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case '#': + comment += + (comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') + + (source.substring(1) || ' '); + atComment = true; + afterEmptyLine = false; + break; + case '%': + if (prelude[i + 1]?.[0] !== '#') + i += 1; + atComment = false; + break; + default: + // This may be wrong after doc-end, but in that case it doesn't matter + if (!atComment) + afterEmptyLine = true; + atComment = false; + } + } + return { comment, afterEmptyLine }; +} +/** + * Compose a stream of CST nodes into a stream of YAML Documents. + * + * ```ts + * import { Composer, Parser } from 'yaml' + * + * const src: string = ... + * const tokens = new Parser().parse(src) + * const docs = new Composer().compose(tokens) + * ``` + */ +class Composer { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new errors.YAMLWarning(pos, code, message)); + else + this.errors.push(new errors.YAMLParseError(pos, code, message)); + }; + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + this.directives = new directives.Directives({ version: options.version || '1.2' }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + //console.log({ dc: doc.comment, prelude, comment }) + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment; + } + else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } + else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it = dc.items[0]; + if (identity.isPair(it)) + it = it.key; + const cb = it.commentBefore; + it.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment}\n${cb}` : comment; + } + } + if (afterDoc) { + for (let i = 0; i < this.errors.length; ++i) + doc.errors.push(this.errors[i]); + for (let i = 0; i < this.warnings.length; ++i) + doc.warnings.push(this.warnings[i]); + } + else { + doc.errors = this.errors; + doc.warnings = this.warnings; + } + this.prelude = []; + this.errors = []; + this.warnings = []; + } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + if (node_process.env.LOG_STREAM) + console.dir(token, { depth: null }); + switch (token.type) { + case 'directive': + this.directives.add(token.source, (offset, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, 'BAD_DIRECTIVE', message, warning); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case 'document': { + const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line'); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; + break; + } + case 'byte-order-mark': + case 'space': + break; + case 'comment': + case 'newline': + this.prelude.push(token.source); + break; + case 'error': { + const msg = token.source + ? `${token.message}: ${JSON.stringify(token.source)}` + : token.message; + const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg); + if (this.atDirectives || !this.doc) + this.errors.push(error); + else + this.doc.errors.push(error); + break; + } + case 'doc-end': { + if (!this.doc) { + const msg = 'Unexpected doc-end without preceding document'; + this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg)); + break; + } + this.doc.directives.docEnd = true; + const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; + } + default: + this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`)); + } + } + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } + else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document.Document(undefined, opts); + if (this.atDirectives) + this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line'); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; + } + } +} + +exports.Composer = Composer; diff --git a/node_modules/yaml/dist/compose/resolve-block-map.d.ts b/node_modules/yaml/dist/compose/resolve-block-map.d.ts new file mode 100644 index 000000000..0e33a1111 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-block-map.d.ts @@ -0,0 +1,6 @@ +import { YAMLMap } from '../nodes/YAMLMap'; +import type { BlockMap } from '../parse/cst'; +import type { CollectionTag } from '../schema/types'; +import type { ComposeContext, ComposeNode } from './compose-node'; +import type { ComposeErrorHandler } from './composer'; +export declare function resolveBlockMap({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bm: BlockMap, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed; diff --git a/node_modules/yaml/dist/compose/resolve-block-map.js b/node_modules/yaml/dist/compose/resolve-block-map.js new file mode 100644 index 000000000..f0d97272f --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-block-map.js @@ -0,0 +1,117 @@ +'use strict'; + +var Pair = require('../nodes/Pair.js'); +var YAMLMap = require('../nodes/YAMLMap.js'); +var resolveProps = require('./resolve-props.js'); +var utilContainsNewline = require('./util-contains-newline.js'); +var utilFlowIndentCheck = require('./util-flow-indent-check.js'); +var utilMapIncludes = require('./util-map-includes.js'); + +const startColMsg = 'All mapping items must start at the same column'; +function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; + const map = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep, value } = collItem; + // key properties + const keyProps = resolveProps.resolveProps(start, { + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + parentIndent: bm.indent, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === 'block-seq') + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key'); + else if ('indent' in key && key.indent !== bm.indent) + onError(offset, 'BAD_INDENT', startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map.comment) + map.comment += '\n' + keyProps.comment; + else + map.comment = keyProps.comment; + } + continue; + } + if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) { + onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line'); + } + } + else if (keyProps.found?.indent !== bm.indent) { + onError(offset, 'BAD_INDENT', startColMsg); + } + // key value + ctx.atKey = true; + const keyStart = keyProps.end; + const keyNode = key + ? composeNode(ctx, key, keyProps, onError) + : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError); + ctx.atKey = false; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + // value properties + const valueProps = resolveProps.resolveProps(sep ?? [], { + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + parentIndent: bm.indent, + startOnNewline: !key || key.type === 'block-scalar' + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === 'block-map' && !valueProps.hasNewline) + onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings'); + if (ctx.options.strict && + keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key'); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : composeEmptyNode(ctx, offset, sep, null, valueProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError); + offset = valueNode.range[2]; + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + else { + // key with no value + if (implicitKey) + onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values'); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + } + if (commentEnd && commentEnd < offset) + onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content'); + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; +} + +exports.resolveBlockMap = resolveBlockMap; diff --git a/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts b/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts new file mode 100644 index 000000000..06346305f --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts @@ -0,0 +1,11 @@ +import type { Range } from '../nodes/Node'; +import { Scalar } from '../nodes/Scalar'; +import type { BlockScalar } from '../parse/cst'; +import type { ComposeContext } from './compose-node'; +import type { ComposeErrorHandler } from './composer'; +export declare function resolveBlockScalar(ctx: ComposeContext, scalar: BlockScalar, onError: ComposeErrorHandler): { + value: string; + type: Scalar.BLOCK_FOLDED | Scalar.BLOCK_LITERAL | null; + comment: string; + range: Range; +}; diff --git a/node_modules/yaml/dist/compose/resolve-block-scalar.js b/node_modules/yaml/dist/compose/resolve-block-scalar.js new file mode 100644 index 000000000..97eaf2b59 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-block-scalar.js @@ -0,0 +1,200 @@ +'use strict'; + +var Scalar = require('../nodes/Scalar.js'); + +function resolveBlockScalar(ctx, scalar, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); + if (!header) + return { value: '', type: null, comment: '', range: [start, start, start] }; + const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + // determine the end of content & start of chomping + let chompStart = lines.length; + for (let i = lines.length - 1; i >= 0; --i) { + const content = lines[i][1]; + if (content === '' || content === '\r') + chompStart = i; + else + break; + } + // shortcut for empty contents + if (chompStart === 0) { + const value = header.chomp === '+' && lines.length > 0 + ? '\n'.repeat(Math.max(1, lines.length - 1)) + : ''; + let end = start + header.length; + if (scalar.source) + end += scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; + } + // find the indentation level to trim from start + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent, content] = lines[i]; + if (content === '' || content === '\r') { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; + } + else { + if (indent.length < trimIndent) { + const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator'; + onError(offset + indent.length, 'MISSING_CHAR', message); + } + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i; + if (trimIndent === 0 && !ctx.atRoot) { + const message = 'Block scalar values in collections must be indented'; + onError(offset, 'BAD_INDENT', message); + } + break; + } + offset += indent.length + content.length + 1; + } + // include trailing more-indented empty lines in content + for (let i = lines.length - 1; i >= chompStart; --i) { + if (lines[i][0].length > trimIndent) + chompStart = i + 1; + } + let value = ''; + let sep = ''; + let prevMoreIndented = false; + // leading whitespace is kept intact + for (let i = 0; i < contentStart; ++i) + value += lines[i][0].slice(trimIndent) + '\n'; + for (let i = contentStart; i < chompStart; ++i) { + let [indent, content] = lines[i]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === '\r'; + if (crlf) + content = content.slice(0, -1); + /* istanbul ignore if already caught in lexer */ + if (content && indent.length < trimIndent) { + const src = header.indent + ? 'explicit indentation indicator' + : 'first line'; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message); + indent = ''; + } + if (type === Scalar.Scalar.BLOCK_LITERAL) { + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + } + else if (indent.length > trimIndent || content[0] === '\t') { + // more-indented content within a folded block + if (sep === ' ') + sep = '\n'; + else if (!prevMoreIndented && sep === '\n') + sep = '\n\n'; + value += sep + indent.slice(trimIndent) + content; + sep = '\n'; + prevMoreIndented = true; + } + else if (content === '') { + // empty line + if (sep === '\n') + value += '\n'; + else + sep = '\n'; + } + else { + value += sep + content; + sep = ' '; + prevMoreIndented = false; + } + } + switch (header.chomp) { + case '-': + break; + case '+': + for (let i = chompStart; i < lines.length; ++i) + value += '\n' + lines[i][0].slice(trimIndent); + if (value[value.length - 1] !== '\n') + value += '\n'; + break; + default: + value += '\n'; + } + const end = start + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; +} +function parseBlockScalarHeader({ offset, props }, strict, onError) { + /* istanbul ignore if should not happen */ + if (props[0].type !== 'block-scalar-header') { + onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found'); + return null; + } + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ''; + let error = -1; + for (let i = 1; i < source.length; ++i) { + const ch = source[i]; + if (!chomp && (ch === '-' || ch === '+')) + chomp = ch; + else { + const n = Number(ch); + if (!indent && n) + indent = n; + else if (error === -1) + error = offset + i; + } + } + if (error !== -1) + onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ''; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case 'space': + hasSpace = true; + // fallthrough + case 'newline': + length += token.source.length; + break; + case 'comment': + if (strict && !hasSpace) { + const message = 'Comments must be separated from other tokens by white space characters'; + onError(token, 'MISSING_CHAR', message); + } + length += token.source.length; + comment = token.source.substring(1); + break; + case 'error': + onError(token, 'UNEXPECTED_TOKEN', token.message); + length += token.source.length; + break; + /* istanbul ignore next should not happen */ + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, 'UNEXPECTED_TOKEN', message); + const ts = token.source; + if (ts && typeof ts === 'string') + length += ts.length; + } + } + } + return { mode, indent, chomp, comment, length }; +} +/** @returns Array of lines split up as `[indent, content]` */ +function splitLines(source) { + const split = source.split(/\n( *)/); + const first = split[0]; + const m = first.match(/^( *)/); + const line0 = m?.[1] + ? [m[1], first.slice(m[1].length)] + : ['', first]; + const lines = [line0]; + for (let i = 1; i < split.length; i += 2) + lines.push([split[i], split[i + 1]]); + return lines; +} + +exports.resolveBlockScalar = resolveBlockScalar; diff --git a/node_modules/yaml/dist/compose/resolve-block-seq.d.ts b/node_modules/yaml/dist/compose/resolve-block-seq.d.ts new file mode 100644 index 000000000..38d539996 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-block-seq.d.ts @@ -0,0 +1,6 @@ +import { YAMLSeq } from '../nodes/YAMLSeq'; +import type { BlockSequence } from '../parse/cst'; +import type { CollectionTag } from '../schema/types'; +import type { ComposeContext, ComposeNode } from './compose-node'; +import type { ComposeErrorHandler } from './composer'; +export declare function resolveBlockSeq({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bs: BlockSequence, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLSeq.Parsed; diff --git a/node_modules/yaml/dist/compose/resolve-block-seq.js b/node_modules/yaml/dist/compose/resolve-block-seq.js new file mode 100644 index 000000000..9c834fc4e --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-block-seq.js @@ -0,0 +1,51 @@ +'use strict'; + +var YAMLSeq = require('../nodes/YAMLSeq.js'); +var resolveProps = require('./resolve-props.js'); +var utilFlowIndentCheck = require('./util-flow-indent-check.js'); + +function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; + const seq = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value } of bs.items) { + const props = resolveProps.resolveProps(start, { + indicator: 'seq-item-ind', + next: value, + offset, + onError, + parentIndent: bs.indent, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value?.type === 'block-seq') + onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column'); + else + onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator'); + } + else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } + } + const node = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError); + offset = node.range[2]; + seq.items.push(node); + } + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; +} + +exports.resolveBlockSeq = resolveBlockSeq; diff --git a/node_modules/yaml/dist/compose/resolve-end.d.ts b/node_modules/yaml/dist/compose/resolve-end.d.ts new file mode 100644 index 000000000..c9d27c214 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-end.d.ts @@ -0,0 +1,6 @@ +import type { SourceToken } from '../parse/cst'; +import type { ComposeErrorHandler } from './composer'; +export declare function resolveEnd(end: SourceToken[] | undefined, offset: number, reqSpace: boolean, onError: ComposeErrorHandler): { + comment: string; + offset: number; +}; diff --git a/node_modules/yaml/dist/compose/resolve-end.js b/node_modules/yaml/dist/compose/resolve-end.js new file mode 100644 index 000000000..3a583477a --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-end.js @@ -0,0 +1,39 @@ +'use strict'; + +function resolveEnd(end, offset, reqSpace, onError) { + let comment = ''; + if (end) { + let hasSpace = false; + let sep = ''; + for (const token of end) { + const { source, type } = token; + switch (type) { + case 'space': + hasSpace = true; + break; + case 'comment': { + if (reqSpace && !hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += sep + cb; + sep = ''; + break; + } + case 'newline': + if (comment) + sep += source; + hasSpace = true; + break; + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`); + } + offset += source.length; + } + } + return { comment, offset }; +} + +exports.resolveEnd = resolveEnd; diff --git a/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts b/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts new file mode 100644 index 000000000..86ffd0931 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts @@ -0,0 +1,7 @@ +import { YAMLMap } from '../nodes/YAMLMap'; +import { YAMLSeq } from '../nodes/YAMLSeq'; +import type { FlowCollection } from '../parse/cst'; +import type { CollectionTag } from '../schema/types'; +import type { ComposeContext, ComposeNode } from './compose-node'; +import type { ComposeErrorHandler } from './composer'; +export declare function resolveFlowCollection({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, fc: FlowCollection, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed | YAMLSeq.Parsed; diff --git a/node_modules/yaml/dist/compose/resolve-flow-collection.js b/node_modules/yaml/dist/compose/resolve-flow-collection.js new file mode 100644 index 000000000..960ad31fa --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-flow-collection.js @@ -0,0 +1,209 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Pair = require('../nodes/Pair.js'); +var YAMLMap = require('../nodes/YAMLMap.js'); +var YAMLSeq = require('../nodes/YAMLSeq.js'); +var resolveEnd = require('./resolve-end.js'); +var resolveProps = require('./resolve-props.js'); +var utilContainsNewline = require('./util-contains-newline.js'); +var utilMapIncludes = require('./util-map-includes.js'); + +const blockMsg = 'Block collections are not allowed within flow collections'; +const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq'); +function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) { + const isMap = fc.start.source === '{'; + const fcName = isMap ? 'flow map' : 'flow sequence'; + const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq)); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; + let offset = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start, key, sep, value } = collItem; + const props = resolveProps.resolveProps(start, { + flow: fcName, + indicator: 'explicit-key-ind', + next: key ?? sep?.[0], + offset, + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep && !value) { + if (i === 0 && props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + else if (i < fc.items.length - 1) + onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += '\n' + props.comment; + else + coll.comment = props.comment; + } + offset = props.end; + continue; + } + if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key)) + onError(key, // checked by containsNewline() + 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + } + if (i === 0) { + if (props.comma) + onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`); + } + else { + if (!props.comma) + onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ''; + loop: for (const st of start) { + switch (st.type) { + case 'comma': + case 'space': + break; + case 'comment': + prevItemComment = st.source.substring(1); + break loop; + default: + break loop; + } + } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (identity.isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += '\n' + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); + } + } + } + if (!isMap && !sep && !props.found) { + // item is a value in a seq + // → key & sep are empty, start does not include ? or : + const valueNode = value + ? composeNode(ctx, value, props, onError) + : composeEmptyNode(ctx, props.end, sep, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else { + // item is a key+value pair + // key value + ctx.atKey = true; + const keyStart = props.end; + const keyNode = key + ? composeNode(ctx, key, props, onError) + : composeEmptyNode(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg); + ctx.atKey = false; + // value properties + const valueProps = resolveProps.resolveProps(sep ?? [], { + flow: fcName, + indicator: 'map-value-ind', + next: value, + offset: keyNode.range[2], + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap && !props.found && ctx.options.strict) { + if (sep) + for (const st of sep) { + if (st === valueProps.found) + break; + if (st.type === 'newline') { + onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line'); + break; + } + } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key'); + } + } + else if (value) { + if ('source' in value && value.source?.[0] === ':') + onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`); + else + onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`); + } + // value value + const valueNode = value + ? composeNode(ctx, value, valueProps, onError) + : valueProps.found + ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) + : null; + if (valueNode) { + if (isBlock(value)) + onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg); + } + else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += '\n' + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap) { + const map = coll; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); + map.items.push(pair); + } + else { + const map = new YAMLMap.YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); + const endRange = (valueNode ?? keyNode).range; + map.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map); + } + offset = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap ? '}' : ']'; + const [ce, ...ee] = fc.end; + let cePos = offset; + if (ce?.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot + ? `${name} must end with a ${expectedEnd}` + : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg); + if (ce && ce.source.length !== 1) + ee.unshift(ce); + } + if (ee.length > 0) { + const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += '\n' + end.comment; + else + coll.comment = end.comment; + } + coll.range = [fc.offset, cePos, end.offset]; + } + else { + coll.range = [fc.offset, cePos, cePos]; + } + return coll; +} + +exports.resolveFlowCollection = resolveFlowCollection; diff --git a/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts b/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts new file mode 100644 index 000000000..ee24cd7f2 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts @@ -0,0 +1,10 @@ +import type { Range } from '../nodes/Node'; +import { Scalar } from '../nodes/Scalar'; +import type { FlowScalar } from '../parse/cst'; +import type { ComposeErrorHandler } from './composer'; +export declare function resolveFlowScalar(scalar: FlowScalar, strict: boolean, onError: ComposeErrorHandler): { + value: string; + type: Scalar.PLAIN | Scalar.QUOTE_DOUBLE | Scalar.QUOTE_SINGLE | null; + comment: string; + range: Range; +}; diff --git a/node_modules/yaml/dist/compose/resolve-flow-scalar.js b/node_modules/yaml/dist/compose/resolve-flow-scalar.js new file mode 100644 index 000000000..be1262a11 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-flow-scalar.js @@ -0,0 +1,228 @@ +'use strict'; + +var Scalar = require('../nodes/Scalar.js'); +var resolveEnd = require('./resolve-end.js'); + +function resolveFlowScalar(scalar, strict, onError) { + const { offset, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type) { + case 'scalar': + _type = Scalar.Scalar.PLAIN; + value = plainValue(source, _onError); + break; + case 'single-quoted-scalar': + _type = Scalar.Scalar.QUOTE_SINGLE; + value = singleQuotedValue(source, _onError); + break; + case 'double-quoted-scalar': + _type = Scalar.Scalar.QUOTE_DOUBLE; + value = doubleQuotedValue(source, _onError); + break; + /* istanbul ignore next should not happen */ + default: + onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`); + return { + value: '', + type: null, + comment: '', + range: [offset, offset + source.length, offset + source.length] + }; + } + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re.comment, + range: [offset, valueEnd, re.offset] + }; +} +function plainValue(source, onError) { + let badChar = ''; + switch (source[0]) { + /* istanbul ignore next should not happen */ + case '\t': + badChar = 'a tab character'; + break; + case ',': + badChar = 'flow indicator character ,'; + break; + case '%': + badChar = 'directive indicator character %'; + break; + case '|': + case '>': { + badChar = `block scalar indicator ${source[0]}`; + break; + } + case '@': + case '`': { + badChar = `reserved character ${source[0]}`; + break; + } + } + if (badChar) + onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`); + return unfoldLines(source); +} +function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, 'MISSING_CHAR', "Missing closing 'quote"); + return unfoldLines(source.slice(1, -1)).replace(/''/g, "'"); +} +function unfoldLines(source) { + const line = /(.*?)\r?\n/sy; + let match = line.exec(source); + if (!match) + return source; + /** + * The negative lookbehinds in these RegExps are to + * prevent causing a polynomial search time in certain cases. + * + * The try-catch is for Safari < 16.4 and other old browsers: + * https://caniuse.com/js-regexp-lookbehind + */ + let trimEnd, trimBoth; + try { + trimEnd = new RegExp('(? wsStart ? source.slice(wsStart, i + 1) : ch; + } + else { + res += ch; + } + } + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, 'MISSING_CHAR', 'Missing closing "quote'); + return res; +} +/** + * Fold a single newline into a space, multiple newlines to N - 1 newlines. + * Presumes `source[offset] === '\n'` + */ +function foldNewline(source, offset) { + let fold = ''; + let ch = source[offset + 1]; + while (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') { + if (ch === '\r' && source[offset + 2] !== '\n') + break; + if (ch === '\n') + fold += '\n'; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = ' '; + return { fold, offset }; +} +const escapeCodes = { + '0': '\0', // null character + a: '\x07', // bell character + b: '\b', // backspace + e: '\x1b', // escape character + f: '\f', // form feed + n: '\n', // line feed + r: '\r', // carriage return + t: '\t', // horizontal tab + v: '\v', // vertical tab + N: '\u0085', // Unicode next line + _: '\u00a0', // Unicode non-breaking space + L: '\u2028', // Unicode line separator + P: '\u2029', // Unicode paragraph separator + ' ': ' ', + '"': '"', + '/': '/', + '\\': '\\', + '\t': '\t' +}; +function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + try { + return String.fromCodePoint(code); + } + catch { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`); + return raw; + } +} + +exports.resolveFlowScalar = resolveFlowScalar; diff --git a/node_modules/yaml/dist/compose/resolve-props.d.ts b/node_modules/yaml/dist/compose/resolve-props.d.ts new file mode 100644 index 000000000..d9ee38196 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-props.d.ts @@ -0,0 +1,23 @@ +import type { SourceToken, Token } from '../parse/cst'; +import type { ComposeErrorHandler } from './composer'; +export interface ResolvePropsArg { + flow?: 'flow map' | 'flow sequence'; + indicator: 'doc-start' | 'explicit-key-ind' | 'map-value-ind' | 'seq-item-ind'; + next: Token | null | undefined; + offset: number; + onError: ComposeErrorHandler; + parentIndent: number; + startOnNewline: boolean; +} +export declare function resolveProps(tokens: SourceToken[], { flow, indicator, next, offset, onError, parentIndent, startOnNewline }: ResolvePropsArg): { + comma: SourceToken | null; + found: SourceToken | null; + spaceBefore: boolean; + comment: string; + hasNewline: boolean; + anchor: SourceToken | null; + tag: SourceToken | null; + newlineAfterProp: SourceToken | null; + end: number; + start: number; +}; diff --git a/node_modules/yaml/dist/compose/resolve-props.js b/node_modules/yaml/dist/compose/resolve-props.js new file mode 100644 index 000000000..a3598c892 --- /dev/null +++ b/node_modules/yaml/dist/compose/resolve-props.js @@ -0,0 +1,148 @@ +'use strict'; + +function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ''; + let commentSep = ''; + let hasNewline = false; + let reqSpace = false; + let tab = null; + let anchor = null; + let tag = null; + let newlineAfterProp = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== 'space' && + token.type !== 'newline' && + token.type !== 'comma') + onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + reqSpace = false; + } + if (tab) { + if (atNewline && token.type !== 'comment' && token.type !== 'newline') { + onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + } + tab = null; + } + switch (token.type) { + case 'space': + // At the doc level, tabs at line start may be parsed + // as leading white space rather than indentation. + // In a flow collection, only the parser handles indent. + if (!flow && + (indicator !== 'doc-start' || next?.type !== 'flow-collection') && + token.source.includes('\t')) { + tab = token; + } + hasSpace = true; + break; + case 'comment': { + if (!hasSpace) + onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); + const cb = token.source.substring(1) || ' '; + if (!comment) + comment = cb; + else + comment += commentSep + cb; + commentSep = ''; + atNewline = false; + break; + } + case 'newline': + if (atNewline) { + if (comment) + comment += token.source; + else if (!found || indicator !== 'seq-item-ind') + spaceBefore = true; + } + else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + newlineAfterProp = token; + hasSpace = true; + break; + case 'anchor': + if (anchor) + onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor'); + if (token.source.endsWith(':')) + onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true); + anchor = token; + start ?? (start = token.offset); + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case 'tag': { + if (tag) + onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag'); + tag = token; + start ?? (start = token.offset); + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + } + case indicator: + // Could here handle preceding comments differently + if (anchor || tag) + onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`); + found = token; + atNewline = + indicator === 'seq-item-ind' || indicator === 'explicit-key-ind'; + hasSpace = false; + break; + case 'comma': + if (flow) { + if (comma) + onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + // else fallthrough + default: + onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; + } + } + const last = tokens[tokens.length - 1]; + const end = last ? last.offset + last.source.length : offset; + if (reqSpace && + next && + next.type !== 'space' && + next.type !== 'newline' && + next.type !== 'comma' && + (next.type !== 'scalar' || next.source !== '')) { + onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + } + if (tab && + ((atNewline && tab.indent <= parentIndent) || + next?.type === 'block-map' || + next?.type === 'block-seq')) + onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + anchor, + tag, + newlineAfterProp, + end, + start: start ?? end + }; +} + +exports.resolveProps = resolveProps; diff --git a/node_modules/yaml/dist/compose/util-contains-newline.d.ts b/node_modules/yaml/dist/compose/util-contains-newline.d.ts new file mode 100644 index 000000000..ca3df4846 --- /dev/null +++ b/node_modules/yaml/dist/compose/util-contains-newline.d.ts @@ -0,0 +1,2 @@ +import type { Token } from '../parse/cst'; +export declare function containsNewline(key: Token | null | undefined): boolean | null; diff --git a/node_modules/yaml/dist/compose/util-contains-newline.js b/node_modules/yaml/dist/compose/util-contains-newline.js new file mode 100644 index 000000000..e7aa82d87 --- /dev/null +++ b/node_modules/yaml/dist/compose/util-contains-newline.js @@ -0,0 +1,36 @@ +'use strict'; + +function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case 'alias': + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + if (key.source.includes('\n')) + return true; + if (key.end) + for (const st of key.end) + if (st.type === 'newline') + return true; + return false; + case 'flow-collection': + for (const it of key.items) { + for (const st of it.start) + if (st.type === 'newline') + return true; + if (it.sep) + for (const st of it.sep) + if (st.type === 'newline') + return true; + if (containsNewline(it.key) || containsNewline(it.value)) + return true; + } + return false; + default: + return true; + } +} + +exports.containsNewline = containsNewline; diff --git a/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts b/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts new file mode 100644 index 000000000..a555fe382 --- /dev/null +++ b/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts @@ -0,0 +1,2 @@ +import type { Token } from '../parse/cst'; +export declare function emptyScalarPosition(offset: number, before: Token[] | undefined, pos: number | null): number; diff --git a/node_modules/yaml/dist/compose/util-empty-scalar-position.js b/node_modules/yaml/dist/compose/util-empty-scalar-position.js new file mode 100644 index 000000000..50fedb179 --- /dev/null +++ b/node_modules/yaml/dist/compose/util-empty-scalar-position.js @@ -0,0 +1,28 @@ +'use strict'; + +function emptyScalarPosition(offset, before, pos) { + if (before) { + pos ?? (pos = before.length); + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case 'space': + case 'comment': + case 'newline': + offset -= st.source.length; + continue; + } + // Technically, an empty scalar is immediately after the last non-empty + // node, but it's more useful to place it after any whitespace. + st = before[++i]; + while (st?.type === 'space') { + offset += st.source.length; + st = before[++i]; + } + break; + } + } + return offset; +} + +exports.emptyScalarPosition = emptyScalarPosition; diff --git a/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts b/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts new file mode 100644 index 000000000..7186397bc --- /dev/null +++ b/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts @@ -0,0 +1,3 @@ +import type { Token } from '../parse/cst'; +import type { ComposeErrorHandler } from './composer'; +export declare function flowIndentCheck(indent: number, fc: Token | null | undefined, onError: ComposeErrorHandler): void; diff --git a/node_modules/yaml/dist/compose/util-flow-indent-check.js b/node_modules/yaml/dist/compose/util-flow-indent-check.js new file mode 100644 index 000000000..1e6b06f8e --- /dev/null +++ b/node_modules/yaml/dist/compose/util-flow-indent-check.js @@ -0,0 +1,17 @@ +'use strict'; + +var utilContainsNewline = require('./util-contains-newline.js'); + +function flowIndentCheck(indent, fc, onError) { + if (fc?.type === 'flow-collection') { + const end = fc.end[0]; + if (end.indent === indent && + (end.source === ']' || end.source === '}') && + utilContainsNewline.containsNewline(fc)) { + const msg = 'Flow end indicator should be more indented than parent'; + onError(end, 'BAD_INDENT', msg, true); + } + } +} + +exports.flowIndentCheck = flowIndentCheck; diff --git a/node_modules/yaml/dist/compose/util-map-includes.d.ts b/node_modules/yaml/dist/compose/util-map-includes.d.ts new file mode 100644 index 000000000..838b6bc7d --- /dev/null +++ b/node_modules/yaml/dist/compose/util-map-includes.d.ts @@ -0,0 +1,4 @@ +import type { ParsedNode } from '../nodes/Node'; +import type { Pair } from '../nodes/Pair'; +import type { ComposeContext } from './compose-node'; +export declare function mapIncludes(ctx: ComposeContext, items: Pair[], search: ParsedNode): boolean; diff --git a/node_modules/yaml/dist/compose/util-map-includes.js b/node_modules/yaml/dist/compose/util-map-includes.js new file mode 100644 index 000000000..ebd7a2daa --- /dev/null +++ b/node_modules/yaml/dist/compose/util-map-includes.js @@ -0,0 +1,15 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); + +function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual = typeof uniqueKeys === 'function' + ? uniqueKeys + : (a, b) => a === b || (identity.isScalar(a) && identity.isScalar(b) && a.value === b.value); + return items.some(pair => isEqual(pair.key, search)); +} + +exports.mapIncludes = mapIncludes; diff --git a/node_modules/yaml/dist/doc/Document.d.ts b/node_modules/yaml/dist/doc/Document.d.ts new file mode 100644 index 000000000..7cfd686a4 --- /dev/null +++ b/node_modules/yaml/dist/doc/Document.d.ts @@ -0,0 +1,141 @@ +import type { YAMLError, YAMLWarning } from '../errors'; +import { Alias } from '../nodes/Alias'; +import { NODE_TYPE } from '../nodes/identity'; +import type { Node, NodeType, ParsedNode, Range } from '../nodes/Node'; +import { Pair } from '../nodes/Pair'; +import type { Scalar } from '../nodes/Scalar'; +import type { YAMLMap } from '../nodes/YAMLMap'; +import type { YAMLSeq } from '../nodes/YAMLSeq'; +import type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from '../options'; +import { Schema } from '../schema/Schema'; +import { Directives } from './directives'; +export type Replacer = any[] | ((key: any, value: any) => unknown); +export declare namespace Document { + /** @ts-ignore The typing of directives fails in TS <= 4.2 */ + interface Parsed extends Document { + directives: Directives; + range: Range; + } +} +export declare class Document { + readonly [NODE_TYPE]: symbol; + /** A comment before this Document */ + commentBefore: string | null; + /** A comment immediately after this Document */ + comment: string | null; + /** The document contents. */ + contents: Strict extends true ? Contents | null : Contents; + directives: Strict extends true ? Directives | undefined : Directives; + /** Errors encountered during parsing. */ + errors: YAMLError[]; + options: Required>; + /** + * The `[start, value-end, node-end]` character offsets for the part of the + * source parsed into this document (undefined if not parsed). The `value-end` + * and `node-end` positions are themselves not included in their respective + * ranges. + */ + range?: Range; + /** The schema used with the document. Use `setSchema()` to change. */ + schema: Schema; + /** Warnings encountered during parsing. */ + warnings: YAMLWarning[]; + /** + * @param value - The initial value for the document, which will be wrapped + * in a Node container. + */ + constructor(value?: any, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions); + constructor(value: any, replacer: null | Replacer, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions); + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone(): Document; + /** Adds a value to the document. */ + add(value: any): void; + /** Adds a value to the document. */ + addIn(path: Iterable, value: unknown): void; + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node: Strict extends true ? Scalar | YAMLMap | YAMLSeq : Node, name?: string): Alias; + /** + * Convert any value into a `Node` using the current schema, recursively + * turning objects into collections. + */ + createNode(value: T, options?: CreateNodeOptions): NodeType; + createNode(value: T, replacer: Replacer | CreateNodeOptions | null, options?: CreateNodeOptions): NodeType; + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key: unknown, value: unknown, options?: CreateNodeOptions): Pair; + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key: unknown): boolean; + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path: Iterable | null): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key: unknown, keepScalar?: boolean): Strict extends true ? unknown : any; + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path: Iterable | null, keepScalar?: boolean): Strict extends true ? unknown : any; + /** + * Checks if the document includes a value with the key `key`. + */ + has(key: unknown): boolean; + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path: Iterable | null): boolean; + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key: any, value: unknown): void; + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path: Iterable | null, value: unknown): void; + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version: '1.1' | '1.2' | 'next' | null, options?: SchemaOptions): void; + /** A plain JavaScript representation of the document `contents`. */ + toJS(opt?: ToJSOptions & { + [ignored: string]: unknown; + }): any; + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg?: string | null, onAnchor?: ToJSOptions['onAnchor']): any; + /** A YAML representation of the document. */ + toString(options?: ToStringOptions): string; +} diff --git a/node_modules/yaml/dist/doc/Document.js b/node_modules/yaml/dist/doc/Document.js new file mode 100644 index 000000000..a95308835 --- /dev/null +++ b/node_modules/yaml/dist/doc/Document.js @@ -0,0 +1,337 @@ +'use strict'; + +var Alias = require('../nodes/Alias.js'); +var Collection = require('../nodes/Collection.js'); +var identity = require('../nodes/identity.js'); +var Pair = require('../nodes/Pair.js'); +var toJS = require('../nodes/toJS.js'); +var Schema = require('../schema/Schema.js'); +var stringifyDocument = require('../stringify/stringifyDocument.js'); +var anchors = require('./anchors.js'); +var applyReviver = require('./applyReviver.js'); +var createNode = require('./createNode.js'); +var directives = require('./directives.js'); + +class Document { + constructor(value, replacer, options) { + /** A comment before this Document */ + this.commentBefore = null; + /** A comment immediately after this Document */ + this.comment = null; + /** Errors encountered during parsing. */ + this.errors = []; + /** Warnings encountered during parsing. */ + this.warnings = []; + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC }); + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: 'warn', + prettyErrors: true, + strict: true, + stringKeys: false, + uniqueKeys: true, + version: '1.2' + }, options); + this.options = opt; + let { version } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version = this.directives.yaml.version; + } + else + this.directives = new directives.Directives({ version }); + this.setSchema(version, options); + // @ts-expect-error We can't really know that this matches Contents. + this.contents = + value === undefined ? null : this.createNode(value, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy = Object.create(Document.prototype, { + [identity.NODE_TYPE]: { value: identity.DOC } + }); + copy.commentBefore = this.commentBefore; + copy.comment = this.comment; + copy.errors = this.errors.slice(); + copy.warnings = this.warnings.slice(); + copy.options = Object.assign({}, this.options); + if (this.directives) + copy.directives = this.directives.clone(); + copy.schema = this.schema.clone(); + // @ts-expect-error We can't really know that this matches Contents. + copy.contents = identity.isNode(this.contents) + ? this.contents.clone(copy.schema) + : this.contents; + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** Adds a value to the document. */ + add(value) { + if (assertCollection(this.contents)) + this.contents.add(value); + } + /** Adds a value to the document. */ + addIn(path, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path, value); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name) { + if (!node.anchor) { + const prev = anchors.anchorNames(this); + node.anchor = + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name; + } + return new Alias.Alias(node.anchor); + } + createNode(value, replacer, options) { + let _replacer = undefined; + if (typeof replacer === 'function') { + value = replacer.call({ '': value }, '', value); + _replacer = replacer; + } + else if (Array.isArray(replacer)) { + const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + replacer = undefined; + } + const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || 'a'); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode.createNode(value, tag, ctx); + if (flow && identity.isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value, options = {}) { + const k = this.createNode(key, null, options); + const v = this.createNode(value, null, options); + return new Pair.Pair(k, v); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + if (Collection.isEmptyPath(path)) { + if (this.contents == null) + return false; + // @ts-expect-error Presumed impossible if Strict extends false + this.contents = null; + return true; + } + return assertCollection(this.contents) + ? this.contents.deleteIn(path) + : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return identity.isCollection(this.contents) + ? this.contents.get(key, keepScalar) + : undefined; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + if (Collection.isEmptyPath(path)) + return !keepScalar && identity.isScalar(this.contents) + ? this.contents.value + : this.contents; + return identity.isCollection(this.contents) + ? this.contents.getIn(path, keepScalar) + : undefined; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return identity.isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path) { + if (Collection.isEmptyPath(path)) + return this.contents !== undefined; + return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value) { + if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = Collection.collectionFromPath(this.schema, [key], value); + } + else if (assertCollection(this.contents)) { + this.contents.set(key, value); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + if (Collection.isEmptyPath(path)) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = value; + } + else if (this.contents == null) { + // @ts-expect-error We can't really know that this matches Contents. + this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value); + } + else if (assertCollection(this.contents)) { + this.contents.setIn(path, value); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version, options = {}) { + if (typeof version === 'number') + version = String(version); + let opt; + switch (version) { + case '1.1': + if (this.directives) + this.directives.yaml.version = '1.1'; + else + this.directives = new directives.Directives({ version: '1.1' }); + opt = { resolveKnownTags: false, schema: 'yaml-1.1' }; + break; + case '1.2': + case 'next': + if (this.directives) + this.directives.yaml.version = version; + else + this.directives = new directives.Directives({ version }); + opt = { resolveKnownTags: true, schema: 'core' }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + // Not using `instanceof Schema` to allow for duck typing + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema.Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: new Map(), + doc: this, + keep: !json, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS.toJS(this.contents, jsonArg ?? '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver.applyReviver(reviver, { '': res }, '', res) + : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error('Document with errors cannot be stringified'); + if ('indent' in options && + (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument.stringifyDocument(this, options); + } +} +function assertCollection(contents) { + if (identity.isCollection(contents)) + return true; + throw new Error('Expected a YAML collection as document contents'); +} + +exports.Document = Document; diff --git a/node_modules/yaml/dist/doc/anchors.d.ts b/node_modules/yaml/dist/doc/anchors.d.ts new file mode 100644 index 000000000..feea5e4bc --- /dev/null +++ b/node_modules/yaml/dist/doc/anchors.d.ts @@ -0,0 +1,24 @@ +import type { Node } from '../nodes/Node'; +import type { Document } from './Document'; +/** + * Verify that the input string is a valid anchor. + * + * Will throw on errors. + */ +export declare function anchorIsValid(anchor: string): true; +export declare function anchorNames(root: Document | Node): Set; +/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ +export declare function findNewAnchor(prefix: string, exclude: Set): string; +export declare function createNodeAnchors(doc: Document, prefix: string): { + onAnchor: (source: unknown) => string; + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => void; + sourceObjects: Map; +}; diff --git a/node_modules/yaml/dist/doc/anchors.js b/node_modules/yaml/dist/doc/anchors.js new file mode 100644 index 000000000..68613fa72 --- /dev/null +++ b/node_modules/yaml/dist/doc/anchors.js @@ -0,0 +1,76 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var visit = require('../visit.js'); + +/** + * Verify that the input string is a valid anchor. + * + * Will throw on errors. + */ +function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); + } + return true; +} +function anchorNames(root) { + const anchors = new Set(); + visit.visit(root, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); + } + }); + return anchors; +} +/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ +function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!exclude.has(name)) + return name; + } +} +function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + prevAnchors ?? (prevAnchors = anchorNames(doc)); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === 'object' && + ref.anchor && + (identity.isScalar(ref.node) || identity.isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } + else { + const error = new Error('Failed to resolve repeated object (this should not happen)'); + error.source = source; + throw error; + } + } + }, + sourceObjects + }; +} + +exports.anchorIsValid = anchorIsValid; +exports.anchorNames = anchorNames; +exports.createNodeAnchors = createNodeAnchors; +exports.findNewAnchor = findNewAnchor; diff --git a/node_modules/yaml/dist/doc/applyReviver.d.ts b/node_modules/yaml/dist/doc/applyReviver.d.ts new file mode 100644 index 000000000..e125b0870 --- /dev/null +++ b/node_modules/yaml/dist/doc/applyReviver.d.ts @@ -0,0 +1,9 @@ +export type Reviver = (key: unknown, value: unknown) => unknown; +/** + * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, + * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the + * 2021 edition: https://tc39.es/ecma262/#sec-json.parse + * + * Includes extensions for handling Map and Set objects. + */ +export declare function applyReviver(reviver: Reviver, obj: unknown, key: unknown, val: any): unknown; diff --git a/node_modules/yaml/dist/doc/applyReviver.js b/node_modules/yaml/dist/doc/applyReviver.js new file mode 100644 index 000000000..bfd0ba860 --- /dev/null +++ b/node_modules/yaml/dist/doc/applyReviver.js @@ -0,0 +1,57 @@ +'use strict'; + +/** + * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, + * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the + * 2021 edition: https://tc39.es/ecma262/#sec-json.parse + * + * Includes extensions for handling Map and Set objects. + */ +function applyReviver(reviver, obj, key, val) { + if (val && typeof val === 'object') { + if (Array.isArray(val)) { + for (let i = 0, len = val.length; i < len; ++i) { + const v0 = val[i]; + const v1 = applyReviver(reviver, val, String(i), v0); + // eslint-disable-next-line @typescript-eslint/no-array-delete + if (v1 === undefined) + delete val[i]; + else if (v1 !== v0) + val[i] = v1; + } + } + else if (val instanceof Map) { + for (const k of Array.from(val.keys())) { + const v0 = val.get(k); + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + val.delete(k); + else if (v1 !== v0) + val.set(k, v1); + } + } + else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v1 = applyReviver(reviver, val, v0, v0); + if (v1 === undefined) + val.delete(v0); + else if (v1 !== v0) { + val.delete(v0); + val.add(v1); + } + } + } + else { + for (const [k, v0] of Object.entries(val)) { + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === undefined) + delete val[k]; + else if (v1 !== v0) + val[k] = v1; + } + } + } + return reviver.call(obj, key, val); +} + +exports.applyReviver = applyReviver; diff --git a/node_modules/yaml/dist/doc/createNode.d.ts b/node_modules/yaml/dist/doc/createNode.d.ts new file mode 100644 index 000000000..1488ff6e7 --- /dev/null +++ b/node_modules/yaml/dist/doc/createNode.d.ts @@ -0,0 +1,17 @@ +import type { Node } from '../nodes/Node'; +import type { Schema } from '../schema/Schema'; +import type { CollectionTag, ScalarTag } from '../schema/types'; +import type { Replacer } from './Document'; +export interface CreateNodeContext { + aliasDuplicateObjects: boolean; + keepUndefined: boolean; + onAnchor: (source: unknown) => string; + onTagObj?: (tagObj: ScalarTag | CollectionTag) => void; + sourceObjects: Map; + replacer?: Replacer; + schema: Schema; +} +export declare function createNode(value: unknown, tagName: string | undefined, ctx: CreateNodeContext): Node; diff --git a/node_modules/yaml/dist/doc/createNode.js b/node_modules/yaml/dist/doc/createNode.js new file mode 100644 index 000000000..53522c6b1 --- /dev/null +++ b/node_modules/yaml/dist/doc/createNode.js @@ -0,0 +1,90 @@ +'use strict'; + +var Alias = require('../nodes/Alias.js'); +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); + +const defaultTagPrefix = 'tag:yaml.org,2002:'; +function findTagObject(value, tagName, tags) { + if (tagName) { + const match = tags.filter(t => t.tag === tagName); + const tagObj = match.find(t => !t.format) ?? match[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags.find(t => t.identify?.(value) && !t.format); +} +function createNode(value, tagName, ctx) { + if (identity.isDocument(value)) + value = value.contents; + if (identity.isNode(value)) + return value; + if (identity.isPair(value)) { + const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; + } + if (value instanceof String || + value instanceof Number || + value instanceof Boolean || + (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere + ) { + // https://tc39.es/ecma262/#sec-serializejsonproperty + value = value.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; + // Detect duplicate references to the same object & use Alias nodes for all + // after first. The `ref` wrapper allows for circular references to resolve. + let ref = undefined; + if (aliasDuplicateObjects && value && typeof value === 'object') { + ref = sourceObjects.get(value); + if (ref) { + ref.anchor ?? (ref.anchor = onAnchor(value)); + return new Alias.Alias(ref.anchor); + } + else { + ref = { anchor: null, node: null }; + sourceObjects.set(value, ref); + } + } + if (tagName?.startsWith('!!')) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema.tags); + if (!tagObj) { + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + value = value.toJSON(); + } + if (!value || typeof value !== 'object') { + const node = new Scalar.Scalar(value); + if (ref) + ref.node = node; + return node; + } + tagObj = + value instanceof Map + ? schema[identity.MAP] + : Symbol.iterator in Object(value) + ? schema[identity.SEQ] + : schema[identity.MAP]; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const node = tagObj?.createNode + ? tagObj.createNode(ctx.schema, value, ctx) + : typeof tagObj?.nodeClass?.from === 'function' + ? tagObj.nodeClass.from(ctx.schema, value, ctx) + : new Scalar.Scalar(value); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; +} + +exports.createNode = createNode; diff --git a/node_modules/yaml/dist/doc/directives.d.ts b/node_modules/yaml/dist/doc/directives.d.ts new file mode 100644 index 000000000..ead29113b --- /dev/null +++ b/node_modules/yaml/dist/doc/directives.d.ts @@ -0,0 +1,49 @@ +import type { Document } from './Document'; +export declare class Directives { + static defaultYaml: Directives['yaml']; + static defaultTags: Directives['tags']; + yaml: { + version: '1.1' | '1.2' | 'next'; + explicit?: boolean; + }; + tags: Record; + /** + * The directives-end/doc-start marker `---`. If `null`, a marker may still be + * included in the document's stringified representation. + */ + docStart: true | null; + /** The doc-end marker `...`. */ + docEnd: boolean; + /** + * Used when parsing YAML 1.1, where: + * > If the document specifies no directives, it is parsed using the same + * > settings as the previous document. If the document does specify any + * > directives, all directives of previous documents, if any, are ignored. + */ + private atNextDocument?; + constructor(yaml?: Directives['yaml'], tags?: Directives['tags']); + clone(): Directives; + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument(): Directives; + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line: string, onError: (offset: number, message: string, warning?: boolean) => void): boolean; + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source: string, onError: (message: string) => void): string | null; + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag: string): string; + toString(doc?: Document): string; +} diff --git a/node_modules/yaml/dist/doc/directives.js b/node_modules/yaml/dist/doc/directives.js new file mode 100644 index 000000000..e13b10e3c --- /dev/null +++ b/node_modules/yaml/dist/doc/directives.js @@ -0,0 +1,178 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var visit = require('../visit.js'); + +const escapeChars = { + '!': '%21', + ',': '%2C', + '[': '%5B', + ']': '%5D', + '{': '%7B', + '}': '%7D' +}; +const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]); +class Directives { + constructor(yaml, tags) { + /** + * The directives-end/doc-start marker `---`. If `null`, a marker may still be + * included in the document's stringified representation. + */ + this.docStart = null; + /** The doc-end marker `...`. */ + this.docEnd = false; + this.yaml = Object.assign({}, Directives.defaultYaml, yaml); + this.tags = Object.assign({}, Directives.defaultTags, tags); + } + clone() { + const copy = new Directives(this.yaml, this.tags); + copy.docStart = this.docStart; + return copy; + } + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case '1.1': + this.atNextDocument = true; + break; + case '1.2': + this.atNextDocument = false; + this.yaml = { + explicit: Directives.defaultYaml.explicit, + version: '1.2' + }; + this.tags = Object.assign({}, Directives.defaultTags); + break; + } + return res; + } + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' }; + this.tags = Object.assign({}, Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name = parts.shift(); + switch (name) { + case '%TAG': { + if (parts.length !== 2) { + onError(0, '%TAG directive should contain exactly two parts'); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case '%YAML': { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, '%YAML directive should contain exactly one part'); + return false; + } + const [version] = parts; + if (version === '1.1' || version === '1.2') { + this.yaml.version = version; + return true; + } + else { + const isValid = /^\d+\.\d+$/.test(version); + onError(6, `Unsupported YAML version ${version}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name}`, true); + return false; + } + } + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === '!') + return '!'; // non-specific tag + if (source[0] !== '!') { + onError(`Not a valid tag: ${source}`); + return null; + } + if (source[1] === '<') { + const verbatim = source.slice(2, -1); + if (verbatim === '!' || verbatim === '!!') { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== '>') + onError('Verbatim tags must end with a >'); + return verbatim; + } + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } + catch (error) { + onError(String(error)); + return null; + } + } + if (handle === '!') + return source; // local tag + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === '!' ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit + ? [`%YAML ${this.yaml.version || '1.2'}`] + : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) { + const tags = {}; + visit.visit(doc.contents, (_key, node) => { + if (identity.isNode(node) && node.tag) + tags[node.tag] = true; + }); + tagNames = Object.keys(tags); + } + else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === '!!' && prefix === 'tag:yaml.org,2002:') + continue; + if (!doc || tagNames.some(tn => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); + } + return lines.join('\n'); + } +} +Directives.defaultYaml = { explicit: false, version: '1.2' }; +Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' }; + +exports.Directives = Directives; diff --git a/node_modules/yaml/dist/errors.d.ts b/node_modules/yaml/dist/errors.d.ts new file mode 100644 index 000000000..9dfcf2850 --- /dev/null +++ b/node_modules/yaml/dist/errors.d.ts @@ -0,0 +1,21 @@ +import type { LineCounter } from './parse/line-counter'; +export type ErrorCode = 'ALIAS_PROPS' | 'BAD_ALIAS' | 'BAD_DIRECTIVE' | 'BAD_DQ_ESCAPE' | 'BAD_INDENT' | 'BAD_PROP_ORDER' | 'BAD_SCALAR_START' | 'BLOCK_AS_IMPLICIT_KEY' | 'BLOCK_IN_FLOW' | 'DUPLICATE_KEY' | 'IMPOSSIBLE' | 'KEY_OVER_1024_CHARS' | 'MISSING_CHAR' | 'MULTILINE_IMPLICIT_KEY' | 'MULTIPLE_ANCHORS' | 'MULTIPLE_DOCS' | 'MULTIPLE_TAGS' | 'NON_STRING_KEY' | 'RESOURCE_EXHAUSTION' | 'TAB_AS_INDENT' | 'TAG_RESOLVE_FAILED' | 'UNEXPECTED_TOKEN' | 'BAD_COLLECTION_TYPE'; +export type LinePos = { + line: number; + col: number; +}; +export declare class YAMLError extends Error { + name: 'YAMLParseError' | 'YAMLWarning'; + code: ErrorCode; + message: string; + pos: [number, number]; + linePos?: [LinePos] | [LinePos, LinePos]; + constructor(name: YAMLError['name'], pos: [number, number], code: ErrorCode, message: string); +} +export declare class YAMLParseError extends YAMLError { + constructor(pos: [number, number], code: ErrorCode, message: string); +} +export declare class YAMLWarning extends YAMLError { + constructor(pos: [number, number], code: ErrorCode, message: string); +} +export declare const prettifyError: (src: string, lc: LineCounter) => (error: YAMLError) => void; diff --git a/node_modules/yaml/dist/errors.js b/node_modules/yaml/dist/errors.js new file mode 100644 index 000000000..358c7ed48 --- /dev/null +++ b/node_modules/yaml/dist/errors.js @@ -0,0 +1,62 @@ +'use strict'; + +class YAMLError extends Error { + constructor(name, pos, code, message) { + super(); + this.name = name; + this.code = code; + this.message = message; + this.pos = pos; + } +} +class YAMLParseError extends YAMLError { + constructor(pos, code, message) { + super('YAMLParseError', pos, code, message); + } +} +class YAMLWarning extends YAMLError { + constructor(pos, code, message) { + super('YAMLWarning', pos, code, message); + } +} +const prettifyError = (src, lc) => (error) => { + if (error.pos[0] === -1) + return; + error.linePos = error.pos.map(pos => lc.linePos(pos)); + const { line, col } = error.linePos[0]; + error.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src + .substring(lc.lineStarts[line - 1], lc.lineStarts[line]) + .replace(/[\n\r]+$/, ''); + // Trim to max 80 chars, keeping col position near the middle + if (ci >= 60 && lineStr.length > 80) { + const trimStart = Math.min(ci - 39, lineStr.length - 79); + lineStr = '…' + lineStr.substring(trimStart); + ci -= trimStart - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + '…'; + // Include previous line in context if pointing at line start + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + // Regexp won't match if start is trimmed + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + '…\n'; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count = 1; + const end = error.linePos[1]; + if (end?.line === line && end.col > col) { + count = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = ' '.repeat(ci) + '^'.repeat(count); + error.message += `:\n\n${lineStr}\n${pointer}\n`; + } +}; + +exports.YAMLError = YAMLError; +exports.YAMLParseError = YAMLParseError; +exports.YAMLWarning = YAMLWarning; +exports.prettifyError = prettifyError; diff --git a/node_modules/yaml/dist/index.d.ts b/node_modules/yaml/dist/index.d.ts new file mode 100644 index 000000000..075c612b7 --- /dev/null +++ b/node_modules/yaml/dist/index.d.ts @@ -0,0 +1,25 @@ +export { Composer } from './compose/composer'; +export { Document } from './doc/Document'; +export { Schema } from './schema/Schema'; +export type { ErrorCode } from './errors'; +export { YAMLError, YAMLParseError, YAMLWarning } from './errors'; +export { Alias } from './nodes/Alias'; +export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity'; +export type { Node, ParsedNode, Range } from './nodes/Node'; +export { Pair } from './nodes/Pair'; +export { Scalar } from './nodes/Scalar'; +export { YAMLMap } from './nodes/YAMLMap'; +export { YAMLSeq } from './nodes/YAMLSeq'; +export type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from './options'; +export * as CST from './parse/cst'; +export { Lexer } from './parse/lexer'; +export { LineCounter } from './parse/line-counter'; +export { Parser } from './parse/parser'; +export type { EmptyStream } from './public-api'; +export { parse, parseAllDocuments, parseDocument, stringify } from './public-api'; +export type { TagId, Tags } from './schema/tags'; +export type { CollectionTag, ScalarTag } from './schema/types'; +export type { YAMLOMap } from './schema/yaml-1.1/omap'; +export type { YAMLSet } from './schema/yaml-1.1/set'; +export type { asyncVisitor, asyncVisitorFn, visitor, visitorFn } from './visit'; +export { visit, visitAsync } from './visit'; diff --git a/node_modules/yaml/dist/index.js b/node_modules/yaml/dist/index.js new file mode 100644 index 000000000..18c0cb612 --- /dev/null +++ b/node_modules/yaml/dist/index.js @@ -0,0 +1,50 @@ +'use strict'; + +var composer = require('./compose/composer.js'); +var Document = require('./doc/Document.js'); +var Schema = require('./schema/Schema.js'); +var errors = require('./errors.js'); +var Alias = require('./nodes/Alias.js'); +var identity = require('./nodes/identity.js'); +var Pair = require('./nodes/Pair.js'); +var Scalar = require('./nodes/Scalar.js'); +var YAMLMap = require('./nodes/YAMLMap.js'); +var YAMLSeq = require('./nodes/YAMLSeq.js'); +var cst = require('./parse/cst.js'); +var lexer = require('./parse/lexer.js'); +var lineCounter = require('./parse/line-counter.js'); +var parser = require('./parse/parser.js'); +var publicApi = require('./public-api.js'); +var visit = require('./visit.js'); + + + +exports.Composer = composer.Composer; +exports.Document = Document.Document; +exports.Schema = Schema.Schema; +exports.YAMLError = errors.YAMLError; +exports.YAMLParseError = errors.YAMLParseError; +exports.YAMLWarning = errors.YAMLWarning; +exports.Alias = Alias.Alias; +exports.isAlias = identity.isAlias; +exports.isCollection = identity.isCollection; +exports.isDocument = identity.isDocument; +exports.isMap = identity.isMap; +exports.isNode = identity.isNode; +exports.isPair = identity.isPair; +exports.isScalar = identity.isScalar; +exports.isSeq = identity.isSeq; +exports.Pair = Pair.Pair; +exports.Scalar = Scalar.Scalar; +exports.YAMLMap = YAMLMap.YAMLMap; +exports.YAMLSeq = YAMLSeq.YAMLSeq; +exports.CST = cst; +exports.Lexer = lexer.Lexer; +exports.LineCounter = lineCounter.LineCounter; +exports.Parser = parser.Parser; +exports.parse = publicApi.parse; +exports.parseAllDocuments = publicApi.parseAllDocuments; +exports.parseDocument = publicApi.parseDocument; +exports.stringify = publicApi.stringify; +exports.visit = visit.visit; +exports.visitAsync = visit.visitAsync; diff --git a/node_modules/yaml/dist/log.d.ts b/node_modules/yaml/dist/log.d.ts new file mode 100644 index 000000000..5e216121a --- /dev/null +++ b/node_modules/yaml/dist/log.d.ts @@ -0,0 +1,3 @@ +export type LogLevelId = 'silent' | 'error' | 'warn' | 'debug'; +export declare function debug(logLevel: LogLevelId, ...messages: any[]): void; +export declare function warn(logLevel: LogLevelId, warning: string | Error): void; diff --git a/node_modules/yaml/dist/log.js b/node_modules/yaml/dist/log.js new file mode 100644 index 000000000..65f99508f --- /dev/null +++ b/node_modules/yaml/dist/log.js @@ -0,0 +1,19 @@ +'use strict'; + +var node_process = require('process'); + +function debug(logLevel, ...messages) { + if (logLevel === 'debug') + console.log(...messages); +} +function warn(logLevel, warning) { + if (logLevel === 'debug' || logLevel === 'warn') { + if (typeof node_process.emitWarning === 'function') + node_process.emitWarning(warning); + else + console.warn(warning); + } +} + +exports.debug = debug; +exports.warn = warn; diff --git a/node_modules/yaml/dist/nodes/Alias.d.ts b/node_modules/yaml/dist/nodes/Alias.d.ts new file mode 100644 index 000000000..c48f40e45 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Alias.d.ts @@ -0,0 +1,29 @@ +import type { Document } from '../doc/Document'; +import type { FlowScalar } from '../parse/cst'; +import type { StringifyContext } from '../stringify/stringify'; +import type { Range } from './Node'; +import { NodeBase } from './Node'; +import type { Scalar } from './Scalar'; +import type { ToJSContext } from './toJS'; +import type { YAMLMap } from './YAMLMap'; +import type { YAMLSeq } from './YAMLSeq'; +export declare namespace Alias { + interface Parsed extends Alias { + range: Range; + srcToken?: FlowScalar & { + type: 'alias'; + }; + } +} +export declare class Alias extends NodeBase { + source: string; + anchor?: never; + constructor(source: string); + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc: Document, ctx?: ToJSContext): Scalar | YAMLMap | YAMLSeq | undefined; + toJSON(_arg?: unknown, ctx?: ToJSContext): unknown; + toString(ctx?: StringifyContext, _onComment?: () => void, _onChompKeep?: () => void): string; +} diff --git a/node_modules/yaml/dist/nodes/Alias.js b/node_modules/yaml/dist/nodes/Alias.js new file mode 100644 index 000000000..357d1c939 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Alias.js @@ -0,0 +1,120 @@ +'use strict'; + +var anchors = require('../doc/anchors.js'); +var visit = require('../visit.js'); +var identity = require('./identity.js'); +var Node = require('./Node.js'); +var toJS = require('./toJS.js'); + +class Alias extends Node.NodeBase { + constructor(source) { + super(identity.ALIAS); + this.source = source; + Object.defineProperty(this, 'tag', { + set() { + throw new Error('Alias nodes cannot have tags'); + } + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc, ctx) { + if (ctx?.maxAliasCount === 0) + throw new ReferenceError('Alias resolution is disabled'); + let nodes; + if (ctx?.aliasResolveCache) { + nodes = ctx.aliasResolveCache; + } + else { + nodes = []; + visit.visit(doc, { + Node: (_key, node) => { + if (identity.isAlias(node) || identity.hasAnchor(node)) + nodes.push(node); + } + }); + if (ctx) + ctx.aliasResolveCache = nodes; + } + let found = undefined; + for (const node of nodes) { + if (node === this) + break; + if (node.anchor === this.source) + found = node; + } + if (found && ctx) { + const { anchors, doc, maxAliasCount } = ctx; + let data = anchors.get(found); + if (!data) { + // Resolve anchors for Node.prototype.toJS() + toJS.toJS(found, null, ctx); + data = anchors.get(found); + } + /* istanbul ignore if */ + if (data?.res === undefined) { + const msg = 'This should not happen: Alias anchor was not resolved?'; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, found, anchors); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = 'Excessive alias count indicates a resource exhaustion attack'; + throw new ReferenceError(msg); + } + } + } + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const source = this.resolve(ctx.doc, ctx); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + return ctx.anchors.get(source).res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchors.anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } +} +function getAliasCount(doc, node, anchors) { + if (identity.isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors && source && anchors.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } + else if (identity.isCollection(node)) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(doc, item, anchors); + if (c > count) + count = c; + } + return count; + } + else if (identity.isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors); + const vc = getAliasCount(doc, node.value, anchors); + return Math.max(kc, vc); + } + return 1; +} + +exports.Alias = Alias; diff --git a/node_modules/yaml/dist/nodes/Collection.d.ts b/node_modules/yaml/dist/nodes/Collection.d.ts new file mode 100644 index 000000000..ffbacfcc4 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Collection.d.ts @@ -0,0 +1,73 @@ +import type { Schema } from '../schema/Schema'; +import { NODE_TYPE } from './identity'; +import { NodeBase } from './Node'; +export declare function collectionFromPath(schema: Schema, path: unknown[], value: unknown): import('./Node').Node; +export declare const isEmptyPath: (path: Iterable | null | undefined) => path is null | undefined; +export declare abstract class Collection extends NodeBase { + schema: Schema | undefined; + [NODE_TYPE]: symbol; + items: unknown[]; + /** An optional anchor on this node. Used by alias nodes. */ + anchor?: string; + /** + * If true, stringify this and all child nodes using flow rather than + * block styles. + */ + flow?: boolean; + constructor(type: symbol, schema?: Schema); + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema?: Schema): Collection; + /** Adds a value to the collection. */ + abstract add(value: unknown): void; + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + abstract delete(key: unknown): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + abstract get(key: unknown, keepScalar?: boolean): unknown; + /** + * Checks if the collection includes a value with the key `key`. + */ + abstract has(key: unknown): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + abstract set(key: unknown, value: unknown): void; + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path: Iterable, value: unknown): void; + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path: Iterable): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path: Iterable, keepScalar?: boolean): unknown; + hasAllNullValues(allowScalar?: boolean): boolean; + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path: Iterable): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path: Iterable, value: unknown): void; +} diff --git a/node_modules/yaml/dist/nodes/Collection.js b/node_modules/yaml/dist/nodes/Collection.js new file mode 100644 index 000000000..bdf8cb4fa --- /dev/null +++ b/node_modules/yaml/dist/nodes/Collection.js @@ -0,0 +1,151 @@ +'use strict'; + +var createNode = require('../doc/createNode.js'); +var identity = require('./identity.js'); +var Node = require('./Node.js'); + +function collectionFromPath(schema, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (typeof k === 'number' && Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } + else { + v = new Map([[k, v]]); + } + } + return createNode.createNode(v, undefined, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error('This should not happen, please report a bug.'); + }, + schema, + sourceObjects: new Map() + }); +} +// Type guard is intentionally a little wrong so as to be more useful, +// as it does not cover untypable empty non-string iterables (e.g. []). +const isEmptyPath = (path) => path == null || + (typeof path === 'object' && !!path[Symbol.iterator]().next().done); +class Collection extends Node.NodeBase { + constructor(type, schema) { + super(type); + Object.defineProperty(this, 'schema', { + value: schema, + configurable: true, + enumerable: false, + writable: true + }); + } + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema) { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema) + copy.schema = schema; + copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path, value) { + if (isEmptyPath(path)) + this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (identity.isCollection(node)) + node.addIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (identity.isCollection(node)) + return node.deleteIn(rest); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + const [key, ...rest] = path; + const node = this.get(key, true); + if (rest.length === 0) + return !keepScalar && identity.isScalar(node) ? node.value : node; + else + return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined; + } + hasAllNullValues(allowScalar) { + return this.items.every(node => { + if (!identity.isPair(node)) + return false; + const n = node.value; + return (n == null || + (allowScalar && + identity.isScalar(n) && + n.value == null && + !n.commentBefore && + !n.comment && + !n.tag)); + }); + } + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.has(key); + const node = this.get(key, true); + return identity.isCollection(node) ? node.hasIn(rest) : false; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + const [key, ...rest] = path; + if (rest.length === 0) { + this.set(key, value); + } + else { + const node = this.get(key, true); + if (identity.isCollection(node)) + node.setIn(rest, value); + else if (node === undefined && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } +} + +exports.Collection = Collection; +exports.collectionFromPath = collectionFromPath; +exports.isEmptyPath = isEmptyPath; diff --git a/node_modules/yaml/dist/nodes/Node.d.ts b/node_modules/yaml/dist/nodes/Node.d.ts new file mode 100644 index 000000000..5fde1d879 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Node.d.ts @@ -0,0 +1,53 @@ +import type { Document } from '../doc/Document'; +import type { ToJSOptions } from '../options'; +import type { Token } from '../parse/cst'; +import type { StringifyContext } from '../stringify/stringify'; +import type { Alias } from './Alias'; +import { NODE_TYPE } from './identity'; +import type { Scalar } from './Scalar'; +import type { ToJSContext } from './toJS'; +import type { MapLike, YAMLMap } from './YAMLMap'; +import type { YAMLSeq } from './YAMLSeq'; +export type Node = Alias | Scalar | YAMLMap | YAMLSeq; +/** Utility type mapper */ +export type NodeType = T extends string | number | bigint | boolean | null | undefined ? Scalar : T extends Date ? Scalar : T extends Array ? YAMLSeq> : T extends { + [key: string]: any; +} ? YAMLMap, NodeType> : T extends { + [key: number]: any; +} ? YAMLMap, NodeType> : Node; +export type ParsedNode = Alias.Parsed | Scalar.Parsed | YAMLMap.Parsed | YAMLSeq.Parsed; +/** `[start, value-end, node-end]` */ +export type Range = [number, number, number]; +export declare abstract class NodeBase { + readonly [NODE_TYPE]: symbol; + /** A comment on or immediately after this */ + comment?: string | null; + /** A comment before this */ + commentBefore?: string | null; + /** + * The `[start, value-end, node-end]` character offsets for the part of the + * source parsed into this node (undefined if not parsed). The `value-end` + * and `node-end` positions are themselves not included in their respective + * ranges. + */ + range?: Range | null; + /** A blank line before this node and its commentBefore */ + spaceBefore?: boolean; + /** The CST token that was composed into this node. */ + srcToken?: Token; + /** A fully qualified tag, if required */ + tag?: string; + /** + * Customize the way that a key-value pair is resolved. + * Used for YAML 1.1 !!merge << handling. + */ + addToJSMap?: (ctx: ToJSContext | undefined, map: MapLike, value: unknown) => void; + /** A plain JS representation of this node */ + abstract toJSON(): any; + abstract toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + constructor(type: symbol); + /** Create a copy of this node. */ + clone(): NodeBase; + /** A plain JavaScript representation of this node. */ + toJS(doc: Document, { mapAsMap, maxAliasCount, onAnchor, reviver }?: ToJSOptions): any; +} diff --git a/node_modules/yaml/dist/nodes/Node.js b/node_modules/yaml/dist/nodes/Node.js new file mode 100644 index 000000000..d384e1cd0 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Node.js @@ -0,0 +1,40 @@ +'use strict'; + +var applyReviver = require('../doc/applyReviver.js'); +var identity = require('./identity.js'); +var toJS = require('./toJS.js'); + +class NodeBase { + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); + } + /** Create a copy of this node. */ + clone() { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!identity.isDocument(doc)) + throw new TypeError('A document argument is required'); + const ctx = { + anchors: new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 + }; + const res = toJS.toJS(this, '', ctx); + if (typeof onAnchor === 'function') + for (const { count, res } of ctx.anchors.values()) + onAnchor(res, count); + return typeof reviver === 'function' + ? applyReviver.applyReviver(reviver, { '': res }, '', res) + : res; + } +} + +exports.NodeBase = NodeBase; diff --git a/node_modules/yaml/dist/nodes/Pair.d.ts b/node_modules/yaml/dist/nodes/Pair.d.ts new file mode 100644 index 000000000..0fa082d71 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Pair.d.ts @@ -0,0 +1,22 @@ +import type { CreateNodeContext } from '../doc/createNode'; +import type { CollectionItem } from '../parse/cst'; +import type { Schema } from '../schema/Schema'; +import type { StringifyContext } from '../stringify/stringify'; +import { addPairToJSMap } from './addPairToJSMap'; +import { NODE_TYPE } from './identity'; +import type { Node } from './Node'; +import type { ToJSContext } from './toJS'; +export declare function createPair(key: unknown, value: unknown, ctx: CreateNodeContext): Pair; +export declare class Pair { + readonly [NODE_TYPE]: symbol; + /** Always Node or null when parsed, but can be set to anything. */ + key: K; + /** Always Node or null when parsed, but can be set to anything. */ + value: V | null; + /** The CST token that was composed into this pair. */ + srcToken?: CollectionItem; + constructor(key: K, value?: V | null); + clone(schema?: Schema): Pair; + toJSON(_?: unknown, ctx?: ToJSContext): ReturnType; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +} diff --git a/node_modules/yaml/dist/nodes/Pair.js b/node_modules/yaml/dist/nodes/Pair.js new file mode 100644 index 000000000..ae4c7727d --- /dev/null +++ b/node_modules/yaml/dist/nodes/Pair.js @@ -0,0 +1,39 @@ +'use strict'; + +var createNode = require('../doc/createNode.js'); +var stringifyPair = require('../stringify/stringifyPair.js'); +var addPairToJSMap = require('./addPairToJSMap.js'); +var identity = require('./identity.js'); + +function createPair(key, value, ctx) { + const k = createNode.createNode(key, undefined, ctx); + const v = createNode.createNode(value, undefined, ctx); + return new Pair(k, v); +} +class Pair { + constructor(key, value = null) { + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR }); + this.key = key; + this.value = value; + } + clone(schema) { + let { key, value } = this; + if (identity.isNode(key)) + key = key.clone(schema); + if (identity.isNode(value)) + value = value.clone(schema); + return new Pair(key, value); + } + toJSON(_, ctx) { + const pair = ctx?.mapAsMap ? new Map() : {}; + return addPairToJSMap.addPairToJSMap(ctx, pair, this); + } + toString(ctx, onComment, onChompKeep) { + return ctx?.doc + ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) + : JSON.stringify(this); + } +} + +exports.Pair = Pair; +exports.createPair = createPair; diff --git a/node_modules/yaml/dist/nodes/Scalar.d.ts b/node_modules/yaml/dist/nodes/Scalar.d.ts new file mode 100644 index 000000000..bf1e98993 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Scalar.d.ts @@ -0,0 +1,47 @@ +import type { BlockScalar, FlowScalar } from '../parse/cst'; +import type { Range } from './Node'; +import { NodeBase } from './Node'; +import type { ToJSContext } from './toJS'; +export declare const isScalarValue: (value: unknown) => boolean; +export declare namespace Scalar { + interface Parsed extends Scalar { + range: Range; + source: string; + srcToken?: FlowScalar | BlockScalar; + } + type BLOCK_FOLDED = 'BLOCK_FOLDED'; + type BLOCK_LITERAL = 'BLOCK_LITERAL'; + type PLAIN = 'PLAIN'; + type QUOTE_DOUBLE = 'QUOTE_DOUBLE'; + type QUOTE_SINGLE = 'QUOTE_SINGLE'; + type Type = BLOCK_FOLDED | BLOCK_LITERAL | PLAIN | QUOTE_DOUBLE | QUOTE_SINGLE; +} +export declare class Scalar extends NodeBase { + static readonly BLOCK_FOLDED = "BLOCK_FOLDED"; + static readonly BLOCK_LITERAL = "BLOCK_LITERAL"; + static readonly PLAIN = "PLAIN"; + static readonly QUOTE_DOUBLE = "QUOTE_DOUBLE"; + static readonly QUOTE_SINGLE = "QUOTE_SINGLE"; + value: T; + /** An optional anchor on this node. Used by alias nodes. */ + anchor?: string; + /** + * By default (undefined), numbers use decimal notation. + * The YAML 1.2 core schema only supports 'HEX' and 'OCT'. + * The YAML 1.1 schema also supports 'BIN' and 'TIME' + */ + format?: string; + /** + * If `value` is a number that is serialized as a decimal string + * (i.e. not using exponential notation), + * use this value when stringifying this node. + */ + minFractionDigits?: number; + /** Set during parsing to the source string value */ + source?: string; + /** The scalar style used for the node's string representation */ + type?: Scalar.Type; + constructor(value: T); + toJSON(arg?: any, ctx?: ToJSContext): any; + toString(): string; +} diff --git a/node_modules/yaml/dist/nodes/Scalar.js b/node_modules/yaml/dist/nodes/Scalar.js new file mode 100644 index 000000000..bd7d4d22c --- /dev/null +++ b/node_modules/yaml/dist/nodes/Scalar.js @@ -0,0 +1,27 @@ +'use strict'; + +var identity = require('./identity.js'); +var Node = require('./Node.js'); +var toJS = require('./toJS.js'); + +const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); +class Scalar extends Node.NodeBase { + constructor(value) { + super(identity.SCALAR); + this.value = value; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } +} +Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; +Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; +Scalar.PLAIN = 'PLAIN'; +Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; +Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; + +exports.Scalar = Scalar; +exports.isScalarValue = isScalarValue; diff --git a/node_modules/yaml/dist/nodes/YAMLMap.d.ts b/node_modules/yaml/dist/nodes/YAMLMap.d.ts new file mode 100644 index 000000000..8a6aa869e --- /dev/null +++ b/node_modules/yaml/dist/nodes/YAMLMap.d.ts @@ -0,0 +1,53 @@ +import type { BlockMap, FlowCollection } from '../parse/cst'; +import type { Schema } from '../schema/Schema'; +import type { StringifyContext } from '../stringify/stringify'; +import type { CreateNodeContext } from '../util'; +import { Collection } from './Collection'; +import type { ParsedNode, Range } from './Node'; +import { Pair } from './Pair'; +import type { Scalar } from './Scalar'; +import type { ToJSContext } from './toJS'; +export type MapLike = Map | Set | Record; +export declare function findPair(items: Iterable>, key: unknown): Pair | undefined; +export declare namespace YAMLMap { + interface Parsed extends YAMLMap { + items: Pair[]; + range: Range; + srcToken?: BlockMap | FlowCollection; + } +} +export declare class YAMLMap extends Collection { + static get tagName(): 'tag:yaml.org,2002:map'; + items: Pair[]; + constructor(schema?: Schema); + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema: Schema, obj: unknown, ctx: CreateNodeContext): YAMLMap; + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair: Pair | { + key: K; + value: V; + }, overwrite?: boolean): void; + delete(key: unknown): boolean; + get(key: unknown, keepScalar: true): Scalar | undefined; + get(key: unknown, keepScalar?: false): V | undefined; + get(key: unknown, keepScalar?: boolean): V | Scalar | undefined; + has(key: unknown): boolean; + set(key: K, value: V): void; + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON>(_?: unknown, ctx?: ToJSContext, Type?: { + new (): T; + }): any; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +} diff --git a/node_modules/yaml/dist/nodes/YAMLMap.js b/node_modules/yaml/dist/nodes/YAMLMap.js new file mode 100644 index 000000000..210abbfcd --- /dev/null +++ b/node_modules/yaml/dist/nodes/YAMLMap.js @@ -0,0 +1,147 @@ +'use strict'; + +var stringifyCollection = require('../stringify/stringifyCollection.js'); +var addPairToJSMap = require('./addPairToJSMap.js'); +var Collection = require('./Collection.js'); +var identity = require('./identity.js'); +var Pair = require('./Pair.js'); +var Scalar = require('./Scalar.js'); + +function findPair(items, key) { + const k = identity.isScalar(key) ? key.value : key; + for (const it of items) { + if (identity.isPair(it)) { + if (it.key === key || it.key === k) + return it; + if (identity.isScalar(it.key) && it.key.value === k) + return it; + } + } + return undefined; +} +class YAMLMap extends Collection.Collection { + static get tagName() { + return 'tag:yaml.org,2002:map'; + } + constructor(schema) { + super(identity.MAP, schema); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map = new this(schema); + const add = (key, value) => { + if (typeof replacer === 'function') + value = replacer.call(obj, key, value); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value !== undefined || keepUndefined) + map.items.push(Pair.createPair(key, value, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value] of obj) + add(key, value); + } + else if (obj && typeof obj === 'object') { + for (const key of Object.keys(obj)) + add(key, obj[key]); + } + if (typeof schema.sortMapEntries === 'function') { + map.items.sort(schema.sortMapEntries); + } + return map; + } + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (identity.isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== 'object' || !('key' in pair)) { + // In TypeScript, this never happens. + _pair = new Pair.Pair(pair, pair?.value); + } + else + _pair = new Pair.Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + // For scalars, keep the old node & its comments and anchors + if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } + else if (sortEntries) { + const i = this.items.findIndex(item => sortEntries(_pair, item) < 0); + if (i === -1) + this.items.push(_pair); + else + this.items.splice(i, 0, _pair); + } + else { + this.items.push(_pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) + return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it?.value; + return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair.Pair(key, value), true); + } + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_, ctx, Type) { + const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map); + for (const item of this.items) + addPairToJSMap.addPairToJSMap(ctx, map, item); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!identity.isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: '', + flowChars: { start: '{', end: '}' }, + itemIndent: ctx.indent || '', + onChompKeep, + onComment + }); + } +} + +exports.YAMLMap = YAMLMap; +exports.findPair = findPair; diff --git a/node_modules/yaml/dist/nodes/YAMLSeq.d.ts b/node_modules/yaml/dist/nodes/YAMLSeq.d.ts new file mode 100644 index 000000000..23baf2b86 --- /dev/null +++ b/node_modules/yaml/dist/nodes/YAMLSeq.d.ts @@ -0,0 +1,60 @@ +import type { CreateNodeContext } from '../doc/createNode'; +import type { BlockSequence, FlowCollection } from '../parse/cst'; +import type { Schema } from '../schema/Schema'; +import type { StringifyContext } from '../stringify/stringify'; +import { Collection } from './Collection'; +import type { ParsedNode, Range } from './Node'; +import type { Pair } from './Pair'; +import type { Scalar } from './Scalar'; +import type { ToJSContext } from './toJS'; +export declare namespace YAMLSeq { + interface Parsed = ParsedNode> extends YAMLSeq { + items: T[]; + range: Range; + srcToken?: BlockSequence | FlowCollection; + } +} +export declare class YAMLSeq extends Collection { + static get tagName(): 'tag:yaml.org,2002:seq'; + items: T[]; + constructor(schema?: Schema); + add(value: T): void; + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key: unknown): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + get(key: unknown, keepScalar: true): Scalar | undefined; + get(key: unknown, keepScalar?: false): T | undefined; + get(key: unknown, keepScalar?: boolean): T | Scalar | undefined; + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key: unknown): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key: unknown, value: T): void; + toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + static from(schema: Schema, obj: unknown, ctx: CreateNodeContext): YAMLSeq; +} diff --git a/node_modules/yaml/dist/nodes/YAMLSeq.js b/node_modules/yaml/dist/nodes/YAMLSeq.js new file mode 100644 index 000000000..a2af086d8 --- /dev/null +++ b/node_modules/yaml/dist/nodes/YAMLSeq.js @@ -0,0 +1,115 @@ +'use strict'; + +var createNode = require('../doc/createNode.js'); +var stringifyCollection = require('../stringify/stringifyCollection.js'); +var Collection = require('./Collection.js'); +var identity = require('./identity.js'); +var Scalar = require('./Scalar.js'); +var toJS = require('./toJS.js'); + +class YAMLSeq extends Collection.Collection { + static get tagName() { + return 'tag:yaml.org,2002:seq'; + } + constructor(schema) { + super(identity.SEQ, schema); + this.items = []; + } + add(value) { + this.items.push(value); + } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + return undefined; + const it = this.items[idx]; + return !keepScalar && identity.isScalar(it) ? it.value : it; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx = asItemIndex(key); + return typeof idx === 'number' && idx < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== 'number') + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx]; + if (identity.isScalar(prev) && Scalar.isScalarValue(value)) + prev.value = value; + else + this.items[idx] = value; + } + toJSON(_, ctx) { + const seq = []; + if (ctx?.onCreate) + ctx.onCreate(seq); + let i = 0; + for (const item of this.items) + seq.push(toJS.toJS(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: '- ', + flowChars: { start: '[', end: ']' }, + itemIndent: (ctx.indent || '') + ' ', + onChompKeep, + onComment + }); + } + static from(schema, obj, ctx) { + const { replacer } = ctx; + const seq = new this(schema); + if (obj && Symbol.iterator in Object(obj)) { + let i = 0; + for (let it of obj) { + if (typeof replacer === 'function') { + const key = obj instanceof Set ? it : String(i++); + it = replacer.call(obj, key, it); + } + seq.items.push(createNode.createNode(it, undefined, ctx)); + } + } + return seq; + } +} +function asItemIndex(key) { + let idx = identity.isScalar(key) ? key.value : key; + if (idx && typeof idx === 'string') + idx = Number(idx); + return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0 + ? idx + : null; +} + +exports.YAMLSeq = YAMLSeq; diff --git a/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts b/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts new file mode 100644 index 000000000..58e931c39 --- /dev/null +++ b/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts @@ -0,0 +1,4 @@ +import type { Pair } from './Pair'; +import type { ToJSContext } from './toJS'; +import type { MapLike } from './YAMLMap'; +export declare function addPairToJSMap(ctx: ToJSContext | undefined, map: MapLike, { key, value }: Pair): MapLike; diff --git a/node_modules/yaml/dist/nodes/addPairToJSMap.js b/node_modules/yaml/dist/nodes/addPairToJSMap.js new file mode 100644 index 000000000..a8faa2904 --- /dev/null +++ b/node_modules/yaml/dist/nodes/addPairToJSMap.js @@ -0,0 +1,65 @@ +'use strict'; + +var log = require('../log.js'); +var merge = require('../schema/yaml-1.1/merge.js'); +var stringify = require('../stringify/stringify.js'); +var identity = require('./identity.js'); +var toJS = require('./toJS.js'); + +function addPairToJSMap(ctx, map, { key, value }) { + if (identity.isNode(key) && key.addToJSMap) + key.addToJSMap(ctx, map, value); + // TODO: Should drop this special case for bare << handling + else if (merge.isMergeKey(ctx, key)) + merge.addMergeToJSMap(ctx, map, value); + else { + const jsKey = toJS.toJS(key, '', ctx); + if (map instanceof Map) { + map.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } + else if (map instanceof Set) { + map.add(jsKey); + } + else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS.toJS(value, stringKey, ctx); + if (stringKey in map) + Object.defineProperty(map, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map[stringKey] = jsValue; + } + } + return map; +} +function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ''; + // eslint-disable-next-line @typescript-eslint/no-base-to-string + if (typeof jsKey !== 'object') + return String(jsKey); + if (identity.isNode(key) && ctx?.doc) { + const strCtx = stringify.createStringifyContext(ctx.doc, {}); + strCtx.anchors = new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); +} + +exports.addPairToJSMap = addPairToJSMap; diff --git a/node_modules/yaml/dist/nodes/identity.d.ts b/node_modules/yaml/dist/nodes/identity.d.ts new file mode 100644 index 000000000..15fc2960a --- /dev/null +++ b/node_modules/yaml/dist/nodes/identity.d.ts @@ -0,0 +1,23 @@ +import type { Document } from '../doc/Document'; +import type { Alias } from './Alias'; +import type { Node } from './Node'; +import type { Pair } from './Pair'; +import type { Scalar } from './Scalar'; +import type { YAMLMap } from './YAMLMap'; +import type { YAMLSeq } from './YAMLSeq'; +export declare const ALIAS: unique symbol; +export declare const DOC: unique symbol; +export declare const MAP: unique symbol; +export declare const PAIR: unique symbol; +export declare const SCALAR: unique symbol; +export declare const SEQ: unique symbol; +export declare const NODE_TYPE: unique symbol; +export declare const isAlias: (node: any) => node is Alias; +export declare const isDocument: (node: any) => node is Document; +export declare const isMap: (node: any) => node is YAMLMap; +export declare const isPair: (node: any) => node is Pair; +export declare const isScalar: (node: any) => node is Scalar; +export declare const isSeq: (node: any) => node is YAMLSeq; +export declare function isCollection(node: any): node is YAMLMap | YAMLSeq; +export declare function isNode(node: any): node is Node; +export declare const hasAnchor: (node: unknown) => node is Scalar | YAMLMap | YAMLSeq; diff --git a/node_modules/yaml/dist/nodes/identity.js b/node_modules/yaml/dist/nodes/identity.js new file mode 100644 index 000000000..5794aa3f8 --- /dev/null +++ b/node_modules/yaml/dist/nodes/identity.js @@ -0,0 +1,53 @@ +'use strict'; + +const ALIAS = Symbol.for('yaml.alias'); +const DOC = Symbol.for('yaml.document'); +const MAP = Symbol.for('yaml.map'); +const PAIR = Symbol.for('yaml.pair'); +const SCALAR = Symbol.for('yaml.scalar'); +const SEQ = Symbol.for('yaml.seq'); +const NODE_TYPE = Symbol.for('yaml.node.type'); +const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS; +const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC; +const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP; +const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR; +const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR; +const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ; +function isCollection(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; +} +function isNode(node) { + if (node && typeof node === 'object') + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; +} +const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + +exports.ALIAS = ALIAS; +exports.DOC = DOC; +exports.MAP = MAP; +exports.NODE_TYPE = NODE_TYPE; +exports.PAIR = PAIR; +exports.SCALAR = SCALAR; +exports.SEQ = SEQ; +exports.hasAnchor = hasAnchor; +exports.isAlias = isAlias; +exports.isCollection = isCollection; +exports.isDocument = isDocument; +exports.isMap = isMap; +exports.isNode = isNode; +exports.isPair = isPair; +exports.isScalar = isScalar; +exports.isSeq = isSeq; diff --git a/node_modules/yaml/dist/nodes/toJS.d.ts b/node_modules/yaml/dist/nodes/toJS.d.ts new file mode 100644 index 000000000..d7e129e14 --- /dev/null +++ b/node_modules/yaml/dist/nodes/toJS.d.ts @@ -0,0 +1,29 @@ +import type { Document } from '../doc/Document'; +import type { Node } from './Node'; +export interface AnchorData { + aliasCount: number; + count: number; + res: unknown; +} +export interface ToJSContext { + anchors: Map; + /** Cached anchor and alias nodes in the order they occur in the document */ + aliasResolveCache?: Node[]; + doc: Document; + keep: boolean; + mapAsMap: boolean; + mapKeyWarned: boolean; + maxAliasCount: number; + onCreate?: (res: unknown) => void; +} +/** + * Recursively convert any node or its contents to native JavaScript + * + * @param value - The input value + * @param arg - If `value` defines a `toJSON()` method, use this + * as its first argument + * @param ctx - Conversion context, originally set in Document#toJS(). If + * `{ keep: true }` is not set, output should be suitable for JSON + * stringification. + */ +export declare function toJS(value: any, arg: string | null, ctx?: ToJSContext): any; diff --git a/node_modules/yaml/dist/nodes/toJS.js b/node_modules/yaml/dist/nodes/toJS.js new file mode 100644 index 000000000..a012823bf --- /dev/null +++ b/node_modules/yaml/dist/nodes/toJS.js @@ -0,0 +1,39 @@ +'use strict'; + +var identity = require('./identity.js'); + +/** + * Recursively convert any node or its contents to native JavaScript + * + * @param value - The input value + * @param arg - If `value` defines a `toJSON()` method, use this + * as its first argument + * @param ctx - Conversion context, originally set in Document#toJS(). If + * `{ keep: true }` is not set, output should be suitable for JSON + * stringification. + */ +function toJS(value, arg, ctx) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + if (Array.isArray(value)) + return value.map((v, i) => toJS(v, String(i), ctx)); + if (value && typeof value.toJSON === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + if (!ctx || !identity.hasAnchor(value)) + return value.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: undefined }; + ctx.anchors.set(value, data); + ctx.onCreate = res => { + data.res = res; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; + } + if (typeof value === 'bigint' && !ctx?.keep) + return Number(value); + return value; +} + +exports.toJS = toJS; diff --git a/node_modules/yaml/dist/options.d.ts b/node_modules/yaml/dist/options.d.ts new file mode 100644 index 000000000..1a30e1ee6 --- /dev/null +++ b/node_modules/yaml/dist/options.d.ts @@ -0,0 +1,350 @@ +import type { Reviver } from './doc/applyReviver'; +import type { Directives } from './doc/directives'; +import type { LogLevelId } from './log'; +import type { ParsedNode } from './nodes/Node'; +import type { Pair } from './nodes/Pair'; +import type { Scalar } from './nodes/Scalar'; +import type { LineCounter } from './parse/line-counter'; +import type { Schema } from './schema/Schema'; +import type { Tags } from './schema/tags'; +import type { CollectionTag, ScalarTag } from './schema/types'; +export type ParseOptions = { + /** + * Whether integers should be parsed into BigInt rather than number values. + * + * Default: `false` + * + * https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/BigInt + */ + intAsBigInt?: boolean; + /** + * Include a `srcToken` value on each parsed `Node`, containing the CST token + * that was composed into this node. + * + * Default: `false` + */ + keepSourceTokens?: boolean; + /** + * If set, newlines will be tracked, to allow for `lineCounter.linePos(offset)` + * to provide the `{ line, col }` positions within the input. + */ + lineCounter?: LineCounter; + /** + * Include line/col position & node type directly in parse errors. + * + * Default: `true` + */ + prettyErrors?: boolean; + /** + * Detect and report errors that are required by the YAML 1.2 spec, + * but are caused by unambiguous content. + * + * Default: `true` + */ + strict?: boolean; + /** + * Parse all mapping keys as strings. Treat all non-scalar keys as errors. + * + * Default: `false` + */ + stringKeys?: boolean; + /** + * YAML requires map keys to be unique. By default, this is checked by + * comparing scalar values with `===`; deep equality is not checked for + * aliases or collections. If merge keys are enabled by the schema, + * multiple `<<` keys are allowed. + * + * Set `false` to disable, or provide your own comparator function to + * customise. The comparator will be passed two `ParsedNode` values, and + * is expected to return a `boolean` indicating their equality. + * + * Default: `true` + */ + uniqueKeys?: boolean | ((a: ParsedNode, b: ParsedNode) => boolean); +}; +export type DocumentOptions = { + /** + * @internal + * Used internally by Composer. If set and includes an explicit version, + * that overrides the `version` option. + */ + _directives?: Directives; + /** + * Control the logging level during parsing + * + * Default: `'warn'` + */ + logLevel?: LogLevelId; + /** + * The YAML version used by documents without a `%YAML` directive. + * + * Default: `"1.2"` + */ + version?: '1.1' | '1.2' | 'next'; +}; +export type SchemaOptions = { + /** + * When parsing, warn about compatibility issues with the given schema. + * When stringifying, use scalar styles that are parsed correctly + * by the `compat` schema as well as the actual schema. + * + * Default: `null` + */ + compat?: string | Tags | null; + /** + * Array of additional tags to include in the schema, or a function that may + * modify the schema's base tag array. + */ + customTags?: Tags | ((tags: Tags) => Tags) | null; + /** + * Enable support for `<<` merge keys. + * + * Default: `false` for YAML 1.2, `true` for earlier versions + */ + merge?: boolean; + /** + * When using the `'core'` schema, support parsing values with these + * explicit YAML 1.1 tags: + * + * `!!binary`, `!!omap`, `!!pairs`, `!!set`, `!!timestamp`. + * + * Default `true` + */ + resolveKnownTags?: boolean; + /** + * The base schema to use. + * + * The core library has built-in support for the following: + * - `'failsafe'`: A minimal schema that parses all scalars as strings + * - `'core'`: The YAML 1.2 core schema + * - `'json'`: The YAML 1.2 JSON schema, with minimal rules for JSON compatibility + * - `'yaml-1.1'`: The YAML 1.1 schema + * + * If using another (custom) schema, the `customTags` array needs to + * fully define the schema's tags. + * + * Default: `'core'` for YAML 1.2, `'yaml-1.1'` for earlier versions + */ + schema?: string | Schema; + /** + * When adding to or stringifying a map, sort the entries. + * If `true`, sort by comparing key values with `<`. + * Does not affect item order when parsing. + * + * Default: `false` + */ + sortMapEntries?: boolean | ((a: Pair, b: Pair) => number); + /** + * Override default values for `toString()` options. + */ + toStringDefaults?: ToStringOptions; +}; +export type CreateNodeOptions = { + /** + * During node construction, use anchors and aliases to keep strictly equal + * non-null objects as equivalent in YAML. + * + * Default: `true` + */ + aliasDuplicateObjects?: boolean; + /** + * Default prefix for anchors. + * + * Default: `'a'`, resulting in anchors `a1`, `a2`, etc. + */ + anchorPrefix?: string; + /** Force the top-level collection node to use flow style. */ + flow?: boolean; + /** + * Keep `undefined` object values when creating mappings, rather than + * discarding them. + * + * Default: `false` + */ + keepUndefined?: boolean | null; + onTagObj?: (tagObj: ScalarTag | CollectionTag) => void; + /** + * Specify the top-level collection type, e.g. `"!!omap"`. Note that this + * requires the corresponding tag to be available in this document's schema. + */ + tag?: string; +}; +export type ToJSOptions = { + /** + * Use Map rather than Object to represent mappings. + * + * Default: `false` + */ + mapAsMap?: boolean; + /** + * Prevent exponential entity expansion attacks by limiting data aliasing count; + * set to `-1` to disable checks; `0` disallows all alias nodes. + * + * Default: `100` + */ + maxAliasCount?: number; + /** + * If defined, called with the resolved `value` and reference `count` for + * each anchor in the document. + */ + onAnchor?: (value: unknown, count: number) => void; + /** + * Optional function that may filter or modify the output JS value + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter + */ + reviver?: Reviver; +}; +export type ToStringOptions = { + /** + * Use block quote styles for scalar values where applicable. + * Set to `false` to disable block quotes completely. + * + * Default: `true` + */ + blockQuote?: boolean | 'folded' | 'literal'; + /** + * Enforce `'block'` or `'flow'` style on maps and sequences. + * Empty collections will always be stringified as `{}` or `[]`. + * + * Default: `'any'`, allowing each node to set its style separately + * with its `flow: boolean` (default `false`) property. + */ + collectionStyle?: 'any' | 'block' | 'flow'; + /** + * Comment stringifier. + * Output should be valid for the current schema. + * + * By default, empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ + commentString?: (comment: string) => string; + /** + * The default type of string literal used to stringify implicit key values. + * Output may use other types if required to fully represent the value. + * + * If `null`, the value of `defaultStringType` is used. + * + * Default: `null` + */ + defaultKeyType?: Scalar.Type | null; + /** + * The default type of string literal used to stringify values in general. + * Output may use other types if required to fully represent the value. + * + * Default: `'PLAIN'` + */ + defaultStringType?: Scalar.Type; + /** + * Include directives in the output. + * + * - If `true`, at least the document-start marker `---` is always included. + * This does not force the `%YAML` directive to be included. To do that, + * set `doc.directives.yaml.explicit = true`. + * - If `false`, no directives or marker is ever included. If using the `%TAG` + * directive, you are expected to include it manually in the stream before + * its use. + * - If `null`, directives and marker may be included if required. + * + * Default: `null` + */ + directives?: boolean | null; + /** + * Restrict double-quoted strings to use JSON-compatible syntax. + * + * Default: `false` + */ + doubleQuotedAsJSON?: boolean; + /** + * Minimum length for double-quoted strings to use multiple lines to + * represent the value. Ignored if `doubleQuotedAsJSON` is set. + * + * Default: `40` + */ + doubleQuotedMinMultiLineLength?: number; + /** + * String representation for `false`. + * With the core schema, use `'false'`, `'False'`, or `'FALSE'`. + * + * Default: `'false'` + */ + falseStr?: string; + /** + * When true, a single space of padding will be added inside the delimiters + * of non-empty single-line flow collections. + * + * Default: `true` + */ + flowCollectionPadding?: boolean; + /** + * The number of spaces to use when indenting code. + * + * Default: `2` + */ + indent?: number; + /** + * Whether block sequences should be indented. + * + * Default: `true` + */ + indentSeq?: boolean; + /** + * Maximum line width (set to `0` to disable folding). + * + * This is a soft limit, as only double-quoted semantics allow for inserting + * a line break in the middle of a word, as well as being influenced by the + * `minContentWidth` option. + * + * Default: `80` + */ + lineWidth?: number; + /** + * Minimum line width for highly-indented content (set to `0` to disable). + * + * Default: `20` + */ + minContentWidth?: number; + /** + * String representation for `null`. + * With the core schema, use `'null'`, `'Null'`, `'NULL'`, `'~'`, or an empty + * string `''`. + * + * Default: `'null'` + */ + nullStr?: string; + /** + * Require keys to be scalars and to use implicit rather than explicit notation. + * + * Default: `false` + */ + simpleKeys?: boolean; + /** + * Use 'single quote' rather than "double quote" where applicable. + * Set to `false` to disable single quotes completely. + * + * Default: `null` + */ + singleQuote?: boolean | null; + /** + * Add a trailing comma after the last entry in a flow map or flow sequence that's split across multiple lines. + * + * Default: `'false'` + */ + trailingComma?: boolean; + /** + * String representation for `true`. + * With the core schema, use `'true'`, `'True'`, or `'TRUE'`. + * + * Default: `'true'` + */ + trueStr?: string; + /** + * The anchor used by an alias must be defined before the alias node. As it's + * possible for the document to be modified manually, the order may be + * verified during stringification. + * + * Default: `'true'` + */ + verifyAliasOrder?: boolean; +}; diff --git a/node_modules/yaml/dist/parse/cst-scalar.d.ts b/node_modules/yaml/dist/parse/cst-scalar.d.ts new file mode 100644 index 000000000..6064ed892 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst-scalar.d.ts @@ -0,0 +1,64 @@ +import type { ErrorCode } from '../errors'; +import type { Range } from '../nodes/Node'; +import type { Scalar } from '../nodes/Scalar'; +import type { BlockScalar, FlowScalar, SourceToken, Token } from './cst'; +/** + * If `token` is a CST flow or block scalar, determine its string value and a few other attributes. + * Otherwise, return `null`. + */ +export declare function resolveAsScalar(token: FlowScalar | BlockScalar, strict?: boolean, onError?: (offset: number, code: ErrorCode, message: string) => void): { + value: string; + type: Scalar.Type | null; + comment: string; + range: Range; +}; +export declare function resolveAsScalar(token: Token | null | undefined, strict?: boolean, onError?: (offset: number, code: ErrorCode, message: string) => void): { + value: string; + type: Scalar.Type | null; + comment: string; + range: Range; +} | null; +/** + * Create a new scalar token with `value` + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param value The string representation of the value, which will have its content properly indented. + * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.indent The indent level of the token. + * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value. + * @param context.offset The offset position of the token. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +export declare function createScalarToken(value: string, context: { + end?: SourceToken[]; + implicitKey?: boolean; + indent: number; + inFlow?: boolean; + offset?: number; + type?: Scalar.Type; +}): BlockScalar | FlowScalar; +/** + * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have. + * + * Best efforts are made to retain any comments previously associated with the `token`, + * though all contents within a collection's `items` will be overwritten. + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key. + * @param value The string representation of the value, which will have its content properly indented. + * @param context.afterKey In most cases, values after a key should have an additional level of indentation. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +export declare function setScalarValue(token: Token, value: string, context?: { + afterKey?: boolean; + implicitKey?: boolean; + inFlow?: boolean; + type?: Scalar.Type; +}): void; diff --git a/node_modules/yaml/dist/parse/cst-scalar.js b/node_modules/yaml/dist/parse/cst-scalar.js new file mode 100644 index 000000000..81b8463f8 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst-scalar.js @@ -0,0 +1,218 @@ +'use strict'; + +var resolveBlockScalar = require('../compose/resolve-block-scalar.js'); +var resolveFlowScalar = require('../compose/resolve-flow-scalar.js'); +var errors = require('../errors.js'); +var stringifyString = require('../stringify/stringifyString.js'); + +function resolveAsScalar(token, strict = true, onError) { + if (token) { + const _onError = (pos, code, message) => { + const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset, code, message); + else + throw new errors.YAMLParseError([offset, offset + 1], code, message); + }; + switch (token.type) { + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return resolveFlowScalar.resolveFlowScalar(token, strict, _onError); + case 'block-scalar': + return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError); + } + } + return null; +} +/** + * Create a new scalar token with `value` + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param value The string representation of the value, which will have its content properly indented. + * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.indent The indent level of the token. + * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value. + * @param context.offset The offset position of the token. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function createScalarToken(value, context) { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context; + const source = stringifyString.stringifyString({ type, value }, { + implicitKey, + indent: indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: 'newline', offset: -1, indent, source: '\n' } + ]; + switch (source[0]) { + case '|': + case '>': { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + return { type: 'block-scalar', offset, indent, props, source: body }; + } + case '"': + return { type: 'double-quoted-scalar', offset, indent, source, end }; + case "'": + return { type: 'single-quoted-scalar', offset, indent, source, end }; + default: + return { type: 'scalar', offset, indent, source, end }; + } +} +/** + * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have. + * + * Best efforts are made to retain any comments previously associated with the `token`, + * though all contents within a collection's `items` will be overwritten. + * + * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`, + * as this function does not support any schema operations and won't check for such conflicts. + * + * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key. + * @param value The string representation of the value, which will have its content properly indented. + * @param context.afterKey In most cases, values after a key should have an additional level of indentation. + * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value. + * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value. + * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`. + */ +function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent = 'indent' in token ? token.indent : null; + if (afterKey && typeof indent === 'number') + indent += 2; + if (!type) + switch (token.type) { + case 'single-quoted-scalar': + type = 'QUOTE_SINGLE'; + break; + case 'double-quoted-scalar': + type = 'QUOTE_DOUBLE'; + break; + case 'block-scalar': { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL'; + break; + } + default: + type = 'PLAIN'; + } + const source = stringifyString.stringifyString({ type, value }, { + implicitKey: implicitKey || indent === null, + indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '', + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + switch (source[0]) { + case '|': + case '>': + setBlockScalarValue(token, source); + break; + case '"': + setFlowScalarValue(token, source, 'double-quoted-scalar'); + break; + case "'": + setFlowScalarValue(token, source, 'single-quoted-scalar'); + break; + default: + setFlowScalarValue(token, source, 'scalar'); + } +} +function setBlockScalarValue(token, source) { + const he = source.indexOf('\n'); + const head = source.substring(0, he); + const body = source.substring(he + 1) + '\n'; + if (token.type === 'block-scalar') { + const header = token.props[0]; + if (header.type !== 'block-scalar-header') + throw new Error('Invalid block scalar header'); + header.source = head; + token.source = body; + } + else { + const { offset } = token; + const indent = 'indent' in token ? token.indent : -1; + const props = [ + { type: 'block-scalar-header', offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined)) + props.push({ type: 'newline', offset: -1, indent, source: '\n' }); + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type: 'block-scalar', indent, props, source: body }); + } +} +/** @returns `true` if last token is a newline */ +function addEndtoBlockProps(props, end) { + if (end) + for (const st of end) + switch (st.type) { + case 'space': + case 'comment': + props.push(st); + break; + case 'newline': + props.push(st); + return true; + } + return false; +} +function setFlowScalarValue(token, source, type) { + switch (token.type) { + case 'scalar': + case 'double-quoted-scalar': + case 'single-quoted-scalar': + token.type = type; + token.source = source; + break; + case 'block-scalar': { + const end = token.props.slice(1); + let oa = source.length; + if (token.props[0].type === 'block-scalar-header') + oa -= token.props[0].source.length; + for (const tok of end) + tok.offset += oa; + delete token.props; + Object.assign(token, { type, source, end }); + break; + } + case 'block-map': + case 'block-seq': { + const offset = token.offset + source.length; + const nl = { type: 'newline', offset, indent: token.indent, source: '\n' }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent = 'indent' in token ? token.indent : -1; + const end = 'end' in token && Array.isArray(token.end) + ? token.end.filter(st => st.type === 'space' || + st.type === 'comment' || + st.type === 'newline') + : []; + for (const key of Object.keys(token)) + if (key !== 'type' && key !== 'offset') + delete token[key]; + Object.assign(token, { type, indent, source, end }); + } + } +} + +exports.createScalarToken = createScalarToken; +exports.resolveAsScalar = resolveAsScalar; +exports.setScalarValue = setScalarValue; diff --git a/node_modules/yaml/dist/parse/cst-stringify.d.ts b/node_modules/yaml/dist/parse/cst-stringify.d.ts new file mode 100644 index 000000000..312bf6c26 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst-stringify.d.ts @@ -0,0 +1,8 @@ +import type { CollectionItem, Token } from './cst'; +/** + * Stringify a CST document, token, or collection item + * + * Fair warning: This applies no validation whatsoever, and + * simply concatenates the sources in their logical order. + */ +export declare const stringify: (cst: Token | CollectionItem) => string; diff --git a/node_modules/yaml/dist/parse/cst-stringify.js b/node_modules/yaml/dist/parse/cst-stringify.js new file mode 100644 index 000000000..78e8c3722 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst-stringify.js @@ -0,0 +1,63 @@ +'use strict'; + +/** + * Stringify a CST document, token, or collection item + * + * Fair warning: This applies no validation whatsoever, and + * simply concatenates the sources in their logical order. + */ +const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst); +function stringifyToken(token) { + switch (token.type) { + case 'block-scalar': { + let res = ''; + for (const tok of token.props) + res += stringifyToken(tok); + return res + token.source; + } + case 'block-map': + case 'block-seq': { + let res = ''; + for (const item of token.items) + res += stringifyItem(item); + return res; + } + case 'flow-collection': { + let res = token.start.source; + for (const item of token.items) + res += stringifyItem(item); + for (const st of token.end) + res += st.source; + return res; + } + case 'document': { + let res = stringifyItem(token); + if (token.end) + for (const st of token.end) + res += st.source; + return res; + } + default: { + let res = token.source; + if ('end' in token && token.end) + for (const st of token.end) + res += st.source; + return res; + } + } +} +function stringifyItem({ start, key, sep, value }) { + let res = ''; + for (const st of start) + res += st.source; + if (key) + res += stringifyToken(key); + if (sep) + for (const st of sep) + res += st.source; + if (value) + res += stringifyToken(value); + return res; +} + +exports.stringify = stringify; diff --git a/node_modules/yaml/dist/parse/cst-visit.d.ts b/node_modules/yaml/dist/parse/cst-visit.d.ts new file mode 100644 index 000000000..edac14072 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst-visit.d.ts @@ -0,0 +1,39 @@ +import type { BlockMap, BlockSequence, CollectionItem, Document, FlowCollection } from './cst'; +export type VisitPath = readonly ['key' | 'value', number][]; +export type Visitor = (item: CollectionItem, path: VisitPath) => number | symbol | Visitor | void; +/** + * Apply a visitor to a CST document or item. + * + * Walks through the tree (depth-first) starting from the root, calling a + * `visitor` function with two arguments when entering each item: + * - `item`: The current item, which included the following members: + * - `start: SourceToken[]` – Source tokens before the key or value, + * possibly including its anchor or tag. + * - `key?: Token | null` – Set for pair values. May then be `null`, if + * the key before the `:` separator is empty. + * - `sep?: SourceToken[]` – Source tokens between the key and the value, + * which should include the `:` map value indicator if `value` is set. + * - `value?: Token` – The value of a sequence item, or of a map pair. + * - `path`: The steps from the root to the current node, as an array of + * `['key' | 'value', number]` tuples. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this token, continue with + * next sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current item, then continue with the next one + * - `number`: Set the index of the next step. This is useful especially if + * the index of the current token has changed. + * - `function`: Define the next visitor for this item. After the original + * visitor is called on item entry, next visitors are called after handling + * a non-empty `key` and when exiting the item. + */ +export declare function visit(cst: Document | CollectionItem, visitor: Visitor): void; +export declare namespace visit { + var BREAK: symbol; + var SKIP: symbol; + var REMOVE: symbol; + var itemAtPath: (cst: Document | CollectionItem, path: VisitPath) => CollectionItem | undefined; + var parentCollection: (cst: Document | CollectionItem, path: VisitPath) => BlockMap | BlockSequence | FlowCollection; +} diff --git a/node_modules/yaml/dist/parse/cst-visit.js b/node_modules/yaml/dist/parse/cst-visit.js new file mode 100644 index 000000000..9ceee936b --- /dev/null +++ b/node_modules/yaml/dist/parse/cst-visit.js @@ -0,0 +1,99 @@ +'use strict'; + +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove item'); +/** + * Apply a visitor to a CST document or item. + * + * Walks through the tree (depth-first) starting from the root, calling a + * `visitor` function with two arguments when entering each item: + * - `item`: The current item, which included the following members: + * - `start: SourceToken[]` – Source tokens before the key or value, + * possibly including its anchor or tag. + * - `key?: Token | null` – Set for pair values. May then be `null`, if + * the key before the `:` separator is empty. + * - `sep?: SourceToken[]` – Source tokens between the key and the value, + * which should include the `:` map value indicator if `value` is set. + * - `value?: Token` – The value of a sequence item, or of a map pair. + * - `path`: The steps from the root to the current node, as an array of + * `['key' | 'value', number]` tuples. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this token, continue with + * next sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current item, then continue with the next one + * - `number`: Set the index of the next step. This is useful especially if + * the index of the current token has changed. + * - `function`: Define the next visitor for this item. After the original + * visitor is called on item entry, next visitors are called after handling + * a non-empty `key` and when exiting the item. + */ +function visit(cst, visitor) { + if ('type' in cst && cst.type === 'document') + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current item */ +visit.SKIP = SKIP; +/** Remove the current item */ +visit.REMOVE = REMOVE; +/** Find the item at `path` from `cst` as the root */ +visit.itemAtPath = (cst, path) => { + let item = cst; + for (const [field, index] of path) { + const tok = item?.[field]; + if (tok && 'items' in tok) { + item = tok.items[index]; + } + else + return undefined; + } + return item; +}; +/** + * Get the immediate parent collection of the item at `path` from `cst` as the root. + * + * Throws an error if the collection is not found, which should never happen if the item itself exists. + */ +visit.parentCollection = (cst, path) => { + const parent = visit.itemAtPath(cst, path.slice(0, -1)); + const field = path[path.length - 1][0]; + const coll = parent?.[field]; + if (coll && 'items' in coll) + return coll; + throw new Error('Parent collection not found'); +}; +function _visit(path, item, visitor) { + let ctrl = visitor(item, path); + if (typeof ctrl === 'symbol') + return ctrl; + for (const field of ['key', 'value']) { + const token = item[field]; + if (token && 'items' in token) { + for (let i = 0; i < token.items.length; ++i) { + const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + token.items.splice(i, 1); + i -= 1; + } + } + if (typeof ctrl === 'function' && field === 'key') + ctrl = ctrl(item, path); + } + } + return typeof ctrl === 'function' ? ctrl(item, path) : ctrl; +} + +exports.visit = visit; diff --git a/node_modules/yaml/dist/parse/cst.d.ts b/node_modules/yaml/dist/parse/cst.d.ts new file mode 100644 index 000000000..3606c0cf3 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst.d.ts @@ -0,0 +1,109 @@ +export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar'; +export { stringify } from './cst-stringify'; +export type { Visitor, VisitPath } from './cst-visit'; +export { visit } from './cst-visit'; +export interface SourceToken { + type: 'byte-order-mark' | 'doc-mode' | 'doc-start' | 'space' | 'comment' | 'newline' | 'directive-line' | 'anchor' | 'tag' | 'seq-item-ind' | 'explicit-key-ind' | 'map-value-ind' | 'flow-map-start' | 'flow-map-end' | 'flow-seq-start' | 'flow-seq-end' | 'flow-error-end' | 'comma' | 'block-scalar-header'; + offset: number; + indent: number; + source: string; +} +export interface ErrorToken { + type: 'error'; + offset: number; + source: string; + message: string; +} +export interface Directive { + type: 'directive'; + offset: number; + source: string; +} +export interface Document { + type: 'document'; + offset: number; + start: SourceToken[]; + value?: Token; + end?: SourceToken[]; +} +export interface DocumentEnd { + type: 'doc-end'; + offset: number; + source: string; + end?: SourceToken[]; +} +export interface FlowScalar { + type: 'alias' | 'scalar' | 'single-quoted-scalar' | 'double-quoted-scalar'; + offset: number; + indent: number; + source: string; + end?: SourceToken[]; +} +export interface BlockScalar { + type: 'block-scalar'; + offset: number; + indent: number; + props: Token[]; + source: string; +} +export interface BlockMap { + type: 'block-map'; + offset: number; + indent: number; + items: Array<{ + start: SourceToken[]; + explicitKey?: true; + key?: never; + sep?: never; + value?: never; + } | { + start: SourceToken[]; + explicitKey?: true; + key: Token | null; + sep: SourceToken[]; + value?: Token; + }>; +} +export interface BlockSequence { + type: 'block-seq'; + offset: number; + indent: number; + items: Array<{ + start: SourceToken[]; + key?: never; + sep?: never; + value?: Token; + }>; +} +export type CollectionItem = { + start: SourceToken[]; + key?: Token | null; + sep?: SourceToken[]; + value?: Token; +}; +export interface FlowCollection { + type: 'flow-collection'; + offset: number; + indent: number; + start: SourceToken; + items: CollectionItem[]; + end: SourceToken[]; +} +export type Token = SourceToken | ErrorToken | Directive | Document | DocumentEnd | FlowScalar | BlockScalar | BlockMap | BlockSequence | FlowCollection; +export type TokenType = SourceToken['type'] | DocumentEnd['type'] | FlowScalar['type']; +/** The byte order mark */ +export declare const BOM = "\uFEFF"; +/** Start of doc-mode */ +export declare const DOCUMENT = "\u0002"; +/** Unexpected end of flow-mode */ +export declare const FLOW_END = "\u0018"; +/** Next token is a scalar value */ +export declare const SCALAR = "\u001F"; +/** @returns `true` if `token` is a flow or block collection */ +export declare const isCollection: (token: Token | null | undefined) => token is BlockMap | BlockSequence | FlowCollection; +/** @returns `true` if `token` is a flow or block scalar; not an alias */ +export declare const isScalar: (token: Token | null | undefined) => token is FlowScalar | BlockScalar; +/** Get a printable representation of a lexer token */ +export declare function prettyToken(token: string): string; +/** Identify the type of a lexer token. May return `null` for unknown tokens. */ +export declare function tokenType(source: string): TokenType | null; diff --git a/node_modules/yaml/dist/parse/cst.js b/node_modules/yaml/dist/parse/cst.js new file mode 100644 index 000000000..613c229b2 --- /dev/null +++ b/node_modules/yaml/dist/parse/cst.js @@ -0,0 +1,112 @@ +'use strict'; + +var cstScalar = require('./cst-scalar.js'); +var cstStringify = require('./cst-stringify.js'); +var cstVisit = require('./cst-visit.js'); + +/** The byte order mark */ +const BOM = '\u{FEFF}'; +/** Start of doc-mode */ +const DOCUMENT = '\x02'; // C0: Start of Text +/** Unexpected end of flow-mode */ +const FLOW_END = '\x18'; // C0: Cancel +/** Next token is a scalar value */ +const SCALAR = '\x1f'; // C0: Unit Separator +/** @returns `true` if `token` is a flow or block collection */ +const isCollection = (token) => !!token && 'items' in token; +/** @returns `true` if `token` is a flow or block scalar; not an alias */ +const isScalar = (token) => !!token && + (token.type === 'scalar' || + token.type === 'single-quoted-scalar' || + token.type === 'double-quoted-scalar' || + token.type === 'block-scalar'); +/* istanbul ignore next */ +/** Get a printable representation of a lexer token */ +function prettyToken(token) { + switch (token) { + case BOM: + return ''; + case DOCUMENT: + return ''; + case FLOW_END: + return ''; + case SCALAR: + return ''; + default: + return JSON.stringify(token); + } +} +/** Identify the type of a lexer token. May return `null` for unknown tokens. */ +function tokenType(source) { + switch (source) { + case BOM: + return 'byte-order-mark'; + case DOCUMENT: + return 'doc-mode'; + case FLOW_END: + return 'flow-error-end'; + case SCALAR: + return 'scalar'; + case '---': + return 'doc-start'; + case '...': + return 'doc-end'; + case '': + case '\n': + case '\r\n': + return 'newline'; + case '-': + return 'seq-item-ind'; + case '?': + return 'explicit-key-ind'; + case ':': + return 'map-value-ind'; + case '{': + return 'flow-map-start'; + case '}': + return 'flow-map-end'; + case '[': + return 'flow-seq-start'; + case ']': + return 'flow-seq-end'; + case ',': + return 'comma'; + } + switch (source[0]) { + case ' ': + case '\t': + return 'space'; + case '#': + return 'comment'; + case '%': + return 'directive-line'; + case '*': + return 'alias'; + case '&': + return 'anchor'; + case '!': + return 'tag'; + case "'": + return 'single-quoted-scalar'; + case '"': + return 'double-quoted-scalar'; + case '|': + case '>': + return 'block-scalar-header'; + } + return null; +} + +exports.createScalarToken = cstScalar.createScalarToken; +exports.resolveAsScalar = cstScalar.resolveAsScalar; +exports.setScalarValue = cstScalar.setScalarValue; +exports.stringify = cstStringify.stringify; +exports.visit = cstVisit.visit; +exports.BOM = BOM; +exports.DOCUMENT = DOCUMENT; +exports.FLOW_END = FLOW_END; +exports.SCALAR = SCALAR; +exports.isCollection = isCollection; +exports.isScalar = isScalar; +exports.prettyToken = prettyToken; +exports.tokenType = tokenType; diff --git a/node_modules/yaml/dist/parse/lexer.d.ts b/node_modules/yaml/dist/parse/lexer.d.ts new file mode 100644 index 000000000..4c01430d7 --- /dev/null +++ b/node_modules/yaml/dist/parse/lexer.d.ts @@ -0,0 +1,87 @@ +/** + * Splits an input string into lexical tokens, i.e. smaller strings that are + * easily identifiable by `tokens.tokenType()`. + * + * Lexing starts always in a "stream" context. Incomplete input may be buffered + * until a complete token can be emitted. + * + * In addition to slices of the original input, the following control characters + * may also be emitted: + * + * - `\x02` (Start of Text): A document starts with the next token + * - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error) + * - `\x1f` (Unit Separator): Next token is a scalar value + * - `\u{FEFF}` (Byte order mark): Emitted separately outside documents + */ +export declare class Lexer { + /** + * Flag indicating whether the end of the current buffer marks the end of + * all input + */ + private atEnd; + /** + * Explicit indent set in block scalar header, as an offset from the current + * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not + * explicitly set. + */ + private blockScalarIndent; + /** + * Block scalars that include a + (keep) chomping indicator in their header + * include trailing empty lines, which are otherwise excluded from the + * scalar's contents. + */ + private blockScalarKeep; + /** Current input */ + private buffer; + /** + * Flag noting whether the map value indicator : can immediately follow this + * node within a flow context. + */ + private flowKey; + /** Count of surrounding flow collection levels. */ + private flowLevel; + /** + * Minimum level of indentation required for next lines to be parsed as a + * part of the current scalar value. + */ + private indentNext; + /** Indentation level of the current line. */ + private indentValue; + /** Position of the next \n character. */ + private lineEndPos; + /** Stores the state of the lexer if reaching the end of incpomplete input */ + private next; + /** A pointer to `buffer`; the current position of the lexer. */ + private pos; + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + lex(source: string, incomplete?: boolean): Generator; + private atLineEnd; + private charAt; + private continueScalar; + private getLine; + private hasChars; + private setNext; + private peek; + private parseNext; + private parseStream; + private parseLineStart; + private parseBlockStart; + private parseDocument; + private parseFlowCollection; + private parseQuotedScalar; + private parseBlockScalarHeader; + private parseBlockScalar; + private parsePlainScalar; + private pushCount; + private pushToIndex; + private pushIndicators; + private pushTag; + private pushNewline; + private pushSpaces; + private pushUntil; +} diff --git a/node_modules/yaml/dist/parse/lexer.js b/node_modules/yaml/dist/parse/lexer.js new file mode 100644 index 000000000..01d8643bf --- /dev/null +++ b/node_modules/yaml/dist/parse/lexer.js @@ -0,0 +1,723 @@ +'use strict'; + +var cst = require('./cst.js'); + +/* +START -> stream + +stream + directive -> line-end -> stream + indent + line-end -> stream + [else] -> line-start + +line-end + comment -> line-end + newline -> . + input-end -> END + +line-start + doc-start -> doc + doc-end -> stream + [else] -> indent -> block-start + +block-start + seq-item-start -> block-start + explicit-key-start -> block-start + map-value-start -> block-start + [else] -> doc + +doc + line-end -> line-start + spaces -> doc + anchor -> doc + tag -> doc + flow-start -> flow -> doc + flow-end -> error -> doc + seq-item-start -> error -> doc + explicit-key-start -> error -> doc + map-value-start -> doc + alias -> doc + quote-start -> quoted-scalar -> doc + block-scalar-header -> line-end -> block-scalar(min) -> line-start + [else] -> plain-scalar(false, min) -> doc + +flow + line-end -> flow + spaces -> flow + anchor -> flow + tag -> flow + flow-start -> flow -> flow + flow-end -> . + seq-item-start -> error -> flow + explicit-key-start -> flow + map-value-start -> flow + alias -> flow + quote-start -> quoted-scalar -> flow + comma -> flow + [else] -> plain-scalar(true, 0) -> flow + +quoted-scalar + quote-end -> . + [else] -> quoted-scalar + +block-scalar(min) + newline + peek(indent < min) -> . + [else] -> block-scalar(min) + +plain-scalar(is-flow, min) + scalar-end(is-flow) -> . + peek(newline + (indent < min)) -> . + [else] -> plain-scalar(min) +*/ +function isEmpty(ch) { + switch (ch) { + case undefined: + case ' ': + case '\n': + case '\r': + case '\t': + return true; + default: + return false; + } +} +const hexDigits = new Set('0123456789ABCDEFabcdef'); +const tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"); +const flowIndicatorChars = new Set(',[]{}'); +const invalidAnchorChars = new Set(' ,[]{}\n\r\t'); +const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch); +/** + * Splits an input string into lexical tokens, i.e. smaller strings that are + * easily identifiable by `tokens.tokenType()`. + * + * Lexing starts always in a "stream" context. Incomplete input may be buffered + * until a complete token can be emitted. + * + * In addition to slices of the original input, the following control characters + * may also be emitted: + * + * - `\x02` (Start of Text): A document starts with the next token + * - `\x18` (Cancel): Unexpected end of flow-mode (indicates an error) + * - `\x1f` (Unit Separator): Next token is a scalar value + * - `\u{FEFF}` (Byte order mark): Emitted separately outside documents + */ +class Lexer { + constructor() { + /** + * Flag indicating whether the end of the current buffer marks the end of + * all input + */ + this.atEnd = false; + /** + * Explicit indent set in block scalar header, as an offset from the current + * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not + * explicitly set. + */ + this.blockScalarIndent = -1; + /** + * Block scalars that include a + (keep) chomping indicator in their header + * include trailing empty lines, which are otherwise excluded from the + * scalar's contents. + */ + this.blockScalarKeep = false; + /** Current input */ + this.buffer = ''; + /** + * Flag noting whether the map value indicator : can immediately follow this + * node within a flow context. + */ + this.flowKey = false; + /** Count of surrounding flow collection levels. */ + this.flowLevel = 0; + /** + * Minimum level of indentation required for next lines to be parsed as a + * part of the current scalar value. + */ + this.indentNext = 0; + /** Indentation level of the current line. */ + this.indentValue = 0; + /** Position of the next \n character. */ + this.lineEndPos = null; + /** Stores the state of the lexer if reaching the end of incpomplete input */ + this.next = null; + /** A pointer to `buffer`; the current position of the lexer. */ + this.pos = 0; + } + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + if (typeof source !== 'string') + throw TypeError('source is not a string'); + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? 'stream'; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i = this.pos; + let ch = this.buffer[i]; + while (ch === ' ' || ch === '\t') + ch = this.buffer[++i]; + if (!ch || ch === '#' || ch === '\n') + return true; + if (ch === '\r') + return this.buffer[i + 1] === '\n'; + return false; + } + charAt(n) { + return this.buffer[this.pos + n]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === ' ') + ch = this.buffer[++indent + offset]; + if (ch === '\r') { + const next = this.buffer[indent + offset + 1]; + if (next === '\n' || (!next && !this.atEnd)) + return offset + indent + 1; + } + return ch === '\n' || indent >= this.indentNext || (!ch && !this.atEnd) + ? offset + indent + : -1; + } + if (ch === '-' || ch === '.') { + const dt = this.buffer.substr(offset, 3); + if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3])) + return -1; + } + return offset; + } + getLine() { + let end = this.lineEndPos; + if (typeof end !== 'number' || (end !== -1 && end < this.pos)) { + end = this.buffer.indexOf('\n', this.pos); + this.lineEndPos = end; + } + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === '\r') + end -= 1; + return this.buffer.substring(this.pos, end); + } + hasChars(n) { + return this.pos + n <= this.buffer.length; + } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; + } + peek(n) { + return this.buffer.substr(this.pos, n); + } + *parseNext(next) { + switch (next) { + case 'stream': + return yield* this.parseStream(); + case 'line-start': + return yield* this.parseLineStart(); + case 'block-start': + return yield* this.parseBlockStart(); + case 'doc': + return yield* this.parseDocument(); + case 'flow': + return yield* this.parseFlowCollection(); + case 'quoted-scalar': + return yield* this.parseQuotedScalar(); + case 'block-scalar': + return yield* this.parseBlockScalar(); + case 'plain-scalar': + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext('stream'); + if (line[0] === cst.BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === '%') { + let dirEnd = line.length; + let cs = line.indexOf('#'); + while (cs !== -1) { + const ch = line[cs - 1]; + if (ch === ' ' || ch === '\t') { + dirEnd = cs - 1; + break; + } + else { + cs = line.indexOf('#', cs + 1); + } + } + while (true) { + const ch = line[dirEnd - 1]; + if (ch === ' ' || ch === '\t') + dirEnd -= 1; + else + break; + } + const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n); // possible comment + this.pushNewline(); + return 'stream'; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return 'stream'; + } + yield cst.DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext('line-start'); + if (ch === '-' || ch === '.') { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext('line-start'); + const s = this.peek(3); + if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return s === '---' ? 'doc' : 'stream'; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext('block-start'); + if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) { + const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n; + return 'block-start'; + } + return 'doc'; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext('doc'); + let n = yield* this.pushIndicators(); + switch (line[n]) { + case '#': + yield* this.pushCount(line.length - n); + // fallthrough + case undefined: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return 'flow'; + case '}': + case ']': + // this is an error + yield* this.pushCount(1); + return 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'doc'; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case '|': + case '>': + n += yield* this.parseBlockScalarHeader(); + n += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); + } + } + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; + } + else { + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext('flow'); + if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') || + (indent === 0 && + (line.startsWith('---') || line.startsWith('...')) && + isEmpty(line[3]))) { + // Allowing for the terminal ] or } at the same (rather than greater) + // indent level as the initial [ or { is technically invalid, but + // failing here would be surprising to users. + const atFlowEndMarker = indent === this.indentNext - 1 && + this.flowLevel === 1 && + (line[0] === ']' || line[0] === '}'); + if (!atFlowEndMarker) { + // this is an error + this.flowLevel = 0; + yield cst.FLOW_END; + return yield* this.parseLineStart(); + } + } + let n = 0; + while (line[n] === ',') { + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + this.flowKey = false; + } + n += yield* this.pushIndicators(); + switch (line[n]) { + case undefined: + return 'flow'; + case '#': + yield* this.pushCount(line.length - n); + return 'flow'; + case '{': + case '[': + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return 'flow'; + case '}': + case ']': + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? 'flow' : 'doc'; + case '*': + yield* this.pushUntil(isNotAnchorChar); + return 'flow'; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ':': { + const next = this.charAt(1); + if (this.flowKey || isEmpty(next) || next === ',') { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return 'flow'; + } + } + // fallthrough + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); + } + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); + } + else { + // double-quote + while (end !== -1) { + let n = 0; + while (this.buffer[end - 1 - n] === '\\') + n += 1; + if (n % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); + } + } + // Only looking for newlines within the quotes + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf('\n', this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf('\n', cs); + } + if (nl !== -1) { + // this is an error caused by an unexpected unindent + end = nl - (qb[nl - 1] === '\r' ? 2 : 1); + } + } + if (end === -1) { + if (!this.atEnd) + return this.setNext('quoted-scalar'); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? 'flow' : 'doc'; + } + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i = this.pos; + while (true) { + const ch = this.buffer[++i]; + if (ch === '+') + this.blockScalarKeep = true; + else if (ch > '0' && ch <= '9') + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== '-') + break; + } + return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#'); + } + *parseBlockScalar() { + let nl = this.pos - 1; // may be -1 if this.pos === 0 + let indent = 0; + let ch; + loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) { + switch (ch) { + case ' ': + indent += 1; + break; + case '\n': + nl = i; + indent = 0; + break; + case '\r': { + const next = this.buffer[i + 1]; + if (!next && !this.atEnd) + return this.setNext('block-scalar'); + if (next === '\n') + break; + } // fallthrough + default: + break loop; + } + } + if (!ch && !this.atEnd) + return this.setNext('block-scalar'); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else { + this.indentNext = + this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext); + } + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf('\n', cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext('block-scalar'); + nl = this.buffer.length; + } + } + // Trailing insufficiently indented tabs are invalid. + // To catch that during parsing, we include them in the block scalar value. + let i = nl + 1; + ch = this.buffer[i]; + while (ch === ' ') + ch = this.buffer[++i]; + if (ch === '\t') { + while (ch === '\t' || ch === ' ' || ch === '\r' || ch === '\n') + ch = this.buffer[++i]; + nl = i - 1; + } + else if (!this.blockScalarKeep) { + do { + let i = nl - 1; + let ch = this.buffer[i]; + if (ch === '\r') + ch = this.buffer[--i]; + const lastChar = i; // Drop the line if last char not more indented + while (ch === ' ') + ch = this.buffer[--i]; + if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar) + nl = i; + else + break; + } while (true); + } + yield cst.SCALAR; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i = this.pos - 1; + let ch; + while ((ch = this.buffer[++i])) { + if (ch === ':') { + const next = this.buffer[i + 1]; + if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next))) + break; + end = i; + } + else if (isEmpty(ch)) { + let next = this.buffer[i + 1]; + if (ch === '\r') { + if (next === '\n') { + i += 1; + ch = '\n'; + next = this.buffer[i + 1]; + } + else + end = i; + } + if (next === '#' || (inFlow && flowIndicatorChars.has(next))) + break; + if (ch === '\n') { + const cs = this.continueScalar(i + 1); + if (cs === -1) + break; + i = Math.max(i, cs - 2); // to advance, but still account for ' #' + } + } + else { + if (inFlow && flowIndicatorChars.has(ch)) + break; + end = i; + } + } + if (!ch && !this.atEnd) + return this.setNext('plain-scalar'); + yield cst.SCALAR; + yield* this.pushToIndex(end + 1, true); + return inFlow ? 'flow' : 'doc'; + } + *pushCount(n) { + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos += n; + return n; + } + return 0; + } + *pushToIndex(i, allowEmpty) { + const s = this.buffer.slice(this.pos, i); + if (s) { + yield s; + this.pos += s.length; + return s.length; + } + else if (allowEmpty) + yield ''; + return 0; + } + *pushIndicators() { + let n = 0; + loop: while (true) { + switch (this.charAt(0)) { + case '!': + n += yield* this.pushTag(); + n += yield* this.pushSpaces(true); + continue loop; + case '&': + n += yield* this.pushUntil(isNotAnchorChar); + n += yield* this.pushSpaces(true); + continue loop; + case '-': // this is an error + case '?': // this is an error outside flow collections + case ':': { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + continue loop; + } + } + } + break loop; + } + return n; + } + *pushTag() { + if (this.charAt(1) === '<') { + let i = this.pos + 2; + let ch = this.buffer[i]; + while (!isEmpty(ch) && ch !== '>') + ch = this.buffer[++i]; + return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false); + } + else { + let i = this.pos + 1; + let ch = this.buffer[i]; + while (ch) { + if (tagChars.has(ch)) + ch = this.buffer[++i]; + else if (ch === '%' && + hexDigits.has(this.buffer[i + 1]) && + hexDigits.has(this.buffer[i + 2])) { + ch = this.buffer[(i += 3)]; + } + else + break; + } + return yield* this.pushToIndex(i, false); + } + } + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === '\n') + return yield* this.pushCount(1); + else if (ch === '\r' && this.charAt(1) === '\n') + return yield* this.pushCount(2); + else + return 0; + } + *pushSpaces(allowTabs) { + let i = this.pos - 1; + let ch; + do { + ch = this.buffer[++i]; + } while (ch === ' ' || (allowTabs && ch === '\t')); + const n = i - this.pos; + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos = i; + } + return n; + } + *pushUntil(test) { + let i = this.pos; + let ch = this.buffer[i]; + while (!test(ch)) + ch = this.buffer[++i]; + return yield* this.pushToIndex(i, false); + } +} + +exports.Lexer = Lexer; diff --git a/node_modules/yaml/dist/parse/line-counter.d.ts b/node_modules/yaml/dist/parse/line-counter.d.ts new file mode 100644 index 000000000..b4690958a --- /dev/null +++ b/node_modules/yaml/dist/parse/line-counter.d.ts @@ -0,0 +1,22 @@ +/** + * Tracks newlines during parsing in order to provide an efficient API for + * determining the one-indexed `{ line, col }` position for any offset + * within the input. + */ +export declare class LineCounter { + lineStarts: number[]; + /** + * Should be called in ascending order. Otherwise, call + * `lineCounter.lineStarts.sort()` before calling `linePos()`. + */ + addNewLine: (offset: number) => number; + /** + * Performs a binary search and returns the 1-indexed { line, col } + * position of `offset`. If `line === 0`, `addNewLine` has never been + * called or `offset` is before the first known newline. + */ + linePos: (offset: number) => { + line: number; + col: number; + }; +} diff --git a/node_modules/yaml/dist/parse/line-counter.js b/node_modules/yaml/dist/parse/line-counter.js new file mode 100644 index 000000000..0e7383bde --- /dev/null +++ b/node_modules/yaml/dist/parse/line-counter.js @@ -0,0 +1,41 @@ +'use strict'; + +/** + * Tracks newlines during parsing in order to provide an efficient API for + * determining the one-indexed `{ line, col }` position for any offset + * within the input. + */ +class LineCounter { + constructor() { + this.lineStarts = []; + /** + * Should be called in ascending order. Otherwise, call + * `lineCounter.lineStarts.sort()` before calling `linePos()`. + */ + this.addNewLine = (offset) => this.lineStarts.push(offset); + /** + * Performs a binary search and returns the 1-indexed { line, col } + * position of `offset`. If `line === 0`, `addNewLine` has never been + * called or `offset` is before the first known newline. + */ + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = (low + high) >> 1; // Math.floor((low + high) / 2) + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; + }; + } +} + +exports.LineCounter = LineCounter; diff --git a/node_modules/yaml/dist/parse/parser.d.ts b/node_modules/yaml/dist/parse/parser.d.ts new file mode 100644 index 000000000..b7ab54511 --- /dev/null +++ b/node_modules/yaml/dist/parse/parser.d.ts @@ -0,0 +1,84 @@ +import type { Token } from './cst'; +/** + * A YAML concrete syntax tree (CST) parser + * + * ```ts + * const src: string = ... + * for (const token of new Parser().parse(src)) { + * // token: Token + * } + * ``` + * + * To use the parser with a user-provided lexer: + * + * ```ts + * function* parse(source: string, lexer: Lexer) { + * const parser = new Parser() + * for (const lexeme of lexer.lex(source)) + * yield* parser.next(lexeme) + * yield* parser.end() + * } + * + * const src: string = ... + * const lexer = new Lexer() + * for (const token of parse(src, lexer)) { + * // token: Token + * } + * ``` + */ +export declare class Parser { + private onNewLine?; + /** If true, space and sequence indicators count as indentation */ + private atNewLine; + /** If true, next token is a scalar value */ + private atScalar; + /** Current indentation level */ + private indent; + /** Current offset since the start of parsing */ + offset: number; + /** On the same line with a block map key */ + private onKeyLine; + /** Top indicates the node that's currently being built */ + stack: Token[]; + /** The source of the current token, set in parse() */ + private source; + /** The type of the current token, set in parse() */ + private type; + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine?: (offset: number) => void); + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + parse(source: string, incomplete?: boolean): Generator; + /** + * Advance the parser by the `source` of one lexical token. + */ + next(source: string): Generator; + private lexer; + /** Call at end of input to push out any remaining constructions */ + end(): Generator; + private get sourceToken(); + private step; + private peek; + private pop; + private stream; + private document; + private scalar; + private blockScalar; + private blockMap; + private blockSequence; + private flowCollection; + private flowScalar; + private startBlockValue; + private atIndentedComment; + private documentEnd; + private lineEnd; +} diff --git a/node_modules/yaml/dist/parse/parser.js b/node_modules/yaml/dist/parse/parser.js new file mode 100644 index 000000000..88ba53496 --- /dev/null +++ b/node_modules/yaml/dist/parse/parser.js @@ -0,0 +1,980 @@ +'use strict'; + +var node_process = require('process'); +var cst = require('./cst.js'); +var lexer = require('./lexer.js'); + +function includesToken(list, type) { + for (let i = 0; i < list.length; ++i) + if (list[i].type === type) + return true; + return false; +} +function findNonEmptyIndex(list) { + for (let i = 0; i < list.length; ++i) { + switch (list[i].type) { + case 'space': + case 'comment': + case 'newline': + break; + default: + return i; + } + } + return -1; +} +function isFlowToken(token) { + switch (token?.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + case 'flow-collection': + return true; + default: + return false; + } +} +function getPrevProps(parent) { + switch (parent.type) { + case 'document': + return parent.start; + case 'block-map': { + const it = parent.items[parent.items.length - 1]; + return it.sep ?? it.start; + } + case 'block-seq': + return parent.items[parent.items.length - 1].start; + /* istanbul ignore next should not happen */ + default: + return []; + } +} +/** Note: May modify input array */ +function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i = prev.length; + loop: while (--i >= 0) { + switch (prev[i].type) { + case 'doc-start': + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + case 'newline': + break loop; + } + } + while (prev[++i]?.type === 'space') { + /* loop */ + } + return prev.splice(i, prev.length); +} +function arrayPushArray(target, source) { + // May exhaust call stack with large `source` array + if (source.length < 1e5) + Array.prototype.push.apply(target, source); + else + for (let i = 0; i < source.length; ++i) + target.push(source[i]); +} +function fixFlowSeqItems(fc) { + if (fc.start.type === 'flow-seq-start') { + for (const it of fc.items) { + if (it.sep && + !it.value && + !includesToken(it.start, 'explicit-key-ind') && + !includesToken(it.sep, 'map-value-ind')) { + if (it.key) + it.value = it.key; + delete it.key; + if (isFlowToken(it.value)) { + if (it.value.end) + arrayPushArray(it.value.end, it.sep); + else + it.value.end = it.sep; + } + else + arrayPushArray(it.start, it.sep); + delete it.sep; + } + } + } +} +/** + * A YAML concrete syntax tree (CST) parser + * + * ```ts + * const src: string = ... + * for (const token of new Parser().parse(src)) { + * // token: Token + * } + * ``` + * + * To use the parser with a user-provided lexer: + * + * ```ts + * function* parse(source: string, lexer: Lexer) { + * const parser = new Parser() + * for (const lexeme of lexer.lex(source)) + * yield* parser.next(lexeme) + * yield* parser.end() + * } + * + * const src: string = ... + * const lexer = new Lexer() + * for (const token of parse(src, lexer)) { + * // token: Token + * } + * ``` + */ +class Parser { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + /** If true, space and sequence indicators count as indentation */ + this.atNewLine = true; + /** If true, next token is a scalar value */ + this.atScalar = false; + /** Current indentation level */ + this.indent = 0; + /** Current offset since the start of parsing */ + this.offset = 0; + /** On the same line with a block map key */ + this.onKeyLine = false; + /** Top indicates the node that's currently being built */ + this.stack = []; + /** The source of the current token, set in parse() */ + this.source = ''; + /** The type of the current token, set in parse() */ + this.type = ''; + // Must be defined after `next()` + this.lexer = new lexer.Lexer(); + this.onNewLine = onNewLine; + } + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (node_process.env.LOG_TOKENS) + console.log('|', cst.prettyToken(source)); + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; + } + const type = cst.tokenType(source); + if (!type) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: 'error', offset: this.offset, message, source }); + this.offset += source.length; + } + else if (type === 'scalar') { + this.atNewLine = false; + this.atScalar = true; + this.type = 'scalar'; + } + else { + this.type = type; + yield* this.step(); + switch (type) { + case 'newline': + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case 'space': + if (this.atNewLine && source[0] === ' ') + this.indent += source.length; + break; + case 'explicit-key-ind': + case 'map-value-ind': + case 'seq-item-ind': + if (this.atNewLine) + this.indent += source.length; + break; + case 'doc-mode': + case 'flow-error-end': + return; + default: + this.atNewLine = false; + } + this.offset += source.length; + } + } + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); + } + get sourceToken() { + const st = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + return st; + } + *step() { + const top = this.peek(1); + if (this.type === 'doc-end' && top?.type !== 'doc-end') { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: 'doc-end', + offset: this.offset, + source: this.source + }); + return; + } + if (!top) + return yield* this.stream(); + switch (top.type) { + case 'document': + return yield* this.document(top); + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return yield* this.scalar(top); + case 'block-scalar': + return yield* this.blockScalar(top); + case 'block-map': + return yield* this.blockMap(top); + case 'block-seq': + return yield* this.blockSequence(top); + case 'flow-collection': + return yield* this.flowCollection(top); + case 'doc-end': + return yield* this.documentEnd(top); + } + /* istanbul ignore next should not happen */ + yield* this.pop(); + } + peek(n) { + return this.stack[this.stack.length - n]; + } + *pop(error) { + const token = error ?? this.stack.pop(); + /* istanbul ignore if should not happen */ + if (!token) { + const message = 'Tried to pop an empty stack'; + yield { type: 'error', offset: this.offset, source: '', message }; + } + else if (this.stack.length === 0) { + yield token; + } + else { + const top = this.peek(1); + if (token.type === 'block-scalar') { + // Block scalars use their parent rather than header indent + token.indent = 'indent' in top ? top.indent : 0; + } + else if (token.type === 'flow-collection' && top.type === 'document') { + // Ignore all indent for top-level flow collections + token.indent = 0; + } + if (token.type === 'flow-collection') + fixFlowSeqItems(token); + switch (top.type) { + case 'document': + top.value = token; + break; + case 'block-scalar': + top.props.push(token); // error + break; + case 'block-map': { + const it = top.items[top.items.length - 1]; + if (it.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } + else if (it.sep) { + it.value = token; + } + else { + Object.assign(it, { key: token, sep: [] }); + this.onKeyLine = !it.explicitKey; + return; + } + break; + } + case 'block-seq': { + const it = top.items[top.items.length - 1]; + if (it.value) + top.items.push({ start: [], value: token }); + else + it.value = token; + break; + } + case 'flow-collection': { + const it = top.items[top.items.length - 1]; + if (!it || it.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it.sep) + it.value = token; + else + Object.assign(it, { key: token, sep: [] }); + return; + } + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.pop(token); + } + if ((top.type === 'document' || + top.type === 'block-map' || + top.type === 'block-seq') && + (token.type === 'block-map' || token.type === 'block-seq')) { + const last = token.items[token.items.length - 1]; + if (last && + !last.sep && + !last.value && + last.start.length > 0 && + findNonEmptyIndex(last.start) === -1 && + (token.indent === 0 || + last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) { + if (top.type === 'document') + top.end = last.start; + else + top.items.push({ start: last.start }); + token.items.splice(-1, 1); + } + } + } + } + *stream() { + switch (this.type) { + case 'directive-line': + yield { type: 'directive', offset: this.offset, source: this.source }; + return; + case 'byte-order-mark': + case 'space': + case 'comment': + case 'newline': + yield this.sourceToken; + return; + case 'doc-mode': + case 'doc-start': { + const doc = { + type: 'document', + offset: this.offset, + start: [] + }; + if (this.type === 'doc-start') + doc.start.push(this.sourceToken); + this.stack.push(doc); + return; + } + } + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source + }; + } + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case 'doc-start': { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } + else + doc.start.push(this.sourceToken); + return; + } + case 'anchor': + case 'tag': + case 'space': + case 'comment': + case 'newline': + doc.start.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: 'error', + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; + } + } + *scalar(scalar) { + if (this.type === 'map-value-ind') { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep; + if (scalar.end) { + sep = scalar.end; + sep.push(this.sourceToken); + delete scalar.end; + } + else + sep = [this.sourceToken]; + const map = { + type: 'block-map', + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case 'space': + case 'comment': + case 'newline': + scalar.props.push(this.sourceToken); + return; + case 'scalar': + scalar.source = this.source; + // block-scalar source includes trailing newline + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + yield* this.pop(); + break; + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map) { + const it = map.items[map.items.length - 1]; + // it.sep is true-ish if pair already has key or : separator + switch (this.type) { + case 'newline': + this.onKeyLine = false; + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'space': + case 'comment': + if (it.value) { + map.items.push({ start: [this.sourceToken] }); + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + arrayPushArray(end, it.start); + end.push(this.sourceToken); + map.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + } + if (this.indent >= map.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map.indent; + const atNextItem = atMapIndent && + (it.sep || it.explicitKey) && + this.type !== 'seq-item-ind'; + // For empty nodes, assign newline-separated not indented empty tokens to following node + let start = []; + if (atNextItem && it.sep && !it.value) { + const nl = []; + for (let i = 0; i < it.sep.length; ++i) { + const st = it.sep[i]; + switch (st.type) { + case 'newline': + nl.push(i); + break; + case 'space': + break; + case 'comment': + if (st.indent > map.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start = it.sep.splice(nl[1]); + } + switch (this.type) { + case 'anchor': + case 'tag': + if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + this.onKeyLine = true; + } + else if (it.sep) { + it.sep.push(this.sourceToken); + } + else { + it.start.push(this.sourceToken); + } + return; + case 'explicit-key-ind': + if (!it.sep && !it.explicitKey) { + it.start.push(this.sourceToken); + it.explicitKey = true; + } + else if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start, explicitKey: true }); + } + else { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken], explicitKey: true }] + }); + } + this.onKeyLine = true; + return; + case 'map-value-ind': + if (it.explicitKey) { + if (!it.sep) { + if (includesToken(it.start, 'newline')) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else { + const start = getFirstKeyStartProps(it.start); + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + } + else if (it.value) { + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } + else if (isFlowToken(it.key) && + !includesToken(it.sep, 'newline')) { + const start = getFirstKeyStartProps(it.start); + const key = it.key; + const sep = it.sep; + sep.push(this.sourceToken); + // @ts-expect-error type guard is wrong here + delete it.key; + // @ts-expect-error type guard is wrong here + delete it.sep; + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key, sep }] + }); + } + else if (start.length > 0) { + // Not actually at next item + it.sep = it.sep.concat(start, this.sourceToken); + } + else { + it.sep.push(this.sourceToken); + } + } + else { + if (!it.sep) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } + else if (it.value || atNextItem) { + map.items.push({ start, key: null, sep: [this.sourceToken] }); + } + else if (includesToken(it.sep, 'map-value-ind')) { + this.stack.push({ + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } + else { + it.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (atNextItem || it.value) { + map.items.push({ start, key: fs, sep: [] }); + this.onKeyLine = true; + } + else if (it.sep) { + this.stack.push(fs); + } + else { + Object.assign(it, { key: fs, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map); + if (bv) { + if (bv.type === 'block-seq') { + if (!it.explicitKey && + it.sep && + !includesToken(it.sep, 'newline')) { + yield* this.pop({ + type: 'error', + offset: this.offset, + message: 'Unexpected block-seq-ind on same line with key', + source: this.source + }); + return; + } + } + else if (atMapIndent) { + map.items.push({ start }); + } + this.stack.push(bv); + return; + } + } + } + } + yield* this.pop(); + yield* this.step(); + } + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; + switch (this.type) { + case 'newline': + if (it.value) { + const end = 'end' in it.value ? it.value.end : undefined; + const last = Array.isArray(end) ? end[end.length - 1] : undefined; + if (last?.type === 'comment') + end?.push(this.sourceToken); + else + seq.items.push({ start: [this.sourceToken] }); + } + else + it.start.push(this.sourceToken); + return; + case 'space': + case 'comment': + if (it.value) + seq.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + arrayPushArray(end, it.start); + end.push(this.sourceToken); + seq.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + case 'anchor': + case 'tag': + if (it.value || this.indent <= seq.indent) + break; + it.start.push(this.sourceToken); + return; + case 'seq-item-ind': + if (this.indent !== seq.indent) + break; + if (it.value || includesToken(it.start, 'seq-item-ind')) + seq.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + } + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); + if (bv) { + this.stack.push(bv); + return; + } + } + yield* this.pop(); + yield* this.step(); + } + *flowCollection(fc) { + const it = fc.items[fc.items.length - 1]; + if (this.type === 'flow-error-end') { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top?.type === 'flow-collection'); + } + else if (fc.end.length === 0) { + switch (this.type) { + case 'comma': + case 'explicit-key-ind': + if (!it || it.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + case 'map-value-ind': + if (!it || it.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + Object.assign(it, { key: null, sep: [this.sourceToken] }); + return; + case 'space': + case 'comment': + case 'newline': + case 'anchor': + case 'tag': + if (!it || it.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + it.start.push(this.sourceToken); + return; + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': { + const fs = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs, sep: [] }); + else if (it.sep) + this.stack.push(fs); + else + Object.assign(it, { key: fs, sep: [] }); + return; + } + case 'flow-map-end': + case 'flow-seq-end': + fc.end.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(fc); + /* istanbul ignore else should not happen */ + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); + } + } + else { + const parent = this.peek(2); + if (parent.type === 'block-map' && + ((this.type === 'map-value-ind' && parent.indent === fc.indent) || + (this.type === 'newline' && + !parent.items[parent.items.length - 1].sep))) { + yield* this.pop(); + yield* this.step(); + } + else if (this.type === 'map-value-ind' && + parent.type !== 'flow-collection') { + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep = fc.end.splice(1, fc.end.length); + sep.push(this.sourceToken); + const map = { + type: 'block-map', + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } + else { + yield* this.lineEnd(fc); + } + } + } + flowScalar(type) { + if (this.onNewLine) { + let nl = this.source.indexOf('\n') + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf('\n', nl) + 1; + } + } + return { + type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + } + startBlockValue(parent) { + switch (this.type) { + case 'alias': + case 'scalar': + case 'single-quoted-scalar': + case 'double-quoted-scalar': + return this.flowScalar(this.type); + case 'block-scalar-header': + return { + type: 'block-scalar', + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: '' + }; + case 'flow-map-start': + case 'flow-seq-start': + return { + type: 'flow-collection', + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case 'seq-item-ind': + return { + type: 'block-seq', + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case 'explicit-key-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, explicitKey: true }] + }; + } + case 'map-value-ind': { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + return { + type: 'block-map', + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; + } + } + return null; + } + atIndentedComment(start, indent) { + if (this.type !== 'comment') + return false; + if (this.indent <= indent) + return false; + return start.every(st => st.type === 'newline' || st.type === 'space'); + } + *documentEnd(docEnd) { + if (this.type !== 'doc-mode') { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } + *lineEnd(token) { + switch (this.type) { + case 'comma': + case 'doc-start': + case 'doc-end': + case 'flow-seq-end': + case 'flow-map-end': + case 'map-value-ind': + yield* this.pop(); + yield* this.step(); + break; + case 'newline': + this.onKeyLine = false; + // fallthrough + case 'space': + case 'comment': + default: + // all other values are errors + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === 'newline') + yield* this.pop(); + } + } +} + +exports.Parser = Parser; diff --git a/node_modules/yaml/dist/public-api.d.ts b/node_modules/yaml/dist/public-api.d.ts new file mode 100644 index 000000000..fd6dd4590 --- /dev/null +++ b/node_modules/yaml/dist/public-api.d.ts @@ -0,0 +1,44 @@ +import { Composer } from './compose/composer'; +import type { Reviver } from './doc/applyReviver'; +import type { Replacer } from './doc/Document'; +import { Document } from './doc/Document'; +import type { Node, ParsedNode } from './nodes/Node'; +import type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from './options'; +export interface EmptyStream extends Array, ReturnType { + empty: true; +} +/** + * Parse the input as a stream of YAML documents. + * + * Documents should be separated from each other by `...` or `---` marker lines. + * + * @returns If an empty `docs` array is returned, it will be of type + * EmptyStream and contain additional stream information. In + * TypeScript, you should use `'empty' in docs` as a type guard for it. + */ +export declare function parseAllDocuments(source: string, options?: ParseOptions & DocumentOptions & SchemaOptions): Array : Document> | EmptyStream; +/** Parse an input string into a single YAML.Document */ +export declare function parseDocument(source: string, options?: ParseOptions & DocumentOptions & SchemaOptions): Contents extends ParsedNode ? Document.Parsed : Document; +/** + * Parse an input string into JavaScript. + * + * Only supports input consisting of a single YAML document; for multi-document + * support you should use `YAML.parseAllDocuments`. May throw on error, and may + * log warnings using `console.warn`. + * + * @param str - A string with YAML formatting. + * @param reviver - A reviver function, as in `JSON.parse()` + * @returns The value will match the type of the root value of the parsed YAML + * document, so Maps become objects, Sequences arrays, and scalars result in + * nulls, booleans, numbers and strings. + */ +export declare function parse(src: string, options?: ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions): any; +export declare function parse(src: string, reviver: Reviver, options?: ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions): any; +/** + * Stringify a value as a YAML document. + * + * @param replacer - A replacer array or function, as in `JSON.stringify()` + * @returns Will always include `\n` as the last character, as is expected of YAML documents. + */ +export declare function stringify(value: any, options?: DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions): string; +export declare function stringify(value: any, replacer?: Replacer | null, options?: string | number | (DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions)): string; diff --git a/node_modules/yaml/dist/public-api.js b/node_modules/yaml/dist/public-api.js new file mode 100644 index 000000000..db76cefdc --- /dev/null +++ b/node_modules/yaml/dist/public-api.js @@ -0,0 +1,107 @@ +'use strict'; + +var composer = require('./compose/composer.js'); +var Document = require('./doc/Document.js'); +var errors = require('./errors.js'); +var log = require('./log.js'); +var identity = require('./nodes/identity.js'); +var lineCounter = require('./parse/line-counter.js'); +var parser = require('./parse/parser.js'); + +function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null; + return { lineCounter: lineCounter$1, prettyErrors }; +} +/** + * Parse the input as a stream of YAML documents. + * + * Documents should be separated from each other by `...` or `---` marker lines. + * + * @returns If an empty `docs` array is returned, it will be of type + * EmptyStream and contain additional stream information. In + * TypeScript, you should use `'empty' in docs` as a type guard for it. + */ +function parseAllDocuments(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser$1 = new parser.Parser(lineCounter?.addNewLine); + const composer$1 = new composer.Composer(options); + const docs = Array.from(composer$1.compose(parser$1.parse(source))); + if (prettyErrors && lineCounter) + for (const doc of docs) { + doc.errors.forEach(errors.prettifyError(source, lineCounter)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter)); + } + if (docs.length > 0) + return docs; + return Object.assign([], { empty: true }, composer$1.streamInfo()); +} +/** Parse an input string into a single YAML.Document */ +function parseDocument(source, options = {}) { + const { lineCounter, prettyErrors } = parseOptions(options); + const parser$1 = new parser.Parser(lineCounter?.addNewLine); + const composer$1 = new composer.Composer(options); + // `doc` is always set by compose.end(true) at the very latest + let doc = null; + for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== 'silent') { + doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()')); + break; + } + } + if (prettyErrors && lineCounter) { + doc.errors.forEach(errors.prettifyError(source, lineCounter)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter)); + } + return doc; +} +function parse(src, reviver, options) { + let _reviver = undefined; + if (typeof reviver === 'function') { + _reviver = reviver; + } + else if (options === undefined && reviver && typeof reviver === 'object') { + options = reviver; + } + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== 'silent') + throw doc.errors[0]; + else + doc.errors = []; + } + return doc.toJS(Object.assign({ reviver: _reviver }, options)); +} +function stringify(value, replacer, options) { + let _replacer = null; + if (typeof replacer === 'function' || Array.isArray(replacer)) { + _replacer = replacer; + } + else if (options === undefined && replacer) { + options = replacer; + } + if (typeof options === 'string') + options = options.length; + if (typeof options === 'number') { + const indent = Math.round(options); + options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent }; + } + if (value === undefined) { + const { keepUndefined } = options ?? replacer ?? {}; + if (!keepUndefined) + return undefined; + } + if (identity.isDocument(value) && !_replacer) + return value.toString(options); + return new Document.Document(value, _replacer, options).toString(options); +} + +exports.parse = parse; +exports.parseAllDocuments = parseAllDocuments; +exports.parseDocument = parseDocument; +exports.stringify = stringify; diff --git a/node_modules/yaml/dist/schema/Schema.d.ts b/node_modules/yaml/dist/schema/Schema.d.ts new file mode 100644 index 000000000..cb6c3ed61 --- /dev/null +++ b/node_modules/yaml/dist/schema/Schema.d.ts @@ -0,0 +1,17 @@ +import { MAP, SCALAR, SEQ } from '../nodes/identity'; +import type { Pair } from '../nodes/Pair'; +import type { SchemaOptions, ToStringOptions } from '../options'; +import type { CollectionTag, ScalarTag } from './types'; +export declare class Schema { + compat: Array | null; + knownTags: Record; + name: string; + sortMapEntries: ((a: Pair, b: Pair) => number) | null; + tags: Array; + toStringOptions: Readonly | null; + readonly [MAP]: CollectionTag; + readonly [SCALAR]: ScalarTag; + readonly [SEQ]: CollectionTag; + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }: SchemaOptions); + clone(): Schema; +} diff --git a/node_modules/yaml/dist/schema/Schema.js b/node_modules/yaml/dist/schema/Schema.js new file mode 100644 index 000000000..392654702 --- /dev/null +++ b/node_modules/yaml/dist/schema/Schema.js @@ -0,0 +1,39 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var map = require('./common/map.js'); +var seq = require('./common/seq.js'); +var string = require('./common/string.js'); +var tags = require('./tags.js'); + +const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; +class Schema { + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) + ? tags.getTags(compat, 'compat') + : compat + ? tags.getTags(null, compat) + : null; + this.name = (typeof schema === 'string' && schema) || 'core'; + this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; + this.tags = tags.getTags(customTags, this.name, merge); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, identity.MAP, { value: map.map }); + Object.defineProperty(this, identity.SCALAR, { value: string.string }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); + // Used by createMap() + this.sortMapEntries = + typeof sortMapEntries === 'function' + ? sortMapEntries + : sortMapEntries === true + ? sortMapEntriesByKey + : null; + } + clone() { + const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy.tags = this.tags.slice(); + return copy; + } +} + +exports.Schema = Schema; diff --git a/node_modules/yaml/dist/schema/common/map.d.ts b/node_modules/yaml/dist/schema/common/map.d.ts new file mode 100644 index 000000000..5db47c559 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/map.d.ts @@ -0,0 +1,2 @@ +import type { CollectionTag } from '../types'; +export declare const map: CollectionTag; diff --git a/node_modules/yaml/dist/schema/common/map.js b/node_modules/yaml/dist/schema/common/map.js new file mode 100644 index 000000000..649c3b973 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/map.js @@ -0,0 +1,19 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var YAMLMap = require('../../nodes/YAMLMap.js'); + +const map = { + collection: 'map', + default: true, + nodeClass: YAMLMap.YAMLMap, + tag: 'tag:yaml.org,2002:map', + resolve(map, onError) { + if (!identity.isMap(map)) + onError('Expected a mapping for this tag'); + return map; + }, + createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx) +}; + +exports.map = map; diff --git a/node_modules/yaml/dist/schema/common/null.d.ts b/node_modules/yaml/dist/schema/common/null.d.ts new file mode 100644 index 000000000..66f9f8393 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/null.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types'; +export declare const nullTag: ScalarTag & { + test: RegExp; +}; diff --git a/node_modules/yaml/dist/schema/common/null.js b/node_modules/yaml/dist/schema/common/null.js new file mode 100644 index 000000000..cb353a7a7 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/null.js @@ -0,0 +1,17 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); + +const nullTag = { + identify: value => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar.Scalar(null), + stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source) + ? source + : ctx.options.nullStr +}; + +exports.nullTag = nullTag; diff --git a/node_modules/yaml/dist/schema/common/seq.d.ts b/node_modules/yaml/dist/schema/common/seq.d.ts new file mode 100644 index 000000000..fc8f562d1 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/seq.d.ts @@ -0,0 +1,2 @@ +import type { CollectionTag } from '../types'; +export declare const seq: CollectionTag; diff --git a/node_modules/yaml/dist/schema/common/seq.js b/node_modules/yaml/dist/schema/common/seq.js new file mode 100644 index 000000000..9c54bc96a --- /dev/null +++ b/node_modules/yaml/dist/schema/common/seq.js @@ -0,0 +1,19 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var YAMLSeq = require('../../nodes/YAMLSeq.js'); + +const seq = { + collection: 'seq', + default: true, + nodeClass: YAMLSeq.YAMLSeq, + tag: 'tag:yaml.org,2002:seq', + resolve(seq, onError) { + if (!identity.isSeq(seq)) + onError('Expected a sequence for this tag'); + return seq; + }, + createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx) +}; + +exports.seq = seq; diff --git a/node_modules/yaml/dist/schema/common/string.d.ts b/node_modules/yaml/dist/schema/common/string.d.ts new file mode 100644 index 000000000..d03dc8999 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/string.d.ts @@ -0,0 +1,2 @@ +import type { ScalarTag } from '../types'; +export declare const string: ScalarTag; diff --git a/node_modules/yaml/dist/schema/common/string.js b/node_modules/yaml/dist/schema/common/string.js new file mode 100644 index 000000000..760142009 --- /dev/null +++ b/node_modules/yaml/dist/schema/common/string.js @@ -0,0 +1,16 @@ +'use strict'; + +var stringifyString = require('../../stringify/stringifyString.js'); + +const string = { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); + } +}; + +exports.string = string; diff --git a/node_modules/yaml/dist/schema/core/bool.d.ts b/node_modules/yaml/dist/schema/core/bool.d.ts new file mode 100644 index 000000000..36c614985 --- /dev/null +++ b/node_modules/yaml/dist/schema/core/bool.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types'; +export declare const boolTag: ScalarTag & { + test: RegExp; +}; diff --git a/node_modules/yaml/dist/schema/core/bool.js b/node_modules/yaml/dist/schema/core/bool.js new file mode 100644 index 000000000..4def73c7f --- /dev/null +++ b/node_modules/yaml/dist/schema/core/bool.js @@ -0,0 +1,21 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); + +const boolTag = { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'), + stringify({ source, value }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === 't' || source[0] === 'T'; + if (value === sv) + return source; + } + return value ? ctx.options.trueStr : ctx.options.falseStr; + } +}; + +exports.boolTag = boolTag; diff --git a/node_modules/yaml/dist/schema/core/float.d.ts b/node_modules/yaml/dist/schema/core/float.d.ts new file mode 100644 index 000000000..6e5412b84 --- /dev/null +++ b/node_modules/yaml/dist/schema/core/float.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types'; +export declare const floatNaN: ScalarTag; +export declare const floatExp: ScalarTag; +export declare const float: ScalarTag; diff --git a/node_modules/yaml/dist/schema/core/float.js b/node_modules/yaml/dist/schema/core/float.js new file mode 100644 index 000000000..8756446e4 --- /dev/null +++ b/node_modules/yaml/dist/schema/core/float.js @@ -0,0 +1,47 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: str => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: str => parseFloat(str), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str)); + const dot = str.indexOf('.'); + if (dot !== -1 && str[str.length - 1] === '0') + node.minFractionDigits = str.length - dot - 1; + return node; + }, + stringify: stringifyNumber.stringifyNumber +}; + +exports.float = float; +exports.floatExp = floatExp; +exports.floatNaN = floatNaN; diff --git a/node_modules/yaml/dist/schema/core/int.d.ts b/node_modules/yaml/dist/schema/core/int.d.ts new file mode 100644 index 000000000..fb884bb8b --- /dev/null +++ b/node_modules/yaml/dist/schema/core/int.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types'; +export declare const intOct: ScalarTag; +export declare const int: ScalarTag; +export declare const intHex: ScalarTag; diff --git a/node_modules/yaml/dist/schema/core/int.js b/node_modules/yaml/dist/schema/core/int.js new file mode 100644 index 000000000..fe4c9ca1a --- /dev/null +++ b/node_modules/yaml/dist/schema/core/int.js @@ -0,0 +1,42 @@ +'use strict'; + +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber.stringifyNumber(node); +} +const intOct = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^0o[0-7]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), + stringify: node => intStringify(node, 8, '0o') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9]+$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber +}; +const intHex = { + identify: value => intIdentify(value) && value >= 0, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^0x[0-9a-fA-F]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +exports.int = int; +exports.intHex = intHex; +exports.intOct = intOct; diff --git a/node_modules/yaml/dist/schema/core/schema.d.ts b/node_modules/yaml/dist/schema/core/schema.d.ts new file mode 100644 index 000000000..0d21e5690 --- /dev/null +++ b/node_modules/yaml/dist/schema/core/schema.d.ts @@ -0,0 +1 @@ +export declare const schema: (import('../types').CollectionTag | import('../types').ScalarTag)[]; diff --git a/node_modules/yaml/dist/schema/core/schema.js b/node_modules/yaml/dist/schema/core/schema.js new file mode 100644 index 000000000..6ab87f2cc --- /dev/null +++ b/node_modules/yaml/dist/schema/core/schema.js @@ -0,0 +1,25 @@ +'use strict'; + +var map = require('../common/map.js'); +var _null = require('../common/null.js'); +var seq = require('../common/seq.js'); +var string = require('../common/string.js'); +var bool = require('./bool.js'); +var float = require('./float.js'); +var int = require('./int.js'); + +const schema = [ + map.map, + seq.seq, + string.string, + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float +]; + +exports.schema = schema; diff --git a/node_modules/yaml/dist/schema/json-schema.d.ts b/node_modules/yaml/dist/schema/json-schema.d.ts new file mode 100644 index 000000000..6d51f40b5 --- /dev/null +++ b/node_modules/yaml/dist/schema/json-schema.d.ts @@ -0,0 +1,69 @@ +type JsonSchema = boolean | ArraySchema | ObjectSchema | NumberSchema | StringSchema; +type JsonType = 'array' | 'object' | 'string' | 'number' | 'integer' | 'boolean' | 'null'; +interface CommonSchema { + type?: JsonType | JsonType[]; + const?: unknown; + enum?: unknown[]; + format?: string; + allOf?: JsonSchema[]; + anyOf?: JsonSchema[]; + oneOf?: JsonSchema[]; + not?: JsonSchema; + if?: JsonSchema; + then?: JsonSchema; + else?: JsonSchema; + $id?: string; + $defs?: Record; + $anchor?: string; + $dynamicAnchor?: string; + $ref?: string; + $dynamicRef?: string; + $schema?: string; + $vocabulary?: Record; + $comment?: string; + default?: unknown; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + title?: string; + description?: string; + examples?: unknown[]; +} +interface ArraySchema extends CommonSchema { + prefixItems?: JsonSchema[]; + items?: JsonSchema; + contains?: JsonSchema; + unevaluatedItems?: JsonSchema; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; +} +interface ObjectSchema extends CommonSchema { + properties?: Record; + patternProperties?: Record; + additionalProperties?: JsonSchema; + propertyNames?: JsonSchema; + unevaluatedProperties?: JsonSchema; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + dependentSchemas?: Record; +} +interface StringSchema extends CommonSchema { + maxLength?: number; + minLength?: number; + patter?: string; + contentEncoding?: string; + contentMediaType?: string; + contentSchema?: JsonSchema; +} +interface NumberSchema extends CommonSchema { + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; +} diff --git a/node_modules/yaml/dist/schema/json/schema.d.ts b/node_modules/yaml/dist/schema/json/schema.d.ts new file mode 100644 index 000000000..5c18c611d --- /dev/null +++ b/node_modules/yaml/dist/schema/json/schema.d.ts @@ -0,0 +1,2 @@ +import type { CollectionTag, ScalarTag } from '../types'; +export declare const schema: (CollectionTag | ScalarTag)[]; diff --git a/node_modules/yaml/dist/schema/json/schema.js b/node_modules/yaml/dist/schema/json/schema.js new file mode 100644 index 000000000..ccb871afb --- /dev/null +++ b/node_modules/yaml/dist/schema/json/schema.js @@ -0,0 +1,64 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var map = require('../common/map.js'); +var seq = require('../common/seq.js'); + +function intIdentify(value) { + return typeof value === 'bigint' || Number.isInteger(value); +} +const stringifyJSON = ({ value }) => JSON.stringify(value); +const jsonScalars = [ + { + identify: value => typeof value === 'string', + default: true, + tag: 'tag:yaml.org,2002:str', + resolve: str => str, + stringify: stringifyJSON + }, + { + identify: value => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: 'tag:yaml.org,2002:null', + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: value => typeof value === 'boolean', + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^true$|^false$/, + resolve: str => str === 'true', + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value) + }, + { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: str => parseFloat(str), + stringify: stringifyJSON + } +]; +const jsonError = { + default: true, + tag: '', + test: /^/, + resolve(str, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; + } +}; +const schema = [map.map, seq.seq].concat(jsonScalars, jsonError); + +exports.schema = schema; diff --git a/node_modules/yaml/dist/schema/tags.d.ts b/node_modules/yaml/dist/schema/tags.d.ts new file mode 100644 index 000000000..01cf33f4d --- /dev/null +++ b/node_modules/yaml/dist/schema/tags.d.ts @@ -0,0 +1,48 @@ +import type { SchemaOptions } from '../options'; +import type { CollectionTag, ScalarTag } from './types'; +declare const tagsByName: { + binary: ScalarTag; + bool: ScalarTag & { + test: RegExp; + }; + float: ScalarTag; + floatExp: ScalarTag; + floatNaN: ScalarTag; + floatTime: ScalarTag; + int: ScalarTag; + intHex: ScalarTag; + intOct: ScalarTag; + intTime: ScalarTag; + map: CollectionTag; + merge: ScalarTag & { + identify(value: unknown): boolean; + test: RegExp; + }; + null: ScalarTag & { + test: RegExp; + }; + omap: CollectionTag; + pairs: CollectionTag; + seq: CollectionTag; + set: CollectionTag; + timestamp: ScalarTag & { + test: RegExp; + }; +}; +export type TagId = keyof typeof tagsByName; +export type Tags = Array; +export declare const coreKnownTags: { + 'tag:yaml.org,2002:binary': ScalarTag; + 'tag:yaml.org,2002:merge': ScalarTag & { + identify(value: unknown): boolean; + test: RegExp; + }; + 'tag:yaml.org,2002:omap': CollectionTag; + 'tag:yaml.org,2002:pairs': CollectionTag; + 'tag:yaml.org,2002:set': CollectionTag; + 'tag:yaml.org,2002:timestamp': ScalarTag & { + test: RegExp; + }; +}; +export declare function getTags(customTags: SchemaOptions['customTags'] | undefined, schemaName: string, addMergeTag?: boolean): (CollectionTag | ScalarTag)[]; +export {}; diff --git a/node_modules/yaml/dist/schema/tags.js b/node_modules/yaml/dist/schema/tags.js new file mode 100644 index 000000000..bd67d864f --- /dev/null +++ b/node_modules/yaml/dist/schema/tags.js @@ -0,0 +1,99 @@ +'use strict'; + +var map = require('./common/map.js'); +var _null = require('./common/null.js'); +var seq = require('./common/seq.js'); +var string = require('./common/string.js'); +var bool = require('./core/bool.js'); +var float = require('./core/float.js'); +var int = require('./core/int.js'); +var schema = require('./core/schema.js'); +var schema$1 = require('./json/schema.js'); +var binary = require('./yaml-1.1/binary.js'); +var merge = require('./yaml-1.1/merge.js'); +var omap = require('./yaml-1.1/omap.js'); +var pairs = require('./yaml-1.1/pairs.js'); +var schema$2 = require('./yaml-1.1/schema.js'); +var set = require('./yaml-1.1/set.js'); +var timestamp = require('./yaml-1.1/timestamp.js'); + +const schemas = new Map([ + ['core', schema.schema], + ['failsafe', [map.map, seq.seq, string.string]], + ['json', schema$1.schema], + ['yaml11', schema$2.schema], + ['yaml-1.1', schema$2.schema] +]); +const tagsByName = { + binary: binary.binary, + bool: bool.boolTag, + float: float.float, + floatExp: float.floatExp, + floatNaN: float.floatNaN, + floatTime: timestamp.floatTime, + int: int.int, + intHex: int.intHex, + intOct: int.intOct, + intTime: timestamp.intTime, + map: map.map, + merge: merge.merge, + null: _null.nullTag, + omap: omap.omap, + pairs: pairs.pairs, + seq: seq.seq, + set: set.set, + timestamp: timestamp.timestamp +}; +const coreKnownTags = { + 'tag:yaml.org,2002:binary': binary.binary, + 'tag:yaml.org,2002:merge': merge.merge, + 'tag:yaml.org,2002:omap': omap.omap, + 'tag:yaml.org,2002:pairs': pairs.pairs, + 'tag:yaml.org,2002:set': set.set, + 'tag:yaml.org,2002:timestamp': timestamp.timestamp +}; +function getTags(customTags, schemaName, addMergeTag) { + const schemaTags = schemas.get(schemaName); + if (schemaTags && !customTags) { + return addMergeTag && !schemaTags.includes(merge.merge) + ? schemaTags.concat(merge.merge) + : schemaTags.slice(); + } + let tags = schemaTags; + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys = Array.from(schemas.keys()) + .filter(key => key !== 'yaml11') + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags = tags.concat(tag); + } + else if (typeof customTags === 'function') { + tags = customTags(tags.slice()); + } + if (addMergeTag) + tags = tags.concat(merge.merge); + return tags.reduce((tags, tag) => { + const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag; + if (!tagObj) { + const tagName = JSON.stringify(tag); + const keys = Object.keys(tagsByName) + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`); + } + if (!tags.includes(tagObj)) + tags.push(tagObj); + return tags; + }, []); +} + +exports.coreKnownTags = coreKnownTags; +exports.getTags = getTags; diff --git a/node_modules/yaml/dist/schema/types.d.ts b/node_modules/yaml/dist/schema/types.d.ts new file mode 100644 index 000000000..631cc53fc --- /dev/null +++ b/node_modules/yaml/dist/schema/types.d.ts @@ -0,0 +1,92 @@ +import type { CreateNodeContext } from '../doc/createNode'; +import type { Node } from '../nodes/Node'; +import type { Scalar } from '../nodes/Scalar'; +import type { YAMLMap } from '../nodes/YAMLMap'; +import type { YAMLSeq } from '../nodes/YAMLSeq'; +import type { ParseOptions } from '../options'; +import type { StringifyContext } from '../stringify/stringify'; +import type { Schema } from './Schema'; +interface TagBase { + /** + * An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes. + */ + createNode?: (schema: Schema, value: unknown, ctx: CreateNodeContext) => Node; + /** + * If `true`, allows for values to be stringified without + * an explicit tag together with `test`. + * If `'key'`, this only applies if the value is used as a mapping key. + * For most cases, it's unlikely that you'll actually want to use this, + * even if you first think you do. + */ + default?: boolean | 'key'; + /** + * If a tag has multiple forms that should be parsed and/or stringified + * differently, use `format` to identify them. + */ + format?: string; + /** + * Used by `YAML.createNode` to detect your data type, e.g. using `typeof` or + * `instanceof`. + */ + identify?: (value: unknown) => boolean; + /** + * The identifier for your data type, with which its stringified form will be + * prefixed. Should either be a !-prefixed local `!tag`, or a fully qualified + * `tag:domain,date:foo`. + */ + tag: string; +} +export interface ScalarTag extends TagBase { + collection?: never; + nodeClass?: never; + /** + * Turns a value into an AST node. + * If returning a non-`Node` value, the output will be wrapped as a `Scalar`. + */ + resolve(value: string, onError: (message: string) => void, options: ParseOptions): unknown; + /** + * Optional function stringifying a Scalar node. If your data includes a + * suitable `.toString()` method, you can probably leave this undefined and + * use the default stringifier. + * + * @param item The node being stringified. + * @param ctx Contains the stringifying context variables. + * @param onComment Callback to signal that the stringifier includes the + * item's comment in its output. + * @param onChompKeep Callback to signal that the output uses a block scalar + * type with the `+` chomping indicator. + */ + stringify?: (item: Scalar, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void) => string; + /** + * Together with `default` allows for values to be stringified without an + * explicit tag and detected using a regular expression. For most cases, it's + * unlikely that you'll actually want to use these, even if you first think + * you do. + */ + test?: RegExp; +} +export interface CollectionTag extends TagBase { + stringify?: never; + test?: never; + /** The source collection type supported by this tag. */ + collection: 'map' | 'seq'; + /** + * The `Node` child class that implements this tag. + * If set, used to select this tag when stringifying. + * + * If the class provides a static `from` method, then that + * will be used if the tag object doesn't have a `createNode` method. + */ + nodeClass?: { + new (schema?: Schema): Node; + from?: (schema: Schema, obj: unknown, ctx: CreateNodeContext) => Node; + }; + /** + * Turns a value into an AST node. + * If returning a non-`Node` value, the output will be wrapped as a `Scalar`. + * + * Note: this is required if nodeClass is not provided. + */ + resolve?: (value: YAMLMap.Parsed | YAMLSeq.Parsed, onError: (message: string) => void, options: ParseOptions) => unknown; +} +export {}; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts new file mode 100644 index 000000000..6a7e60b52 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts @@ -0,0 +1,2 @@ +import type { ScalarTag } from '../types'; +export declare const binary: ScalarTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/binary.js b/node_modules/yaml/dist/schema/yaml-1.1/binary.js new file mode 100644 index 000000000..e529d7493 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/binary.js @@ -0,0 +1,70 @@ +'use strict'; + +var node_buffer = require('buffer'); +var Scalar = require('../../nodes/Scalar.js'); +var stringifyString = require('../../stringify/stringifyString.js'); + +const binary = { + identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array + default: false, + tag: 'tag:yaml.org,2002:binary', + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof node_buffer.Buffer === 'function') { + return node_buffer.Buffer.from(src, 'base64'); + } + else if (typeof atob === 'function') { + // On IE 11, atob() can't handle newlines + const str = atob(src.replace(/[\n\r]/g, '')); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) + buffer[i] = str.charCodeAt(i); + return buffer; + } + else { + onError('This environment does not support reading binary tags; either Buffer or atob is required'); + return src; + } + }, + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { + if (!value) + return ''; + const buf = value; // checked earlier by binary.identify() + let str; + if (typeof node_buffer.Buffer === 'function') { + str = + buf instanceof node_buffer.Buffer + ? buf.toString('base64') + : node_buffer.Buffer.from(buf.buffer).toString('base64'); + } + else if (typeof btoa === 'function') { + let s = ''; + for (let i = 0; i < buf.length; ++i) + s += String.fromCharCode(buf[i]); + str = btoa(s); + } + else { + throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required'); + } + type ?? (type = Scalar.Scalar.BLOCK_LITERAL); + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n = Math.ceil(str.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str.substr(o, lineWidth); + } + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\n' : ' '); + } + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); + } +}; + +exports.binary = binary; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts new file mode 100644 index 000000000..5208456c1 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts @@ -0,0 +1,7 @@ +import type { ScalarTag } from '../types'; +export declare const trueTag: ScalarTag & { + test: RegExp; +}; +export declare const falseTag: ScalarTag & { + test: RegExp; +}; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/bool.js b/node_modules/yaml/dist/schema/yaml-1.1/bool.js new file mode 100644 index 000000000..d98795263 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/bool.js @@ -0,0 +1,29 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); + +function boolStringify({ value, source }, ctx) { + const boolObj = value ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value ? ctx.options.trueStr : ctx.options.falseStr; +} +const trueTag = { + identify: value => value === true, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar.Scalar(true), + stringify: boolStringify +}; +const falseTag = { + identify: value => value === false, + default: true, + tag: 'tag:yaml.org,2002:bool', + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, + resolve: () => new Scalar.Scalar(false), + stringify: boolStringify +}; + +exports.falseTag = falseTag; +exports.trueTag = trueTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts new file mode 100644 index 000000000..6e5412b84 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts @@ -0,0 +1,4 @@ +import type { ScalarTag } from '../types'; +export declare const floatNaN: ScalarTag; +export declare const floatExp: ScalarTag; +export declare const float: ScalarTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/float.js b/node_modules/yaml/dist/schema/yaml-1.1/float.js new file mode 100644 index 000000000..39f1eb0c9 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/float.js @@ -0,0 +1,50 @@ +'use strict'; + +var Scalar = require('../../nodes/Scalar.js'); +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const floatNaN = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === 'nan' + ? NaN + : str[0] === '-' + ? Number.NEGATIVE_INFINITY + : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber +}; +const floatExp = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'EXP', + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, '')), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } +}; +const float = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ''))); + const dot = str.indexOf('.'); + if (dot !== -1) { + const f = str.substring(dot + 1).replace(/_/g, ''); + if (f[f.length - 1] === '0') + node.minFractionDigits = f.length; + } + return node; + }, + stringify: stringifyNumber.stringifyNumber +}; + +exports.float = float; +exports.floatExp = floatExp; +exports.floatNaN = floatNaN; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts new file mode 100644 index 000000000..22461ed67 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts @@ -0,0 +1,5 @@ +import type { ScalarTag } from '../types'; +export declare const intBin: ScalarTag; +export declare const intOct: ScalarTag; +export declare const int: ScalarTag; +export declare const intHex: ScalarTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/int.js b/node_modules/yaml/dist/schema/yaml-1.1/int.js new file mode 100644 index 000000000..fdf47ca68 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/int.js @@ -0,0 +1,76 @@ +'use strict'; + +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); +function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; + if (sign === '-' || sign === '+') + offset += 1; + str = str.substring(offset).replace(/_/g, ''); + if (intAsBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n = BigInt(str); + return sign === '-' ? BigInt(-1) * n : n; + } + const n = parseInt(str, radix); + return sign === '-' ? -1 * n : n; +} +function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? '-' + prefix + str.substr(1) : prefix + str; + } + return stringifyNumber.stringifyNumber(node); +} +const intBin = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'BIN', + test: /^[-+]?0b[0-1_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), + stringify: node => intStringify(node, 2, '0b') +}; +const intOct = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'OCT', + test: /^[-+]?0[0-7_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), + stringify: node => intStringify(node, 8, '0') +}; +const int = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber +}; +const intHex = { + identify: intIdentify, + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'HEX', + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: node => intStringify(node, 16, '0x') +}; + +exports.int = int; +exports.intBin = intBin; +exports.intHex = intHex; +exports.intOct = intOct; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts new file mode 100644 index 000000000..8ade17125 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts @@ -0,0 +1,9 @@ +import type { ToJSContext } from '../../nodes/toJS'; +import type { MapLike } from '../../nodes/YAMLMap'; +import type { ScalarTag } from '../types'; +export declare const merge: ScalarTag & { + identify(value: unknown): boolean; + test: RegExp; +}; +export declare const isMergeKey: (ctx: ToJSContext | undefined, key: unknown) => boolean | undefined; +export declare function addMergeToJSMap(ctx: ToJSContext | undefined, map: MapLike, value: unknown): void; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/merge.js b/node_modules/yaml/dist/schema/yaml-1.1/merge.js new file mode 100644 index 000000000..7d64b4a8f --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/merge.js @@ -0,0 +1,71 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var Scalar = require('../../nodes/Scalar.js'); + +// If the value associated with a merge key is a single mapping node, each of +// its key/value pairs is inserted into the current mapping, unless the key +// already exists in it. If the value associated with the merge key is a +// sequence, then this sequence is expected to contain mapping nodes and each +// of these nodes is merged in turn according to its order in the sequence. +// Keys in mapping nodes earlier in the sequence override keys specified in +// later mapping nodes. -- http://yaml.org/type/merge.html +const MERGE_KEY = '<<'; +const merge = { + identify: value => value === MERGE_KEY || + (typeof value === 'symbol' && value.description === MERGE_KEY), + default: 'key', + tag: 'tag:yaml.org,2002:merge', + test: /^<<$/, + resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), { + addToJSMap: addMergeToJSMap + }), + stringify: () => MERGE_KEY +}; +const isMergeKey = (ctx, key) => (merge.identify(key) || + (identity.isScalar(key) && + (!key.type || key.type === Scalar.Scalar.PLAIN) && + merge.identify(key.value))) && + ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default); +function addMergeToJSMap(ctx, map, value) { + const source = resolveAliasValue(ctx, value); + if (identity.isSeq(source)) + for (const it of source.items) + mergeValue(ctx, map, it); + else if (Array.isArray(source)) + for (const it of source) + mergeValue(ctx, map, it); + else + mergeValue(ctx, map, source); +} +function mergeValue(ctx, map, value) { + const source = resolveAliasValue(ctx, value); + if (!identity.isMap(source)) + throw new Error('Merge sources must be maps or map aliases'); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value); + } + else if (map instanceof Set) { + map.add(key); + } + else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map; +} +function resolveAliasValue(ctx, value) { + return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value; +} + +exports.addMergeToJSMap = addMergeToJSMap; +exports.isMergeKey = isMergeKey; +exports.merge = merge; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts new file mode 100644 index 000000000..33425afcb --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts @@ -0,0 +1,22 @@ +import type { ToJSContext } from '../../nodes/toJS'; +import { YAMLMap } from '../../nodes/YAMLMap'; +import { YAMLSeq } from '../../nodes/YAMLSeq'; +import type { CreateNodeContext } from '../../util'; +import type { Schema } from '../Schema'; +import type { CollectionTag } from '../types'; +export declare class YAMLOMap extends YAMLSeq { + static tag: string; + constructor(); + add: typeof YAMLMap.prototype.add; + delete: typeof YAMLMap.prototype.delete; + get: typeof YAMLMap.prototype.get; + has: typeof YAMLMap.prototype.has; + set: typeof YAMLMap.prototype.set; + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; + static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLOMap; +} +export declare const omap: CollectionTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/omap.js b/node_modules/yaml/dist/schema/yaml-1.1/omap.js new file mode 100644 index 000000000..3ca141dee --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/omap.js @@ -0,0 +1,77 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var toJS = require('../../nodes/toJS.js'); +var YAMLMap = require('../../nodes/YAMLMap.js'); +var YAMLSeq = require('../../nodes/YAMLSeq.js'); +var pairs = require('./pairs.js'); + +class YAMLOMap extends YAMLSeq.YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.YAMLMap.prototype.set.bind(this); + this.tag = YAMLOMap.tag; + } + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_, ctx) { + if (!ctx) + return super.toJSON(_); + const map = new Map(); + if (ctx?.onCreate) + ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (identity.isPair(pair)) { + key = toJS.toJS(pair.key, '', ctx); + value = toJS.toJS(pair.value, key, ctx); + } + else { + key = toJS.toJS(pair, '', ctx); + } + if (map.has(key)) + throw new Error('Ordered maps must not include duplicate keys'); + map.set(key, value); + } + return map; + } + static from(schema, iterable, ctx) { + const pairs$1 = pairs.createPairs(schema, iterable, ctx); + const omap = new this(); + omap.items = pairs$1.items; + return omap; + } +} +YAMLOMap.tag = 'tag:yaml.org,2002:omap'; +const omap = { + collection: 'seq', + identify: value => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: 'tag:yaml.org,2002:omap', + resolve(seq, onError) { + const pairs$1 = pairs.resolvePairs(seq, onError); + const seenKeys = []; + for (const { key } of pairs$1.items) { + if (identity.isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } + else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs$1); + }, + createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) +}; + +exports.YAMLOMap = YAMLOMap; +exports.omap = omap; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts new file mode 100644 index 000000000..3bb7d0c0d --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts @@ -0,0 +1,10 @@ +import type { CreateNodeContext } from '../../doc/createNode'; +import type { ParsedNode } from '../../nodes/Node'; +import { Pair } from '../../nodes/Pair'; +import type { YAMLMap } from '../../nodes/YAMLMap'; +import { YAMLSeq } from '../../nodes/YAMLSeq'; +import type { Schema } from '../../schema/Schema'; +import type { CollectionTag } from '../types'; +export declare function resolvePairs(seq: YAMLSeq.Parsed> | YAMLMap.Parsed, onError: (message: string) => void): YAMLSeq.Parsed>; +export declare function createPairs(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSeq; +export declare const pairs: CollectionTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/pairs.js b/node_modules/yaml/dist/schema/yaml-1.1/pairs.js new file mode 100644 index 000000000..aa32e0fa2 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/pairs.js @@ -0,0 +1,82 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var Pair = require('../../nodes/Pair.js'); +var Scalar = require('../../nodes/Scalar.js'); +var YAMLSeq = require('../../nodes/YAMLSeq.js'); + +function resolvePairs(seq, onError) { + if (identity.isSeq(seq)) { + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (identity.isPair(item)) + continue; + else if (identity.isMap(item)) { + if (item.items.length > 1) + onError('Each pair must have its own sequence indicator'); + const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore + ? `${item.commentBefore}\n${pair.key.commentBefore}` + : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment + ? `${item.comment}\n${cn.comment}` + : item.comment; + } + item = pair; + } + seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item); + } + } + else + onError('Expected a sequence for this tag'); + return seq; +} +function createPairs(schema, iterable, ctx) { + const { replacer } = ctx; + const pairs = new YAMLSeq.YAMLSeq(schema); + pairs.tag = 'tag:yaml.org,2002:pairs'; + let i = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it of iterable) { + if (typeof replacer === 'function') + it = replacer.call(iterable, String(i++), it); + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } + else + throw new TypeError(`Expected [key, value] tuple: ${it}`); + } + else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } + else { + throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`); + } + } + else { + key = it; + } + pairs.items.push(Pair.createPair(key, value, ctx)); + } + return pairs; +} +const pairs = { + collection: 'seq', + default: false, + tag: 'tag:yaml.org,2002:pairs', + resolve: resolvePairs, + createNode: createPairs +}; + +exports.createPairs = createPairs; +exports.pairs = pairs; +exports.resolvePairs = resolvePairs; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts new file mode 100644 index 000000000..0d21e5690 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts @@ -0,0 +1 @@ +export declare const schema: (import('../types').CollectionTag | import('../types').ScalarTag)[]; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/schema.js b/node_modules/yaml/dist/schema/yaml-1.1/schema.js new file mode 100644 index 000000000..2ea4b730e --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/schema.js @@ -0,0 +1,41 @@ +'use strict'; + +var map = require('../common/map.js'); +var _null = require('../common/null.js'); +var seq = require('../common/seq.js'); +var string = require('../common/string.js'); +var binary = require('./binary.js'); +var bool = require('./bool.js'); +var float = require('./float.js'); +var int = require('./int.js'); +var merge = require('./merge.js'); +var omap = require('./omap.js'); +var pairs = require('./pairs.js'); +var set = require('./set.js'); +var timestamp = require('./timestamp.js'); + +const schema = [ + map.map, + seq.seq, + string.string, + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + merge.merge, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp +]; + +exports.schema = schema; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts new file mode 100644 index 000000000..ddf43aa03 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts @@ -0,0 +1,28 @@ +import { Pair } from '../../nodes/Pair'; +import type { Scalar } from '../../nodes/Scalar'; +import type { ToJSContext } from '../../nodes/toJS'; +import { YAMLMap } from '../../nodes/YAMLMap'; +import type { Schema } from '../../schema/Schema'; +import type { StringifyContext } from '../../stringify/stringify'; +import type { CreateNodeContext } from '../../util'; +import type { CollectionTag } from '../types'; +export declare class YAMLSet extends YAMLMap | null> { + static tag: string; + constructor(schema?: Schema); + add(key: T | Pair | null> | { + key: T; + value: Scalar | null; + }): void; + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key: unknown, keepPair?: boolean): any; + set(key: T, value: boolean): void; + /** @deprecated Will throw; `value` must be boolean */ + set(key: T, value: null): void; + toJSON(_?: unknown, ctx?: ToJSContext): any; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet; +} +export declare const set: CollectionTag; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/set.js b/node_modules/yaml/dist/schema/yaml-1.1/set.js new file mode 100644 index 000000000..650c2508b --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/set.js @@ -0,0 +1,96 @@ +'use strict'; + +var identity = require('../../nodes/identity.js'); +var Pair = require('../../nodes/Pair.js'); +var YAMLMap = require('../../nodes/YAMLMap.js'); + +class YAMLSet extends YAMLMap.YAMLMap { + constructor(schema) { + super(schema); + this.tag = YAMLSet.tag; + } + add(key) { + let pair; + if (identity.isPair(key)) + pair = key; + else if (key && + typeof key === 'object' && + 'key' in key && + 'value' in key && + key.value === null) + pair = new Pair.Pair(key.key, null); + else + pair = new Pair.Pair(key, null); + const prev = YAMLMap.findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); + } + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = YAMLMap.findPair(this.items, key); + return !keepPair && identity.isPair(pair) + ? identity.isScalar(pair.key) + ? pair.key.value + : pair.key + : pair; + } + set(key, value) { + if (typeof value !== 'boolean') + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = YAMLMap.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } + else if (!prev && value) { + this.items.push(new Pair.Pair(key)); + } + } + toJSON(_, ctx) { + return super.toJSON(_, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error('Set items must all have null values'); + } + static from(schema, iterable, ctx) { + const { replacer } = ctx; + const set = new this(schema); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value of iterable) { + if (typeof replacer === 'function') + value = replacer.call(iterable, value, value); + set.items.push(Pair.createPair(value, null, ctx)); + } + return set; + } +} +YAMLSet.tag = 'tag:yaml.org,2002:set'; +const set = { + collection: 'map', + identify: value => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: 'tag:yaml.org,2002:set', + createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), + resolve(map, onError) { + if (identity.isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); + else + onError('Set items must all have null values'); + } + else + onError('Expected a mapping for this tag'); + return map; + } +}; + +exports.YAMLSet = YAMLSet; +exports.set = set; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts b/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts new file mode 100644 index 000000000..851346688 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts @@ -0,0 +1,6 @@ +import type { ScalarTag } from '../types'; +export declare const intTime: ScalarTag; +export declare const floatTime: ScalarTag; +export declare const timestamp: ScalarTag & { + test: RegExp; +}; diff --git a/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js b/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js new file mode 100644 index 000000000..982fd0637 --- /dev/null +++ b/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js @@ -0,0 +1,105 @@ +'use strict'; + +var stringifyNumber = require('../../stringify/stringifyNumber.js'); + +/** Internal types handle bigint as number, because TS can't figure it out. */ +function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === '-' || sign === '+' ? str.substring(1) : str; + const num = (n) => asBigInt ? BigInt(n) : Number(n); + const res = parts + .replace(/_/g, '') + .split(':') + .reduce((res, p) => res * num(60) + num(p), num(0)); + return (sign === '-' ? num(-1) * res : res); +} +/** + * hhhh:mm:ss.sss + * + * Internal types handle bigint as number, because TS can't figure it out. + */ +function stringifySexagesimal(node) { + let { value } = node; + let num = (n) => n; + if (typeof value === 'bigint') + num = n => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber.stringifyNumber(node); + let sign = ''; + if (value < 0) { + sign = '-'; + value *= num(-1); + } + const _60 = num(60); + const parts = [value % _60]; // seconds, including ms + if (value < 60) { + parts.unshift(0); // at least one : is required + } + else { + value = (value - parts[0]) / _60; + parts.unshift(value % _60); // minutes + if (value >= 60) { + value = (value - parts[0]) / _60; + parts.unshift(value); // hours + } + } + return (sign + + parts + .map(n => String(n).padStart(2, '0')) + .join(':') + .replace(/000000\d*$/, '') // % 60 may introduce error + ); +} +const intTime = { + identify: value => typeof value === 'bigint' || Number.isInteger(value), + default: true, + tag: 'tag:yaml.org,2002:int', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), + stringify: stringifySexagesimal +}; +const floatTime = { + identify: value => typeof value === 'number', + default: true, + tag: 'tag:yaml.org,2002:float', + format: 'TIME', + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: str => parseSexagesimal(str, false), + stringify: stringifySexagesimal +}; +const timestamp = { + identify: value => value instanceof Date, + default: true, + tag: 'tag:yaml.org,2002:timestamp', + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd + '(?:' + // time is optional + '(?:t|T|[ \\t]+)' + // t | T | whitespace + '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)? + '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30 + ')?$'), + resolve(str) { + const match = str.match(timestamp.test); + if (!match) + throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); + const [, year, month, day, hour, minute, second] = match.map(Number); + const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match[8]; + if (tz && tz !== 'Z') { + let d = parseSexagesimal(tz, false); + if (Math.abs(d) < 30) + d *= 60; + date -= 60000 * d; + } + return new Date(date); + }, + stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? '' +}; + +exports.floatTime = floatTime; +exports.intTime = intTime; +exports.timestamp = timestamp; diff --git a/node_modules/yaml/dist/stringify/foldFlowLines.d.ts b/node_modules/yaml/dist/stringify/foldFlowLines.d.ts new file mode 100644 index 000000000..aac3cac60 --- /dev/null +++ b/node_modules/yaml/dist/stringify/foldFlowLines.d.ts @@ -0,0 +1,34 @@ +export declare const FOLD_FLOW = "flow"; +export declare const FOLD_BLOCK = "block"; +export declare const FOLD_QUOTED = "quoted"; +/** + * `'block'` prevents more-indented lines from being folded; + * `'quoted'` allows for `\` escapes, including escaped newlines + */ +export type FoldMode = 'flow' | 'block' | 'quoted'; +export interface FoldOptions { + /** + * Accounts for leading contents on the first line, defaulting to + * `indent.length` + */ + indentAtStart?: number; + /** Default: `80` */ + lineWidth?: number; + /** + * Allow highly indented lines to stretch the line width or indent content + * from the start. + * + * Default: `20` + */ + minContentWidth?: number; + /** Called once if the text is folded */ + onFold?: () => void; + /** Called once if any line of text exceeds lineWidth characters */ + onOverflow?: () => void; +} +/** + * Tries to keep input at up to `lineWidth` characters, splitting only on spaces + * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are + * terminated with `\n` and started with `indent`. + */ +export declare function foldFlowLines(text: string, indent: string, mode?: FoldMode, { indentAtStart, lineWidth, minContentWidth, onFold, onOverflow }?: FoldOptions): string; diff --git a/node_modules/yaml/dist/stringify/foldFlowLines.js b/node_modules/yaml/dist/stringify/foldFlowLines.js new file mode 100644 index 000000000..9c610589e --- /dev/null +++ b/node_modules/yaml/dist/stringify/foldFlowLines.js @@ -0,0 +1,151 @@ +'use strict'; + +const FOLD_FLOW = 'flow'; +const FOLD_BLOCK = 'block'; +const FOLD_QUOTED = 'quoted'; +/** + * Tries to keep input at up to `lineWidth` characters, splitting only on spaces + * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are + * terminated with `\n` and started with `indent`. + */ +function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + if (lineWidth < minContentWidth) + minContentWidth = 0; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === 'number') { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split = undefined; + let prev = undefined; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i, indent.length); + if (i !== -1) + end = i + endStep; + } + for (let ch; (ch = text[(i += 1)]);) { + if (mode === FOLD_QUOTED && ch === '\\') { + escStart = i; + switch (text[i + 1]) { + case 'x': + i += 3; + break; + case 'u': + i += 5; + break; + case 'U': + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === '\n') { + if (mode === FOLD_BLOCK) + i = consumeMoreIndentedLines(text, i, indent.length); + end = i + indent.length + endStep; + split = undefined; + } + else { + if (ch === ' ' && + prev && + prev !== ' ' && + prev !== '\n' && + prev !== '\t') { + // space surrounded by non-space can be replaced with newline + indent + const next = text[i + 1]; + if (next && next !== ' ' && next !== '\n' && next !== '\t') + split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = undefined; + } + else if (mode === FOLD_QUOTED) { + // white-space collected at end may stretch past lineWidth + while (prev === ' ' || prev === '\t') { + prev = ch; + ch = text[(i += 1)]; + overflow = true; + } + // Account for newline escape, but don't break preceding escape + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + // Bail out if lineWidth & minContentWidth are shorter than an escape string + if (escapedFolds[j]) + return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = undefined; + } + else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i = 0; i < folds.length; ++i) { + const fold = folds[i]; + const end = folds[i + 1] || text.length; + if (fold === 0) + res = `\n${indent}${text.slice(0, end)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += `\n${indent}${text.slice(fold + 1, end)}`; + } + } + return res; +} +/** + * Presumes `i + 1` is at the start of a line + * @returns index of last newline in more-indented block + */ +function consumeMoreIndentedLines(text, i, indent) { + let end = i; + let start = i + 1; + let ch = text[start]; + while (ch === ' ' || ch === '\t') { + if (i < start + indent) { + ch = text[++i]; + } + else { + do { + ch = text[++i]; + } while (ch && ch !== '\n'); + end = i; + start = i + 1; + ch = text[start]; + } + } + return end; +} + +exports.FOLD_BLOCK = FOLD_BLOCK; +exports.FOLD_FLOW = FOLD_FLOW; +exports.FOLD_QUOTED = FOLD_QUOTED; +exports.foldFlowLines = foldFlowLines; diff --git a/node_modules/yaml/dist/stringify/stringify.d.ts b/node_modules/yaml/dist/stringify/stringify.d.ts new file mode 100644 index 000000000..b693d457a --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringify.d.ts @@ -0,0 +1,21 @@ +import type { Document } from '../doc/Document'; +import type { Alias } from '../nodes/Alias'; +import type { ToStringOptions } from '../options'; +export type StringifyContext = { + actualString?: boolean; + allNullValues?: boolean; + anchors: Set; + doc: Document; + forceBlockIndent?: boolean; + implicitKey?: boolean; + indent: string; + indentStep: string; + indentAtStart?: number; + inFlow: boolean | null; + inStringifyKey?: boolean; + flowCollectionPadding: string; + options: Readonly>>; + resolvedAliases?: Set; +}; +export declare function createStringifyContext(doc: Document, options: ToStringOptions): StringifyContext; +export declare function stringify(item: unknown, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; diff --git a/node_modules/yaml/dist/stringify/stringify.js b/node_modules/yaml/dist/stringify/stringify.js new file mode 100644 index 000000000..d837ec75a --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringify.js @@ -0,0 +1,132 @@ +'use strict'; + +var anchors = require('../doc/anchors.js'); +var identity = require('../nodes/identity.js'); +var stringifyComment = require('./stringifyComment.js'); +var stringifyString = require('./stringifyString.js'); + +function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment.stringifyComment, + defaultKeyType: null, + defaultStringType: 'PLAIN', + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: 'false', + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: 'null', + simpleKeys: false, + singleQuote: null, + trailingComma: false, + trueStr: 'true', + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case 'block': + inFlow = false; + break; + case 'flow': + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '', + indent: '', + indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ', + inFlow, + options: opt + }; +} +function getTagObject(tags, item) { + if (item.tag) { + const match = tags.filter(t => t.tag === item.tag); + if (match.length > 0) + return match.find(t => t.format === item.format) ?? match[0]; + } + let tagObj = undefined; + let obj; + if (identity.isScalar(item)) { + obj = item.value; + let match = tags.filter(t => t.identify?.(obj)); + if (match.length > 1) { + const testMatch = match.filter(t => t.test); + if (testMatch.length > 0) + match = testMatch; + } + tagObj = + match.find(t => t.format === item.format) ?? match.find(t => !t.format); + } + else { + obj = item; + tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj); + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; +} +// needs to be called before value stringifier to allow for circular anchor refs +function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) { + if (!doc.directives) + return ''; + const props = []; + const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor; + if (anchor && anchors.anchorIsValid(anchor)) { + anchors$1.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ?? (tagObj.default ? null : tagObj.tag); + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(' '); +} +function stringify(item, ctx, onComment, onChompKeep) { + if (identity.isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (identity.isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } + else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = undefined; + const node = identity.isNode(item) + ? item + : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) }); + tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node)); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str = typeof tagObj.stringify === 'function' + ? tagObj.stringify(node, ctx, onComment, onChompKeep) + : identity.isScalar(node) + ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) + : node.toString(ctx, onComment, onChompKeep); + if (!props) + return str; + return identity.isScalar(node) || str[0] === '{' || str[0] === '[' + ? `${props} ${str}` + : `${props}\n${ctx.indent}${str}`; +} + +exports.createStringifyContext = createStringifyContext; +exports.stringify = stringify; diff --git a/node_modules/yaml/dist/stringify/stringifyCollection.d.ts b/node_modules/yaml/dist/stringify/stringifyCollection.d.ts new file mode 100644 index 000000000..c5e8ffa55 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyCollection.d.ts @@ -0,0 +1,17 @@ +import type { Collection } from '../nodes/Collection'; +import type { StringifyContext } from './stringify'; +interface StringifyCollectionOptions { + blockItemPrefix: string; + flowChars: { + start: '{'; + end: '}'; + } | { + start: '['; + end: ']'; + }; + itemIndent: string; + onChompKeep?: () => void; + onComment?: () => void; +} +export declare function stringifyCollection(collection: Readonly, ctx: StringifyContext, options: StringifyCollectionOptions): string; +export {}; diff --git a/node_modules/yaml/dist/stringify/stringifyCollection.js b/node_modules/yaml/dist/stringify/stringifyCollection.js new file mode 100644 index 000000000..6f7839ef4 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyCollection.js @@ -0,0 +1,155 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var stringify = require('./stringify.js'); +var stringifyComment = require('./stringifyComment.js'); + +function stringifyCollection(collection, ctx, options) { + const flow = ctx.inFlow ?? collection.flow; + const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection; + return stringify(collection, ctx, options); +} +function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; // flag for the preceding node's status + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (identity.isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment = item.comment; + } + else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true)); + if (comment) + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + if (chompKeep && comment) + chompKeep = false; + lines.push(blockItemPrefix + str); + } + let str; + if (lines.length === 0) { + str = flowChars.start + flowChars.end; + } + else { + str = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str += line ? `\n${indent}${line}` : '\n'; + } + } + if (comment) { + str += '\n' + stringifyComment.indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; +} +function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (identity.isNode(item)) { + if (item.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment = item.comment; + } + else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(''); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = identity.isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } + else if (item.value == null && ik?.comment) { + comment = ik.comment; + } + } + if (comment) + reqNewline = true; + let str = stringify.stringify(item, itemCtx, () => (comment = null)); + reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\n')); + if (i < items.length - 1) { + str += ','; + } + else if (ctx.options.trailingComma) { + if (ctx.options.lineWidth > 0) { + reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + + (str.length + 2) > + ctx.options.lineWidth); + } + if (reqNewline) { + str += ','; + } + } + if (comment) + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + lines.push(str); + linesAtValue = lines.length; + } + const { start, end } = flowChars; + if (lines.length === 0) { + return start + end; + } + else { + if (!reqNewline) { + const len = lines.reduce((sum, line) => sum + line.length + 2, 2); + reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; + } + if (reqNewline) { + let str = start; + for (const line of lines) + str += line ? `\n${indentStep}${indent}${line}` : '\n'; + return `${str}\n${indent}${end}`; + } + else { + return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + } + } +} +function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ''); + if (comment) { + const ic = stringifyComment.indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); // Avoid double indent on first line + } +} + +exports.stringifyCollection = stringifyCollection; diff --git a/node_modules/yaml/dist/stringify/stringifyComment.d.ts b/node_modules/yaml/dist/stringify/stringifyComment.d.ts new file mode 100644 index 000000000..9fcf48d76 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyComment.d.ts @@ -0,0 +1,10 @@ +/** + * Stringifies a comment. + * + * Empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ +export declare const stringifyComment: (str: string) => string; +export declare function indentComment(comment: string, indent: string): string; +export declare const lineComment: (str: string, indent: string, comment: string) => string; diff --git a/node_modules/yaml/dist/stringify/stringifyComment.js b/node_modules/yaml/dist/stringify/stringifyComment.js new file mode 100644 index 000000000..26bf361a9 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyComment.js @@ -0,0 +1,24 @@ +'use strict'; + +/** + * Stringifies a comment. + * + * Empty comment lines are left empty, + * lines consisting of a single space are replaced by `#`, + * and all other lines are prefixed with a `#`. + */ +const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#'); +function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; +} +const lineComment = (str, indent, comment) => str.endsWith('\n') + ? indentComment(comment, indent) + : comment.includes('\n') + ? '\n' + indentComment(comment, indent) + : (str.endsWith(' ') ? '' : ' ') + comment; + +exports.indentComment = indentComment; +exports.lineComment = lineComment; +exports.stringifyComment = stringifyComment; diff --git a/node_modules/yaml/dist/stringify/stringifyDocument.d.ts b/node_modules/yaml/dist/stringify/stringifyDocument.d.ts new file mode 100644 index 000000000..6b37acca8 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyDocument.d.ts @@ -0,0 +1,4 @@ +import type { Document } from '../doc/Document'; +import type { Node } from '../nodes/Node'; +import type { ToStringOptions } from '../options'; +export declare function stringifyDocument(doc: Readonly>, options: ToStringOptions): string; diff --git a/node_modules/yaml/dist/stringify/stringifyDocument.js b/node_modules/yaml/dist/stringify/stringifyDocument.js new file mode 100644 index 000000000..fb9d73cb2 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyDocument.js @@ -0,0 +1,87 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var stringify = require('./stringify.js'); +var stringifyComment = require('./stringifyComment.js'); + +function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir = doc.directives.toString(doc); + if (dir) { + lines.push(dir); + hasDirectives = true; + } + else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push('---'); + const ctx = stringify.createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(''); + const cs = commentString(doc.commentBefore); + lines.unshift(stringifyComment.indentComment(cs, '')); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (identity.isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(''); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(stringifyComment.indentComment(cs, '')); + } + // top-level block scalars need to be indented if followed by a comment + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? undefined : () => (chompKeep = true); + let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep); + if (contentComment) + body += stringifyComment.lineComment(body, '', commentString(contentComment)); + if ((body[0] === '|' || body[0] === '>') && + lines[lines.length - 1] === '---') { + // Top-level block scalars with a preceding doc marker ought to use the + // same line for their header. + lines[lines.length - 1] = `--- ${body}`; + } + else + lines.push(body); + } + else { + lines.push(stringify.stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes('\n')) { + lines.push('...'); + lines.push(stringifyComment.indentComment(cs, '')); + } + else { + lines.push(`... ${cs}`); + } + } + else { + lines.push('...'); + } + } + else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ''); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') + lines.push(''); + lines.push(stringifyComment.indentComment(commentString(dc), '')); + } + } + return lines.join('\n') + '\n'; +} + +exports.stringifyDocument = stringifyDocument; diff --git a/node_modules/yaml/dist/stringify/stringifyNumber.d.ts b/node_modules/yaml/dist/stringify/stringifyNumber.d.ts new file mode 100644 index 000000000..743b4244a --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyNumber.d.ts @@ -0,0 +1,2 @@ +import type { Scalar } from '../nodes/Scalar'; +export declare function stringifyNumber({ format, minFractionDigits, tag, value }: Scalar): string; diff --git a/node_modules/yaml/dist/stringify/stringifyNumber.js b/node_modules/yaml/dist/stringify/stringifyNumber.js new file mode 100644 index 000000000..100972a68 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyNumber.js @@ -0,0 +1,27 @@ +'use strict'; + +function stringifyNumber({ format, minFractionDigits, tag, value }) { + if (typeof value === 'bigint') + return String(value); + const num = typeof value === 'number' ? value : Number(value); + if (!isFinite(num)) + return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf'; + let n = Object.is(value, -0) ? '-0' : JSON.stringify(value); + if (!format && + minFractionDigits && + (!tag || tag === 'tag:yaml.org,2002:float') && + /^-?\d/.test(n) && + !n.includes('e')) { + let i = n.indexOf('.'); + if (i < 0) { + i = n.length; + n += '.'; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) + n += '0'; + } + return n; +} + +exports.stringifyNumber = stringifyNumber; diff --git a/node_modules/yaml/dist/stringify/stringifyPair.d.ts b/node_modules/yaml/dist/stringify/stringifyPair.d.ts new file mode 100644 index 000000000..2126beebe --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyPair.d.ts @@ -0,0 +1,3 @@ +import type { Pair } from '../nodes/Pair'; +import type { StringifyContext } from './stringify'; +export declare function stringifyPair({ key, value }: Readonly, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; diff --git a/node_modules/yaml/dist/stringify/stringifyPair.js b/node_modules/yaml/dist/stringify/stringifyPair.js new file mode 100644 index 000000000..25f974b2d --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyPair.js @@ -0,0 +1,152 @@ +'use strict'; + +var identity = require('../nodes/identity.js'); +var Scalar = require('../nodes/Scalar.js'); +var stringify = require('./stringify.js'); +var stringifyComment = require('./stringifyComment.js'); + +function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = (identity.isNode(key) && key.comment) || null; + if (simpleKeys) { + if (keyComment) { + throw new Error('With simple keys, key nodes cannot have comments'); + } + if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) { + const msg = 'With simple keys, collection cannot be used as a key value'; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && + (!key || + (keyComment && value == null && !ctx.inFlow) || + identity.isCollection(key) || + (identity.isScalar(key) + ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL + : typeof key === 'object')); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true)); + if (!explicitKey && !ctx.inFlow && str.length > 1024) { + if (simpleKeys) + throw new Error('With simple keys, single line scalar must not span more than 1024 characters'); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value == null) { + if (keyCommentDone && onComment) + onComment(); + return str === '' ? '?' : explicitKey ? `? ${str}` : str; + } + } + else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) { + str = `? ${str}`; + if (keyComment && !keyCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } + else if (chompKeep && onChompKeep) + onChompKeep(); + return str; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str}\n${indent}:`; + } + else { + str = `${str}:`; + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (identity.isNode(value)) { + vsb = !!value.spaceBefore; + vcb = value.commentBefore; + valueComment = value.comment; + } + else { + vsb = false; + vcb = null; + valueComment = null; + if (value && typeof value === 'object') + value = doc.createNode(value); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && identity.isScalar(value)) + ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && + indentStep.length >= 2 && + !ctx.inFlow && + !explicitKey && + identity.isSeq(value) && + !value.flow && + !value.tag && + !value.anchor) { + // If indentSeq === false, consider '- ' as part of indentation where possible + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true)); + let ws = ' '; + if (keyComment || vsb || vcb) { + ws = vsb ? '\n' : ''; + if (vcb) { + const cs = commentString(vcb); + ws += `\n${stringifyComment.indentComment(cs, ctx.indent)}`; + } + if (valueStr === '' && !ctx.inFlow) { + if (ws === '\n' && valueComment) + ws = '\n\n'; + } + else { + ws += `\n${ctx.indent}`; + } + } + else if (!explicitKey && identity.isCollection(value)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf('\n'); + const hasNewline = nl0 !== -1; + const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow) { + let hasPropsLine = false; + if (hasNewline && (vs0 === '&' || vs0 === '!')) { + let sp0 = valueStr.indexOf(' '); + if (vs0 === '&' && + sp0 !== -1 && + sp0 < nl0 && + valueStr[sp0 + 1] === '!') { + sp0 = valueStr.indexOf(' ', sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = `\n${ctx.indent}`; + } + } + else if (valueStr === '' || valueStr[0] === '\n') { + ws = ''; + } + str += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } + else if (valueComment && !valueCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); + } + else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str; +} + +exports.stringifyPair = stringifyPair; diff --git a/node_modules/yaml/dist/stringify/stringifyString.d.ts b/node_modules/yaml/dist/stringify/stringifyString.d.ts new file mode 100644 index 000000000..df109307d --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyString.d.ts @@ -0,0 +1,9 @@ +import { Scalar } from '../nodes/Scalar'; +import type { StringifyContext } from './stringify'; +interface StringifyScalar { + value: string; + comment?: string | null; + type?: string; +} +export declare function stringifyString(item: Scalar | StringifyScalar, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +export {}; diff --git a/node_modules/yaml/dist/stringify/stringifyString.js b/node_modules/yaml/dist/stringify/stringifyString.js new file mode 100644 index 000000000..2caadc633 --- /dev/null +++ b/node_modules/yaml/dist/stringify/stringifyString.js @@ -0,0 +1,338 @@ +'use strict'; + +var Scalar = require('../nodes/Scalar.js'); +var foldFlowLines = require('./foldFlowLines.js'); + +const getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth +}); +// Also checks for lines starting with %, as parsing the output as YAML 1.1 will +// presume that's starting a new document. +const containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); +function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) + return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === '\n') { + if (i - start > limit) + return true; + start = i + 1; + if (strLen - start <= limit) + return false; + } + } + return true; +} +function doubleQuotedString(value, ctx) { + const json = JSON.stringify(value); + if (ctx.options.doubleQuotedAsJSON) + return json; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + let str = ''; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === ' ' && json[i + 1] === '\\' && json[i + 2] === 'n') { + // space before newline needs to be escaped to not be folded + str += json.slice(start, i) + '\\ '; + i += 1; + start = i; + ch = '\\'; + } + if (ch === '\\') + switch (json[i + 1]) { + case 'u': + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case '0000': + str += '\\0'; + break; + case '0007': + str += '\\a'; + break; + case '000b': + str += '\\v'; + break; + case '001b': + str += '\\e'; + break; + case '0085': + str += '\\N'; + break; + case '00a0': + str += '\\_'; + break; + case '2028': + str += '\\L'; + break; + case '2029': + str += '\\P'; + break; + default: + if (code.substr(0, 2) === '00') + str += '\\x' + code.substr(2); + else + str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case 'n': + if (implicitKey || + json[i + 2] === '"' || + json.length < minMultiLineLength) { + i += 1; + } + else { + // folding will eat first newline + str += json.slice(start, i) + '\n\n'; + while (json[i + 2] === '\\' && + json[i + 3] === 'n' && + json[i + 4] !== '"') { + str += '\n'; + i += 2; + } + str += indent; + // space after newline needs to be escaped to not be folded + if (json[i + 2] === ' ') + str += '\\'; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey + ? str + : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); +} +function singleQuotedString(value, ctx) { + if (ctx.options.singleQuote === false || + (ctx.implicitKey && value.includes('\n')) || + /[ \t]\n|\n[ \t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline + ) + return doubleQuotedString(value, ctx); + const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : ''); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&\n${indent}`) + "'"; + return ctx.implicitKey + ? res + : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); +} +function quotedString(value, ctx) { + const { singleQuote } = ctx.options; + let qs; + if (singleQuote === false) + qs = doubleQuotedString; + else { + const hasDouble = value.includes('"'); + const hasSingle = value.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote ? singleQuotedString : doubleQuotedString; + } + return qs(value, ctx); +} +// The negative lookbehind avoids a polynomial search, +// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind +let blockEndNewlines; +try { + blockEndNewlines = new RegExp('(^|(?\n'; + // determine chomping from whitespace at value end + let chomp; + let endStart; + for (endStart = value.length; endStart > 0; --endStart) { + const ch = value[endStart - 1]; + if (ch !== '\n' && ch !== '\t' && ch !== ' ') + break; + } + let end = value.substring(endStart); + const endNlPos = end.indexOf('\n'); + if (endNlPos === -1) { + chomp = '-'; // strip + } + else if (value === end || endNlPos !== end.length - 1) { + chomp = '+'; // keep + if (onChompKeep) + onChompKeep(); + } + else { + chomp = ''; // clip + } + if (end) { + value = value.slice(0, -end.length); + if (end[end.length - 1] === '\n') + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + // determine indent indicator from whitespace at value start + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value.length; ++startEnd) { + const ch = value[startEnd]; + if (ch === ' ') + startWithSpace = true; + else if (ch === '\n') + startNlPos = startEnd; + else + break; + } + let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value = value.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? '2' : '1'; // root is at -1 + // Leading | or > is added later + let header = (startWithSpace ? indentSize : '') + chomp; + if (comment) { + header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' ')); + if (onComment) + onComment(); + } + if (!literal) { + const foldedValue = value + .replace(/\n+/g, '\n$&') + .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded + // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent + .replace(/\n+/g, `$&${indent}`); + let literalFallback = false; + const foldOptions = getFoldOptions(ctx, true); + if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) { + foldOptions.onOverflow = () => { + literalFallback = true; + }; + } + const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions); + if (!literalFallback) + return `>${header}\n${indent}${body}`; + } + value = value.replace(/\n+/g, `$&${indent}`); + return `|${header}\n${indent}${start}${value}${end}`; +} +function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if ((implicitKey && value.includes('\n')) || + (inFlow && /[[\]{},]/.test(value))) { + return quotedString(value, ctx); + } + if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + // not allowed: + // - '-' or '?' + // - start with an indicator character (except [?:-]) or /[?-] / + // - '\n ', ': ' or ' \n' anywhere + // - '#' not preceded by a non-space char + // - end with ' ' or ':' + return implicitKey || inFlow || !value.includes('\n') + ? quotedString(value, ctx) + : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && + !inFlow && + type !== Scalar.Scalar.PLAIN && + value.includes('\n')) { + // Where allowed & type not set explicitly, prefer block style for multiline strings + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value)) { + if (indent === '') { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + else if (implicitKey && indent === indentStep) { + return quotedString(value, ctx); + } + } + const str = value.replace(/\n+/g, `$&\n${indent}`); + // Verify that output will be parsed as a string, as e.g. plain numbers and + // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'), + // and others in v1.1. + if (actualString) { + const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey + ? str + : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); +} +function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === 'string' + ? item + : Object.assign({}, item, { value: String(item.value) }); + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + // force double quotes on control characters & unpaired surrogates + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type = Scalar.Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.Scalar.BLOCK_FOLDED: + case Scalar.Scalar.BLOCK_LITERAL: + return implicitKey || inFlow + ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers + : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; + } + }; + let res = _stringify(type); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t = (implicitKey && defaultKeyType) || defaultStringType; + res = _stringify(t); + if (res === null) + throw new Error(`Unsupported default string type ${t}`); + } + return res; +} + +exports.stringifyString = stringifyString; diff --git a/node_modules/yaml/dist/test-events.d.ts b/node_modules/yaml/dist/test-events.d.ts new file mode 100644 index 000000000..d1a234835 --- /dev/null +++ b/node_modules/yaml/dist/test-events.d.ts @@ -0,0 +1,4 @@ +export declare function testEvents(src: string): { + events: string[]; + error: unknown; +}; diff --git a/node_modules/yaml/dist/test-events.js b/node_modules/yaml/dist/test-events.js new file mode 100644 index 000000000..f38d3365f --- /dev/null +++ b/node_modules/yaml/dist/test-events.js @@ -0,0 +1,134 @@ +'use strict'; + +var identity = require('./nodes/identity.js'); +var publicApi = require('./public-api.js'); +var visit = require('./visit.js'); + +const scalarChar = { + BLOCK_FOLDED: '>', + BLOCK_LITERAL: '|', + PLAIN: ':', + QUOTE_DOUBLE: '"', + QUOTE_SINGLE: "'" +}; +function anchorExists(doc, anchor) { + let found = false; + visit.visit(doc, { + Value(_key, node) { + if (node.anchor === anchor) { + found = true; + return visit.visit.BREAK; + } + } + }); + return found; +} +// test harness for yaml-test-suite event tests +function testEvents(src) { + const docs = publicApi.parseAllDocuments(src); + const errDoc = docs.find(doc => doc.errors.length > 0); + const error = errDoc ? errDoc.errors[0].message : null; + const events = ['+STR']; + try { + for (let i = 0; i < docs.length; ++i) { + const doc = docs[i]; + let root = doc.contents; + if (Array.isArray(root)) + root = root[0]; + const [rootStart] = doc.range || [0]; + const error = doc.errors[0]; + if (error && (!error.pos || error.pos[0] < rootStart)) + throw new Error(); + let docStart = '+DOC'; + if (doc.directives.docStart) + docStart += ' ---'; + else if (doc.contents && + doc.contents.range[2] === doc.contents.range[0] && + !doc.contents.anchor && + !doc.contents.tag) + continue; + events.push(docStart); + addEvents(events, doc, error?.pos[0] ?? -1, root); + let docEnd = '-DOC'; + if (doc.directives.docEnd) + docEnd += ' ...'; + events.push(docEnd); + } + } + catch (e) { + return { events, error: error ?? e }; + } + events.push('-STR'); + return { events, error }; +} +function addEvents(events, doc, errPos, node) { + if (!node) { + events.push('=VAL :'); + return; + } + if (errPos !== -1 && identity.isNode(node) && node.range[0] >= errPos) + throw new Error(); + let props = ''; + let anchor = identity.isScalar(node) || identity.isCollection(node) ? node.anchor : undefined; + if (anchor) { + if (/\d$/.test(anchor)) { + const alt = anchor.replace(/\d$/, ''); + if (anchorExists(doc, alt)) + anchor = alt; + } + props = ` &${anchor}`; + } + if (identity.isNode(node) && node.tag) + props += ` <${node.tag}>`; + if (identity.isMap(node)) { + const ev = node.flow ? '+MAP {}' : '+MAP'; + events.push(`${ev}${props}`); + node.items.forEach(({ key, value }) => { + addEvents(events, doc, errPos, key); + addEvents(events, doc, errPos, value); + }); + events.push('-MAP'); + } + else if (identity.isSeq(node)) { + const ev = node.flow ? '+SEQ []' : '+SEQ'; + events.push(`${ev}${props}`); + node.items.forEach(item => { + addEvents(events, doc, errPos, item); + }); + events.push('-SEQ'); + } + else if (identity.isPair(node)) { + events.push(`+MAP${props}`); + addEvents(events, doc, errPos, node.key); + addEvents(events, doc, errPos, node.value); + events.push('-MAP'); + } + else if (identity.isAlias(node)) { + let alias = node.source; + if (alias && /\d$/.test(alias)) { + const alt = alias.replace(/\d$/, ''); + if (anchorExists(doc, alt)) + alias = alt; + } + events.push(`=ALI${props} *${alias}`); + } + else { + const scalar = scalarChar[String(node.type)]; + if (!scalar) + throw new Error(`Unexpected node type ${node.type}`); + const value = node.source + .replace(/\\/g, '\\\\') + .replace(/\0/g, '\\0') + .replace(/\x07/g, '\\a') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\v/g, '\\v') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/\x1b/g, '\\e'); + events.push(`=VAL${props} ${scalar}${value}`); + } +} + +exports.testEvents = testEvents; diff --git a/node_modules/yaml/dist/util.d.ts b/node_modules/yaml/dist/util.d.ts new file mode 100644 index 000000000..176130e68 --- /dev/null +++ b/node_modules/yaml/dist/util.d.ts @@ -0,0 +1,16 @@ +export { createNode } from './doc/createNode'; +export type { CreateNodeContext } from './doc/createNode'; +export { debug, warn } from './log'; +export type { LogLevelId } from './log'; +export { createPair } from './nodes/Pair'; +export { toJS } from './nodes/toJS'; +export type { ToJSContext } from './nodes/toJS'; +export { findPair } from './nodes/YAMLMap'; +export { map as mapTag } from './schema/common/map'; +export { seq as seqTag } from './schema/common/seq'; +export { string as stringTag } from './schema/common/string'; +export { foldFlowLines } from './stringify/foldFlowLines'; +export type { FoldOptions } from './stringify/foldFlowLines'; +export type { StringifyContext } from './stringify/stringify'; +export { stringifyNumber } from './stringify/stringifyNumber'; +export { stringifyString } from './stringify/stringifyString'; diff --git a/node_modules/yaml/dist/util.js b/node_modules/yaml/dist/util.js new file mode 100644 index 000000000..ae3c4abc5 --- /dev/null +++ b/node_modules/yaml/dist/util.js @@ -0,0 +1,28 @@ +'use strict'; + +var createNode = require('./doc/createNode.js'); +var log = require('./log.js'); +var Pair = require('./nodes/Pair.js'); +var toJS = require('./nodes/toJS.js'); +var YAMLMap = require('./nodes/YAMLMap.js'); +var map = require('./schema/common/map.js'); +var seq = require('./schema/common/seq.js'); +var string = require('./schema/common/string.js'); +var foldFlowLines = require('./stringify/foldFlowLines.js'); +var stringifyNumber = require('./stringify/stringifyNumber.js'); +var stringifyString = require('./stringify/stringifyString.js'); + + + +exports.createNode = createNode.createNode; +exports.debug = log.debug; +exports.warn = log.warn; +exports.createPair = Pair.createPair; +exports.toJS = toJS.toJS; +exports.findPair = YAMLMap.findPair; +exports.mapTag = map.map; +exports.seqTag = seq.seq; +exports.stringTag = string.string; +exports.foldFlowLines = foldFlowLines.foldFlowLines; +exports.stringifyNumber = stringifyNumber.stringifyNumber; +exports.stringifyString = stringifyString.stringifyString; diff --git a/node_modules/yaml/dist/visit.d.ts b/node_modules/yaml/dist/visit.d.ts new file mode 100644 index 000000000..8af36313f --- /dev/null +++ b/node_modules/yaml/dist/visit.d.ts @@ -0,0 +1,102 @@ +import type { Document } from './doc/Document'; +import type { Alias } from './nodes/Alias'; +import type { Node } from './nodes/Node'; +import type { Pair } from './nodes/Pair'; +import type { Scalar } from './nodes/Scalar'; +import type { YAMLMap } from './nodes/YAMLMap'; +import type { YAMLSeq } from './nodes/YAMLSeq'; +export type visitorFn = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair; +export type visitor = visitorFn | { + Alias?: visitorFn; + Collection?: visitorFn; + Map?: visitorFn; + Node?: visitorFn; + Pair?: visitorFn; + Scalar?: visitorFn; + Seq?: visitorFn; + Value?: visitorFn; +}; +export type asyncVisitorFn = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair | Promise; +export type asyncVisitor = asyncVisitorFn | { + Alias?: asyncVisitorFn; + Collection?: asyncVisitorFn; + Map?: asyncVisitorFn; + Node?: asyncVisitorFn; + Pair?: asyncVisitorFn; + Scalar?: asyncVisitorFn; + Seq?: asyncVisitorFn; + Value?: asyncVisitorFn; +}; +/** + * Apply a visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +export declare function visit(node: Node | Document | null, visitor: visitor): void; +export declare namespace visit { + var BREAK: symbol; + var SKIP: symbol; + var REMOVE: symbol; +} +/** + * Apply an async visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `Promise`: Must resolve to one of the following values + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +export declare function visitAsync(node: Node | Document | null, visitor: asyncVisitor): Promise; +export declare namespace visitAsync { + var BREAK: symbol; + var SKIP: symbol; + var REMOVE: symbol; +} diff --git a/node_modules/yaml/dist/visit.js b/node_modules/yaml/dist/visit.js new file mode 100644 index 000000000..f126e54f7 --- /dev/null +++ b/node_modules/yaml/dist/visit.js @@ -0,0 +1,236 @@ +'use strict'; + +var identity = require('./nodes/identity.js'); + +const BREAK = Symbol('break visit'); +const SKIP = Symbol('skip children'); +const REMOVE = Symbol('remove node'); +/** + * Apply a visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + visit_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visit.BREAK = BREAK; +/** Do not visit the children of the current node */ +visit.SKIP = SKIP; +/** Remove the current node */ +visit.REMOVE = REMOVE; +function visit_(key, node, visitor, path) { + const ctrl = callVisitor(key, node, visitor, path); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visit_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (identity.isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = visit_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (identity.isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = visit_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +/** + * Apply an async visitor to an AST node or document. + * + * Walks through the tree (depth-first) starting from `node`, calling a + * `visitor` function with three arguments: + * - `key`: For sequence values and map `Pair`, the node's index in the + * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly. + * `null` for the root node. + * - `node`: The current node. + * - `path`: The ancestry of the current node. + * + * The return value of the visitor may be used to control the traversal: + * - `Promise`: Must resolve to one of the following values + * - `undefined` (default): Do nothing and continue + * - `visit.SKIP`: Do not visit the children of this node, continue with next + * sibling + * - `visit.BREAK`: Terminate traversal completely + * - `visit.REMOVE`: Remove the current node, then continue with the next one + * - `Node`: Replace the current node, then continue by visiting it + * - `number`: While iterating the items of a sequence or map, set the index + * of the next step. This is useful especially if the index of the current + * node has changed. + * + * If `visitor` is a single function, it will be called with all values + * encountered in the tree, including e.g. `null` values. Alternatively, + * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`, + * `Alias` and `Scalar` node. To define the same visitor function for more than + * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar) + * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most + * specific defined one will be used for each node. + */ +async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } + else + await visitAsync_(null, node, visitor_, Object.freeze([])); +} +// Without the `as symbol` casts, TS declares these in the `visit` +// namespace using `var`, but then complains about that because +// `unique symbol` must be `const`. +/** Terminate visit traversal completely */ +visitAsync.BREAK = BREAK; +/** Do not visit the children of the current node */ +visitAsync.SKIP = SKIP; +/** Remove the current node */ +visitAsync.REMOVE = REMOVE; +async function visitAsync_(key, node, visitor, path) { + const ctrl = await callVisitor(key, node, visitor, path); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visitAsync_(key, ctrl, visitor, path); + } + if (typeof ctrl !== 'symbol') { + if (identity.isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = await visitAsync_(i, node.items[i], visitor, path); + if (typeof ci === 'number') + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } + else if (identity.isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = await visitAsync_('key', node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_('value', node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; +} +function initVisitor(visitor) { + if (typeof visitor === 'object' && + (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; +} +function callVisitor(key, node, visitor, path) { + if (typeof visitor === 'function') + return visitor(key, node, path); + if (identity.isMap(node)) + return visitor.Map?.(key, node, path); + if (identity.isSeq(node)) + return visitor.Seq?.(key, node, path); + if (identity.isPair(node)) + return visitor.Pair?.(key, node, path); + if (identity.isScalar(node)) + return visitor.Scalar?.(key, node, path); + if (identity.isAlias(node)) + return visitor.Alias?.(key, node, path); + return undefined; +} +function replaceNode(key, path, node) { + const parent = path[path.length - 1]; + if (identity.isCollection(parent)) { + parent.items[key] = node; + } + else if (identity.isPair(parent)) { + if (key === 'key') + parent.key = node; + else + parent.value = node; + } + else if (identity.isDocument(parent)) { + parent.contents = node; + } + else { + const pt = identity.isAlias(parent) ? 'alias' : 'scalar'; + throw new Error(`Cannot replace node with ${pt} parent`); + } +} + +exports.visit = visit; +exports.visitAsync = visitAsync; diff --git a/node_modules/yaml/package.json b/node_modules/yaml/package.json new file mode 100644 index 000000000..bfbc8619b --- /dev/null +++ b/node_modules/yaml/package.json @@ -0,0 +1,97 @@ +{ + "name": "yaml", + "version": "2.9.1", + "license": "ISC", + "author": "Eemeli Aro ", + "funding": "https://github.com/sponsors/eemeli", + "repository": "github:eemeli/yaml", + "description": "JavaScript parser and stringifier for YAML", + "keywords": [ + "YAML", + "parser", + "stringifier" + ], + "homepage": "https://eemeli.org/yaml/", + "files": [ + "browser/", + "dist/", + "util.js" + ], + "type": "commonjs", + "main": "./dist/index.js", + "bin": "./bin.mjs", + "browser": { + "./dist/index.js": "./browser/index.js", + "./dist/util.js": "./browser/dist/util.js", + "./util.js": "./browser/dist/util.js" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "node": "./dist/index.js", + "default": "./browser/index.js" + }, + "./package.json": "./package.json", + "./util": { + "types": "./dist/util.d.ts", + "node": "./dist/util.js", + "default": "./browser/dist/util.js" + } + }, + "scripts": { + "build": "npm run build:node && npm run build:browser", + "build:browser": "rollup -c config/rollup.browser-config.mjs", + "build:node": "rollup -c config/rollup.node-config.mjs", + "clean": "git clean -fdxe node_modules", + "lint": "eslint config/ src/", + "prettier": "prettier --write .", + "prestart": "rollup --sourcemap -c config/rollup.node-config.mjs", + "start": "node --enable-source-maps -i -e 'YAML=require(\"./dist/index.js\");const{parse,parseDocument,parseAllDocuments}=YAML'", + "test": "jest --config config/jest.config.js", + "test:all": "npm test && npm run test:types && npm run test:dist && npm run test:dist:types", + "test:browsers": "cd playground && npm test", + "test:dist": "npm run build:node && jest --config config/jest.config.js", + "test:dist:types": "tsc --allowJs --moduleResolution node --noEmit --target es5 dist/index.js", + "test:types": "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json", + "docs:install": "cd docs-slate && bundle install", + "predocs:deploy": "node docs/prepare-docs.mjs", + "docs:deploy": "cd docs-slate && ./deploy.sh", + "predocs": "node docs/prepare-docs.mjs", + "docs": "cd docs-slate && bundle exec middleman server", + "preversion": "npm test && npm run build", + "prepublishOnly": "npm run clean && npm test && npm run build" + }, + "browserslist": "defaults, not ie 11", + "prettier": { + "arrowParens": "avoid", + "semi": false, + "singleQuote": true, + "trailingComma": "none" + }, + "devDependencies": { + "@babel/core": "^7.12.10", + "@babel/plugin-transform-typescript": "^7.12.17", + "@babel/preset-env": "^7.12.11", + "@eslint/js": "^9.9.1", + "@rollup/plugin-babel": "^6.0.3", + "@rollup/plugin-replace": "^6.0.3", + "@rollup/plugin-typescript": "^12.1.1", + "@types/jest": "^29.2.4", + "@types/node": "^20.11.20", + "babel-jest": "^29.0.1", + "eslint": "^9.9.1", + "eslint-config-prettier": "^10.1.8", + "fast-check": "^2.12.0", + "jest": "^29.0.1", + "jest-resolve": "^29.7.0", + "jest-ts-webcompat-resolver": "^1.0.0", + "prettier": "^3.0.2", + "rollup": "^4.12.0", + "tslib": "^2.8.1", + "typescript": "^5.7.2", + "typescript-eslint": "^8.4.0" + }, + "engines": { + "node": ">= 14.6" + } +} diff --git a/node_modules/yaml/util.js b/node_modules/yaml/util.js new file mode 100644 index 000000000..070103f91 --- /dev/null +++ b/node_modules/yaml/util.js @@ -0,0 +1,2 @@ +// Re-exporter for Node.js < 12.16.0 +module.exports = require('./dist/util.js') diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md new file mode 100644 index 000000000..f58acb863 --- /dev/null +++ b/node_modules/yargs-parser/CHANGELOG.md @@ -0,0 +1,319 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [22.0.0](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.1.1...yargs-parser-v22.0.0) (2025-05-26) + + +### ⚠ BREAKING CHANGES + +* yargs is now ESM first ([#503](https://github.com/yargs/yargs-parser/issues/503)) + +### Features + +* yargs is now ESM first ([#503](https://github.com/yargs/yargs-parser/issues/503)) ([6d69295](https://github.com/yargs/yargs-parser/commit/6d692953ade099375c6c5e131367968b07ae8470)) + +## [21.1.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.1.0...yargs-parser-v21.1.1) (2022-08-04) + + +### Bug Fixes + +* **typescript:** ignore .cts files during publish ([#454](https://github.com/yargs/yargs-parser/issues/454)) ([d69f9c3](https://github.com/yargs/yargs-parser/commit/d69f9c3a91c3ad2f9494d0a94e29a8b76c41b81b)), closes [#452](https://github.com/yargs/yargs-parser/issues/452) + +## [21.1.0](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.1...yargs-parser-v21.1.0) (2022-08-03) + + +### Features + +* allow the browser build to be imported ([#443](https://github.com/yargs/yargs-parser/issues/443)) ([a89259f](https://github.com/yargs/yargs-parser/commit/a89259ff41d6f5312b3ce8a30bef343a993f395a)) + + +### Bug Fixes + +* **halt-at-non-option:** prevent known args from being parsed when "unknown-options-as-args" is enabled ([#438](https://github.com/yargs/yargs-parser/issues/438)) ([c474bc1](https://github.com/yargs/yargs-parser/commit/c474bc10c3aa0ae864b95e5722730114ef15f573)) +* node version check now uses process.versions.node ([#450](https://github.com/yargs/yargs-parser/issues/450)) ([d07bcdb](https://github.com/yargs/yargs-parser/commit/d07bcdbe43075f7201fbe8a08e491217247fe1f1)) +* parse options ending with 3+ hyphens ([#434](https://github.com/yargs/yargs-parser/issues/434)) ([4f1060b](https://github.com/yargs/yargs-parser/commit/4f1060b50759fadbac3315c5117b0c3d65b0a7d8)) + +### [21.0.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.0...yargs-parser-v21.0.1) (2022-02-27) + + +### Bug Fixes + +* return deno env object ([#432](https://github.com/yargs/yargs-parser/issues/432)) ([b00eb87](https://github.com/yargs/yargs-parser/commit/b00eb87b4860a890dd2dab0d6058241bbfd2b3ec)) + +## [21.0.0](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.9...yargs-parser-v21.0.0) (2021-11-15) + + +### ⚠ BREAKING CHANGES + +* drops support for 10 (#421) + +### Bug Fixes + +* esm json import ([#416](https://www.github.com/yargs/yargs-parser/issues/416)) ([90f970a](https://www.github.com/yargs/yargs-parser/commit/90f970a6482dd4f5b5eb18d38596dd6f02d73edf)) +* parser should preserve inner quotes ([#407](https://www.github.com/yargs/yargs-parser/issues/407)) ([ae11f49](https://www.github.com/yargs/yargs-parser/commit/ae11f496a8318ea8885aa25015d429b33713c314)) + + +### Code Refactoring + +* drops support for 10 ([#421](https://www.github.com/yargs/yargs-parser/issues/421)) ([3aaf878](https://www.github.com/yargs/yargs-parser/commit/3aaf8784f5c7f2aec6108c1c6a55537fa7e3b5c1)) + +### [20.2.9](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.8...yargs-parser-v20.2.9) (2021-06-20) + + +### Bug Fixes + +* **build:** fixed automated release pipeline ([1fe9135](https://www.github.com/yargs/yargs-parser/commit/1fe9135884790a083615419b2861683e2597dac3)) + +### [20.2.8](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.7...yargs-parser-v20.2.8) (2021-06-20) + + +### Bug Fixes + +* **locale:** Turkish camelize and decamelize issues with toLocaleLowerCase/toLocaleUpperCase ([2617303](https://www.github.com/yargs/yargs-parser/commit/261730383e02448562f737b94bbd1f164aed5143)) +* **perf:** address slow parse when using unknown-options-as-args ([#394](https://www.github.com/yargs/yargs-parser/issues/394)) ([441f059](https://www.github.com/yargs/yargs-parser/commit/441f059d585d446551068ad213db79ac91daf83a)) +* **string-utils:** detect [0,1] ranged values as numbers ([#388](https://www.github.com/yargs/yargs-parser/issues/388)) ([efcc32c](https://www.github.com/yargs/yargs-parser/commit/efcc32c2d6b09aba31abfa2db9bd947befe5586b)) + +### [20.2.7](https://www.github.com/yargs/yargs-parser/compare/v20.2.6...v20.2.7) (2021-03-10) + + +### Bug Fixes + +* **deno:** force release for Deno ([6687c97](https://www.github.com/yargs/yargs-parser/commit/6687c972d0f3ca7865a97908dde3080b05f8b026)) + +### [20.2.6](https://www.github.com/yargs/yargs-parser/compare/v20.2.5...v20.2.6) (2021-02-22) + + +### Bug Fixes + +* **populate--:** -- should always be array ([#354](https://www.github.com/yargs/yargs-parser/issues/354)) ([585ae8f](https://www.github.com/yargs/yargs-parser/commit/585ae8ffad74cc02974f92d788e750137fd65146)) + +### [20.2.5](https://www.github.com/yargs/yargs-parser/compare/v20.2.4...v20.2.5) (2021-02-13) + + +### Bug Fixes + +* do not lowercase camel cased string ([#348](https://www.github.com/yargs/yargs-parser/issues/348)) ([5f4da1f](https://www.github.com/yargs/yargs-parser/commit/5f4da1f17d9d50542d2aaa206c9806ce3e320335)) + +### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09) + + +### Bug Fixes + +* **deno:** address import issues in Deno ([#339](https://www.github.com/yargs/yargs-parser/issues/339)) ([3b54e5e](https://www.github.com/yargs/yargs-parser/commit/3b54e5eef6e9a7b7c6eec7c12bab3ba3b8ba8306)) + +### [20.2.3](https://www.github.com/yargs/yargs-parser/compare/v20.2.2...v20.2.3) (2020-10-16) + + +### Bug Fixes + +* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#336](https://www.github.com/yargs/yargs-parser/issues/336)) ([3ae7242](https://www.github.com/yargs/yargs-parser/commit/3ae7242040ff876d28dabded60ac226e00150c88)) + +### [20.2.2](https://www.github.com/yargs/yargs-parser/compare/v20.2.1...v20.2.2) (2020-10-14) + + +### Bug Fixes + +* **exports:** node 13.0-13.6 require a string fallback ([#333](https://www.github.com/yargs/yargs-parser/issues/333)) ([291aeda](https://www.github.com/yargs/yargs-parser/commit/291aeda06b685b7a015d83bdf2558e180b37388d)) + +### [20.2.1](https://www.github.com/yargs/yargs-parser/compare/v20.2.0...v20.2.1) (2020-10-01) + + +### Bug Fixes + +* **deno:** update types for deno ^1.4.0 ([#330](https://www.github.com/yargs/yargs-parser/issues/330)) ([0ab92e5](https://www.github.com/yargs/yargs-parser/commit/0ab92e50b090f11196334c048c9c92cecaddaf56)) + +## [20.2.0](https://www.github.com/yargs/yargs-parser/compare/v20.1.0...v20.2.0) (2020-09-21) + + +### Features + +* **string-utils:** export looksLikeNumber helper ([#324](https://www.github.com/yargs/yargs-parser/issues/324)) ([c8580a2](https://www.github.com/yargs/yargs-parser/commit/c8580a2327b55f6342acecb6e72b62963d506750)) + + +### Bug Fixes + +* **unknown-options-as-args:** convert positionals that look like numbers ([#326](https://www.github.com/yargs/yargs-parser/issues/326)) ([f85ebb4](https://www.github.com/yargs/yargs-parser/commit/f85ebb4face9d4b0f56147659404cbe0002f3dad)) + +## [20.1.0](https://www.github.com/yargs/yargs-parser/compare/v20.0.0...v20.1.0) (2020-09-20) + + +### Features + +* adds parse-positional-numbers configuration ([#321](https://www.github.com/yargs/yargs-parser/issues/321)) ([9cec00a](https://www.github.com/yargs/yargs-parser/commit/9cec00a622251292ffb7dce6f78f5353afaa0d4c)) + + +### Bug Fixes + +* **build:** update release-please; make labels kick off builds ([#323](https://www.github.com/yargs/yargs-parser/issues/323)) ([09f448b](https://www.github.com/yargs/yargs-parser/commit/09f448b4cd66e25d2872544718df46dab8af062a)) + +## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09) + + +### ⚠ BREAKING CHANGES + +* do not ship type definitions (#318) + +### Bug Fixes + +* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315) + + +### Code Refactoring + +* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330)) + +### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27) + + +### Bug Fixes + +* **build:** fixing publication ([#310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5)) + +### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27) + + +### Bug Fixes + +* **build:** switch to action for publish ([#308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174)) + +### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27) + + +### Bug Fixes + +* **types:** envPrefix should be optional ([#305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523)) + +### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09) + + +### Bug Fixes + +* **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0)) + +## [19.0.0](https://www.github.com/yargs/yargs-parser/compare/v18.1.3...v19.0.0) (2020-08-09) + + +### ⚠ BREAKING CHANGES + +* adds support for ESM and Deno (#295) +* **ts:** projects using `@types/yargs-parser` may see variations in type definitions. +* drops Node 6. begin following Node.js LTS schedule (#278) + +### Features + +* adds support for ESM and Deno ([#295](https://www.github.com/yargs/yargs-parser/issues/295)) ([195bc4a](https://www.github.com/yargs/yargs-parser/commit/195bc4a7f20c2a8f8e33fbb6ba96ef6e9a0120a1)) +* expose camelCase and decamelize helpers ([#296](https://www.github.com/yargs/yargs-parser/issues/296)) ([39154ce](https://www.github.com/yargs/yargs-parser/commit/39154ceb5bdcf76b5f59a9219b34cedb79b67f26)) +* **deps:** update to latest camelcase/decamelize ([#281](https://www.github.com/yargs/yargs-parser/issues/281)) ([8931ab0](https://www.github.com/yargs/yargs-parser/commit/8931ab08f686cc55286f33a95a83537da2be5516)) + + +### Bug Fixes + +* boolean numeric short option ([#294](https://www.github.com/yargs/yargs-parser/issues/294)) ([f600082](https://www.github.com/yargs/yargs-parser/commit/f600082c959e092076caf420bbbc9d7a231e2418)) +* raise permission error for Deno if config load fails ([#298](https://www.github.com/yargs/yargs-parser/issues/298)) ([1174e2b](https://www.github.com/yargs/yargs-parser/commit/1174e2b3f0c845a1cd64e14ffc3703e730567a84)) +* **deps:** update dependency decamelize to v3 ([#274](https://www.github.com/yargs/yargs-parser/issues/274)) ([4d98698](https://www.github.com/yargs/yargs-parser/commit/4d98698bc6767e84ec54a0842908191739be73b7)) +* **types:** switch back to using Partial types ([#293](https://www.github.com/yargs/yargs-parser/issues/293)) ([bdc80ba](https://www.github.com/yargs/yargs-parser/commit/bdc80ba59fa13bc3025ce0a85e8bad9f9da24ea7)) + + +### Build System + +* drops Node 6. begin following Node.js LTS schedule ([#278](https://www.github.com/yargs/yargs-parser/issues/278)) ([9014ed7](https://www.github.com/yargs/yargs-parser/commit/9014ed722a32768b96b829e65a31705db5c1458a)) + + +### Code Refactoring + +* **ts:** move index.js to TypeScript ([#292](https://www.github.com/yargs/yargs-parser/issues/292)) ([f78d2b9](https://www.github.com/yargs/yargs-parser/commit/f78d2b97567ac4828624406e420b4047c710b789)) + +### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16) + + +### Bug Fixes + +* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e)) + +### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26) + + +### Bug Fixes + +* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13)) + +### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16) + + +### Bug Fixes + +* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential +prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) + +## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07) + + +### Features + +* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f)) + +## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02) + + +### ⚠ BREAKING CHANGES + +* the narg count is now enforced when parsing arrays. + +### Features + +* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c)) + +## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01) + + +### Features + +* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb)) + +### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29) + + +### Bug Fixes + +* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba)) + +## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10) + + +### ⚠ BREAKING CHANGES + +* this reverts parsing behavior of booleans to that of yargs@14 +* objects used during parsing are now created with a null +prototype. There may be some scenarios where this change in behavior +leaks externally. + +### Features + +* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5)) +* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732)) + + +### Bug Fixes + +* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346)) +* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c)) +* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de)) +* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5)) + +## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01) + + +### ⚠ BREAKING CHANGES + +* populate error if incompatible narg/count or array/count options are used (#191) + +### Features + +* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0)) +* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9)) + + +### Reverts + +* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf)) diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt new file mode 100644 index 000000000..836440bef --- /dev/null +++ b/node_modules/yargs-parser/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md new file mode 100644 index 000000000..261484076 --- /dev/null +++ b/node_modules/yargs-parser/README.md @@ -0,0 +1,518 @@ +# yargs-parser + +![ci](https://github.com/yargs/yargs-parser/workflows/ci/badge.svg) +[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) +![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/yargs-parser) + +The mighty option parser used by [yargs](https://github.com/yargs/yargs). + +visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. + + + +## Example + +```sh +npm i yargs-parser --save +``` + +```js +const argv = require('yargs-parser')(process.argv.slice(2)) +console.log(argv) +``` + +```console +$ node example.js --foo=33 --bar hello +{ _: [], foo: 33, bar: 'hello' } +``` + +_or parse a string!_ + +```js +const argv = require('yargs-parser')('--foo=99 --bar=33') +console.log(argv) +``` + +```console +{ _: [], foo: 99, bar: 33 } +``` + +Convert an array of mixed types before passing to `yargs-parser`: + +```js +const parse = require('yargs-parser') +parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string +parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings +``` + +## Deno Example + +As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno): + +```typescript +import parser from "https://deno.land/x/yargs_parser/deno.ts"; + +const argv = parser('--foo=99 --bar=9987930', { + string: ['bar'] +}) +console.log(argv) +``` + +## ESM Example + +As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_): + +**Node.js:** + +```js +import parser from 'yargs-parser' + +const argv = parser('--foo=99 --bar=9987930', { + string: ['bar'] +}) +console.log(argv) +``` + +**Browsers:** + +```html + + + + +``` + +## API + +### parser(args, opts={}) + +Parses command line arguments returning a simple mapping of keys and values. + +**expects:** + +* `args`: a string or array of strings representing the options to parse. +* `opts`: provide a set of hints indicating how `args` should be parsed: + * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
+ Indicate that keys should be parsed as an array and coerced to booleans / numbers:
+ `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. + * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. + * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided + (or throws an error). For arrays the function is called only once for the entire array:
+ `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
+ `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). + * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. + * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. + * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. + * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. + * `opts.normalize`: `path.normalize()` will be applied to values set to this key. + * `opts.number`: keys should be treated as numbers. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). + +**returns:** + +* `obj`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. + +### require('yargs-parser').detailed(args, opts={}) + +Parses a command line string, returning detailed information required by the +yargs engine. + +**expects:** + +* `args`: a string or array of strings representing options to parse. +* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. + +**returns:** + +* `argv`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. +* `error`: populated with an error object if an exception occurred during parsing. +* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. +* `newAliases`: any new aliases added via camel-case expansion: + * `boolean`: `{ fooBar: true }` +* `defaulted`: any new argument created by `opts.default`, no aliases included. + * `boolean`: `{ foo: true }` +* `configuration`: given by default settings and `opts.configuration`. + + + +### Configuration + +The yargs-parser applies several automated transformations on the keys provided +in `args`. These features can be turned on and off using the `configuration` field +of `opts`. + +```js +var parsed = parser(['--no-dice'], { + configuration: { + 'boolean-negation': false + } +}) +``` + +### short option groups + +* default: `true`. +* key: `short-option-groups`. + +Should a group of short-options be treated as boolean flags? + +```console +$ node example.js -abc +{ _: [], a: true, b: true, c: true } +``` + +_if disabled:_ + +```console +$ node example.js -abc +{ _: [], abc: true } +``` + +### camel-case expansion + +* default: `true`. +* key: `camel-case-expansion`. + +Should hyphenated arguments be expanded into camel-case aliases? + +```console +$ node example.js --foo-bar +{ _: [], 'foo-bar': true, fooBar: true } +``` + +_if disabled:_ + +```console +$ node example.js --foo-bar +{ _: [], 'foo-bar': true } +``` + +### dot-notation + +* default: `true` +* key: `dot-notation` + +Should keys that contain `.` be treated as objects? + +```console +$ node example.js --foo.bar +{ _: [], foo: { bar: true } } +``` + +_if disabled:_ + +```console +$ node example.js --foo.bar +{ _: [], "foo.bar": true } +``` + +### parse numbers + +* default: `true` +* key: `parse-numbers` + +Should keys that look like numbers be treated as such? + +```console +$ node example.js --foo=99.3 +{ _: [], foo: 99.3 } +``` + +_if disabled:_ + +```console +$ node example.js --foo=99.3 +{ _: [], foo: "99.3" } +``` + +### parse positional numbers + +* default: `true` +* key: `parse-positional-numbers` + +Should positional keys that look like numbers be treated as such. + +```console +$ node example.js 99.3 +{ _: [99.3] } +``` + +_if disabled:_ + +```console +$ node example.js 99.3 +{ _: ['99.3'] } +``` + +### boolean negation + +* default: `true` +* key: `boolean-negation` + +Should variables prefixed with `--no` be treated as negations? + +```console +$ node example.js --no-foo +{ _: [], foo: false } +``` + +_if disabled:_ + +```console +$ node example.js --no-foo +{ _: [], "no-foo": true } +``` + +### combine arrays + +* default: `false` +* key: `combine-arrays` + +Should arrays be combined when provided by both command line arguments and +a configuration file. + +### duplicate arguments array + +* default: `true` +* key: `duplicate-arguments-array` + +Should arguments be coerced into an array when duplicated: + +```console +$ node example.js -x 1 -x 2 +{ _: [], x: [1, 2] } +``` + +_if disabled:_ + +```console +$ node example.js -x 1 -x 2 +{ _: [], x: 2 } +``` + +### flatten duplicate arrays + +* default: `true` +* key: `flatten-duplicate-arrays` + +Should array arguments be coerced into a single array when duplicated: + +```console +$ node example.js -x 1 2 -x 3 4 +{ _: [], x: [1, 2, 3, 4] } +``` + +_if disabled:_ + +```console +$ node example.js -x 1 2 -x 3 4 +{ _: [], x: [[1, 2], [3, 4]] } +``` + +### greedy arrays + +* default: `true` +* key: `greedy-arrays` + +Should arrays consume more than one positional argument following their flag. + +```console +$ node example --arr 1 2 +{ _: [], arr: [1, 2] } +``` + +_if disabled:_ + +```console +$ node example --arr 1 2 +{ _: [2], arr: [1] } +``` + +**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** + +### nargs eats options + +* default: `false` +* key: `nargs-eats-options` + +Should nargs consume dash options as well as positional arguments. + +### negation prefix + +* default: `no-` +* key: `negation-prefix` + +The prefix to use for negated boolean variables. + +```console +$ node example.js --no-foo +{ _: [], foo: false } +``` + +_if set to `quux`:_ + +```console +$ node example.js --quuxfoo +{ _: [], foo: false } +``` + +### populate -- + +* default: `false`. +* key: `populate--` + +Should unparsed flags be stored in `--` or `_`. + +_If disabled:_ + +```console +$ node example.js a -b -- x y +{ _: [ 'a', 'x', 'y' ], b: true } +``` + +_If enabled:_ + +```console +$ node example.js a -b -- x y +{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } +``` + +### set placeholder key + +* default: `false`. +* key: `set-placeholder-key`. + +Should a placeholder be added for keys not set via the corresponding CLI argument? + +_If disabled:_ + +```console +$ node example.js -a 1 -c 2 +{ _: [], a: 1, c: 2 } +``` + +_If enabled:_ + +```console +$ node example.js -a 1 -c 2 +{ _: [], a: 1, b: undefined, c: 2 } +``` + +### halt at non-option + +* default: `false`. +* key: `halt-at-non-option`. + +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. + +_If disabled:_ + +```console +$ node example.js -a run b -x y +{ _: [ 'b' ], a: 'run', x: 'y' } +``` + +_If enabled:_ + +```console +$ node example.js -a run b -x y +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-expansion` is disabled. + +_If disabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```console +$ node example.js --test-field 1 +{ _: [], testField: 1 } +``` + +### unknown options as args + +* default: `false` +* key: `unknown-options-as-args` + +Should unknown options be treated like regular arguments? An unknown option is one that is not +configured in `opts`. + +_If disabled_ + +```console +$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } +``` + +_If enabled_ + +```console +$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } +``` + +## Supported Node.js Versions + +Libraries in this ecosystem make a best effort to track +[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a +post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). + +## Special Thanks + +The yargs project evolves from optimist and minimist. It owes its +existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ + +## License + +ISC diff --git a/node_modules/yargs-parser/browser.js b/node_modules/yargs-parser/browser.js new file mode 100644 index 000000000..241202c7e --- /dev/null +++ b/node_modules/yargs-parser/browser.js @@ -0,0 +1,29 @@ +// Main entrypoint for ESM web browser environments. Avoids using Node.js +// specific libraries, such as "path". +// +// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc. +import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js' +import { YargsParser } from './build/lib/yargs-parser.js' +const parser = new YargsParser({ + cwd: () => { return '' }, + format: (str, arg) => { return str.replace('%s', arg) }, + normalize: (str) => { return str }, + resolve: (str) => { return str }, + require: () => { + throw Error('loading config from files not currently supported in browser') + }, + env: () => {} +}) + +const yargsParser = function Parser (args, opts) { + const result = parser.parse(args.slice(), opts) + return result.argv +} +yargsParser.detailed = function (args, opts) { + return parser.parse(args.slice(), opts) +} +yargsParser.camelCase = camelCase +yargsParser.decamelize = decamelize +yargsParser.looksLikeNumber = looksLikeNumber + +export default yargsParser diff --git a/node_modules/yargs-parser/build/lib/index.js b/node_modules/yargs-parser/build/lib/index.js new file mode 100644 index 000000000..910939193 --- /dev/null +++ b/node_modules/yargs-parser/build/lib/index.js @@ -0,0 +1,64 @@ +/** + * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js + * + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +var _a, _b, _c; +/* eslint-disable n/no-unpublished-import */ +import { format } from 'util'; +import { normalize, resolve } from 'path'; +import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; +import { YargsParser } from './yargs-parser.js'; +import { readFileSync } from 'fs'; +import { createRequire } from 'node:module'; +// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our +// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only. +const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) + ? Number(process.env.YARGS_MIN_NODE_VERSION) + : 20; +const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); +if (nodeVersion) { + const major = Number(nodeVersion.match(/^([^.]+)/)[1]); + if (major < minNodeVersion) { + throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); + } +} +// Creates a yargs-parser instance using Node.js standard libraries: +const env = process ? process.env : {}; +const require = createRequire ? createRequire(import.meta.url) : undefined; +const parser = new YargsParser({ + cwd: process.cwd, + env: () => { + return env; + }, + format, + normalize, + resolve, + require: (path) => { + if (typeof require !== 'undefined') { + return require(path); + } + else if (path.match(/\.json$/)) { + // Addresses: https://github.com/yargs/yargs/issues/2040 + return JSON.parse(readFileSync(path, 'utf8')); + } + else { + throw Error('only .json config files are supported in ESM'); + } + } +}); +const yargsParser = function Parser(args, opts) { + const result = parser.parse(args.slice(), opts); + return result.argv; +}; +yargsParser.detailed = function (args, opts) { + return parser.parse(args.slice(), opts); +}; +yargsParser.camelCase = camelCase; +yargsParser.decamelize = decamelize; +yargsParser.looksLikeNumber = looksLikeNumber; +export default yargsParser; +// special syntax to allow unqualified default export from CommonJS +export { yargsParser as 'module.exports' }; diff --git a/node_modules/yargs-parser/build/lib/string-utils.js b/node_modules/yargs-parser/build/lib/string-utils.js new file mode 100644 index 000000000..4e8bd996e --- /dev/null +++ b/node_modules/yargs-parser/build/lib/string-utils.js @@ -0,0 +1,65 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +export function camelCase(str) { + // Handle the case where an argument is provided as camel case, e.g., fooBar. + // by ensuring that the string isn't already mixed case: + const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); + if (!isCamelCase) { + str = str.toLowerCase(); + } + if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { + return str; + } + else { + let camelcase = ''; + let nextChrUpper = false; + const leadingHyphens = str.match(/^-+/); + for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { + let chr = str.charAt(i); + if (nextChrUpper) { + nextChrUpper = false; + chr = chr.toUpperCase(); + } + if (i !== 0 && (chr === '-' || chr === '_')) { + nextChrUpper = true; + } + else if (chr !== '-' && chr !== '_') { + camelcase += chr; + } + } + return camelcase; + } +} +export function decamelize(str, joinString) { + const lowercase = str.toLowerCase(); + joinString = joinString || '-'; + let notCamelcase = ''; + for (let i = 0; i < str.length; i++) { + const chrLower = lowercase.charAt(i); + const chrString = str.charAt(i); + if (chrLower !== chrString && i > 0) { + notCamelcase += `${joinString}${lowercase.charAt(i)}`; + } + else { + notCamelcase += chrString; + } + } + return notCamelcase; +} +export function looksLikeNumber(x) { + if (x === null || x === undefined) + return false; + // if loaded from config, may already be a number. + if (typeof x === 'number') + return true; + // hexadecimal. + if (/^0x[0-9a-f]+$/i.test(x)) + return true; + // don't treat 0123 as a number; as it drops the leading '0'. + if (/^0[^.]/.test(x)) + return false; + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} diff --git a/node_modules/yargs-parser/build/lib/tokenize-arg-string.js b/node_modules/yargs-parser/build/lib/tokenize-arg-string.js new file mode 100644 index 000000000..5e732efe0 --- /dev/null +++ b/node_modules/yargs-parser/build/lib/tokenize-arg-string.js @@ -0,0 +1,40 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +// take an un-split argv string and tokenize it. +export function tokenizeArgString(argString) { + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e); + } + argString = argString.trim(); + let i = 0; + let prevC = null; + let c = null; + let opening = null; + const args = []; + for (let ii = 0; ii < argString.length; ii++) { + prevC = c; + c = argString.charAt(ii); + // split on spaces unless we're in quotes. + if (c === ' ' && !opening) { + if (!(prevC === ' ')) { + i++; + } + continue; + } + // don't split the string if we're in matching + // opening or closing single and double quotes. + if (c === opening) { + opening = null; + } + else if ((c === "'" || c === '"') && !opening) { + opening = c; + } + if (!args[i]) + args[i] = ''; + args[i] += c; + } + return args; +} diff --git a/node_modules/yargs-parser/build/lib/yargs-parser-types.js b/node_modules/yargs-parser/build/lib/yargs-parser-types.js new file mode 100644 index 000000000..63b7c313a --- /dev/null +++ b/node_modules/yargs-parser/build/lib/yargs-parser-types.js @@ -0,0 +1,12 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +export var DefaultValuesForTypeKey; +(function (DefaultValuesForTypeKey) { + DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; + DefaultValuesForTypeKey["STRING"] = "string"; + DefaultValuesForTypeKey["NUMBER"] = "number"; + DefaultValuesForTypeKey["ARRAY"] = "array"; +})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); diff --git a/node_modules/yargs-parser/build/lib/yargs-parser.js b/node_modules/yargs-parser/build/lib/yargs-parser.js new file mode 100644 index 000000000..e3624fb7b --- /dev/null +++ b/node_modules/yargs-parser/build/lib/yargs-parser.js @@ -0,0 +1,1046 @@ +/** + * @license + * Copyright (c) 2016, Contributors + * SPDX-License-Identifier: ISC + */ +/* eslint-disable prefer-arrow-callback */ +import { tokenizeArgString } from './tokenize-arg-string.js'; +import { DefaultValuesForTypeKey } from './yargs-parser-types.js'; +import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; +let mixin; +export class YargsParser { + constructor(_mixin) { + mixin = _mixin; + } + parse(argsInput, options) { + const opts = Object.assign({ + alias: undefined, + array: undefined, + boolean: undefined, + config: undefined, + configObjects: undefined, + configuration: undefined, + coerce: undefined, + count: undefined, + default: undefined, + envPrefix: undefined, + narg: undefined, + normalize: undefined, + string: undefined, + number: undefined, + __: undefined, + key: undefined + }, options); + // allow a string argument to be passed in rather + // than an argv array. + const args = tokenizeArgString(argsInput); + // tokenizeArgString adds extra quotes to args if argsInput is a string + // only strip those extra quotes in processValue if argsInput is a string + const inputIsString = typeof argsInput === 'string'; + // aliases might have transitive relationships, normalize this. + const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); + const configuration = Object.assign({ + 'boolean-negation': true, + 'camel-case-expansion': true, + 'combine-arrays': false, + 'dot-notation': true, + 'duplicate-arguments-array': true, + 'flatten-duplicate-arrays': true, + 'greedy-arrays': true, + 'halt-at-non-option': false, + 'nargs-eats-options': false, + 'negation-prefix': 'no-', + 'parse-numbers': true, + 'parse-positional-numbers': true, + 'populate--': false, + 'set-placeholder-key': false, + 'short-option-groups': true, + 'strip-aliased': false, + 'strip-dashed': false, + 'unknown-options-as-args': false + }, opts.configuration); + const defaults = Object.assign(Object.create(null), opts.default); + const configObjects = opts.configObjects || []; + const envPrefix = opts.envPrefix; + const notFlagsOption = configuration['populate--']; + const notFlagsArgv = notFlagsOption ? '--' : '_'; + const newAliases = Object.create(null); + const defaulted = Object.create(null); + // allow a i18n handler to be passed in, default to a fake one (util.format). + const __ = opts.__ || mixin.format; + const flags = { + aliases: Object.create(null), + arrays: Object.create(null), + bools: Object.create(null), + strings: Object.create(null), + numbers: Object.create(null), + counts: Object.create(null), + normalize: Object.create(null), + configs: Object.create(null), + nargs: Object.create(null), + coercions: Object.create(null), + keys: [] + }; + const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; + const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); + [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { + const key = typeof opt === 'object' ? opt.key : opt; + // assign to flags[bools|strings|numbers] + const assignment = Object.keys(opt).map(function (key) { + const arrayFlagKeys = { + boolean: 'bools', + string: 'strings', + number: 'numbers' + }; + return arrayFlagKeys[key]; + }).filter(Boolean).pop(); + // assign key to be coerced + if (assignment) { + flags[assignment][key] = true; + } + flags.arrays[key] = true; + flags.keys.push(key); + }); + [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + flags.keys.push(key); + }); + [].concat(opts.string || []).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + flags.keys.push(key); + }); + [].concat(opts.number || []).filter(Boolean).forEach(function (key) { + flags.numbers[key] = true; + flags.keys.push(key); + }); + [].concat(opts.count || []).filter(Boolean).forEach(function (key) { + flags.counts[key] = true; + flags.keys.push(key); + }); + [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true; + flags.keys.push(key); + }); + if (typeof opts.narg === 'object') { + Object.entries(opts.narg).forEach(([key, value]) => { + if (typeof value === 'number') { + flags.nargs[key] = value; + flags.keys.push(key); + } + }); + } + if (typeof opts.coerce === 'object') { + Object.entries(opts.coerce).forEach(([key, value]) => { + if (typeof value === 'function') { + flags.coercions[key] = value; + flags.keys.push(key); + } + }); + } + if (typeof opts.config !== 'undefined') { + if (Array.isArray(opts.config) || typeof opts.config === 'string') { + ; + [].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true; + }); + } + else if (typeof opts.config === 'object') { + Object.entries(opts.config).forEach(([key, value]) => { + if (typeof value === 'boolean' || typeof value === 'function') { + flags.configs[key] = value; + } + }); + } + } + // create a lookup table that takes into account all + // combinations of aliases: {f: ['foo'], foo: ['f']} + extendAliases(opts.key, aliases, opts.default, flags.arrays); + // apply default values to all aliases. + Object.keys(defaults).forEach(function (key) { + (flags.aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key]; + }); + }); + let error = null; + checkConfiguration(); + let notFlags = []; + const argv = Object.assign(Object.create(null), { _: [] }); + // TODO(bcoe): for the first pass at removing object prototype we didn't + // remove all prototypes from objects returned by this API, we might want + // to gradually move towards doing so. + const argvReturn = {}; + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + const truncatedArg = arg.replace(/^-{3,}/, '---'); + let broken; + let key; + let letters; + let m; + let next; + let value; + // any unknown option (except for end-of-options, "--") + if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { + pushPositional(arg); + // ---, ---=, ----, etc, + } + else if (truncatedArg.match(/^---+(=|$)/)) { + // options without key name are invalid. + pushPositional(arg); + continue; + // -- separated by = + } + else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--?([^=]+)=([\s\S]*)$/); + // arrays format = '--f=a b c' + if (m !== null && Array.isArray(m) && m.length >= 3) { + if (checkAllAliases(m[1], flags.arrays)) { + i = eatArray(i, m[1], args, m[2]); + } + else if (checkAllAliases(m[1], flags.nargs) !== false) { + // nargs format = '--f=monkey washing cat' + i = eatNargs(i, m[1], args, m[2]); + } + else { + setArg(m[1], m[2], true); + } + } + } + else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { + m = arg.match(negatedBoolean); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); + } + // -- separated by space. + } + else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { + m = arg.match(/^--?(.+)/); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + if (checkAllAliases(key, flags.arrays)) { + // array format = '--foo a b c' + i = eatArray(i, key, args); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '--foo a b c' + // should be truthy even if: flags.nargs[key] === 0 + i = eatNargs(i, key, args); + } + else { + next = args[i + 1]; + if (next !== undefined && (!next.match(/^-/) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + // dot-notation flag separated by '='. + } + else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/); + if (m !== null && Array.isArray(m) && m.length >= 3) { + setArg(m[1], m[2]); + } + // dot-notation flag separated by space. + } + else if (arg.match(/^-.\..+/) && !arg.match(negative)) { + next = args[i + 1]; + m = arg.match(/^-(.\..+)/); + if (m !== null && Array.isArray(m) && m.length >= 2) { + key = m[1]; + if (next !== undefined && !next.match(/^-/) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { + letters = arg.slice(1, -1).split(''); + broken = false; + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3); + key = letters[j]; + if (checkAllAliases(key, flags.arrays)) { + // array format = '-f=a b c' + i = eatArray(i, key, args, value); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '-f=monkey washing cat' + i = eatNargs(i, key, args, value); + } + else { + setArg(key, value); + } + broken = true; + break; + } + if (next === '-') { + setArg(letters[j], next); + continue; + } + // current letter is an alphabetic character and next value is a number + if (/[A-Za-z]/.test(letters[j]) && + /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && + checkAllAliases(next, flags.bools) === false) { + setArg(letters[j], next); + broken = true; + break; + } + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], next); + broken = true; + break; + } + else { + setArg(letters[j], defaultValue(letters[j])); + } + } + key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (checkAllAliases(key, flags.arrays)) { + // array format = '-f a b c' + i = eatArray(i, key, args); + } + else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '-f a b c' + // should be truthy even if: flags.nargs[key] === 0 + i = eatNargs(i, key, args); + } + else { + next = args[i + 1]; + if (next !== undefined && (!/^(-|--)[^-]/.test(next) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next); + i++; + } + else { + setArg(key, defaultValue(key)); + } + } + } + } + else if (arg.match(/^-[0-9]$/) && + arg.match(negative) && + checkAllAliases(arg.slice(1), flags.bools)) { + // single-digit boolean alias, e.g: xargs -0 + key = arg.slice(1); + setArg(key, defaultValue(key)); + } + else if (arg === '--') { + notFlags = args.slice(i + 1); + break; + } + else if (configuration['halt-at-non-option']) { + notFlags = args.slice(i); + break; + } + else { + pushPositional(arg); + } + } + // order of precedence: + // 1. command line arg + // 2. value from env var + // 3. value from config file + // 4. value from config objects + // 5. configured default value + applyEnvVars(argv, true); // special case: check env vars that point to config file + applyEnvVars(argv, false); + setConfig(argv); + setConfigObjects(); + applyDefaultsAndAliases(argv, flags.aliases, defaults, true); + applyCoercions(argv); + if (configuration['set-placeholder-key']) + setPlaceholderKeys(argv); + // for any counts either not in args or without an explicit default, set to 0 + Object.keys(flags.counts).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) + setArg(key, 0); + }); + // '--' defaults to undefined. + if (notFlagsOption && notFlags.length) + argv[notFlagsArgv] = []; + notFlags.forEach(function (key) { + argv[notFlagsArgv].push(key); + }); + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key]; + }); + } + if (configuration['strip-aliased']) { + ; + [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion'] && alias.includes('-')) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; + } + delete argv[alias]; + }); + } + // Push argument into positional array, applying numeric coercion: + function pushPositional(arg) { + const maybeCoercedNumber = maybeCoerceNumber('_', arg); + if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { + argv._.push(maybeCoercedNumber); + } + } + // how many arguments should we consume, based + // on the nargs option? + function eatNargs(i, key, args, argAfterEqualSign) { + let ii; + let toEat = checkAllAliases(key, flags.nargs); + // NaN has a special meaning for the array type, indicating that one or + // more values are expected. + toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; + if (toEat === 0) { + if (!isUndefined(argAfterEqualSign)) { + error = Error(__('Argument unexpected for: %s', key)); + } + setArg(key, defaultValue(key)); + return i; + } + let available = isUndefined(argAfterEqualSign) ? 0 : 1; + if (configuration['nargs-eats-options']) { + // classic behavior, yargs eats positional and dash arguments. + if (args.length - (i + 1) + available < toEat) { + error = Error(__('Not enough arguments following: %s', key)); + } + available = toEat; + } + else { + // nargs will not consume flag arguments, e.g., -abc, --foo, + // and terminates when one is observed. + for (ii = i + 1; ii < args.length; ii++) { + if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) + available++; + else + break; + } + if (available < toEat) + error = Error(__('Not enough arguments following: %s', key)); + } + let consumed = Math.min(available, toEat); + if (!isUndefined(argAfterEqualSign) && consumed > 0) { + setArg(key, argAfterEqualSign); + consumed--; + } + for (ii = i + 1; ii < (consumed + i + 1); ii++) { + setArg(key, args[ii]); + } + return (i + consumed); + } + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray(i, key, args, argAfterEqualSign) { + let argsToSet = []; + let next = argAfterEqualSign || args[i + 1]; + // If both array and nargs are configured, enforce the nargs count: + const nargsCount = checkAllAliases(key, flags.nargs); + if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { + argsToSet.push(true); + } + else if (isUndefined(next) || + (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { + // for keys without value ==> argsToSet remains an empty [] + // set user default value, if available + if (defaults[key] !== undefined) { + const defVal = defaults[key]; + argsToSet = Array.isArray(defVal) ? defVal : [defVal]; + } + } + else { + // value in --option=value is eaten as is + if (!isUndefined(argAfterEqualSign)) { + argsToSet.push(processValue(key, argAfterEqualSign, true)); + } + for (let ii = i + 1; ii < args.length; ii++) { + if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || + (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) + break; + next = args[ii]; + if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) + break; + i = ii; + argsToSet.push(processValue(key, next, inputIsString)); + } + } + // If both array and nargs are configured, create an error if less than + // nargs positionals were found. NaN has special meaning, indicating + // that at least one value is required (more are okay). + if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || + (isNaN(nargsCount) && argsToSet.length === 0))) { + error = Error(__('Not enough arguments following: %s', key)); + } + setArg(key, argsToSet); + return i; + } + function setArg(key, val, shouldStripQuotes = inputIsString) { + if (/-/.test(key) && configuration['camel-case-expansion']) { + const alias = key.split('.').map(function (prop) { + return camelCase(prop); + }).join('.'); + addNewAlias(key, alias); + } + const value = processValue(key, val, shouldStripQuotes); + const splitKey = key.split('.'); + setKey(argv, splitKey, value); + // handle populating aliases of the full key + if (flags.aliases[key]) { + flags.aliases[key].forEach(function (x) { + const keyProperties = x.split('.'); + setKey(argv, keyProperties, value); + }); + } + // handle populating aliases of the first element of the dot-notation key + if (splitKey.length > 1 && configuration['dot-notation']) { + ; + (flags.aliases[splitKey[0]] || []).forEach(function (x) { + let keyProperties = x.split('.'); + // expand alias with nested objects in key + const a = [].concat(splitKey); + a.shift(); // nuke the old key. + keyProperties = keyProperties.concat(a); + // populate alias only if is not already an alias of the full key + // (already populated above) + if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { + setKey(argv, keyProperties, value); + } + }); + } + // Set normalize getter and setter when key is in 'normalize' but isn't an array + if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { + const keys = [key].concat(flags.aliases[key] || []); + keys.forEach(function (key) { + Object.defineProperty(argvReturn, key, { + enumerable: true, + get() { + return val; + }, + set(value) { + val = typeof value === 'string' ? mixin.normalize(value) : value; + } + }); + }); + } + } + function addNewAlias(key, alias) { + if (!(flags.aliases[key] && flags.aliases[key].length)) { + flags.aliases[key] = [alias]; + newAliases[alias] = true; + } + if (!(flags.aliases[alias] && flags.aliases[alias].length)) { + addNewAlias(alias, key); + } + } + function processValue(key, val, shouldStripQuotes) { + // strings may be quoted, clean this up as we assign values. + if (shouldStripQuotes) { + val = stripQuotes(val); + } + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') + val = val === 'true'; + } + let value = Array.isArray(val) + ? val.map(function (v) { return maybeCoerceNumber(key, v); }) + : maybeCoerceNumber(key, val); + // increment a count given as arg (either no value or value parsed as boolean) + if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { + value = increment(); + } + // Set normalized value when key is in 'normalize' and in 'arrays' + if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { + if (Array.isArray(val)) + value = val.map((val) => { return mixin.normalize(val); }); + else + value = mixin.normalize(val); + } + return value; + } + function maybeCoerceNumber(key, value) { + if (!configuration['parse-positional-numbers'] && key === '_') + return value; + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { + const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); + if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { + value = Number(value); + } + } + return value; + } + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig(argv) { + const configLookup = Object.create(null); + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, flags.aliases, defaults); + Object.keys(flags.configs).forEach(function (configKey) { + const configPath = argv[configKey] || configLookup[configKey]; + if (configPath) { + try { + let config = null; + const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); + const resolveConfig = flags.configs[configKey]; + if (typeof resolveConfig === 'function') { + try { + config = resolveConfig(resolvedConfigPath); + } + catch (e) { + config = e; + } + if (config instanceof Error) { + error = config; + return; + } + } + else { + config = mixin.require(resolvedConfigPath); + } + setConfigObject(config); + } + catch (ex) { + // Deno will receive a PermissionDenied error if an attempt is + // made to load config without the --allow-read flag: + if (ex.name === 'PermissionDenied') + error = ex; + else if (argv[configKey]) + error = Error(__('Invalid JSON config file: %s', configPath)); + } + } + }); + } + // set args from config object. + // it recursively checks nested objects. + function setConfigObject(config, prev) { + Object.keys(config).forEach(function (key) { + const value = config[key]; + const fullKey = prev ? prev + '.' + key : key; + // if the value is an inner object and we have dot-notation + // enabled, treat inner objects in config the same as + // heavily nested dot notations (foo.bar.apple). + if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { + // if the value is an object but not an array, check nested object + setConfigObject(value, fullKey); + } + else { + // setting arguments via CLI takes precedence over + // values within the config file. + if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { + setArg(fullKey, value); + } + } + }); + } + // set all config objects passed in opts + function setConfigObjects() { + if (typeof configObjects !== 'undefined') { + configObjects.forEach(function (configObject) { + setConfigObject(configObject); + }); + } + } + function applyEnvVars(argv, configOnly) { + if (typeof envPrefix === 'undefined') + return; + const prefix = typeof envPrefix === 'string' ? envPrefix : ''; + const env = mixin.env(); + Object.keys(env).forEach(function (envVar) { + if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { + // get array of nested keys and convert them to camel case + const keys = envVar.split('__').map(function (key, i) { + if (i === 0) { + key = key.substring(prefix.length); + } + return camelCase(key); + }); + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { + setArg(keys.join('.'), env[envVar]); + } + } + }); + } + function applyCoercions(argv) { + let coerce; + const applied = new Set(); + Object.keys(argv).forEach(function (key) { + if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases + coerce = checkAllAliases(key, flags.coercions); + if (typeof coerce === 'function') { + try { + const value = maybeCoerceNumber(key, coerce(argv[key])); + ([].concat(flags.aliases[key] || [], key)).forEach(ali => { + applied.add(ali); + argv[ali] = value; + }); + } + catch (err) { + error = err; + } + } + } + }); + } + function setPlaceholderKeys(argv) { + flags.keys.forEach((key) => { + // don't set placeholder keys for dot notation options 'foo.bar'. + if (~key.indexOf('.')) + return; + if (typeof argv[key] === 'undefined') + argv[key] = undefined; + }); + return argv; + } + function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]); + if (canLog) + defaulted[key] = true; + (aliases[key] || []).forEach(function (x) { + if (hasKey(obj, x.split('.'))) + return; + setKey(obj, x.split('.'), defaults[key]); + }); + } + }); + } + function hasKey(obj, keys) { + let o = obj; + if (!configuration['dot-notation']) + keys = [keys.join('.')]; + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}); + }); + const key = keys[keys.length - 1]; + if (typeof o !== 'object') + return false; + else + return key in o; + } + function setKey(obj, keys, value) { + let o = obj; + if (!configuration['dot-notation']) + keys = [keys.join('.')]; + keys.slice(0, -1).forEach(function (key) { + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + key = sanitizeKey(key); + if (typeof o === 'object' && o[key] === undefined) { + o[key] = {}; + } + if (typeof o[key] !== 'object' || Array.isArray(o[key])) { + // ensure that o[key] is an array, and that the last item is an empty object. + if (Array.isArray(o[key])) { + o[key].push({}); + } + else { + o[key] = [o[key], {}]; + } + // we want to update the empty object at the end of the o[key] array, so set o to that object + o = o[key][o[key].length - 1]; + } + else { + o = o[key]; + } + }); + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + const key = sanitizeKey(keys[keys.length - 1]); + const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); + const isValueArray = Array.isArray(value); + let duplicate = configuration['duplicate-arguments-array']; + // nargs has higher priority than duplicate + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true; + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined; + } + } + if (value === increment()) { + o[key] = increment(o[key]); + } + else if (Array.isArray(o[key])) { + if (duplicate && isTypeArray && isValueArray) { + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); + } + else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { + o[key] = value; + } + else { + o[key] = o[key].concat([value]); + } + } + else if (o[key] === undefined && isTypeArray) { + o[key] = isValueArray ? value : [value]; + } + else if (duplicate && !(o[key] === undefined || + checkAllAliases(key, flags.counts) || + checkAllAliases(key, flags.bools))) { + o[key] = [o[key], value]; + } + else { + o[key] = value; + } + } + // extend the aliases list with inferred aliases. + function extendAliases(...args) { + args.forEach(function (obj) { + Object.keys(obj || {}).forEach(function (key) { + // short-circuit if we've already added a key + // to the aliases array, for example it might + // exist in both 'opts.default' and 'opts.key'. + if (flags.aliases[key]) + return; + flags.aliases[key] = [].concat(aliases[key] || []); + // For "--option-name", also set argv.optionName + flags.aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x) && configuration['camel-case-expansion']) { + const c = camelCase(x); + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c); + newAliases[c] = true; + } + } + }); + // For "--optionName", also set argv['option-name'] + flags.aliases[key].concat(key).forEach(function (x) { + if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { + const c = decamelize(x, '-'); + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c); + newAliases[c] = true; + } + } + }); + flags.aliases[key].forEach(function (x) { + flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + }); + } + function checkAllAliases(key, flag) { + const toCheck = [].concat(flags.aliases[key] || [], key); + const keys = Object.keys(flag); + const setAlias = toCheck.find(key => keys.includes(key)); + return setAlias ? flag[setAlias] : false; + } + function hasAnyFlag(key) { + const flagsKeys = Object.keys(flags); + const toCheck = [].concat(flagsKeys.map(k => flags[k])); + return toCheck.some(function (flag) { + return Array.isArray(flag) ? flag.includes(key) : flag[key]; + }); + } + function hasFlagsMatching(arg, ...patterns) { + const toCheck = [].concat(...patterns); + return toCheck.some(function (pattern) { + const match = arg.match(pattern); + return match && hasAnyFlag(match[1]); + }); + } + // based on a simplified version of the short flag group parsing logic + function hasAllShortFlags(arg) { + // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group + if (arg.match(negative) || !arg.match(/^-[^-]+/)) { + return false; + } + let hasAllFlags = true; + let next; + const letters = arg.slice(1).split(''); + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + if (!hasAnyFlag(letters[j])) { + hasAllFlags = false; + break; + } + if ((letters[j + 1] && letters[j + 1] === '=') || + next === '-' || + (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || + (letters[j + 1] && letters[j + 1].match(/\W/))) { + break; + } + } + return hasAllFlags; + } + function isUnknownOptionAsArg(arg) { + return configuration['unknown-options-as-args'] && isUnknownOption(arg); + } + function isUnknownOption(arg) { + arg = arg.replace(/^-{3,}/, '--'); + // ignore negative numbers + if (arg.match(negative)) { + return false; + } + // if this is a short option group and all of them are configured, it isn't unknown + if (hasAllShortFlags(arg)) { + return false; + } + // e.g. '--count=2' + const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; + // e.g. '-a' or '--arg' + const normalFlag = /^-+([^=]+?)$/; + // e.g. '-a-' + const flagEndingInHyphen = /^-+([^=]+?)-$/; + // e.g. '-abc123' + const flagEndingInDigits = /^-+([^=]+?\d+)$/; + // e.g. '-a/usr/local' + const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; + // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method + return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); + } + // make a best effort to pick a default value + // for an option based on name and type. + function defaultValue(key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key]; + } + else { + return defaultForType(guessType(key)); + } + } + // return a default value, given the type of a flag., + function defaultForType(type) { + const def = { + [DefaultValuesForTypeKey.BOOLEAN]: true, + [DefaultValuesForTypeKey.STRING]: '', + [DefaultValuesForTypeKey.NUMBER]: undefined, + [DefaultValuesForTypeKey.ARRAY]: [] + }; + return def[type]; + } + // given a flag, enforce a default type. + function guessType(key) { + let type = DefaultValuesForTypeKey.BOOLEAN; + if (checkAllAliases(key, flags.strings)) + type = DefaultValuesForTypeKey.STRING; + else if (checkAllAliases(key, flags.numbers)) + type = DefaultValuesForTypeKey.NUMBER; + else if (checkAllAliases(key, flags.bools)) + type = DefaultValuesForTypeKey.BOOLEAN; + else if (checkAllAliases(key, flags.arrays)) + type = DefaultValuesForTypeKey.ARRAY; + return type; + } + function isUndefined(num) { + return num === undefined; + } + // check user configuration settings for inconsistencies + function checkConfiguration() { + // count keys should not be set as array/narg + Object.keys(flags.counts).find(key => { + if (checkAllAliases(key, flags.arrays)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); + return true; + } + else if (checkAllAliases(key, flags.nargs)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); + return true; + } + return false; + }); + } + return { + aliases: Object.assign({}, flags.aliases), + argv: Object.assign(argvReturn, argv), + configuration: configuration, + defaulted: Object.assign({}, defaulted), + error: error, + newAliases: Object.assign({}, newAliases) + }; + } +} +// if any aliases reference each other, we should +// merge them together. +function combineAliases(aliases) { + const aliasArrays = []; + const combined = Object.create(null); + let change = true; + // turn alias lookup hash {key: ['alias1', 'alias2']} into + // a simple array ['key', 'alias1', 'alias2'] + Object.keys(aliases).forEach(function (key) { + aliasArrays.push([].concat(aliases[key], key)); + }); + // combine arrays until zero changes are + // made in an iteration. + while (change) { + change = false; + for (let i = 0; i < aliasArrays.length; i++) { + for (let ii = i + 1; ii < aliasArrays.length; ii++) { + const intersect = aliasArrays[i].filter(function (v) { + return aliasArrays[ii].indexOf(v) !== -1; + }); + if (intersect.length) { + aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); + aliasArrays.splice(ii, 1); + change = true; + break; + } + } + } + } + // map arrays back to the hash-lookup (de-dupe while + // we're at it). + aliasArrays.forEach(function (aliasArray) { + aliasArray = aliasArray.filter(function (v, i, self) { + return self.indexOf(v) === i; + }); + const lastAlias = aliasArray.pop(); + if (lastAlias !== undefined && typeof lastAlias === 'string') { + combined[lastAlias] = aliasArray; + } + }); + return combined; +} +// this function should only be called when a count is given as an arg +// it is NOT called to set a default value +// thus we can start the count at 1 instead of 0 +function increment(orig) { + return orig !== undefined ? orig + 1 : 1; +} +// TODO(bcoe): in the next major version of yargs, switch to +// Object.create(null) for dot notation: +function sanitizeKey(key) { + if (key === '__proto__') + return '___proto___'; + return key; +} +function stripQuotes(val) { + return (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0]) + ? val.substring(1, val.length - 1) + : val; +} diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json new file mode 100644 index 000000000..82c021783 --- /dev/null +++ b/node_modules/yargs-parser/package.json @@ -0,0 +1,78 @@ +{ + "name": "yargs-parser", + "version": "22.0.0", + "description": "the mighty option parser used by yargs", + "main": "build/lib/index.js", + "exports": { + ".": [ + { + "import": "./build/lib/index.js" + }, + "./build/lib/index.js" + ], + "./browser": [ + "./browser.js" + ] + }, + "type": "module", + "module": "./build/lib/index.js", + "scripts": { + "check": "gts lint", + "fix": "gts fix", + "pretest": "rimraf build && tsc -p tsconfig.test.json", + "test": "c8 --reporter=text --reporter=html mocha test/*.mjs", + "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'", + "pretest:typescript": "npm run pretest", + "test:typescript": "c8 mocha ./build/test/typescript/*.js", + "coverage": "c8 report --check-coverage", + "precompile": "rimraf build", + "compile": "tsc", + "prepare": "npm run compile" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs-parser.git" + }, + "keywords": [ + "argument", + "parser", + "yargs", + "command", + "cli", + "parsing", + "option", + "args", + "argument" + ], + "author": "Ben Coe ", + "license": "ISC", + "devDependencies": { + "@babel/eslint-parser": "^7.27.1", + "@babel/preset-typescript": "^7.27.1", + "@types/chai": "^5.2.1", + "@types/mocha": "^10.0.10", + "@types/node": "^22.15.3", + "@typescript-eslint/eslint-plugin": "^8.29.1", + "@typescript-eslint/parser": "^8.31.1", + "c8": "^10.1.3", + "chai": "^5.2.0", + "cross-env": "^7.0.2", + "eslint": "^8.57.1", + "gts": "^5.3.1", + "mocha": "^11.1.0", + "puppeteer": "^24.6.1", + "rimraf": "^6.0.1", + "serve": "^14.0.0", + "start-server-and-test": "^2.0.11", + "typescript": "^5.8.3" + }, + "files": [ + "browser.js", + "build", + "!*.d.ts", + "!*.d.cts" + ], + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } +} diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE new file mode 100644 index 000000000..b0145ca0b --- /dev/null +++ b/node_modules/yargs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +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. diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md new file mode 100644 index 000000000..5a3c6698a --- /dev/null +++ b/node_modules/yargs/README.md @@ -0,0 +1,182 @@ +

+ +

+

Yargs

+

+ Yargs be a node.js library fer hearties tryin' ter parse optstrings +

+ +
+ +![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg) +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Coverage][coverage-image]][coverage-url] +[![Conventional Commits][conventional-commits-image]][conventional-commits-url] + +## Description +Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. + +It gives you: + +* commands and (grouped) options (`my-program.js serve --port=5000`). +* a dynamically generated help menu based on your arguments: + +``` +mocha [spec..] + +Run tests with Mocha + +Commands + mocha inspect [spec..] Run tests with Mocha [default] + mocha init create a client-side Mocha setup at + +Rules & Behavior + --allow-uncaught Allow uncaught errors to propagate [boolean] + --async-only, -A Require all tests to use a callback (async) or + return a Promise [boolean] +``` + +* generate completion scripts for Bash and Zsh for your command +* and [tons more](/docs/api.md). + +## Installation + +Stable version: +```bash +npm i yargs +``` + +Bleeding edge version with the most recent features: +```bash +npm i yargs@next +``` + +## Usage + +### Simple Example + +```javascript +#!/usr/bin/env node +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers'; +const argv = yargs(hideBin(process.argv)).parse() + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!') +} else { + console.log('Retreat from the xupptumblers!') +} +``` + +```bash +$ ./plunder.js --ships=4 --distance=22 +Plunder more riffiwobbles! + +$ ./plunder.js --ships 12 --distance 98.7 +Retreat from the xupptumblers! +``` + +> Note: `hideBin` is a shorthand for `process.argv.slice(2)`. It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690). + +### Complex Example + +```javascript +#!/usr/bin/env node +import yargs from 'yargs'; +import { hideBin } from 'yargs/helpers'; + +yargs(hideBin(process.argv)) + .command('serve [port]', 'start the server', (yargs) => { + return yargs + .positional('port', { + describe: 'port to bind on', + default: 5000 + }) + }, (argv) => { + if (argv.verbose) console.info(`start server on :${argv.port}`) + serve(argv.port) + }) + .option('verbose', { + alias: 'v', + type: 'boolean', + description: 'Run with verbose logging' + }) + .parse() +``` + +Run the example above with `--help` to see the help for the application. + +## Supported Platforms + +### TypeScript + +yargs has type definitions at [@types/yargs][type-definitions]. + +``` +npm i @types/yargs --save-dev +``` + +See usage examples in [docs](/docs/typescript.md). + +### Deno + +As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno): + +```typescript +import yargs from 'https://deno.land/x/yargs@v17.7.2-deno/deno.ts' +import { Arguments } from 'https://deno.land/x/yargs@v17.7.2-deno/deno-types.ts' + +yargs(Deno.args) + .command('download ', 'download a list of files', (yargs: any) => { + return yargs.positional('files', { + describe: 'a list of files to do something with' + }) + }, (argv: Arguments) => { + console.info(argv) + }) + .strictCommands() + .demandCommand(1) + .parse() +``` + +> Note: If you use version tags in url then you also have to add `-deno` flag on the end, like `@17.7.2-deno` + +### Usage in Browser + +See examples of using yargs in the browser in [docs](/docs/browser.md). + +## Documentation + +### Table of Contents + +* [Yargs' API](/docs/api.md) +* [Examples](/docs/examples.md) +* [Parsing Tricks](/docs/tricks.md) + * [Stop the Parser](/docs/tricks.md#stop) + * [Negating Boolean Arguments](/docs/tricks.md#negate) + * [Numbers](/docs/tricks.md#numbers) + * [Arrays](/docs/tricks.md#arrays) + * [Objects](/docs/tricks.md#objects) + * [Quotes](/docs/tricks.md#quotes) +* [Advanced Topics](/docs/advanced.md) + * [Composing Your App Using Commands](/docs/advanced.md#commands) + * [Building Configurable CLI Apps](/docs/advanced.md#configuration) + * [Customizing Yargs' Parser](/docs/advanced.md#customizing) +* [Contributing](/contributing.md) + +## Supported Node.js Versions + +Libraries in this ecosystem make a best effort to track +[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a +post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). + +[npm-url]: https://www.npmjs.com/package/yargs +[npm-image]: https://img.shields.io/npm/v/yargs.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: http://standardjs.com/ +[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg +[conventional-commits-url]: https://conventionalcommits.org/ +[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs +[coverage-image]: https://img.shields.io/nycrc/yargs/yargs +[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc diff --git a/node_modules/yargs/browser.d.ts b/node_modules/yargs/browser.d.ts new file mode 100644 index 000000000..21f3fc691 --- /dev/null +++ b/node_modules/yargs/browser.d.ts @@ -0,0 +1,5 @@ +import {YargsFactory} from './build/lib/yargs-factory'; + +declare const Yargs: ReturnType; + +export default Yargs; diff --git a/node_modules/yargs/browser.mjs b/node_modules/yargs/browser.mjs new file mode 100644 index 000000000..2d0d6e9e5 --- /dev/null +++ b/node_modules/yargs/browser.mjs @@ -0,0 +1,7 @@ +// Bootstrap yargs for browser: +import browserPlatformShim from './lib/platform-shims/browser.mjs'; +import {YargsFactory} from './build/lib/yargs-factory.js'; + +const Yargs = YargsFactory(browserPlatformShim); + +export default Yargs; diff --git a/node_modules/yargs/build/lib/argsert.js b/node_modules/yargs/build/lib/argsert.js new file mode 100644 index 000000000..be5b3aa69 --- /dev/null +++ b/node_modules/yargs/build/lib/argsert.js @@ -0,0 +1,62 @@ +import { YError } from './yerror.js'; +import { parseCommand } from './parse-command.js'; +const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; +export function argsert(arg1, arg2, arg3) { + function parseArgs() { + return typeof arg1 === 'object' + ? [{ demanded: [], optional: [] }, arg1, arg2] + : [ + parseCommand(`cmd ${arg1}`), + arg2, + arg3, + ]; + } + try { + let position = 0; + const [parsed, callerArguments, _length] = parseArgs(); + const args = [].slice.call(callerArguments); + while (args.length && args[args.length - 1] === undefined) + args.pop(); + const length = _length || args.length; + if (length < parsed.demanded.length) { + throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); + } + const totalCommands = parsed.demanded.length + parsed.optional.length; + if (length > totalCommands) { + throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); + } + parsed.demanded.forEach(demanded => { + const arg = args.shift(); + const observedType = guessType(arg); + const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); + if (matchingTypes.length === 0) + argumentTypeError(observedType, demanded.cmd, position); + position += 1; + }); + parsed.optional.forEach(optional => { + if (args.length === 0) + return; + const arg = args.shift(); + const observedType = guessType(arg); + const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); + if (matchingTypes.length === 0) + argumentTypeError(observedType, optional.cmd, position); + position += 1; + }); + } + catch (err) { + console.warn(err.stack); + } +} +function guessType(arg) { + if (Array.isArray(arg)) { + return 'array'; + } + else if (arg === null) { + return 'null'; + } + return typeof arg; +} +function argumentTypeError(observedType, allowedTypes, position) { + throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); +} diff --git a/node_modules/yargs/build/lib/command.js b/node_modules/yargs/build/lib/command.js new file mode 100644 index 000000000..984d18ccd --- /dev/null +++ b/node_modules/yargs/build/lib/command.js @@ -0,0 +1,479 @@ +import { assertNotStrictEqual, } from './typings/common-types.js'; +import { isPromise } from './utils/is-promise.js'; +import { applyMiddleware, commandMiddlewareFactory, } from './middleware.js'; +import { parseCommand } from './parse-command.js'; +import { isYargsInstance, } from './yargs-factory.js'; +import { maybeAsyncResult } from './utils/maybe-async-result.js'; +const DEFAULT_MARKER = /(^\*)|(^\$0)/; +export class CommandInstance { + constructor(usage, validation, globalMiddleware, shim) { + this.requireCache = new Set(); + this.handlers = {}; + this.aliasMap = {}; + this.frozens = []; + this.shim = shim; + this.usage = usage; + this.globalMiddleware = globalMiddleware; + this.validation = validation; + } + addDirectory(dir, req, callerFile, opts) { + opts = opts || {}; + this.requireCache.add(callerFile); + const fullDirPath = this.shim.path.resolve(this.shim.path.dirname(callerFile), dir); + const files = this.shim.readdirSync(fullDirPath, { + recursive: opts.recurse ? true : false, + }); + if (!Array.isArray(opts.extensions)) + opts.extensions = ['js']; + const visit = typeof opts.visit === 'function' ? opts.visit : (o) => o; + for (const fileb of files) { + const file = fileb.toString(); + if (opts.exclude) { + let exclude = false; + if (typeof opts.exclude === 'function') { + exclude = opts.exclude(file); + } + else { + exclude = opts.exclude.test(file); + } + if (exclude) + continue; + } + if (opts.include) { + let include = false; + if (typeof opts.include === 'function') { + include = opts.include(file); + } + else { + include = opts.include.test(file); + } + if (!include) + continue; + } + let supportedExtension = false; + for (const ext of opts.extensions) { + if (file.endsWith(ext)) + supportedExtension = true; + } + if (supportedExtension) { + const joined = this.shim.path.join(fullDirPath, file); + const module = req(joined); + const extendableModule = Object.create(null, Object.getOwnPropertyDescriptors({ ...module })); + const visited = visit(extendableModule, joined, file); + if (visited) { + if (this.requireCache.has(joined)) + continue; + else + this.requireCache.add(joined); + if (!extendableModule.command) { + extendableModule.command = this.shim.path.basename(joined, this.shim.path.extname(joined)); + } + this.addHandler(extendableModule); + } + } + } + } + addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { + let aliases = []; + const middlewares = commandMiddlewareFactory(commandMiddleware); + handler = handler || (() => { }); + if (Array.isArray(cmd)) { + if (isCommandAndAliases(cmd)) { + [cmd, ...aliases] = cmd; + } + else { + for (const command of cmd) { + this.addHandler(command); + } + } + } + else if (isCommandHandlerDefinition(cmd)) { + let command = Array.isArray(cmd.command) || typeof cmd.command === 'string' + ? cmd.command + : null; + if (command === null) { + throw new Error(`No command name given for module: ${this.shim.inspect(cmd)}`); + } + if (cmd.aliases) + command = [].concat(command).concat(cmd.aliases); + this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); + return; + } + else if (isCommandBuilderDefinition(builder)) { + this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); + return; + } + if (typeof cmd === 'string') { + const parsedCommand = parseCommand(cmd); + aliases = aliases.map(alias => parseCommand(alias).cmd); + let isDefault = false; + const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => { + if (DEFAULT_MARKER.test(c)) { + isDefault = true; + return false; + } + return true; + }); + if (parsedAliases.length === 0 && isDefault) + parsedAliases.push('$0'); + if (isDefault) { + parsedCommand.cmd = parsedAliases[0]; + aliases = parsedAliases.slice(1); + cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); + } + aliases.forEach(alias => { + this.aliasMap[alias] = parsedCommand.cmd; + }); + if (description !== false) { + this.usage.command(cmd, description, isDefault, aliases, deprecated); + } + this.handlers[parsedCommand.cmd] = { + original: cmd, + description, + handler, + builder: builder || {}, + middlewares, + deprecated, + demanded: parsedCommand.demanded, + optional: parsedCommand.optional, + }; + if (isDefault) + this.defaultCommand = this.handlers[parsedCommand.cmd]; + } + } + getCommandHandlers() { + return this.handlers; + } + getCommands() { + return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); + } + hasDefaultCommand() { + return !!this.defaultCommand; + } + runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) { + const commandHandler = this.handlers[command] || + this.handlers[this.aliasMap[command]] || + this.defaultCommand; + const currentContext = yargs.getInternalMethods().getContext(); + const parentCommands = currentContext.commands.slice(); + const isDefaultCommand = !command; + if (command) { + currentContext.commands.push(command); + currentContext.fullCommands.push(commandHandler.original); + } + const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet); + return isPromise(builderResult) + ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs)) + : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs); + } + applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) { + const builder = commandHandler.builder; + let innerYargs = yargs; + if (isCommandBuilderCallback(builder)) { + yargs.getInternalMethods().getUsageInstance().freeze(); + const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet); + if (isPromise(builderOutput)) { + return builderOutput.then(output => { + innerYargs = isYargsInstance(output) ? output : yargs; + return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); + }); + } + } + else if (isCommandBuilderOptionDefinitions(builder)) { + yargs.getInternalMethods().getUsageInstance().freeze(); + innerYargs = yargs.getInternalMethods().reset(aliases); + Object.keys(commandHandler.builder).forEach(key => { + innerYargs.option(key, builder[key]); + }); + } + return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); + } + parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) { + if (isDefaultCommand) + innerYargs.getInternalMethods().getUsageInstance().unfreeze(true); + if (this.shouldUpdateUsage(innerYargs)) { + innerYargs + .getInternalMethods() + .getUsageInstance() + .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); + } + const innerArgv = innerYargs + .getInternalMethods() + .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly); + return isPromise(innerArgv) + ? innerArgv.then(argv => ({ + aliases: innerYargs.parsed.aliases, + innerArgv: argv, + })) + : { + aliases: innerYargs.parsed.aliases, + innerArgv: innerArgv, + }; + } + shouldUpdateUsage(yargs) { + return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() && + yargs.getInternalMethods().getUsageInstance().getUsage().length === 0); + } + usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { + const c = DEFAULT_MARKER.test(commandHandler.original) + ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() + : commandHandler.original; + const pc = parentCommands.filter(c => { + return !DEFAULT_MARKER.test(c); + }); + pc.push(c); + return `$0 ${pc.join(' ')}`; + } + handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) { + if (!yargs.getInternalMethods().getHasOutput()) { + const validation = yargs + .getInternalMethods() + .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand); + innerArgv = maybeAsyncResult(innerArgv, result => { + validation(result); + return result; + }); + } + if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) { + yargs.getInternalMethods().setHasOutput(); + const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; + yargs + .getInternalMethods() + .postProcess(innerArgv, populateDoubleDash, false, false); + innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false); + innerArgv = maybeAsyncResult(innerArgv, result => { + const handlerResult = commandHandler.handler(result); + return isPromise(handlerResult) + ? handlerResult.then(() => result) + : result; + }); + if (!isDefaultCommand) { + yargs.getInternalMethods().getUsageInstance().cacheHelpMessage(); + } + if (isPromise(innerArgv) && + !yargs.getInternalMethods().hasParseCallback()) { + innerArgv.catch(error => { + try { + yargs.getInternalMethods().getUsageInstance().fail(null, error); + } + catch (_err) { + } + }); + } + } + if (!isDefaultCommand) { + currentContext.commands.pop(); + currentContext.fullCommands.pop(); + } + return innerArgv; + } + applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) { + let positionalMap = {}; + if (helpOnly) + return innerArgv; + if (!yargs.getInternalMethods().getHasOutput()) { + positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs); + } + const middlewares = this.globalMiddleware + .getMiddleware() + .slice(0) + .concat(commandHandler.middlewares); + const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true); + return isPromise(maybePromiseArgv) + ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap)) + : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap); + } + populatePositionals(commandHandler, argv, context, yargs) { + argv._ = argv._.slice(context.commands.length); + const demanded = commandHandler.demanded.slice(0); + const optional = commandHandler.optional.slice(0); + const positionalMap = {}; + this.validation.positionalCount(demanded.length, argv._.length); + while (demanded.length) { + const demand = demanded.shift(); + this.populatePositional(demand, argv, positionalMap); + } + while (optional.length) { + const maybe = optional.shift(); + this.populatePositional(maybe, argv, positionalMap); + } + argv._ = context.commands.concat(argv._.map(a => '' + a)); + this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs); + return positionalMap; + } + populatePositional(positional, argv, positionalMap) { + const cmd = positional.cmd[0]; + if (positional.variadic) { + positionalMap[cmd] = argv._.splice(0).map(String); + } + else { + if (argv._.length) + positionalMap[cmd] = [String(argv._.shift())]; + } + } + cmdToParseOptions(cmdString) { + const parseOptions = { + array: [], + default: {}, + alias: {}, + demand: {}, + }; + const parsed = parseCommand(cmdString); + parsed.demanded.forEach(d => { + const [cmd, ...aliases] = d.cmd; + if (d.variadic) { + parseOptions.array.push(cmd); + parseOptions.default[cmd] = []; + } + parseOptions.alias[cmd] = aliases; + parseOptions.demand[cmd] = true; + }); + parsed.optional.forEach(o => { + const [cmd, ...aliases] = o.cmd; + if (o.variadic) { + parseOptions.array.push(cmd); + parseOptions.default[cmd] = []; + } + parseOptions.alias[cmd] = aliases; + }); + return parseOptions; + } + postProcessPositionals(argv, positionalMap, parseOptions, yargs) { + const options = Object.assign({}, yargs.getOptions()); + options.default = Object.assign(parseOptions.default, options.default); + for (const key of Object.keys(parseOptions.alias)) { + options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); + } + options.array = options.array.concat(parseOptions.array); + options.config = {}; + const unparsed = []; + Object.keys(positionalMap).forEach(key => { + positionalMap[key].map(value => { + if (options.configuration['unknown-options-as-args']) + options.key[key] = true; + unparsed.push(`--${key}`); + unparsed.push(value); + }); + }); + if (!unparsed.length) + return; + const config = Object.assign({}, options.configuration, { + 'populate--': false, + }); + const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { + configuration: config, + })); + if (parsed.error) { + yargs + .getInternalMethods() + .getUsageInstance() + .fail(parsed.error.message, parsed.error); + } + else { + const positionalKeys = Object.keys(positionalMap); + Object.keys(positionalMap).forEach(key => { + positionalKeys.push(...parsed.aliases[key]); + }); + Object.keys(parsed.argv).forEach(key => { + if (positionalKeys.includes(key)) { + if (!positionalMap[key]) + positionalMap[key] = parsed.argv[key]; + if (!this.isInConfigs(yargs, key) && + !this.isDefaulted(yargs, key) && + Object.prototype.hasOwnProperty.call(argv, key) && + Object.prototype.hasOwnProperty.call(parsed.argv, key) && + (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) { + argv[key] = [].concat(argv[key], parsed.argv[key]); + } + else { + argv[key] = parsed.argv[key]; + } + } + }); + } + } + isDefaulted(yargs, key) { + const { default: defaults } = yargs.getOptions(); + return (Object.prototype.hasOwnProperty.call(defaults, key) || + Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key))); + } + isInConfigs(yargs, key) { + const { configObjects } = yargs.getOptions(); + return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) || + configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key)))); + } + runDefaultBuilderOn(yargs) { + if (!this.defaultCommand) + return; + if (this.shouldUpdateUsage(yargs)) { + const commandString = DEFAULT_MARKER.test(this.defaultCommand.original) + ? this.defaultCommand.original + : this.defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); + yargs + .getInternalMethods() + .getUsageInstance() + .usage(commandString, this.defaultCommand.description); + } + const builder = this.defaultCommand.builder; + if (isCommandBuilderCallback(builder)) { + return builder(yargs, true); + } + else if (!isCommandBuilderDefinition(builder)) { + Object.keys(builder).forEach(key => { + yargs.option(key, builder[key]); + }); + } + return undefined; + } + extractDesc({ describe, description, desc }) { + for (const test of [describe, description, desc]) { + if (typeof test === 'string' || test === false) + return test; + assertNotStrictEqual(test, true, this.shim); + } + return false; + } + freeze() { + this.frozens.push({ + handlers: this.handlers, + aliasMap: this.aliasMap, + defaultCommand: this.defaultCommand, + }); + } + unfreeze() { + const frozen = this.frozens.pop(); + assertNotStrictEqual(frozen, undefined, this.shim); + ({ + handlers: this.handlers, + aliasMap: this.aliasMap, + defaultCommand: this.defaultCommand, + } = frozen); + } + reset() { + this.handlers = {}; + this.aliasMap = {}; + this.defaultCommand = undefined; + this.requireCache = new Set(); + return this; + } +} +export function command(usage, validation, globalMiddleware, shim) { + return new CommandInstance(usage, validation, globalMiddleware, shim); +} +export function isCommandBuilderDefinition(builder) { + return (typeof builder === 'object' && + !!builder.builder && + typeof builder.handler === 'function'); +} +function isCommandAndAliases(cmd) { + return cmd.every(c => typeof c === 'string'); +} +export function isCommandBuilderCallback(builder) { + return typeof builder === 'function'; +} +function isCommandBuilderOptionDefinitions(builder) { + return typeof builder === 'object'; +} +export function isCommandHandlerDefinition(cmd) { + return typeof cmd === 'object' && !Array.isArray(cmd); +} diff --git a/node_modules/yargs/build/lib/completion-templates.js b/node_modules/yargs/build/lib/completion-templates.js new file mode 100644 index 000000000..9c6505d02 --- /dev/null +++ b/node_modules/yargs/build/lib/completion-templates.js @@ -0,0 +1,66 @@ +export const completionShTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc +# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local cur_word args type_list + + cur_word="\${COMP_WORDS[COMP_CWORD]}" + args=("\${COMP_WORDS[@]}") + + # ask yargs to generate completions. + # see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk + mapfile -t type_list < <({{app_path}} --get-yargs-completions "\${args[@]}") + mapfile -t COMPREPLY < <(compgen -W "$( printf '%q ' "\${type_list[@]}" )" -- "\${cur_word}" | + awk '/ / { print "\\""$0"\\"" } /^[^ ]+$/ { print $0 }') + + # if no match was found, fall back to filename completion + if [ \${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=() + fi + + return 0 +} +complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +`; +export const completionZshTemplate = `#compdef {{app_name}} +###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc +# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local reply + local si=$IFS + IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) + IFS=$si + if [[ \${#reply} -gt 0 ]]; then + _describe 'values' reply + else + _default + fi +} +if [[ "\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then + _{{app_name}}_yargs_completions "$@" +else + compdef _{{app_name}}_yargs_completions {{app_name}} +fi +###-end-{{app_name}}-completions-### +`; +export const completionFishTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} > ~/.config/fish/completions/{{app_name}}.fish +# +complete -f -c {{app_name}} -a '({{app_path}} --get-yargs-completions (commandline -o)[2..-1])' +###-end-{{app_name}}-completions-### +`; diff --git a/node_modules/yargs/build/lib/completion.js b/node_modules/yargs/build/lib/completion.js new file mode 100644 index 000000000..7f4133d24 --- /dev/null +++ b/node_modules/yargs/build/lib/completion.js @@ -0,0 +1,270 @@ +import { isCommandBuilderCallback } from './command.js'; +import { assertNotStrictEqual } from './typings/common-types.js'; +import * as templates from './completion-templates.js'; +import { isPromise } from './utils/is-promise.js'; +import { parseCommand } from './parse-command.js'; +export class Completion { + constructor(yargs, usage, command, shim) { + var _a, _b, _c, _d, _e; + this.yargs = yargs; + this.usage = usage; + this.command = command; + this.shim = shim; + this.completionKey = 'get-yargs-completions'; + this.aliases = null; + this.customCompletionFunction = null; + this.indexAfterLastReset = 0; + this.zshShell = + (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) || + ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false; + this.fishShell = (_e = (_d = this.shim.getEnv('SHELL')) === null || _d === void 0 ? void 0 : _d.includes('fish')) !== null && _e !== void 0 ? _e : false; + } + defaultCompletion(args, argv, current, done) { + const handlers = this.command.getCommandHandlers(); + for (let i = 0, ii = args.length; i < ii; ++i) { + if (handlers[args[i]] && handlers[args[i]].builder) { + const builder = handlers[args[i]].builder; + if (isCommandBuilderCallback(builder)) { + this.indexAfterLastReset = i + 1; + const y = this.yargs.getInternalMethods().reset(); + builder(y, true); + return y.argv; + } + } + } + const completions = []; + this.commandCompletions(completions, args, current); + this.optionCompletions(completions, args, argv, current); + this.choicesFromOptionsCompletions(completions, args, argv, current); + this.choicesFromPositionalsCompletions(completions, args, argv, current); + done(null, completions); + } + commandCompletions(completions, args, current) { + const parentCommands = this.yargs + .getInternalMethods() + .getContext().commands; + if (!current.match(/^-/) && + parentCommands[parentCommands.length - 1] !== current && + !this.previousArgHasChoices(args)) { + this.usage.getCommands().forEach(usageCommand => { + const commandName = parseCommand(usageCommand[0]).cmd; + if (args.indexOf(commandName) === -1) { + const desc = usageCommand[1] || ''; + if (this.fishShell) { + completions.push(commandName + '\t' + desc); + } + else if (this.zshShell) { + completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); + } + else { + completions.push(commandName); + } + } + }); + } + } + optionCompletions(completions, args, argv, current) { + if ((current.match(/^-/) || (current === '' && completions.length === 0)) && + !this.previousArgHasChoices(args)) { + const options = this.yargs.getOptions(); + const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; + Object.keys(options.key).forEach(key => { + const negable = !!options.configuration['boolean-negation'] && + options.boolean.includes(key); + const isPositionalKey = positionalKeys.includes(key); + if (!isPositionalKey && + !options.hiddenOptions.includes(key) && + !this.argsContainKey(args, key, negable)) { + this.completeOptionKey(key, completions, current, negable && !!options.default[key]); + } + }); + } + } + choicesFromOptionsCompletions(completions, args, argv, current) { + if (this.previousArgHasChoices(args)) { + const choices = this.getPreviousArgChoices(args); + if (choices && choices.length > 0) { + if (this.fishShell) { + completions.push(...choices); + } + else { + completions.push(...choices.map(c => c.replace(/:/g, '\\:'))); + } + } + } + } + choicesFromPositionalsCompletions(completions, args, argv, current) { + if (current === '' && + completions.length > 0 && + this.previousArgHasChoices(args)) { + return; + } + const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; + const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + + 1); + const positionalKey = positionalKeys[argv._.length - offset - 1]; + if (!positionalKey) { + return; + } + const choices = this.yargs.getOptions().choices[positionalKey] || []; + for (const choice of choices) { + if (choice.startsWith(current)) { + if (this.fishShell) { + completions.push(choice); + } + else { + completions.push(choice.replace(/:/g, '\\:')); + } + } + } + } + getPreviousArgChoices(args) { + if (args.length < 1) + return; + let previousArg = args[args.length - 1]; + let filter = ''; + if (!previousArg.startsWith('-') && args.length > 1) { + filter = previousArg; + previousArg = args[args.length - 2]; + } + if (!previousArg.startsWith('-')) + return; + const previousArgKey = previousArg.replace(/^-+/, ''); + const options = this.yargs.getOptions(); + const possibleAliases = [ + previousArgKey, + ...(this.yargs.getAliases()[previousArgKey] || []), + ]; + let choices; + for (const possibleAlias of possibleAliases) { + if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) && + Array.isArray(options.choices[possibleAlias])) { + choices = options.choices[possibleAlias]; + break; + } + } + if (choices) { + return choices.filter(choice => !filter || choice.startsWith(filter)); + } + } + previousArgHasChoices(args) { + const choices = this.getPreviousArgChoices(args); + return choices !== undefined && choices.length > 0; + } + argsContainKey(args, key, negable) { + const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1; + if (argsContains(key)) + return true; + if (negable && argsContains(`no-${key}`)) + return true; + if (this.aliases) { + for (const alias of this.aliases[key]) { + if (argsContains(alias)) + return true; + } + } + return false; + } + completeOptionKey(key, completions, current, negable) { + var _a, _b, _c, _d; + let keyWithDesc = key; + if (this.zshShell || this.fishShell) { + const descs = this.usage.getDescriptions(); + const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => { + const desc = descs[alias]; + return typeof desc === 'string' && desc.length > 0; + }); + const descFromAlias = aliasKey ? descs[aliasKey] : undefined; + const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : ''; + const cleanedDesc = desc + .replace('__yargsString__:', '') + .replace(/(\r\n|\n|\r)/gm, ' '); + if (this.fishShell) { + keyWithDesc = `${key}\t${cleanedDesc}`; + } + else { + keyWithDesc = `${key.replace(/:/g, '\\:')}:${cleanedDesc}`; + } + } + const startsByTwoDashes = (s) => /^--/.test(s); + const isShortOption = (s) => /^[^0-9]$/.test(s); + const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; + completions.push(dashes + keyWithDesc); + if (negable) { + completions.push(dashes + 'no-' + keyWithDesc); + } + } + customCompletion(args, argv, current, done) { + assertNotStrictEqual(this.customCompletionFunction, null, this.shim); + if (isSyncCompletionFunction(this.customCompletionFunction)) { + const result = this.customCompletionFunction(current, argv); + if (isPromise(result)) { + return result + .then(list => { + this.shim.process.nextTick(() => { + done(null, list); + }); + }) + .catch(err => { + this.shim.process.nextTick(() => { + done(err, undefined); + }); + }); + } + return done(null, result); + } + else if (isFallbackCompletionFunction(this.customCompletionFunction)) { + return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => { + done(null, completions); + }); + } + else { + return this.customCompletionFunction(current, argv, completions => { + done(null, completions); + }); + } + } + getCompletion(args, done) { + const current = args.length ? args[args.length - 1] : ''; + const argv = this.yargs.parse(args, true); + const completionFunction = this.customCompletionFunction + ? (argv) => this.customCompletion(args, argv, current, done) + : (argv) => this.defaultCompletion(args, argv, current, done); + return isPromise(argv) + ? argv.then(completionFunction) + : completionFunction(argv); + } + generateCompletionScript($0, cmd) { + let script; + if (this.zshShell) { + script = templates.completionZshTemplate; + } + else if (this.fishShell) { + script = templates.completionFishTemplate; + } + else { + script = templates.completionShTemplate; + } + const name = this.shim.path.basename($0); + if ($0.match(/\.js$/)) + $0 = `./${$0}`; + script = script.replace(/{{app_name}}/g, name); + script = script.replace(/{{completion_command}}/g, cmd); + return script.replace(/{{app_path}}/g, $0); + } + registerFunction(fn) { + this.customCompletionFunction = fn; + } + setParsed(parsed) { + this.aliases = parsed.aliases; + } +} +export function completion(yargs, usage, command, shim) { + return new Completion(yargs, usage, command, shim); +} +function isSyncCompletionFunction(completionFunction) { + return completionFunction.length < 3; +} +function isFallbackCompletionFunction(completionFunction) { + return completionFunction.length > 3; +} diff --git a/node_modules/yargs/build/lib/middleware.js b/node_modules/yargs/build/lib/middleware.js new file mode 100644 index 000000000..4e561a79f --- /dev/null +++ b/node_modules/yargs/build/lib/middleware.js @@ -0,0 +1,88 @@ +import { argsert } from './argsert.js'; +import { isPromise } from './utils/is-promise.js'; +export class GlobalMiddleware { + constructor(yargs) { + this.globalMiddleware = []; + this.frozens = []; + this.yargs = yargs; + } + addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) { + argsert(' [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length); + if (Array.isArray(callback)) { + for (let i = 0; i < callback.length; i++) { + if (typeof callback[i] !== 'function') { + throw Error('middleware must be a function'); + } + const m = callback[i]; + m.applyBeforeValidation = applyBeforeValidation; + m.global = global; + } + Array.prototype.push.apply(this.globalMiddleware, callback); + } + else if (typeof callback === 'function') { + const m = callback; + m.applyBeforeValidation = applyBeforeValidation; + m.global = global; + m.mutates = mutates; + this.globalMiddleware.push(callback); + } + return this.yargs; + } + addCoerceMiddleware(callback, option) { + const aliases = this.yargs.getAliases(); + this.globalMiddleware = this.globalMiddleware.filter(m => { + const toCheck = [...(aliases[option] || []), option]; + if (!m.option) + return true; + else + return !toCheck.includes(m.option); + }); + callback.option = option; + return this.addMiddleware(callback, true, true, true); + } + getMiddleware() { + return this.globalMiddleware; + } + freeze() { + this.frozens.push([...this.globalMiddleware]); + } + unfreeze() { + const frozen = this.frozens.pop(); + if (frozen !== undefined) + this.globalMiddleware = frozen; + } + reset() { + this.globalMiddleware = this.globalMiddleware.filter(m => m.global); + } +} +export function commandMiddlewareFactory(commandMiddleware) { + if (!commandMiddleware) + return []; + return commandMiddleware.map(middleware => { + middleware.applyBeforeValidation = false; + return middleware; + }); +} +export function applyMiddleware(argv, yargs, middlewares, beforeValidation) { + return middlewares.reduce((acc, middleware) => { + if (middleware.applyBeforeValidation !== beforeValidation) { + return acc; + } + if (middleware.mutates) { + if (middleware.applied) + return acc; + middleware.applied = true; + } + if (isPromise(acc)) { + return acc + .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) + .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); + } + else { + const result = middleware(acc, yargs); + return isPromise(result) + ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) + : Object.assign(acc, result); + } + }, argv); +} diff --git a/node_modules/yargs/build/lib/parse-command.js b/node_modules/yargs/build/lib/parse-command.js new file mode 100644 index 000000000..4989f5310 --- /dev/null +++ b/node_modules/yargs/build/lib/parse-command.js @@ -0,0 +1,32 @@ +export function parseCommand(cmd) { + const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); + const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); + const bregex = /\.*[\][<>]/g; + const firstCommand = splitCommand.shift(); + if (!firstCommand) + throw new Error(`No command found in: ${cmd}`); + const parsedCommand = { + cmd: firstCommand.replace(bregex, ''), + demanded: [], + optional: [], + }; + splitCommand.forEach((cmd, i) => { + let variadic = false; + cmd = cmd.replace(/\s/g, ''); + if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) + variadic = true; + if (/^\[/.test(cmd)) { + parsedCommand.optional.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic, + }); + } + else { + parsedCommand.demanded.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic, + }); + } + }); + return parsedCommand; +} diff --git a/node_modules/yargs/build/lib/typings/common-types.js b/node_modules/yargs/build/lib/typings/common-types.js new file mode 100644 index 000000000..73e1773a2 --- /dev/null +++ b/node_modules/yargs/build/lib/typings/common-types.js @@ -0,0 +1,9 @@ +export function assertNotStrictEqual(actual, expected, shim, message) { + shim.assert.notStrictEqual(actual, expected, message); +} +export function assertSingleKey(actual, shim) { + shim.assert.strictEqual(typeof actual, 'string'); +} +export function objectKeys(object) { + return Object.keys(object); +} diff --git a/node_modules/yargs/build/lib/typings/yargs-parser-types.js b/node_modules/yargs/build/lib/typings/yargs-parser-types.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/yargs/build/lib/typings/yargs-parser-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/yargs/build/lib/usage.js b/node_modules/yargs/build/lib/usage.js new file mode 100644 index 000000000..0127c130d --- /dev/null +++ b/node_modules/yargs/build/lib/usage.js @@ -0,0 +1,584 @@ +import { objFilter } from './utils/obj-filter.js'; +import { YError } from './yerror.js'; +import setBlocking from './utils/set-blocking.js'; +function isBoolean(fail) { + return typeof fail === 'boolean'; +} +export function usage(yargs, shim) { + const __ = shim.y18n.__; + const self = {}; + const fails = []; + self.failFn = function failFn(f) { + fails.push(f); + }; + let failMessage = null; + let globalFailMessage = null; + let showHelpOnFail = true; + self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { + const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; + if (yargs.getInternalMethods().isGlobalContext()) { + globalFailMessage = message; + } + failMessage = message; + showHelpOnFail = enabled; + return self; + }; + let failureOutput = false; + self.fail = function fail(msg, err) { + const logger = yargs.getInternalMethods().getLoggerInstance(); + if (fails.length) { + for (let i = fails.length - 1; i >= 0; --i) { + const fail = fails[i]; + if (isBoolean(fail)) { + if (err) + throw err; + else if (msg) + throw Error(msg); + } + else { + fail(msg, err, self); + } + } + } + else { + if (yargs.getExitProcess()) + setBlocking(true); + if (!failureOutput) { + failureOutput = true; + if (showHelpOnFail) { + yargs.showHelp('error'); + logger.error(); + } + if (msg || err) + logger.error(msg || err); + const globalOrCommandFailMessage = failMessage || globalFailMessage; + if (globalOrCommandFailMessage) { + if (msg || err) + logger.error(''); + logger.error(globalOrCommandFailMessage); + } + } + err = err || new YError(msg); + if (yargs.getExitProcess()) { + return yargs.exit(1); + } + else if (yargs.getInternalMethods().hasParseCallback()) { + return yargs.exit(1, err); + } + else { + throw err; + } + } + }; + let usages = []; + let usageDisabled = false; + self.usage = (msg, description) => { + if (msg === null) { + usageDisabled = true; + usages = []; + return self; + } + usageDisabled = false; + usages.push([msg, description || '']); + return self; + }; + self.getUsage = () => { + return usages; + }; + self.getUsageDisabled = () => { + return usageDisabled; + }; + self.getPositionalGroupName = () => { + return __('Positionals:'); + }; + let examples = []; + self.example = (cmd, description) => { + examples.push([cmd, description || '']); + }; + let commands = []; + self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { + if (isDefault) { + commands = commands.map(cmdArray => { + cmdArray[2] = false; + return cmdArray; + }); + } + commands.push([cmd, description || '', isDefault, aliases, deprecated]); + }; + self.getCommands = () => commands; + let descriptions = {}; + self.describe = function describe(keyOrKeys, desc) { + if (Array.isArray(keyOrKeys)) { + keyOrKeys.forEach(k => { + self.describe(k, desc); + }); + } + else if (typeof keyOrKeys === 'object') { + Object.keys(keyOrKeys).forEach(k => { + self.describe(k, keyOrKeys[k]); + }); + } + else { + descriptions[keyOrKeys] = desc; + } + }; + self.getDescriptions = () => descriptions; + let epilogs = []; + self.epilog = msg => { + epilogs.push(msg); + }; + let wrapSet = false; + let wrap; + self.wrap = cols => { + wrapSet = true; + wrap = cols; + }; + self.getWrap = () => { + if (shim.getEnv('YARGS_DISABLE_WRAP')) { + return null; + } + if (!wrapSet) { + wrap = windowWidth(); + wrapSet = true; + } + return wrap; + }; + const deferY18nLookupPrefix = '__yargsString__:'; + self.deferY18nLookup = str => deferY18nLookupPrefix + str; + self.help = function help() { + if (cachedHelpMessage) + return cachedHelpMessage; + normalizeAliases(); + const base$0 = yargs.customScriptName + ? yargs.$0 + : shim.path.basename(yargs.$0); + const demandedOptions = yargs.getDemandedOptions(); + const demandedCommands = yargs.getDemandedCommands(); + const deprecatedOptions = yargs.getDeprecatedOptions(); + const groups = yargs.getGroups(); + const options = yargs.getOptions(); + let keys = []; + keys = keys.concat(Object.keys(descriptions)); + keys = keys.concat(Object.keys(demandedOptions)); + keys = keys.concat(Object.keys(demandedCommands)); + keys = keys.concat(Object.keys(options.default)); + keys = keys.filter(filterHiddenOptions); + keys = Object.keys(keys.reduce((acc, key) => { + if (key !== '_') + acc[key] = true; + return acc; + }, {})); + const theWrap = self.getWrap(); + const ui = shim.cliui({ + width: theWrap, + wrap: !!theWrap, + }); + if (!usageDisabled) { + if (usages.length) { + usages.forEach(usage => { + ui.div({ text: `${usage[0].replace(/\$0/g, base$0)}` }); + if (usage[1]) { + ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); + } + }); + ui.div(); + } + else if (commands.length) { + let u = null; + if (demandedCommands._) { + u = `${base$0} <${__('command')}>\n`; + } + else { + u = `${base$0} [${__('command')}]\n`; + } + ui.div(`${u}`); + } + } + if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) { + ui.div(__('Commands:')); + const context = yargs.getInternalMethods().getContext(); + const parentCommands = context.commands.length + ? `${context.commands.join(' ')} ` + : ''; + if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] === + true) { + commands = commands.sort((a, b) => a[0].localeCompare(b[0])); + } + const prefix = base$0 ? `${base$0} ` : ''; + commands.forEach(command => { + const commandString = `${prefix}${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; + ui.span({ + text: commandString, + padding: [0, 2, 0, 2], + width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4, + }, { text: command[1] }); + const hints = []; + if (command[2]) + hints.push(`[${__('default')}]`); + if (command[3] && command[3].length) { + hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); + } + if (command[4]) { + if (typeof command[4] === 'string') { + hints.push(`[${__('deprecated: %s', command[4])}]`); + } + else { + hints.push(`[${__('deprecated')}]`); + } + } + if (hints.length) { + ui.div({ + text: hints.join(' '), + padding: [0, 0, 0, 2], + align: 'right', + }); + } + else { + ui.div(); + } + }); + ui.div(); + } + const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []); + keys = keys.filter(key => !yargs.parsed.newAliases[key] && + aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); + const defaultGroup = __('Options:'); + if (!groups[defaultGroup]) + groups[defaultGroup] = []; + addUngroupedKeys(keys, options.alias, groups, defaultGroup); + const isLongSwitch = (sw) => /^--/.test(getText(sw)); + const displayedGroups = Object.keys(groups) + .filter(groupName => groups[groupName].length > 0) + .map(groupName => { + const normalizedKeys = groups[groupName] + .filter(filterHiddenOptions) + .map(key => { + if (aliasKeys.includes(key)) + return key; + for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { + if ((options.alias[aliasKey] || []).includes(key)) + return aliasKey; + } + return key; + }); + return { groupName, normalizedKeys }; + }) + .filter(({ normalizedKeys }) => normalizedKeys.length > 0) + .map(({ groupName, normalizedKeys }) => { + const switches = normalizedKeys.reduce((acc, key) => { + acc[key] = [key] + .concat(options.alias[key] || []) + .map(sw => { + if (groupName === self.getPositionalGroupName()) + return sw; + else { + return ((/^[0-9]$/.test(sw) + ? options.boolean.includes(key) + ? '-' + : '--' + : sw.length > 1 + ? '--' + : '-') + sw); + } + }) + .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) + ? 0 + : isLongSwitch(sw1) + ? 1 + : -1) + .join(', '); + return acc; + }, {}); + return { groupName, normalizedKeys, switches }; + }); + const shortSwitchesUsed = displayedGroups + .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) + .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key]))); + if (shortSwitchesUsed) { + displayedGroups + .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) + .forEach(({ normalizedKeys, switches }) => { + normalizedKeys.forEach(key => { + if (isLongSwitch(switches[key])) { + switches[key] = addIndentation(switches[key], '-x, '.length); + } + }); + }); + } + displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => { + ui.div(groupName); + normalizedKeys.forEach(key => { + const kswitch = switches[key]; + let desc = descriptions[key] || ''; + let type = null; + if (desc.includes(deferY18nLookupPrefix)) + desc = __(desc.substring(deferY18nLookupPrefix.length)); + if (options.boolean.includes(key)) + type = `[${__('boolean')}]`; + if (options.count.includes(key)) + type = `[${__('count')}]`; + if (options.string.includes(key)) + type = `[${__('string')}]`; + if (options.normalize.includes(key)) + type = `[${__('string')}]`; + if (options.array.includes(key)) + type = `[${__('array')}]`; + if (options.number.includes(key)) + type = `[${__('number')}]`; + const deprecatedExtra = (deprecated) => typeof deprecated === 'string' + ? `[${__('deprecated: %s', deprecated)}]` + : `[${__('deprecated')}]`; + const extra = [ + key in deprecatedOptions + ? deprecatedExtra(deprecatedOptions[key]) + : null, + type, + key in demandedOptions ? `[${__('required')}]` : null, + options.choices && options.choices[key] + ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` + : null, + defaultString(options.default[key], options.defaultDescription[key]), + ] + .filter(Boolean) + .join(' '); + ui.span({ + text: getText(kswitch), + padding: [0, 2, 0, 2 + getIndentation(kswitch)], + width: maxWidth(switches, theWrap) + 4, + }, desc); + const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] === + true; + if (extra && !shouldHideOptionExtras) + ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); + else + ui.div(); + }); + ui.div(); + }); + if (examples.length) { + ui.div(__('Examples:')); + examples.forEach(example => { + example[0] = example[0].replace(/\$0/g, base$0); + }); + examples.forEach(example => { + if (example[1] === '') { + ui.div({ + text: example[0], + padding: [0, 2, 0, 2], + }); + } + else { + ui.div({ + text: example[0], + padding: [0, 2, 0, 2], + width: maxWidth(examples, theWrap) + 4, + }, { + text: example[1], + }); + } + }); + ui.div(); + } + if (epilogs.length > 0) { + const e = epilogs + .map(epilog => epilog.replace(/\$0/g, base$0)) + .join('\n'); + ui.div(`${e}\n`); + } + return ui.toString().replace(/\s*$/, ''); + }; + function maxWidth(table, theWrap, modifier) { + let width = 0; + if (!Array.isArray(table)) { + table = Object.values(table).map(v => [v]); + } + table.forEach(v => { + width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width); + }); + if (theWrap) + width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); + return width; + } + function normalizeAliases() { + const demandedOptions = yargs.getDemandedOptions(); + const options = yargs.getOptions(); + (Object.keys(options.alias) || []).forEach(key => { + options.alias[key].forEach(alias => { + if (descriptions[alias]) + self.describe(key, descriptions[alias]); + if (alias in demandedOptions) + yargs.demandOption(key, demandedOptions[alias]); + if (options.boolean.includes(alias)) + yargs.boolean(key); + if (options.count.includes(alias)) + yargs.count(key); + if (options.string.includes(alias)) + yargs.string(key); + if (options.normalize.includes(alias)) + yargs.normalize(key); + if (options.array.includes(alias)) + yargs.array(key); + if (options.number.includes(alias)) + yargs.number(key); + }); + }); + } + let cachedHelpMessage; + self.cacheHelpMessage = function () { + cachedHelpMessage = this.help(); + }; + self.clearCachedHelpMessage = function () { + cachedHelpMessage = undefined; + }; + self.hasCachedHelpMessage = function () { + return !!cachedHelpMessage; + }; + function addUngroupedKeys(keys, aliases, groups, defaultGroup) { + let groupedKeys = []; + let toCheck = null; + Object.keys(groups).forEach(group => { + groupedKeys = groupedKeys.concat(groups[group]); + }); + keys.forEach(key => { + toCheck = [key].concat(aliases[key]); + if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { + groups[defaultGroup].push(key); + } + }); + return groupedKeys; + } + function filterHiddenOptions(key) { + return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 || + yargs.parsed.argv[yargs.getOptions().showHiddenOpt]); + } + self.showHelp = (level) => { + const logger = yargs.getInternalMethods().getLoggerInstance(); + if (!level) + level = 'error'; + const emit = typeof level === 'function' ? level : logger[level]; + emit(self.help()); + }; + self.functionDescription = fn => { + const description = fn.name + ? shim.Parser.decamelize(fn.name, '-') + : __('generated-value'); + return ['(', description, ')'].join(''); + }; + self.stringifiedValues = function stringifiedValues(values, separator) { + let string = ''; + const sep = separator || ', '; + const array = [].concat(values); + if (!values || !array.length) + return string; + array.forEach(value => { + if (string.length) + string += sep; + string += JSON.stringify(value); + }); + return string; + }; + function defaultString(value, defaultDescription) { + let string = `[${__('default:')} `; + if (value === undefined && !defaultDescription) + return null; + if (defaultDescription) { + string += defaultDescription; + } + else { + switch (typeof value) { + case 'string': + string += `"${value}"`; + break; + case 'object': + string += JSON.stringify(value); + break; + default: + string += value; + } + } + return `${string}]`; + } + function windowWidth() { + const maxWidth = 80; + if (shim.process.stdColumns) { + return Math.min(maxWidth, shim.process.stdColumns); + } + else { + return maxWidth; + } + } + let version = null; + self.version = ver => { + version = ver; + }; + self.showVersion = level => { + const logger = yargs.getInternalMethods().getLoggerInstance(); + if (!level) + level = 'error'; + const emit = typeof level === 'function' ? level : logger[level]; + emit(version); + }; + self.reset = function reset(localLookup) { + failMessage = null; + failureOutput = false; + usages = []; + usageDisabled = false; + epilogs = []; + examples = []; + commands = []; + descriptions = objFilter(descriptions, k => !localLookup[k]); + return self; + }; + const frozens = []; + self.freeze = function freeze() { + frozens.push({ + failMessage, + failureOutput, + usages, + usageDisabled, + epilogs, + examples, + commands, + descriptions, + }); + }; + self.unfreeze = function unfreeze(defaultCommand = false) { + const frozen = frozens.pop(); + if (!frozen) + return; + if (defaultCommand) { + descriptions = { ...frozen.descriptions, ...descriptions }; + commands = [...frozen.commands, ...commands]; + usages = [...frozen.usages, ...usages]; + examples = [...frozen.examples, ...examples]; + epilogs = [...frozen.epilogs, ...epilogs]; + } + else { + ({ + failMessage, + failureOutput, + usages, + usageDisabled, + epilogs, + examples, + commands, + descriptions, + } = frozen); + } + }; + return self; +} +function isIndentedText(text) { + return typeof text === 'object'; +} +function addIndentation(text, indent) { + return isIndentedText(text) + ? { text: text.text, indentation: text.indentation + indent } + : { text, indentation: indent }; +} +function getIndentation(text) { + return isIndentedText(text) ? text.indentation : 0; +} +function getText(text) { + return isIndentedText(text) ? text.text : text; +} diff --git a/node_modules/yargs/build/lib/utils/apply-extends.js b/node_modules/yargs/build/lib/utils/apply-extends.js new file mode 100644 index 000000000..664ba453e --- /dev/null +++ b/node_modules/yargs/build/lib/utils/apply-extends.js @@ -0,0 +1,61 @@ +import { YError } from '../yerror.js'; +let previouslyVisitedConfigs = []; +let shim; +export function applyExtends(config, cwd, mergeExtends, _shim) { + shim = _shim; + let defaultConfig = {}; + if (Object.prototype.hasOwnProperty.call(config, 'extends')) { + if (typeof config.extends !== 'string') + return defaultConfig; + const isPath = /\.json|\..*rc$/.test(config.extends); + let pathToDefault = null; + if (!isPath) { + try { + pathToDefault = import.meta.resolve(config.extends); + } + catch (_err) { + return config; + } + } + else { + pathToDefault = getPathToDefaultConfig(cwd, config.extends); + } + checkForCircularExtends(pathToDefault); + previouslyVisitedConfigs.push(pathToDefault); + defaultConfig = isPath + ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8')) + : _shim.require(config.extends); + delete config.extends; + defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim); + } + previouslyVisitedConfigs = []; + return mergeExtends + ? mergeDeep(defaultConfig, config) + : Object.assign({}, defaultConfig, config); +} +function checkForCircularExtends(cfgPath) { + if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { + throw new YError(`Circular extended configurations: '${cfgPath}'.`); + } +} +function getPathToDefaultConfig(cwd, pathToExtend) { + return shim.path.resolve(cwd, pathToExtend); +} +function mergeDeep(config1, config2) { + const target = {}; + function isObject(obj) { + return obj && typeof obj === 'object' && !Array.isArray(obj); + } + Object.assign(target, config1); + for (const key of Object.keys(config2)) { + if (key === '__proto__') + continue; + if (isObject(config2[key]) && isObject(target[key])) { + target[key] = mergeDeep(config1[key], config2[key]); + } + else { + target[key] = config2[key]; + } + } + return target; +} diff --git a/node_modules/yargs/build/lib/utils/is-promise.js b/node_modules/yargs/build/lib/utils/is-promise.js new file mode 100644 index 000000000..d250c08aa --- /dev/null +++ b/node_modules/yargs/build/lib/utils/is-promise.js @@ -0,0 +1,5 @@ +export function isPromise(maybePromise) { + return (!!maybePromise && + !!maybePromise.then && + typeof maybePromise.then === 'function'); +} diff --git a/node_modules/yargs/build/lib/utils/levenshtein.js b/node_modules/yargs/build/lib/utils/levenshtein.js new file mode 100644 index 000000000..60575ef34 --- /dev/null +++ b/node_modules/yargs/build/lib/utils/levenshtein.js @@ -0,0 +1,34 @@ +export function levenshtein(a, b) { + if (a.length === 0) + return b.length; + if (b.length === 0) + return a.length; + const matrix = []; + let i; + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } + let j; + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } + else { + if (i > 1 && + j > 1 && + b.charAt(i - 2) === a.charAt(j - 1) && + b.charAt(i - 1) === a.charAt(j - 2)) { + matrix[i][j] = matrix[i - 2][j - 2] + 1; + } + else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); + } + } + } + } + return matrix[b.length][a.length]; +} diff --git a/node_modules/yargs/build/lib/utils/maybe-async-result.js b/node_modules/yargs/build/lib/utils/maybe-async-result.js new file mode 100644 index 000000000..8c6a40c65 --- /dev/null +++ b/node_modules/yargs/build/lib/utils/maybe-async-result.js @@ -0,0 +1,17 @@ +import { isPromise } from './is-promise.js'; +export function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => { + throw err; +}) { + try { + const result = isFunction(getResult) ? getResult() : getResult; + return isPromise(result) + ? result.then((result) => resultHandler(result)) + : resultHandler(result); + } + catch (err) { + return errorHandler(err); + } +} +function isFunction(arg) { + return typeof arg === 'function'; +} diff --git a/node_modules/yargs/build/lib/utils/obj-filter.js b/node_modules/yargs/build/lib/utils/obj-filter.js new file mode 100644 index 000000000..cd68ad298 --- /dev/null +++ b/node_modules/yargs/build/lib/utils/obj-filter.js @@ -0,0 +1,10 @@ +import { objectKeys } from '../typings/common-types.js'; +export function objFilter(original = {}, filter = () => true) { + const obj = {}; + objectKeys(original).forEach(key => { + if (filter(key, original[key])) { + obj[key] = original[key]; + } + }); + return obj; +} diff --git a/node_modules/yargs/build/lib/utils/process-argv.js b/node_modules/yargs/build/lib/utils/process-argv.js new file mode 100644 index 000000000..74dc9e4c4 --- /dev/null +++ b/node_modules/yargs/build/lib/utils/process-argv.js @@ -0,0 +1,17 @@ +function getProcessArgvBinIndex() { + if (isBundledElectronApp()) + return 0; + return 1; +} +function isBundledElectronApp() { + return isElectronApp() && !process.defaultApp; +} +function isElectronApp() { + return !!process.versions.electron; +} +export function hideBin(argv) { + return argv.slice(getProcessArgvBinIndex() + 1); +} +export function getProcessArgvBin() { + return process.argv[getProcessArgvBinIndex()]; +} diff --git a/node_modules/yargs/build/lib/utils/set-blocking.js b/node_modules/yargs/build/lib/utils/set-blocking.js new file mode 100644 index 000000000..88fb806df --- /dev/null +++ b/node_modules/yargs/build/lib/utils/set-blocking.js @@ -0,0 +1,12 @@ +export default function setBlocking(blocking) { + if (typeof process === 'undefined') + return; + [process.stdout, process.stderr].forEach(_stream => { + const stream = _stream; + if (stream._handle && + stream.isTTY && + typeof stream._handle.setBlocking === 'function') { + stream._handle.setBlocking(blocking); + } + }); +} diff --git a/node_modules/yargs/build/lib/utils/which-module.js b/node_modules/yargs/build/lib/utils/which-module.js new file mode 100644 index 000000000..5974e2268 --- /dev/null +++ b/node_modules/yargs/build/lib/utils/which-module.js @@ -0,0 +1,10 @@ +export default function whichModule(exported) { + if (typeof require === 'undefined') + return null; + for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]]; + if (mod.exports === exported) + return mod; + } + return null; +} diff --git a/node_modules/yargs/build/lib/validation.js b/node_modules/yargs/build/lib/validation.js new file mode 100644 index 000000000..bd2e1b8b1 --- /dev/null +++ b/node_modules/yargs/build/lib/validation.js @@ -0,0 +1,305 @@ +import { argsert } from './argsert.js'; +import { assertNotStrictEqual, } from './typings/common-types.js'; +import { levenshtein as distance } from './utils/levenshtein.js'; +import { objFilter } from './utils/obj-filter.js'; +const specialKeys = ['$0', '--', '_']; +export function validation(yargs, usage, shim) { + const __ = shim.y18n.__; + const __n = shim.y18n.__n; + const self = {}; + self.nonOptionCount = function nonOptionCount(argv) { + const demandedCommands = yargs.getDemandedCommands(); + const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0); + const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length; + if (demandedCommands._ && + (_s < demandedCommands._.min || _s > demandedCommands._.max)) { + if (_s < demandedCommands._.min) { + if (demandedCommands._.minMsg !== undefined) { + usage.fail(demandedCommands._.minMsg + ? demandedCommands._.minMsg + .replace(/\$0/g, _s.toString()) + .replace(/\$1/, demandedCommands._.min.toString()) + : null); + } + else { + usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString())); + } + } + else if (_s > demandedCommands._.max) { + if (demandedCommands._.maxMsg !== undefined) { + usage.fail(demandedCommands._.maxMsg + ? demandedCommands._.maxMsg + .replace(/\$0/g, _s.toString()) + .replace(/\$1/, demandedCommands._.max.toString()) + : null); + } + else { + usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString())); + } + } + } + }; + self.positionalCount = function positionalCount(required, observed) { + if (observed < required) { + usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + '')); + } + }; + self.requiredArguments = function requiredArguments(argv, demandedOptions) { + let missing = null; + for (const key of Object.keys(demandedOptions)) { + if (!Object.prototype.hasOwnProperty.call(argv, key) || + typeof argv[key] === 'undefined') { + missing = missing || {}; + missing[key] = demandedOptions[key]; + } + } + if (missing) { + const customMsgs = []; + for (const key of Object.keys(missing)) { + const msg = missing[key]; + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg); + } + } + const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; + usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); + } + }; + self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) { + var _a; + const commandKeys = yargs + .getInternalMethods() + .getCommandInstance() + .getCommands(); + const unknown = []; + const currentContext = yargs.getInternalMethods().getContext(); + Object.keys(argv).forEach(key => { + if (!specialKeys.includes(key) && + !Object.prototype.hasOwnProperty.call(positionalMap, key) && + !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) && + !self.isValidAndSomeAliasIsNotNew(key, aliases)) { + unknown.push(key); + } + }); + if (checkPositionals && + (currentContext.commands.length > 0 || + commandKeys.length > 0 || + isDefaultCommand)) { + argv._.slice(currentContext.commands.length).forEach(key => { + if (!commandKeys.includes('' + key)) { + unknown.push('' + key); + } + }); + } + if (checkPositionals) { + const demandedCommands = yargs.getDemandedCommands(); + const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0; + const expected = currentContext.commands.length + maxNonOptDemanded; + if (expected < argv._.length) { + argv._.slice(expected).forEach(key => { + key = String(key); + if (!currentContext.commands.includes(key) && + !unknown.includes(key)) { + unknown.push(key); + } + }); + } + } + if (unknown.length) { + usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `"${s}"`)).join(', '))); + } + }; + self.unknownCommands = function unknownCommands(argv) { + const commandKeys = yargs + .getInternalMethods() + .getCommandInstance() + .getCommands(); + const unknown = []; + const currentContext = yargs.getInternalMethods().getContext(); + if (currentContext.commands.length > 0 || commandKeys.length > 0) { + argv._.slice(currentContext.commands.length).forEach(key => { + if (!commandKeys.includes('' + key)) { + unknown.push('' + key); + } + }); + } + if (unknown.length > 0) { + usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); + return true; + } + else { + return false; + } + }; + self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { + if (!Object.prototype.hasOwnProperty.call(aliases, key)) { + return false; + } + const newAliases = yargs.parsed.newAliases; + return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]); + }; + self.limitedChoices = function limitedChoices(argv) { + const options = yargs.getOptions(); + const invalid = {}; + if (!Object.keys(options.choices).length) + return; + Object.keys(argv).forEach(key => { + if (specialKeys.indexOf(key) === -1 && + Object.prototype.hasOwnProperty.call(options.choices, key)) { + [].concat(argv[key]).forEach(value => { + if (options.choices[key].indexOf(value) === -1 && + value !== undefined) { + invalid[key] = (invalid[key] || []).concat(value); + } + }); + } + }); + const invalidKeys = Object.keys(invalid); + if (!invalidKeys.length) + return; + let msg = __('Invalid values:'); + invalidKeys.forEach(key => { + msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; + }); + usage.fail(msg); + }; + let implied = {}; + self.implies = function implies(key, value) { + argsert(' [array|number|string]', [key, value], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach(k => { + self.implies(k, key[k]); + }); + } + else { + yargs.global(key); + if (!implied[key]) { + implied[key] = []; + } + if (Array.isArray(value)) { + value.forEach(i => self.implies(key, i)); + } + else { + assertNotStrictEqual(value, undefined, shim); + implied[key].push(value); + } + } + }; + self.getImplied = function getImplied() { + return implied; + }; + function keyExists(argv, val) { + const num = Number(val); + val = isNaN(num) ? val : num; + if (typeof val === 'number') { + val = argv._.length >= val; + } + else if (val.match(/^--no-.+/)) { + val = val.match(/^--no-(.+)/)[1]; + val = !Object.prototype.hasOwnProperty.call(argv, val); + } + else { + val = Object.prototype.hasOwnProperty.call(argv, val); + } + return val; + } + self.implications = function implications(argv) { + const implyFail = []; + Object.keys(implied).forEach(key => { + const origKey = key; + (implied[key] || []).forEach(value => { + let key = origKey; + const origValue = value; + key = keyExists(argv, key); + value = keyExists(argv, value); + if (key && !value) { + implyFail.push(` ${origKey} -> ${origValue}`); + } + }); + }); + if (implyFail.length) { + let msg = `${__('Implications failed:')}\n`; + implyFail.forEach(value => { + msg += value; + }); + usage.fail(msg); + } + }; + let conflicting = {}; + self.conflicts = function conflicts(key, value) { + argsert(' [array|string]', [key, value], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach(k => { + self.conflicts(k, key[k]); + }); + } + else { + yargs.global(key); + if (!conflicting[key]) { + conflicting[key] = []; + } + if (Array.isArray(value)) { + value.forEach(i => self.conflicts(key, i)); + } + else { + conflicting[key].push(value); + } + } + }; + self.getConflicting = () => conflicting; + self.conflicting = function conflictingFn(argv) { + Object.keys(argv).forEach(key => { + if (conflicting[key]) { + conflicting[key].forEach(value => { + if (value && argv[key] !== undefined && argv[value] !== undefined) { + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); + } + }); + } + }); + if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) { + Object.keys(conflicting).forEach(key => { + conflicting[key].forEach(value => { + if (value && + argv[shim.Parser.camelCase(key)] !== undefined && + argv[shim.Parser.camelCase(value)] !== undefined) { + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); + } + }); + }); + } + }; + self.recommendCommands = function recommendCommands(cmd, potentialCommands) { + const threshold = 3; + potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); + let recommended = null; + let bestDistance = Infinity; + for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { + const d = distance(cmd, candidate); + if (d <= threshold && d < bestDistance) { + bestDistance = d; + recommended = candidate; + } + } + if (recommended) + usage.fail(__('Did you mean %s?', recommended)); + }; + self.reset = function reset(localLookup) { + implied = objFilter(implied, k => !localLookup[k]); + conflicting = objFilter(conflicting, k => !localLookup[k]); + return self; + }; + const frozens = []; + self.freeze = function freeze() { + frozens.push({ + implied, + conflicting, + }); + }; + self.unfreeze = function unfreeze() { + const frozen = frozens.pop(); + assertNotStrictEqual(frozen, undefined, shim); + ({ implied, conflicting } = frozen); + }; + return self; +} diff --git a/node_modules/yargs/build/lib/yargs-factory.js b/node_modules/yargs/build/lib/yargs-factory.js new file mode 100644 index 000000000..d3e6baa01 --- /dev/null +++ b/node_modules/yargs/build/lib/yargs-factory.js @@ -0,0 +1,1517 @@ +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation; +import { command as Command, } from './command.js'; +import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js'; +import { YError } from './yerror.js'; +import { usage as Usage } from './usage.js'; +import { argsert } from './argsert.js'; +import { completion as Completion, } from './completion.js'; +import { validation as Validation, } from './validation.js'; +import { objFilter } from './utils/obj-filter.js'; +import { applyExtends } from './utils/apply-extends.js'; +import { applyMiddleware, GlobalMiddleware, } from './middleware.js'; +import { isPromise } from './utils/is-promise.js'; +import { maybeAsyncResult } from './utils/maybe-async-result.js'; +import setBlocking from './utils/set-blocking.js'; +export function YargsFactory(_shim) { + return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => { + const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim); + Object.defineProperty(yargs, 'argv', { + get: () => { + return yargs.parse(); + }, + enumerable: true, + }); + yargs.help(); + yargs.version(); + return yargs; + }; +} +const kCopyDoubleDash = Symbol('copyDoubleDash'); +const kCreateLogger = Symbol('copyDoubleDash'); +const kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject'); +const kEmitWarning = Symbol('emitWarning'); +const kFreeze = Symbol('freeze'); +const kGetDollarZero = Symbol('getDollarZero'); +const kGetParserConfiguration = Symbol('getParserConfiguration'); +const kGetUsageConfiguration = Symbol('getUsageConfiguration'); +const kGuessLocale = Symbol('guessLocale'); +const kGuessVersion = Symbol('guessVersion'); +const kParsePositionalNumbers = Symbol('parsePositionalNumbers'); +const kPkgUp = Symbol('pkgUp'); +const kPopulateParserHintArray = Symbol('populateParserHintArray'); +const kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary'); +const kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary'); +const kPopulateParserHintDictionary = Symbol('populateParserHintDictionary'); +const kSanitizeKey = Symbol('sanitizeKey'); +const kSetKey = Symbol('setKey'); +const kUnfreeze = Symbol('unfreeze'); +const kValidateAsync = Symbol('validateAsync'); +const kGetCommandInstance = Symbol('getCommandInstance'); +const kGetContext = Symbol('getContext'); +const kGetHasOutput = Symbol('getHasOutput'); +const kGetLoggerInstance = Symbol('getLoggerInstance'); +const kGetParseContext = Symbol('getParseContext'); +const kGetUsageInstance = Symbol('getUsageInstance'); +const kGetValidationInstance = Symbol('getValidationInstance'); +const kHasParseCallback = Symbol('hasParseCallback'); +const kIsGlobalContext = Symbol('isGlobalContext'); +const kPostProcess = Symbol('postProcess'); +const kRebase = Symbol('rebase'); +const kReset = Symbol('reset'); +const kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands'); +const kRunValidation = Symbol('runValidation'); +const kSetHasOutput = Symbol('setHasOutput'); +const kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys'); +const DEFAULT_LOCALE = 'en_US'; +export class YargsInstance { + constructor(processArgs = [], cwd, parentRequire, shim) { + this.customScriptName = false; + this.parsed = false; + _YargsInstance_command.set(this, void 0); + _YargsInstance_cwd.set(this, void 0); + _YargsInstance_context.set(this, { commands: [], fullCommands: [] }); + _YargsInstance_completion.set(this, null); + _YargsInstance_completionCommand.set(this, null); + _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden'); + _YargsInstance_exitError.set(this, null); + _YargsInstance_detectLocale.set(this, true); + _YargsInstance_emittedWarnings.set(this, {}); + _YargsInstance_exitProcess.set(this, true); + _YargsInstance_frozens.set(this, []); + _YargsInstance_globalMiddleware.set(this, void 0); + _YargsInstance_groups.set(this, {}); + _YargsInstance_hasOutput.set(this, false); + _YargsInstance_helpOpt.set(this, null); + _YargsInstance_isGlobalContext.set(this, true); + _YargsInstance_logger.set(this, void 0); + _YargsInstance_output.set(this, ''); + _YargsInstance_options.set(this, void 0); + _YargsInstance_parentRequire.set(this, void 0); + _YargsInstance_parserConfig.set(this, {}); + _YargsInstance_parseFn.set(this, null); + _YargsInstance_parseContext.set(this, null); + _YargsInstance_pkgs.set(this, {}); + _YargsInstance_preservedGroups.set(this, {}); + _YargsInstance_processArgs.set(this, void 0); + _YargsInstance_recommendCommands.set(this, false); + _YargsInstance_shim.set(this, void 0); + _YargsInstance_strict.set(this, false); + _YargsInstance_strictCommands.set(this, false); + _YargsInstance_strictOptions.set(this, false); + _YargsInstance_usage.set(this, void 0); + _YargsInstance_usageConfig.set(this, {}); + _YargsInstance_versionOpt.set(this, null); + _YargsInstance_validation.set(this, void 0); + __classPrivateFieldSet(this, _YargsInstance_shim, shim, "f"); + __classPrivateFieldSet(this, _YargsInstance_processArgs, processArgs, "f"); + __classPrivateFieldSet(this, _YargsInstance_cwd, cwd, "f"); + __classPrivateFieldSet(this, _YargsInstance_parentRequire, parentRequire, "f"); + __classPrivateFieldSet(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f"); + this.$0 = this[kGetDollarZero](); + this[kReset](); + __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f"), "f"); + __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), "f"); + __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f"), "f"); + __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f"), "f"); + __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); + __classPrivateFieldSet(this, _YargsInstance_logger, this[kCreateLogger](), "f"); + __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(DEFAULT_LOCALE); + } + addHelpOpt(opt, msg) { + const defaultHelpOpt = 'help'; + argsert('[string|boolean] [string]', [opt, msg], arguments.length); + if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { + this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); + __classPrivateFieldSet(this, _YargsInstance_helpOpt, null, "f"); + } + if (opt === false && msg === undefined) + return this; + __classPrivateFieldSet(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, "f"); + this.boolean(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); + this.describe(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show help')); + return this; + } + help(opt, msg) { + return this.addHelpOpt(opt, msg); + } + addShowHiddenOpt(opt, msg) { + argsert('[string|boolean] [string]', [opt, msg], arguments.length); + if (opt === false && msg === undefined) + return this; + const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); + this.boolean(showHiddenOpt); + this.describe(showHiddenOpt, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show hidden options')); + __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt; + return this; + } + showHidden(opt, msg) { + return this.addShowHiddenOpt(opt, msg); + } + alias(key, value) { + argsert(' [string|array]', [key, value], arguments.length); + this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value); + return this; + } + array(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('array', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + boolean(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('boolean', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + check(f, global) { + argsert(' [boolean]', [f, global], arguments.length); + this.middleware((argv, _yargs) => { + return maybeAsyncResult(() => { + return f(argv, _yargs.getOptions()); + }, (result) => { + if (!result) { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__('Argument check failed: %s', f.toString())); + } + else if (typeof result === 'string' || result instanceof Error) { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(result.toString(), result); + } + return argv; + }, (err) => { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err); + return argv; + }); + }, false, global); + return this; + } + choices(key, value) { + argsert(' [string|array]', [key, value], arguments.length); + this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value); + return this; + } + coerce(keys, value) { + argsert(' [function]', [keys, value], arguments.length); + if (Array.isArray(keys)) { + if (!value) { + throw new YError('coerce callback must be provided'); + } + for (const key of keys) { + this.coerce(key, value); + } + return this; + } + else if (typeof keys === 'object') { + for (const key of Object.keys(keys)) { + this.coerce(key, keys[key]); + } + return this; + } + if (!value) { + throw new YError('coerce callback must be provided'); + } + const coerceKey = keys; + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[coerceKey] = true; + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => { + var _a; + const coerceKeyAliases = (_a = yargs.getAliases()[coerceKey]) !== null && _a !== void 0 ? _a : []; + const argvKeys = [coerceKey, ...coerceKeyAliases].filter(key => Object.prototype.hasOwnProperty.call(argv, key)); + if (argvKeys.length === 0) { + return argv; + } + return maybeAsyncResult(() => { + return value(argv[argvKeys[0]]); + }, (result) => { + argvKeys.forEach(key => { + argv[key] = result; + }); + return argv; + }, (err) => { + throw new YError(err.message); + }); + }, coerceKey); + return this; + } + conflicts(key1, key2) { + argsert(' [string|array]', [key1, key2], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicts(key1, key2); + return this; + } + config(key = 'config', msg, parseFn) { + argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); + if (typeof key === 'object' && !Array.isArray(key)) { + key = applyExtends(key, __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(key); + return this; + } + if (typeof msg === 'function') { + parseFn = msg; + msg = undefined; + } + this.describe(key, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Path to JSON config file')); + (Array.isArray(key) ? key : [key]).forEach(k => { + __classPrivateFieldGet(this, _YargsInstance_options, "f").config[k] = parseFn || true; + }); + return this; + } + completion(cmd, desc, fn) { + argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); + if (typeof desc === 'function') { + fn = desc; + desc = undefined; + } + __classPrivateFieldSet(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion', "f"); + if (!desc && desc !== false) { + desc = 'generate completion script'; + } + this.command(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), desc); + if (fn) + __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn); + return this; + } + command(cmd, description, builder, handler, middlewares, deprecated) { + argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder, handler, middlewares, deprecated); + return this; + } + commands(cmd, description, builder, handler, middlewares, deprecated) { + return this.command(cmd, description, builder, handler, middlewares, deprecated); + } + commandDir(dir, opts) { + argsert(' [object]', [dir, opts], arguments.length); + const req = __classPrivateFieldGet(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet(this, _YargsInstance_shim, "f").require; + __classPrivateFieldGet(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet(this, _YargsInstance_shim, "f").getCallerFile(), opts); + return this; + } + count(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('count', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + default(key, value, defaultDescription) { + argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); + if (defaultDescription) { + assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription; + } + if (typeof value === 'function') { + assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key]) + __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = + __classPrivateFieldGet(this, _YargsInstance_usage, "f").functionDescription(value); + value = value.call(); + } + this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value); + return this; + } + defaults(key, value, defaultDescription) { + return this.default(key, value, defaultDescription); + } + demandCommand(min = 1, max, minMsg, maxMsg) { + argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); + if (typeof max !== 'number') { + minMsg = max; + max = Infinity; + } + this.global('_', false); + __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands._ = { + min, + max, + minMsg, + maxMsg, + }; + return this; + } + demand(keys, max, msg) { + if (Array.isArray(max)) { + max.forEach(key => { + assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + this.demandOption(key, msg); + }); + max = Infinity; + } + else if (typeof max !== 'number') { + msg = max; + max = Infinity; + } + if (typeof keys === 'number') { + assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + this.demandCommand(keys, max, msg, msg); + } + else if (Array.isArray(keys)) { + keys.forEach(key => { + assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + this.demandOption(key, msg); + }); + } + else { + if (typeof msg === 'string') { + this.demandOption(keys, msg); + } + else if (msg === true || typeof msg === 'undefined') { + this.demandOption(keys); + } + } + return this; + } + demandOption(keys, msg) { + argsert(' [string]', [keys, msg], arguments.length); + this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg); + return this; + } + deprecateOption(option, message) { + argsert(' [string|boolean]', [option, message], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message; + return this; + } + describe(keys, description) { + argsert(' [string]', [keys, description], arguments.length); + this[kSetKey](keys, true); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description); + return this; + } + detectLocale(detect) { + argsert('', [detect], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_detectLocale, detect, "f"); + return this; + } + env(prefix) { + argsert('[string|boolean]', [prefix], arguments.length); + if (prefix === false) + delete __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; + else + __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix = prefix || ''; + return this; + } + epilogue(msg) { + argsert('', [msg], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").epilog(msg); + return this; + } + epilog(msg) { + return this.epilogue(msg); + } + example(cmd, description) { + argsert(' [string]', [cmd, description], arguments.length); + if (Array.isArray(cmd)) { + cmd.forEach(exampleParams => this.example(...exampleParams)); + } + else { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description); + } + return this; + } + exit(code, err) { + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + __classPrivateFieldSet(this, _YargsInstance_exitError, err, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.exit(code); + } + exitProcess(enabled = true) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_exitProcess, enabled, "f"); + return this; + } + fail(f) { + argsert('', [f], arguments.length); + if (typeof f === 'boolean' && f !== false) { + throw new YError("Invalid first argument. Expected function or boolean 'false'"); + } + __classPrivateFieldGet(this, _YargsInstance_usage, "f").failFn(f); + return this; + } + getAliases() { + return this.parsed ? this.parsed.aliases : {}; + } + async getCompletion(args, done) { + argsert(' [function]', [args, done], arguments.length); + if (!done) { + return new Promise((resolve, reject) => { + __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => { + if (err) + reject(err); + else + resolve(completions); + }); + }); + } + else { + return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, done); + } + } + getDemandedOptions() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedOptions; + } + getDemandedCommands() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands; + } + getDeprecatedOptions() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions; + } + getDetectLocale() { + return __classPrivateFieldGet(this, _YargsInstance_detectLocale, "f"); + } + getExitProcess() { + return __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"); + } + getGroups() { + return Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_groups, "f"), __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")); + } + getHelp() { + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { + if (!this.parsed) { + const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); + if (isPromise(parse)) { + return parse.then(() => { + return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); + }); + } + } + const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); + if (isPromise(builderResponse)) { + return builderResponse.then(() => { + return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); + }); + } + } + return Promise.resolve(__classPrivateFieldGet(this, _YargsInstance_usage, "f").help()); + } + getOptions() { + return __classPrivateFieldGet(this, _YargsInstance_options, "f"); + } + getStrict() { + return __classPrivateFieldGet(this, _YargsInstance_strict, "f"); + } + getStrictCommands() { + return __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"); + } + getStrictOptions() { + return __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"); + } + global(globals, global) { + argsert(' [boolean]', [globals, global], arguments.length); + globals = [].concat(globals); + if (global !== false) { + __classPrivateFieldGet(this, _YargsInstance_options, "f").local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local.filter(l => globals.indexOf(l) === -1); + } + else { + globals.forEach(g => { + if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").local.includes(g)) + __classPrivateFieldGet(this, _YargsInstance_options, "f").local.push(g); + }); + } + return this; + } + group(opts, groupName) { + argsert(' ', [opts, groupName], arguments.length); + const existing = __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName]; + if (__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]) { + delete __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]; + } + const seen = {}; + __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter(key => { + if (seen[key]) + return false; + return (seen[key] = true); + }); + return this; + } + hide(key) { + argsert('', [key], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_options, "f").hiddenOptions.push(key); + return this; + } + implies(key, value) { + argsert(' [number|string|array]', [key, value], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").implies(key, value); + return this; + } + locale(locale) { + argsert('[string]', [locale], arguments.length); + if (locale === undefined) { + this[kGuessLocale](); + return __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.getLocale(); + } + __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); + __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(locale); + return this; + } + middleware(callback, applyBeforeValidation, global) { + return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global); + } + nargs(key, value) { + argsert(' [number]', [key, value], arguments.length); + this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value); + return this; + } + normalize(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('normalize', keys); + return this; + } + number(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('number', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + option(key, opt) { + argsert(' [object]', [key, opt], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach(k => { + this.options(k, key[k]); + }); + } + else { + if (typeof opt !== 'object') { + opt = {}; + } + this[kTrackManuallySetKeys](key); + if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) { + this[kEmitWarning]([ + '"version" is a reserved word.', + 'Please do one of the following:', + '- Disable version with `yargs.version(false)` if using "version" as an option', + '- Use the built-in `yargs.version` method instead (if applicable)', + '- Use a different option key', + 'https://yargs.js.org/docs/#api-reference-version', + ].join('\n'), undefined, 'versionWarning'); + } + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[key] = true; + if (opt.alias) + this.alias(key, opt.alias); + const deprecate = opt.deprecate || opt.deprecated; + if (deprecate) { + this.deprecateOption(key, deprecate); + } + const demand = opt.demand || opt.required || opt.require; + if (demand) { + this.demand(key, demand); + } + if (opt.demandOption) { + this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); + } + if (opt.conflicts) { + this.conflicts(key, opt.conflicts); + } + if ('default' in opt) { + this.default(key, opt.default); + } + if (opt.implies !== undefined) { + this.implies(key, opt.implies); + } + if (opt.nargs !== undefined) { + this.nargs(key, opt.nargs); + } + if (opt.config) { + this.config(key, opt.configParser); + } + if (opt.normalize) { + this.normalize(key); + } + if (opt.choices) { + this.choices(key, opt.choices); + } + if (opt.coerce) { + this.coerce(key, opt.coerce); + } + if (opt.group) { + this.group(key, opt.group); + } + if (opt.boolean || opt.type === 'boolean') { + this.boolean(key); + if (opt.alias) + this.boolean(opt.alias); + } + if (opt.array || opt.type === 'array') { + this.array(key); + if (opt.alias) + this.array(opt.alias); + } + if (opt.number || opt.type === 'number') { + this.number(key); + if (opt.alias) + this.number(opt.alias); + } + if (opt.string || opt.type === 'string') { + this.string(key); + if (opt.alias) + this.string(opt.alias); + } + if (opt.count || opt.type === 'count') { + this.count(key); + } + if (typeof opt.global === 'boolean') { + this.global(key, opt.global); + } + if (opt.defaultDescription) { + __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription; + } + if (opt.skipValidation) { + this.skipValidation(key); + } + const desc = opt.describe || opt.description || opt.desc; + const descriptions = __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions(); + if (!Object.prototype.hasOwnProperty.call(descriptions, key) || + typeof desc === 'string') { + this.describe(key, desc); + } + if (opt.hidden) { + this.hide(key); + } + if (opt.requiresArg) { + this.requiresArg(key); + } + } + return this; + } + options(key, opt) { + return this.option(key, opt); + } + parse(args, shortCircuit, _parseFn) { + argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); + this[kFreeze](); + if (typeof args === 'undefined') { + args = __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); + } + if (typeof shortCircuit === 'object') { + __classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, "f"); + shortCircuit = _parseFn; + } + if (typeof shortCircuit === 'function') { + __classPrivateFieldSet(this, _YargsInstance_parseFn, shortCircuit, "f"); + shortCircuit = false; + } + if (!shortCircuit) + __classPrivateFieldSet(this, _YargsInstance_processArgs, args, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) + __classPrivateFieldSet(this, _YargsInstance_exitProcess, false, "f"); + const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit); + const tmpParsed = this.parsed; + __classPrivateFieldGet(this, _YargsInstance_completion, "f").setParsed(this.parsed); + if (isPromise(parsed)) { + return parsed + .then(argv => { + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) + __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); + return argv; + }) + .catch(err => { + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) { + __classPrivateFieldGet(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); + } + throw err; + }) + .finally(() => { + this[kUnfreeze](); + this.parsed = tmpParsed; + }); + } + else { + if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) + __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet(this, _YargsInstance_output, "f")); + this[kUnfreeze](); + this.parsed = tmpParsed; + } + return parsed; + } + parseAsync(args, shortCircuit, _parseFn) { + const maybePromise = this.parse(args, shortCircuit, _parseFn); + return !isPromise(maybePromise) + ? Promise.resolve(maybePromise) + : maybePromise; + } + parseSync(args, shortCircuit, _parseFn) { + const maybePromise = this.parse(args, shortCircuit, _parseFn); + if (isPromise(maybePromise)) { + throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware'); + } + return maybePromise; + } + parserConfiguration(config) { + argsert('', [config], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, "f"); + return this; + } + pkgConf(key, rootPath) { + argsert(' [string]', [key, rootPath], arguments.length); + let conf = null; + const obj = this[kPkgUp](rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f")); + if (obj[key] && typeof obj[key] === 'object') { + conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(conf); + } + return this; + } + positional(key, opts) { + argsert(' ', [key, opts], arguments.length); + const supportedOpts = [ + 'default', + 'defaultDescription', + 'implies', + 'normalize', + 'choices', + 'conflicts', + 'coerce', + 'type', + 'describe', + 'desc', + 'description', + 'alias', + ]; + opts = objFilter(opts, (k, v) => { + if (k === 'type' && !['string', 'number', 'boolean'].includes(v)) + return false; + return supportedOpts.includes(k); + }); + const fullCommand = __classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands.length - 1]; + const parseOptions = fullCommand + ? __classPrivateFieldGet(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand) + : { + array: [], + alias: {}, + default: {}, + demand: {}, + }; + objectKeys(parseOptions).forEach(pk => { + const parseOption = parseOptions[pk]; + if (Array.isArray(parseOption)) { + if (parseOption.indexOf(key) !== -1) + opts[pk] = true; + } + else { + if (parseOption[key] && !(pk in opts)) + opts[pk] = parseOption[key]; + } + }); + this.group(key, __classPrivateFieldGet(this, _YargsInstance_usage, "f").getPositionalGroupName()); + return this.option(key, opts); + } + recommendCommands(recommend = true) { + argsert('[boolean]', [recommend], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_recommendCommands, recommend, "f"); + return this; + } + required(keys, max, msg) { + return this.demand(keys, max, msg); + } + require(keys, max, msg) { + return this.demand(keys, max, msg); + } + requiresArg(keys) { + argsert(' [number]', [keys], arguments.length); + if (typeof keys === 'string' && __classPrivateFieldGet(this, _YargsInstance_options, "f").narg[keys]) { + return this; + } + else { + this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN); + } + return this; + } + showCompletionScript($0, cmd) { + argsert('[string] [string]', [$0, cmd], arguments.length); + $0 = $0 || this.$0; + __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion')); + return this; + } + showHelp(level) { + argsert('[string|function]', [level], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { + if (!this.parsed) { + const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); + if (isPromise(parse)) { + parse.then(() => { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); + }); + return this; + } + } + const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); + if (isPromise(builderResponse)) { + builderResponse.then(() => { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); + }); + return this; + } + } + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); + return this; + } + scriptName(scriptName) { + this.customScriptName = true; + this.$0 = scriptName; + return this; + } + showHelpOnFail(enabled, message) { + argsert('[boolean|string] [string]', [enabled, message], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message); + return this; + } + showVersion(level) { + argsert('[string|function]', [level], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion(level); + return this; + } + skipValidation(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('skipValidation', keys); + return this; + } + strict(enabled) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_strict, enabled !== false, "f"); + return this; + } + strictCommands(enabled) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_strictCommands, enabled !== false, "f"); + return this; + } + strictOptions(enabled) { + argsert('[boolean]', [enabled], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_strictOptions, enabled !== false, "f"); + return this; + } + string(keys) { + argsert('', [keys], arguments.length); + this[kPopulateParserHintArray]('string', keys); + this[kTrackManuallySetKeys](keys); + return this; + } + terminalWidth() { + argsert([], 0); + return __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.stdColumns; + } + updateLocale(obj) { + return this.updateStrings(obj); + } + updateStrings(obj) { + argsert('', [obj], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); + __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj); + return this; + } + usage(msg, description, builder, handler) { + argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); + if (description !== undefined) { + assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + if ((msg || '').match(/^\$0( |$)/)) { + return this.command(msg, description, builder, handler); + } + else { + throw new YError('.usage() description must start with $0 if being used as alias for .command()'); + } + } + else { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").usage(msg); + return this; + } + } + usageConfiguration(config) { + argsert('', [config], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f"); + return this; + } + version(opt, msg, ver) { + const defaultVersionOpt = 'version'; + argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); + if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")) { + this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(undefined); + __classPrivateFieldSet(this, _YargsInstance_versionOpt, null, "f"); + } + if (arguments.length === 0) { + ver = this[kGuessVersion](); + opt = defaultVersionOpt; + } + else if (arguments.length === 1) { + if (opt === false) { + return this; + } + ver = opt; + opt = defaultVersionOpt; + } + else if (arguments.length === 2) { + ver = msg; + msg = undefined; + } + __classPrivateFieldSet(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, "f"); + msg = msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show version number'); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(ver || undefined); + this.boolean(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); + this.describe(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"), msg); + return this; + } + wrap(cols) { + argsert('', [cols], arguments.length); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols); + return this; + } + [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { + if (!argv._ || !argv['--']) + return argv; + argv._.push.apply(argv._, argv['--']); + try { + delete argv['--']; + } + catch (_err) { } + return argv; + } + [kCreateLogger]() { + return { + log: (...args) => { + if (!this[kHasParseCallback]()) + console.log(...args); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); + }, + error: (...args) => { + if (!this[kHasParseCallback]()) + console.error(...args); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); + __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); + }, + }; + } + [kDeleteFromParserHintObject](optionKey) { + objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, "f")).forEach((hintKey) => { + if (((key) => key === 'configObjects')(hintKey)) + return; + const hint = __classPrivateFieldGet(this, _YargsInstance_options, "f")[hintKey]; + if (Array.isArray(hint)) { + if (hint.includes(optionKey)) + hint.splice(hint.indexOf(optionKey), 1); + } + else if (typeof hint === 'object') { + delete hint[optionKey]; + } + }); + delete __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions()[optionKey]; + } + [kEmitWarning](warning, type, deduplicationId) { + if (!__classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) { + __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.emitWarning(warning, type); + __classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true; + } + } + [kFreeze]() { + __classPrivateFieldGet(this, _YargsInstance_frozens, "f").push({ + options: __classPrivateFieldGet(this, _YargsInstance_options, "f"), + configObjects: __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects.slice(0), + exitProcess: __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"), + groups: __classPrivateFieldGet(this, _YargsInstance_groups, "f"), + strict: __classPrivateFieldGet(this, _YargsInstance_strict, "f"), + strictCommands: __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"), + strictOptions: __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"), + completionCommand: __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), + output: __classPrivateFieldGet(this, _YargsInstance_output, "f"), + exitError: __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), + hasOutput: __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"), + parsed: this.parsed, + parseFn: __classPrivateFieldGet(this, _YargsInstance_parseFn, "f"), + parseContext: __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"), + }); + __classPrivateFieldGet(this, _YargsInstance_usage, "f").freeze(); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").freeze(); + __classPrivateFieldGet(this, _YargsInstance_command, "f").freeze(); + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").freeze(); + } + [kGetDollarZero]() { + let $0 = ''; + let default$0; + if (/\b(node|iojs|electron|bun)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) { + default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2); + } + else { + default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(0, 1); + } + $0 = default$0 + .map(x => { + const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, "f"), x); + return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; + }) + .join(' ') + .trim(); + if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_') && + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_')) { + $0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f") + .getEnv('_') + .replace(`${__classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.execPath())}/`, ''); + } + return $0; + } + [kGetParserConfiguration]() { + return __classPrivateFieldGet(this, _YargsInstance_parserConfig, "f"); + } + [kGetUsageConfiguration]() { + return __classPrivateFieldGet(this, _YargsInstance_usageConfig, "f"); + } + [kGuessLocale]() { + if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, "f")) + return; + const locale = __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_ALL') || + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_MESSAGES') || + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANG') || + __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANGUAGE') || + 'en_US'; + this.locale(locale.replace(/[.:].*/, '')); + } + [kGuessVersion]() { + const obj = this[kPkgUp](); + return obj.version || 'unknown'; + } + [kParsePositionalNumbers](argv) { + const args = argv['--'] ? argv['--'] : argv._; + for (let i = 0, arg; (arg = args[i]) !== undefined; i++) { + if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && + Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) { + args[i] = Number(arg); + } + } + return argv; + } + [kPkgUp](rootPath) { + const npath = rootPath || '*'; + if (__classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]) + return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; + let obj = {}; + try { + let startDir = rootPath || __classPrivateFieldGet(this, _YargsInstance_shim, "f").mainFilename; + if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").path.extname(startDir)) { + startDir = __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(startDir); + } + const pkgJsonPath = __classPrivateFieldGet(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names) => { + if (names.includes('package.json')) { + return 'package.json'; + } + else { + return undefined; + } + }); + assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + obj = JSON.parse(__classPrivateFieldGet(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, 'utf8')); + } + catch (_noop) { } + __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath] = obj || {}; + return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; + } + [kPopulateParserHintArray](type, keys) { + keys = [].concat(keys); + keys.forEach(key => { + key = this[kSanitizeKey](key); + __classPrivateFieldGet(this, _YargsInstance_options, "f")[type].push(key); + }); + } + [kPopulateParserHintSingleValueDictionary](builder, type, key, value) { + this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { + __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = value; + }); + } + [kPopulateParserHintArrayDictionary](builder, type, key, value) { + this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { + __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] || []).concat(value); + }); + } + [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) { + if (Array.isArray(key)) { + key.forEach(k => { + builder(k, value); + }); + } + else if (((key) => typeof key === 'object')(key)) { + for (const k of objectKeys(key)) { + builder(k, key[k]); + } + } + else { + singleKeyHandler(type, this[kSanitizeKey](key), value); + } + } + [kSanitizeKey](key) { + if (key === '__proto__') + return '___proto___'; + return key; + } + [kSetKey](key, set) { + this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set); + return this; + } + [kUnfreeze]() { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + const frozen = __classPrivateFieldGet(this, _YargsInstance_frozens, "f").pop(); + assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); + let configObjects; + (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, { + options: ({ set value(_o) { __classPrivateFieldSet(_a, _YargsInstance_options, _o, "f"); } }).value, + configObjects, + exitProcess: ({ set value(_o) { __classPrivateFieldSet(_b, _YargsInstance_exitProcess, _o, "f"); } }).value, + groups: ({ set value(_o) { __classPrivateFieldSet(_c, _YargsInstance_groups, _o, "f"); } }).value, + output: ({ set value(_o) { __classPrivateFieldSet(_d, _YargsInstance_output, _o, "f"); } }).value, + exitError: ({ set value(_o) { __classPrivateFieldSet(_e, _YargsInstance_exitError, _o, "f"); } }).value, + hasOutput: ({ set value(_o) { __classPrivateFieldSet(_f, _YargsInstance_hasOutput, _o, "f"); } }).value, + parsed: this.parsed, + strict: ({ set value(_o) { __classPrivateFieldSet(_g, _YargsInstance_strict, _o, "f"); } }).value, + strictCommands: ({ set value(_o) { __classPrivateFieldSet(_h, _YargsInstance_strictCommands, _o, "f"); } }).value, + strictOptions: ({ set value(_o) { __classPrivateFieldSet(_j, _YargsInstance_strictOptions, _o, "f"); } }).value, + completionCommand: ({ set value(_o) { __classPrivateFieldSet(_k, _YargsInstance_completionCommand, _o, "f"); } }).value, + parseFn: ({ set value(_o) { __classPrivateFieldSet(_l, _YargsInstance_parseFn, _o, "f"); } }).value, + parseContext: ({ set value(_o) { __classPrivateFieldSet(_m, _YargsInstance_parseContext, _o, "f"); } }).value, + } = frozen); + __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = configObjects; + __classPrivateFieldGet(this, _YargsInstance_usage, "f").unfreeze(); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").unfreeze(); + __classPrivateFieldGet(this, _YargsInstance_command, "f").unfreeze(); + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").unfreeze(); + } + [kValidateAsync](validation, argv) { + return maybeAsyncResult(argv, result => { + validation(result); + return result; + }); + } + getInternalMethods() { + return { + getCommandInstance: this[kGetCommandInstance].bind(this), + getContext: this[kGetContext].bind(this), + getHasOutput: this[kGetHasOutput].bind(this), + getLoggerInstance: this[kGetLoggerInstance].bind(this), + getParseContext: this[kGetParseContext].bind(this), + getParserConfiguration: this[kGetParserConfiguration].bind(this), + getUsageConfiguration: this[kGetUsageConfiguration].bind(this), + getUsageInstance: this[kGetUsageInstance].bind(this), + getValidationInstance: this[kGetValidationInstance].bind(this), + hasParseCallback: this[kHasParseCallback].bind(this), + isGlobalContext: this[kIsGlobalContext].bind(this), + postProcess: this[kPostProcess].bind(this), + reset: this[kReset].bind(this), + runValidation: this[kRunValidation].bind(this), + runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this), + setHasOutput: this[kSetHasOutput].bind(this), + }; + } + [kGetCommandInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_command, "f"); + } + [kGetContext]() { + return __classPrivateFieldGet(this, _YargsInstance_context, "f"); + } + [kGetHasOutput]() { + return __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"); + } + [kGetLoggerInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_logger, "f"); + } + [kGetParseContext]() { + return __classPrivateFieldGet(this, _YargsInstance_parseContext, "f") || {}; + } + [kGetUsageInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_usage, "f"); + } + [kGetValidationInstance]() { + return __classPrivateFieldGet(this, _YargsInstance_validation, "f"); + } + [kHasParseCallback]() { + return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"); + } + [kIsGlobalContext]() { + return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, "f"); + } + [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) { + if (calledFromCommand) + return argv; + if (isPromise(argv)) + return argv; + if (!populateDoubleDash) { + argv = this[kCopyDoubleDash](argv); + } + const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] || + this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined; + if (parsePositionalNumbers) { + argv = this[kParsePositionalNumbers](argv); + } + if (runGlobalMiddleware) { + argv = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); + } + return argv; + } + [kReset](aliases = {}) { + __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f") || {}, "f"); + const tmpOptions = {}; + tmpOptions.local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local || []; + tmpOptions.configObjects = __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []; + const localLookup = {}; + tmpOptions.local.forEach(l => { + localLookup[l] = true; + (aliases[l] || []).forEach(a => { + localLookup[a] = true; + }); + }); + Object.assign(__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => { + const keys = __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName].filter(key => !(key in localLookup)); + if (keys.length > 0) { + acc[groupName] = keys; + } + return acc; + }, {})); + __classPrivateFieldSet(this, _YargsInstance_groups, {}, "f"); + const arrayOptions = [ + 'array', + 'boolean', + 'string', + 'skipValidation', + 'count', + 'normalize', + 'number', + 'hiddenOptions', + ]; + const objectOptions = [ + 'narg', + 'key', + 'alias', + 'default', + 'defaultDescription', + 'config', + 'choices', + 'demandedOptions', + 'demandedCommands', + 'deprecatedOptions', + ]; + arrayOptions.forEach(k => { + tmpOptions[k] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[k] || []).filter((k) => !localLookup[k]); + }); + objectOptions.forEach((k) => { + tmpOptions[k] = objFilter(__classPrivateFieldGet(this, _YargsInstance_options, "f")[k], k => !localLookup[k]); + }); + tmpOptions.envPrefix = __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; + __classPrivateFieldSet(this, _YargsInstance_options, tmpOptions, "f"); + __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f") + ? __classPrivateFieldGet(this, _YargsInstance_usage, "f").reset(localLookup) + : Usage(this, __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f") + ? __classPrivateFieldGet(this, _YargsInstance_validation, "f").reset(localLookup) + : Validation(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f") + ? __classPrivateFieldGet(this, _YargsInstance_command, "f").reset() + : Command(__classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_validation, "f"), __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + if (!__classPrivateFieldGet(this, _YargsInstance_completion, "f")) + __classPrivateFieldSet(this, _YargsInstance_completion, Completion(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_command, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); + __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").reset(); + __classPrivateFieldSet(this, _YargsInstance_completionCommand, null, "f"); + __classPrivateFieldSet(this, _YargsInstance_output, '', "f"); + __classPrivateFieldSet(this, _YargsInstance_exitError, null, "f"); + __classPrivateFieldSet(this, _YargsInstance_hasOutput, false, "f"); + this.parsed = false; + return this; + } + [kRebase](base, dir) { + return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir); + } + [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) { + var _a, _b, _c, _d; + let skipValidation = !!calledFromCommand || helpOnly; + args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); + __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__; + __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration](); + const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration['populate--']; + const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, { + 'populate--': true, + }); + const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), { + configuration: { 'parse-positional-numbers': false, ...config }, + })); + const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f")); + let argvPromise = undefined; + const aliases = parsed.aliases; + let helpOptSet = false; + let versionOptSet = false; + Object.keys(argv).forEach(key => { + if (key === __classPrivateFieldGet(this, _YargsInstance_helpOpt, "f") && argv[key]) { + helpOptSet = true; + } + else if (key === __classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && argv[key]) { + versionOptSet = true; + } + }); + argv.$0 = this.$0; + this.parsed = parsed; + if (commandIndex === 0) { + __classPrivateFieldGet(this, _YargsInstance_usage, "f").clearCachedHelpMessage(); + } + try { + this[kGuessLocale](); + if (shortCircuit) { + return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false); + } + if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { + const helpCmds = [__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] + .concat(aliases[__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] || []) + .filter(k => k.length > 1); + if (helpCmds.includes('' + argv._[argv._.length - 1])) { + argv._.pop(); + helpOptSet = true; + } + } + __classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f"); + const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands(); + const requestCompletions = ((_a = __classPrivateFieldGet(this, _YargsInstance_completion, "f")) === null || _a === void 0 ? void 0 : _a.completionKey) + ? [ + (_b = __classPrivateFieldGet(this, _YargsInstance_completion, "f")) === null || _b === void 0 ? void 0 : _b.completionKey, + ...((_d = this.getAliases()[(_c = __classPrivateFieldGet(this, _YargsInstance_completion, "f")) === null || _c === void 0 ? void 0 : _c.completionKey]) !== null && _d !== void 0 ? _d : []), + ].some((key) => Object.prototype.hasOwnProperty.call(argv, key)) + : false; + const skipRecommendation = helpOptSet || requestCompletions || helpOnly; + if (argv._.length) { + if (handlerKeys.length) { + let firstUnknownCommand; + for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) { + cmd = String(argv._[i]); + if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { + const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly); + return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); + } + else if (!firstUnknownCommand && + cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { + firstUnknownCommand = cmd; + break; + } + } + if (!__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && + __classPrivateFieldGet(this, _YargsInstance_recommendCommands, "f") && + firstUnknownCommand && + !skipRecommendation) { + __classPrivateFieldGet(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys); + } + } + if (__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") && + argv._.includes(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) && + !requestCompletions) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + this.showCompletionScript(); + this.exit(0); + } + } + if (__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) { + const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly); + return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); + } + if (requestCompletions) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + args = [].concat(args); + const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey}`) + 1); + __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => { + if (err) + throw new YError(err.message); + (completions || []).forEach(completion => { + __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(completion); + }); + this.exit(0); + }); + return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false); + } + if (!__classPrivateFieldGet(this, _YargsInstance_hasOutput, "f")) { + if (helpOptSet) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + skipValidation = true; + this.showHelp(message => { + __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(message); + this.exit(0); + }); + } + else if (versionOptSet) { + if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) + setBlocking(true); + skipValidation = true; + __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion('log'); + this.exit(0); + } + } + if (!skipValidation && __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.length > 0) { + skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true); + } + if (!skipValidation) { + if (parsed.error) + throw new YError(parsed.error.message); + if (!requestCompletions) { + const validation = this[kRunValidation](aliases, {}, parsed.error); + if (!calledFromCommand) { + argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true); + } + argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv); + if (isPromise(argvPromise) && !calledFromCommand) { + argvPromise = argvPromise.then(() => { + return applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); + }); + } + } + } + } + catch (err) { + if (err instanceof YError) + __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message, err); + else + throw err; + } + return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true); + } + [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) { + const demandedOptions = { ...this.getDemandedOptions() }; + return (argv) => { + if (parseErrors) + throw new YError(parseErrors.message); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").nonOptionCount(argv); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions); + let failedStrictCommands = false; + if (__classPrivateFieldGet(this, _YargsInstance_strictCommands, "f")) { + failedStrictCommands = __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownCommands(argv); + } + if (__classPrivateFieldGet(this, _YargsInstance_strict, "f") && !failedStrictCommands) { + __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand); + } + else if (__classPrivateFieldGet(this, _YargsInstance_strictOptions, "f")) { + __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false); + } + __classPrivateFieldGet(this, _YargsInstance_validation, "f").limitedChoices(argv); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").implications(argv); + __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicting(argv); + }; + } + [kSetHasOutput]() { + __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); + } + [kTrackManuallySetKeys](keys) { + if (typeof keys === 'string') { + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; + } + else { + for (const k of keys) { + __classPrivateFieldGet(this, _YargsInstance_options, "f").key[k] = true; + } + } + } +} +export function isYargsInstance(y) { + return !!y && typeof y.getInternalMethods === 'function'; +} diff --git a/node_modules/yargs/build/lib/yerror.js b/node_modules/yargs/build/lib/yerror.js new file mode 100644 index 000000000..7a36684da --- /dev/null +++ b/node_modules/yargs/build/lib/yerror.js @@ -0,0 +1,9 @@ +export class YError extends Error { + constructor(msg) { + super(msg || 'yargs error'); + this.name = 'YError'; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, YError); + } + } +} diff --git a/node_modules/yargs/helpers/helpers.mjs b/node_modules/yargs/helpers/helpers.mjs new file mode 100644 index 000000000..3f96b3db8 --- /dev/null +++ b/node_modules/yargs/helpers/helpers.mjs @@ -0,0 +1,10 @@ +import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js'; +import {hideBin} from '../build/lib/utils/process-argv.js'; +import Parser from 'yargs-parser'; +import shim from '../lib/platform-shims/esm.mjs'; + +const applyExtends = (config, cwd, mergeExtends) => { + return _applyExtends(config, cwd, mergeExtends, shim); +}; + +export {applyExtends, hideBin, Parser}; diff --git a/node_modules/yargs/helpers/package.json b/node_modules/yargs/helpers/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/node_modules/yargs/helpers/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/yargs/index.mjs b/node_modules/yargs/index.mjs new file mode 100644 index 000000000..d65a6f446 --- /dev/null +++ b/node_modules/yargs/index.mjs @@ -0,0 +1,10 @@ +'use strict'; + +// Bootstraps yargs for ESM: +import esmPlatformShim from './lib/platform-shims/esm.mjs'; +import {YargsFactory} from './build/lib/yargs-factory.js'; + +const Yargs = YargsFactory(esmPlatformShim); +export default Yargs; + +export {Yargs as 'module.exports'}; diff --git a/node_modules/yargs/lib/platform-shims/browser.mjs b/node_modules/yargs/lib/platform-shims/browser.mjs new file mode 100644 index 000000000..7e6ba57a1 --- /dev/null +++ b/node_modules/yargs/lib/platform-shims/browser.mjs @@ -0,0 +1,99 @@ +/* eslint-disable no-unused-vars */ +'use strict'; + +import cliui from 'https://unpkg.com/cliui@8.0.1/index.mjs'; // eslint-disable-line +import Parser from 'https://unpkg.com/yargs-parser@21.1.1/browser.js'; // eslint-disable-line +import {getProcessArgvBin} from '../../build/lib/utils/process-argv.js'; +import {YError} from '../../build/lib/yerror.js'; + +const REQUIRE_ERROR = 'require is not supported in browser'; +const REQUIRE_DIRECTORY_ERROR = + 'loading a directory of commands is not supported in browser'; + +export default { + assert: { + notStrictEqual: (a, b) => { + // noop. + }, + strictEqual: (a, b) => { + // noop. + }, + }, + cliui, + findUp: () => undefined, + getEnv: key => { + // There is no environment in browser: + return undefined; + }, + inspect: console.log, + getCallerFile: () => { + throw new YError(REQUIRE_DIRECTORY_ERROR); + }, + getProcessArgvBin, + mainFilename: 'yargs', + Parser, + path: { + basename: str => str, + dirname: str => str, + extname: str => str, + relative: str => str, + join: (str, _str2) => str, + }, + process: { + argv: () => [], + cwd: () => '', + emitWarning: (warning, name) => {}, + execPath: () => '', + // exit is noop browser: + exit: () => {}, + nextTick: cb => { + // eslint-disable-next-line no-undef + window.setTimeout(cb, 1); + }, + stdColumns: 80, + }, + readFileSync: () => { + return ''; + }, + readdirSync: () => { + return []; + }, + require: () => { + throw new YError(REQUIRE_ERROR); + }, + requireDirectory: () => { + throw new YError(REQUIRE_DIRECTORY_ERROR); + }, + stringWidth: str => { + return [...str].length; + }, + // TODO: replace this with y18n once it's ported to ESM: + y18n: { + __: (...str) => { + if (str.length === 0) return ''; + const args = str.slice(1); + return sprintf(str[0], ...args); + }, + __n: (str1, str2, count, ...args) => { + if (count === 1) { + return sprintf(str1, ...args); + } else { + return sprintf(str2, ...args); + } + }, + getLocale: () => { + return 'en_US'; + }, + setLocale: () => {}, + updateLocale: () => {}, + }, +}; + +function sprintf(_str, ...args) { + let str = ''; + const split = _str.split('%s'); + split.forEach((token, i) => { + str += `${token}${split[i + 1] !== undefined && args[i] ? args[i] : ''}`; + }); + return str; +} diff --git a/node_modules/yargs/lib/platform-shims/esm.mjs b/node_modules/yargs/lib/platform-shims/esm.mjs new file mode 100644 index 000000000..1b8efe80e --- /dev/null +++ b/node_modules/yargs/lib/platform-shims/esm.mjs @@ -0,0 +1,67 @@ +'use strict' + +import { notStrictEqual, strictEqual } from 'assert' +import cliui from 'cliui' +import escalade from 'escalade/sync' +import { inspect } from 'util' +import { fileURLToPath } from 'url'; +import Parser from 'yargs-parser' +import { basename, dirname, extname, relative, resolve, join } from 'path' +import { getProcessArgvBin } from '../../build/lib/utils/process-argv.js' +import stringWidth from 'string-width'; +import y18n from 'y18n' +import { createRequire } from 'node:module'; +import getCallerFile from 'get-caller-file'; +import { readFileSync, readdirSync } from 'node:fs' + +const __dirname = fileURLToPath(import.meta.url); +const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules')); +const require = createRequire(import.meta.url); + +export default { + assert: { + notStrictEqual, + strictEqual + }, + cliui, + findUp: escalade, + getEnv: (key) => { + return process.env[key] + }, + inspect, + getProcessArgvBin, + mainFilename: mainFilename || process.cwd(), + Parser, + path: { + basename, + dirname, + extname, + relative, + resolve, + join + }, + process: { + argv: () => process.argv, + cwd: process.cwd, + emitWarning: (warning, type) => process.emitWarning(warning, type), + execPath: () => process.execPath, + exit: (code) => { + // eslint-disable-next-line n/no-process-exit + process.exit(code); + }, + nextTick: process.nextTick, + stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null + }, + readFileSync, + readdirSync, + require, + getCallerFile: () => { + const callerFile = getCallerFile(3); + return callerFile.match(/^file:\/\//) ? fileURLToPath(callerFile) : callerFile; + }, + stringWidth, + y18n: y18n({ + directory: resolve(__dirname, '../../../locales'), + updateFiles: false + }) +} diff --git a/node_modules/yargs/locales/be.json b/node_modules/yargs/locales/be.json new file mode 100644 index 000000000..e28fa3013 --- /dev/null +++ b/node_modules/yargs/locales/be.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Каманды:", + "Options:": "Опцыі:", + "Examples:": "Прыклады:", + "boolean": "булевы тып", + "count": "падлік", + "string": "радковы тып", + "number": "лік", + "array": "масіў", + "required": "неабходна", + "default": "па змаўчанні", + "default:": "па змаўчанні:", + "choices:": "магчымасці:", + "aliases:": "аліасы:", + "generated-value": "згенераванае значэнне", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", + "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", + "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s" + }, + "Missing argument value: %s": { + "one": "Не хапае значэння аргументу: %s", + "other": "Не хапае значэнняў аргументаў: %s" + }, + "Missing required argument: %s": { + "one": "Не хапае неабходнага аргументу: %s", + "other": "Не хапае неабходных аргументаў: %s" + }, + "Unknown argument: %s": { + "one": "Невядомы аргумент: %s", + "other": "Невядомыя аргументы: %s" + }, + "Invalid values:": "Несапраўдныя значэння:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", + "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", + "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", + "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", + "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", + "Path to JSON config file": "Шлях да файла канфігурацыі JSON", + "Show help": "Паказаць дапамогу", + "Show version number": "Паказаць нумар версіі", + "Did you mean %s?": "Вы мелі на ўвазе %s?" +} diff --git a/node_modules/yargs/locales/cs.json b/node_modules/yargs/locales/cs.json new file mode 100644 index 000000000..639487564 --- /dev/null +++ b/node_modules/yargs/locales/cs.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Příkazy:", + "Options:": "Možnosti:", + "Examples:": "Příklady:", + "boolean": "logická hodnota", + "count": "počet", + "string": "řetězec", + "number": "číslo", + "array": "pole", + "required": "povinné", + "default": "výchozí", + "default:": "výchozí:", + "choices:": "volby:", + "aliases:": "aliasy:", + "generated-value": "generovaná-hodnota", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s", + "other": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Příliš mnoho argumentů: zadáno %s, maximálně %s", + "other": "Příliš mnoho argumentů: zadáno %s, maximálně %s" + }, + "Missing argument value: %s": { + "one": "Chybí hodnota argumentu: %s", + "other": "Chybí hodnoty argumentů: %s" + }, + "Missing required argument: %s": { + "one": "Chybí požadovaný argument: %s", + "other": "Chybí požadované argumenty: %s" + }, + "Unknown argument: %s": { + "one": "Neznámý argument: %s", + "other": "Neznámé argumenty: %s" + }, + "Invalid values:": "Neplatné hodnoty:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Zadáno: %s, Možnosti: %s", + "Argument check failed: %s": "Kontrola argumentů se nezdařila: %s", + "Implications failed:": "Chybí závislé argumenty:", + "Not enough arguments following: %s": "Následuje nedostatek argumentů: %s", + "Invalid JSON config file: %s": "Neplatný konfigurační soubor JSON: %s", + "Path to JSON config file": "Cesta ke konfiguračnímu souboru JSON", + "Show help": "Zobrazit nápovědu", + "Show version number": "Zobrazit číslo verze", + "Did you mean %s?": "Měl jste na mysli %s?", + "Arguments %s and %s are mutually exclusive" : "Argumenty %s a %s se vzájemně vylučují", + "Positionals:": "Poziční:", + "command": "příkaz", + "deprecated": "zastaralé", + "deprecated: %s": "zastaralé: %s" +} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json new file mode 100644 index 000000000..e7b90023e --- /dev/null +++ b/node_modules/yargs/locales/de.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Kommandos:", + "Options:": "Optionen:", + "Examples:": "Beispiele:", + "boolean": "boolean", + "count": "Anzahl", + "string": "string", + "number": "Zahl", + "array": "array", + "required": "erforderlich", + "default": "Standard", + "default:": "Standard:", + "choices:": "Möglichkeiten:", + "aliases:": "Aliase:", + "generated-value": "Generierter-Wert", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", + "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", + "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt" + }, + "Missing argument value: %s": { + "one": "Fehlender Argumentwert: %s", + "other": "Fehlende Argumentwerte: %s" + }, + "Missing required argument: %s": { + "one": "Fehlendes Argument: %s", + "other": "Fehlende Argumente: %s" + }, + "Unknown argument: %s": { + "one": "Unbekanntes Argument: %s", + "other": "Unbekannte Argumente: %s" + }, + "Invalid values:": "Unzulässige Werte:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", + "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", + "Implications failed:": "Fehlende abhängige Argumente:", + "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", + "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", + "Path to JSON config file": "Pfad zur JSON-Config Datei", + "Show help": "Hilfe anzeigen", + "Show version number": "Version anzeigen", + "Did you mean %s?": "Meintest du %s?" +} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json new file mode 100644 index 000000000..af096a110 --- /dev/null +++ b/node_modules/yargs/locales/en.json @@ -0,0 +1,55 @@ +{ + "Commands:": "Commands:", + "Options:": "Options:", + "Examples:": "Examples:", + "boolean": "boolean", + "count": "count", + "string": "string", + "number": "number", + "array": "array", + "required": "required", + "default": "default", + "default:": "default:", + "choices:": "choices:", + "aliases:": "aliases:", + "generated-value": "generated-value", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Not enough non-option arguments: got %s, need at least %s", + "other": "Not enough non-option arguments: got %s, need at least %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Too many non-option arguments: got %s, maximum of %s", + "other": "Too many non-option arguments: got %s, maximum of %s" + }, + "Missing argument value: %s": { + "one": "Missing argument value: %s", + "other": "Missing argument values: %s" + }, + "Missing required argument: %s": { + "one": "Missing required argument: %s", + "other": "Missing required arguments: %s" + }, + "Unknown argument: %s": { + "one": "Unknown argument: %s", + "other": "Unknown arguments: %s" + }, + "Unknown command: %s": { + "one": "Unknown command: %s", + "other": "Unknown commands: %s" + }, + "Invalid values:": "Invalid values:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", + "Argument check failed: %s": "Argument check failed: %s", + "Implications failed:": "Missing dependent arguments:", + "Not enough arguments following: %s": "Not enough arguments following: %s", + "Invalid JSON config file: %s": "Invalid JSON config file: %s", + "Path to JSON config file": "Path to JSON config file", + "Show help": "Show help", + "Show version number": "Show version number", + "Did you mean %s?": "Did you mean %s?", + "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", + "Positionals:": "Positionals:", + "command": "command", + "deprecated": "deprecated", + "deprecated: %s": "deprecated: %s" +} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json new file mode 100644 index 000000000..d77b4616a --- /dev/null +++ b/node_modules/yargs/locales/es.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opciones:", + "Examples:": "Ejemplos:", + "boolean": "booleano", + "count": "cuenta", + "string": "cadena de caracteres", + "number": "número", + "array": "tabla", + "required": "requerido", + "default": "defecto", + "default:": "defecto:", + "choices:": "selección:", + "aliases:": "alias:", + "generated-value": "valor-generado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", + "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", + "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s" + }, + "Missing argument value: %s": { + "one": "Falta argumento: %s", + "other": "Faltan argumentos: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento requerido: %s", + "other": "Faltan argumentos requeridos: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconocido: %s", + "other": "Argumentos desconocidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", + "Argument check failed: %s": "Verificación de argumento ha fallado: %s", + "Implications failed:": "Implicaciones fallidas:", + "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", + "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", + "Path to JSON config file": "Ruta al archivo de configuración JSON", + "Show help": "Muestra ayuda", + "Show version number": "Muestra número de versión", + "Did you mean %s?": "Quisiste decir %s?" +} diff --git a/node_modules/yargs/locales/fi.json b/node_modules/yargs/locales/fi.json new file mode 100644 index 000000000..481feb710 --- /dev/null +++ b/node_modules/yargs/locales/fi.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Komennot:", + "Options:": "Valinnat:", + "Examples:": "Esimerkkejä:", + "boolean": "totuusarvo", + "count": "lukumäärä", + "string": "merkkijono", + "number": "numero", + "array": "taulukko", + "required": "pakollinen", + "default": "oletusarvo", + "default:": "oletusarvo:", + "choices:": "vaihtoehdot:", + "aliases:": "aliakset:", + "generated-value": "generoitu-arvo", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s", + "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s", + "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s" + }, + "Missing argument value: %s": { + "one": "Argumentin arvo puuttuu: %s", + "other": "Argumentin arvot puuttuvat: %s" + }, + "Missing required argument: %s": { + "one": "Pakollinen argumentti puuttuu: %s", + "other": "Pakollisia argumentteja puuttuu: %s" + }, + "Unknown argument: %s": { + "one": "Tuntematon argumentti: %s", + "other": "Tuntemattomia argumentteja: %s" + }, + "Invalid values:": "Virheelliset arvot:", + "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s", + "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s", + "Implications failed:": "Riippuvia argumentteja puuttuu:", + "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s", + "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s", + "Path to JSON config file": "JSON-asetustiedoston polku", + "Show help": "Näytä ohje", + "Show version number": "Näytä versionumero", + "Did you mean %s?": "Tarkoititko %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat", + "Positionals:": "Sijaintiparametrit:", + "command": "komento" +} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json new file mode 100644 index 000000000..edd743f0c --- /dev/null +++ b/node_modules/yargs/locales/fr.json @@ -0,0 +1,53 @@ +{ + "Commands:": "Commandes :", + "Options:": "Options :", + "Examples:": "Exemples :", + "boolean": "booléen", + "count": "compteur", + "string": "chaîne de caractères", + "number": "nombre", + "array": "tableau", + "required": "requis", + "default": "défaut", + "default:": "défaut :", + "choices:": "choix :", + "aliases:": "alias :", + "generated-value": "valeur générée", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s", + "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s", + "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s" + }, + "Missing argument value: %s": { + "one": "Argument manquant : %s", + "other": "Arguments manquants : %s" + }, + "Missing required argument: %s": { + "one": "Argument requis manquant : %s", + "other": "Arguments requis manquants : %s" + }, + "Unknown argument: %s": { + "one": "Argument inconnu : %s", + "other": "Arguments inconnus : %s" + }, + "Unknown command: %s": { + "one": "Commande inconnue : %s", + "other": "Commandes inconnues : %s" + }, + "Invalid values:": "Valeurs invalides :", + "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s", + "Argument check failed: %s": "Echec de la vérification de l'argument : %s", + "Implications failed:": "Arguments dépendants manquants :", + "Not enough arguments following: %s": "Pas assez d'arguments après : %s", + "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s", + "Path to JSON config file": "Chemin du fichier de configuration JSON", + "Show help": "Affiche l'aide", + "Show version number": "Affiche le numéro de version", + "Did you mean %s?": "Vouliez-vous dire %s ?", + "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs", + "Positionals:": "Arguments positionnels :", + "command": "commande" +} diff --git a/node_modules/yargs/locales/he.json b/node_modules/yargs/locales/he.json new file mode 100644 index 000000000..947cc8870 --- /dev/null +++ b/node_modules/yargs/locales/he.json @@ -0,0 +1,55 @@ +{ + "Commands:": "פקודות:", + "Options:": "אופציות:", + "Examples:": "דוגמות:", + "boolean": "בוליאני", + "count": "ספירה", + "string": "מחרוזת", + "number": "מספר", + "array": "מערך", + "required": "דרוש", + "default": "ברירת מחדל", + "default:": "ברירת מחדל:", + "choices:": "בחירות:", + "aliases:": "כינויים:", + "generated-value": "ערך-שנוצר", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "אין מספיק טיעונים שאינם אופציונלים: קיבל %s, צריך לפחות %s", + "other": "אין מספיק טיעונים שאינם אופציונלים: קיבל %s, צריך לפחות %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "יותר מדי טיעונים שאינם אופציונלים: קיבל %s, מקסימום של %s", + "other": "יותר מדי טיעונים שאינם אופציונלים: קיבל %s, מקסימום של %s" + }, + "Missing argument value: %s": { + "one": "חסר ערך הטענה: %s", + "other": "חסרים ערכי הטענה: %s" + }, + "Missing required argument: %s": { + "one": "חסר טענה דרושה: %s", + "other": "חסרות טענות דרושות: %s" + }, + "Unknown argument: %s": { + "one": "טענה לא ידוע: %s", + "other": "טענות לא ידועות: %s" + }, + "Unknown command: %s": { + "one": "פקודת לא ידועה: %s", + "other": "פקודות לא ידועות: %s" + }, + "Invalid values:": "ערכים לא חוקיים:", + "Argument: %s, Given: %s, Choices: %s": "טענות: %s, ניתנו: %s, בחירות: %s", + "Argument check failed: %s": "בדיקת הטענה נכשלה: %s", + "Implications failed:": "חסרים טיעונים תלויים:", + "Not enough arguments following: %s": "אין מספיק טיעונים לאחר: %s", + "Invalid JSON config file: %s": "קובץ תצורה לא תקין של JSON: %s", + "Path to JSON config file": "נתיב לקובץ התצורה של JSON", + "Show help": "הצג עזרה", + "Show version number": "הצג מספר גרסה", + "Did you mean %s?": "האם התכוונת ל- %s?", + "Arguments %s and %s are mutually exclusive" : "טענות %s ו- %s סותרים זה את זה", + "Positionals:": "עמדות:", + "command": "פקודה", + "deprecated": "הוצא משימוש", + "deprecated: %s": "הוצא משימוש: %s" +} diff --git a/node_modules/yargs/locales/hi.json b/node_modules/yargs/locales/hi.json new file mode 100644 index 000000000..a9de77cce --- /dev/null +++ b/node_modules/yargs/locales/hi.json @@ -0,0 +1,49 @@ +{ + "Commands:": "आदेश:", + "Options:": "विकल्प:", + "Examples:": "उदाहरण:", + "boolean": "सत्यता", + "count": "संख्या", + "string": "वर्णों का तार ", + "number": "अंक", + "array": "सरणी", + "required": "आवश्यक", + "default": "डिफॉल्ट", + "default:": "डिफॉल्ट:", + "choices:": "विकल्प:", + "aliases:": "उपनाम:", + "generated-value": "उत्पन्न-मूल्य", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", + "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", + "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य" + }, + "Missing argument value: %s": { + "one": "कुछ तर्को के मूल्य गुम हैं: %s", + "other": "कुछ तर्को के मूल्य गुम हैं: %s" + }, + "Missing required argument: %s": { + "one": "आवश्यक तर्क गुम हैं: %s", + "other": "आवश्यक तर्क गुम हैं: %s" + }, + "Unknown argument: %s": { + "one": "अज्ञात तर्क प्राप्त: %s", + "other": "अज्ञात तर्क प्राप्त: %s" + }, + "Invalid values:": "अमान्य मूल्य:", + "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", + "Argument check failed: %s": "तर्क जांच विफल: %s", + "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", + "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", + "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", + "Path to JSON config file": "JSON config फाइल का पथ", + "Show help": "सहायता दिखाएँ", + "Show version number": "Version संख्या दिखाएँ", + "Did you mean %s?": "क्या आपका मतलब है %s?", + "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", + "Positionals:": "स्थानीय:", + "command": "आदेश" +} diff --git a/node_modules/yargs/locales/hu.json b/node_modules/yargs/locales/hu.json new file mode 100644 index 000000000..21492d05a --- /dev/null +++ b/node_modules/yargs/locales/hu.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Parancsok:", + "Options:": "Opciók:", + "Examples:": "Példák:", + "boolean": "boolean", + "count": "számláló", + "string": "szöveg", + "number": "szám", + "array": "tömb", + "required": "kötelező", + "default": "alapértelmezett", + "default:": "alapértelmezett:", + "choices:": "lehetőségek:", + "aliases:": "aliaszok:", + "generated-value": "generált-érték", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", + "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", + "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet" + }, + "Missing argument value: %s": { + "one": "Hiányzó argumentum érték: %s", + "other": "Hiányzó argumentum értékek: %s" + }, + "Missing required argument: %s": { + "one": "Hiányzó kötelező argumentum: %s", + "other": "Hiányzó kötelező argumentumok: %s" + }, + "Unknown argument: %s": { + "one": "Ismeretlen argumentum: %s", + "other": "Ismeretlen argumentumok: %s" + }, + "Invalid values:": "Érvénytelen érték:", + "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", + "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", + "Implications failed:": "Implikációk sikertelenek:", + "Not enough arguments following: %s": "Nem elég argumentum követi: %s", + "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", + "Path to JSON config file": "JSON konfigurációs file helye", + "Show help": "Súgo megjelenítése", + "Show version number": "Verziószám megjelenítése", + "Did you mean %s?": "Erre gondoltál %s?" +} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json new file mode 100644 index 000000000..125867cbb --- /dev/null +++ b/node_modules/yargs/locales/id.json @@ -0,0 +1,50 @@ + +{ + "Commands:": "Perintah:", + "Options:": "Pilihan:", + "Examples:": "Contoh:", + "boolean": "boolean", + "count": "jumlah", + "number": "nomor", + "string": "string", + "array": "larik", + "required": "diperlukan", + "default": "bawaan", + "default:": "bawaan:", + "aliases:": "istilah lain:", + "choices:": "pilihan:", + "generated-value": "nilai-yang-dihasilkan", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumen wajib kurang: hanya %s, minimal %s", + "other": "Argumen wajib kurang: hanya %s, minimal %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s", + "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s" + }, + "Missing argument value: %s": { + "one": "Kurang argumen: %s", + "other": "Kurang argumen: %s" + }, + "Missing required argument: %s": { + "one": "Kurang argumen wajib: %s", + "other": "Kurang argumen wajib: %s" + }, + "Unknown argument: %s": { + "one": "Argumen tak diketahui: %s", + "other": "Argumen tak diketahui: %s" + }, + "Invalid values:": "Nilai-nilai tidak valid:", + "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", + "Argument check failed: %s": "Pemeriksaan argument gagal: %s", + "Implications failed:": "Implikasi gagal:", + "Not enough arguments following: %s": "Kurang argumen untuk: %s", + "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", + "Path to JSON config file": "Alamat berkas konfigurasi JSON", + "Show help": "Lihat bantuan", + "Show version number": "Lihat nomor versi", + "Did you mean %s?": "Maksud Anda: %s?", + "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", + "Positionals:": "Posisional-posisional:", + "command": "perintah" +} diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json new file mode 100644 index 000000000..fde575618 --- /dev/null +++ b/node_modules/yargs/locales/it.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Comandi:", + "Options:": "Opzioni:", + "Examples:": "Esempi:", + "boolean": "booleano", + "count": "contatore", + "string": "stringa", + "number": "numero", + "array": "vettore", + "required": "richiesto", + "default": "predefinito", + "default:": "predefinito:", + "choices:": "scelte:", + "aliases:": "alias:", + "generated-value": "valore generato", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", + "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", + "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s" + }, + "Missing argument value: %s": { + "one": "Argomento mancante: %s", + "other": "Argomenti mancanti: %s" + }, + "Missing required argument: %s": { + "one": "Argomento richiesto mancante: %s", + "other": "Argomenti richiesti mancanti: %s" + }, + "Unknown argument: %s": { + "one": "Argomento sconosciuto: %s", + "other": "Argomenti sconosciuti: %s" + }, + "Invalid values:": "Valori non validi:", + "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", + "Argument check failed: %s": "Controllo dell'argomento fallito: %s", + "Implications failed:": "Argomenti dipendenti mancanti:", + "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", + "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", + "Path to JSON config file": "Percorso del file di configurazione JSON", + "Show help": "Mostra la schermata di aiuto", + "Show version number": "Mostra il numero di versione", + "Did you mean %s?": "Intendi forse %s?" +} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json new file mode 100644 index 000000000..3954ae68f --- /dev/null +++ b/node_modules/yargs/locales/ja.json @@ -0,0 +1,51 @@ +{ + "Commands:": "コマンド:", + "Options:": "オプション:", + "Examples:": "例:", + "boolean": "真偽", + "count": "カウント", + "string": "文字列", + "number": "数値", + "array": "配列", + "required": "必須", + "default": "デフォルト", + "default:": "デフォルト:", + "choices:": "選択してください:", + "aliases:": "エイリアス:", + "generated-value": "生成された値", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", + "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", + "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:" + }, + "Missing argument value: %s": { + "one": "引数の値が見つかりません: %s", + "other": "引数の値が見つかりません: %s" + }, + "Missing required argument: %s": { + "one": "必須の引数が見つかりません: %s", + "other": "必須の引数が見つかりません: %s" + }, + "Unknown argument: %s": { + "one": "未知の引数です: %s", + "other": "未知の引数です: %s" + }, + "Invalid values:": "不正な値です:", + "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s", + "Argument check failed: %s": "引数のチェックに失敗しました: %s", + "Implications failed:": "オプションの組み合わせで不正が生じました:", + "Not enough arguments following: %s": "次の引数が不足しています。: %s", + "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", + "Path to JSON config file": "JSONの設定ファイルまでのpath", + "Show help": "ヘルプを表示", + "Show version number": "バージョンを表示", + "Did you mean %s?": "もしかして %s?", + "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", + "Positionals:": "位置:", + "command": "コマンド", + "deprecated": "非推奨", + "deprecated: %s": "非推奨: %s" +} diff --git a/node_modules/yargs/locales/ka.json b/node_modules/yargs/locales/ka.json new file mode 100644 index 000000000..57cf3b89a --- /dev/null +++ b/node_modules/yargs/locales/ka.json @@ -0,0 +1,55 @@ +{ + "Commands:": "ბრძანებები:", + "Options:": "მორგება:", + "Examples:": "მაგალითები:", + "boolean": "ლოგიკური", + "count": "დათვლა", + "string": "სტრიქონი", + "number": "რიცხვი", + "array": "მასივი", + "required": "აუცილებელია", + "default": "ნაგულისხმევი", + "default:": "ნაგულისხმევი:", + "choices:": "არჩევნები:", + "aliases:": "ფსევდონიმები:", + "generated-value": "დაგენერირებული-მნიშვნელობა", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "არასაკმარისი არაპარამეტრული არგუმენტი: მაქვს %s, საჭიროა სულ ცოტა %s", + "other": "არასაკმარისი არაპარამეტრული არგუმენტები: მაქვს %s, საჭიროა სულ ცოტა %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "მეტისმეტად ბევრი არაპარამეტრული არგუმენტი: მაქვს %s, მაქსიმუმია %s", + "other": "მეტისმეტად ბევრი არაპარამეტრული არგუმენტები: მაქვს %s, მაქსიმუმია %s" + }, + "Missing argument value: %s": { + "one": "აკლია არგუმენტის მნიშვნელობა: %s", + "other": "აკლია არგუმენტის მნიშვნელობა: %s" + }, + "Missing required argument: %s": { + "one": "აკლია აუცილებელი არგუმენტი: %s", + "other": "აკლია აუცილებელი არგუმენტი: %s" + }, + "Unknown argument: %s": { + "one": "უცნობი არგუმენტი: %s", + "other": "უცნობი არგუმენტები: %s" + }, + "Unknown command: %s": { + "one": "უცნობი ბრძანება: %s", + "other": "უცნობი ბრძანებები: %s" + }, + "Invalid values:": "არასწორი მნიშვნელობები:", + "Argument: %s, Given: %s, Choices: %s": "არგუმენტი: %s, მითითებულია: %s, არჩევანი: %s", + "Argument check failed: %s": "არგუმენტის შემოწმება ჩავარდა: %s", + "Implications failed:": "ამ არგუმენტს დამატებითი არგუმენტი სჭირდება:", + "Not enough arguments following: %s": "არასაკმარისი არგუმენტები მოჰყვება: %s", + "Invalid JSON config file: %s": "არასწორი JSON კონფიგურაციის ფაილი: %s", + "Path to JSON config file": "ბილიკი JSON კონფიგურაციის ფაილამდე", + "Show help": "დახმარების ჩვენება", + "Show version number": "ვერსიის ნომრის ჩვენება", + "Did you mean %s?": "გულისხმობდით %s?", + "Arguments %s and %s are mutually exclusive": "არგუმენტები %s და %s ურთიერთგამომრიცხავია", + "Positionals:": "პოზიციური არგუმენტები:", + "command": "ბრძანება", + "deprecated": "მოძველებულია", + "deprecated: %s": "მოძველებულია: %s" +} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json new file mode 100644 index 000000000..746bc89fe --- /dev/null +++ b/node_modules/yargs/locales/ko.json @@ -0,0 +1,49 @@ +{ + "Commands:": "명령:", + "Options:": "옵션:", + "Examples:": "예시:", + "boolean": "불리언", + "count": "개수", + "string": "문자열", + "number": "숫자", + "array": "배열", + "required": "필수", + "default": "기본값", + "default:": "기본값:", + "choices:": "선택지:", + "aliases:": "별칭:", + "generated-value": "생성된 값", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요", + "other": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능", + "other": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능" + }, + "Missing argument value: %s": { + "one": "인수가 주어지지 않았습니다: %s", + "other": "인수가 주어지지 않았습니다: %s" + }, + "Missing required argument: %s": { + "one": "필수 인수가 주어지지 않았습니다: %s", + "other": "필수 인수가 주어지지 않았습니다: %s" + }, + "Unknown argument: %s": { + "one": "알 수 없는 인수입니다: %s", + "other": "알 수 없는 인수입니다: %s" + }, + "Invalid values:": "유효하지 않은 값:", + "Argument: %s, Given: %s, Choices: %s": "인수: %s, 주어진 값: %s, 선택지: %s", + "Argument check failed: %s": "인수 체크에 실패했습니다: %s", + "Implications failed:": "주어진 인수에 필요한 추가 인수가 주어지지 않았습니다:", + "Not enough arguments following: %s": "다음 인수가 주어지지 않았습니다: %s", + "Invalid JSON config file: %s": "유효하지 않은 JSON 설정 파일: %s", + "Path to JSON config file": "JSON 설정 파일 경로", + "Show help": "도움말 표시", + "Show version number": "버전 표시", + "Did you mean %s?": "%s을(를) 찾으시나요?", + "Arguments %s and %s are mutually exclusive" : "인수 %s과(와) %s은(는) 동시에 지정할 수 없습니다", + "Positionals:": "위치:", + "command": "명령" +} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json new file mode 100644 index 000000000..6f410ed09 --- /dev/null +++ b/node_modules/yargs/locales/nb.json @@ -0,0 +1,44 @@ +{ + "Commands:": "Kommandoer:", + "Options:": "Alternativer:", + "Examples:": "Eksempler:", + "boolean": "boolsk", + "count": "antall", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default": "standard", + "default:": "standard:", + "choices:": "valg:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", + "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", + "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Mangler argument verdi: %s", + "other": "Mangler argument verdier: %s" + }, + "Missing required argument: %s": { + "one": "Mangler obligatorisk argument: %s", + "other": "Mangler obligatoriske argumenter: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjente argumenter: %s" + }, + "Invalid values:": "Ugyldige verdier:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", + "Argument check failed: %s": "Argumentsjekk mislyktes: %s", + "Implications failed:": "Konsekvensene mislyktes:", + "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json new file mode 100644 index 000000000..9ff95c559 --- /dev/null +++ b/node_modules/yargs/locales/nl.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Commando's:", + "Options:": "Opties:", + "Examples:": "Voorbeelden:", + "boolean": "booleaans", + "count": "aantal", + "string": "string", + "number": "getal", + "array": "lijst", + "required": "verplicht", + "default": "standaard", + "default:": "standaard:", + "choices:": "keuzes:", + "aliases:": "aliassen:", + "generated-value": "gegenereerde waarde", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", + "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", + "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s" + }, + "Missing argument value: %s": { + "one": "Missende argumentwaarde: %s", + "other": "Missende argumentwaarden: %s" + }, + "Missing required argument: %s": { + "one": "Missend verplicht argument: %s", + "other": "Missende verplichte argumenten: %s" + }, + "Unknown argument: %s": { + "one": "Onbekend argument: %s", + "other": "Onbekende argumenten: %s" + }, + "Invalid values:": "Ongeldige waarden:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", + "Argument check failed: %s": "Argumentcontrole mislukt: %s", + "Implications failed:": "Ontbrekende afhankelijke argumenten:", + "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", + "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", + "Path to JSON config file": "Pad naar JSON-config-bestand", + "Show help": "Toon help", + "Show version number": "Toon versienummer", + "Did you mean %s?": "Bedoelde u misschien %s?", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", + "Positionals:": "Positie-afhankelijke argumenten", + "command": "commando" +} diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json new file mode 100644 index 000000000..24479ac94 --- /dev/null +++ b/node_modules/yargs/locales/nn.json @@ -0,0 +1,44 @@ +{ + "Commands:": "Kommandoar:", + "Options:": "Alternativ:", + "Examples:": "Døme:", + "boolean": "boolsk", + "count": "mengd", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default": "standard", + "default:": "standard:", + "choices:": "val:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", + "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s", + "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Manglar argumentverdi: %s", + "other": "Manglar argumentverdiar: %s" + }, + "Missing required argument: %s": { + "one": "Manglar obligatorisk argument: %s", + "other": "Manglar obligatoriske argument: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjende argument: %s" + }, + "Invalid values:": "Ugyldige verdiar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", + "Argument check failed: %s": "Argumentsjekk mislukkast: %s", + "Implications failed:": "Konsekvensane mislukkast:", + "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json new file mode 100644 index 000000000..dcb5cb753 --- /dev/null +++ b/node_modules/yargs/locales/pirate.json @@ -0,0 +1,13 @@ +{ + "Commands:": "Choose yer command:", + "Options:": "Options for me hearties!", + "Examples:": "Ex. marks the spot:", + "required": "requi-yar-ed", + "Missing required argument: %s": { + "one": "Ye be havin' to set the followin' argument land lubber: %s", + "other": "Ye be havin' to set the followin' arguments land lubber: %s" + }, + "Show help": "Parlay this here code of conduct", + "Show version number": "'Tis the version ye be askin' fer", + "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" +} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json new file mode 100644 index 000000000..a41d4bd50 --- /dev/null +++ b/node_modules/yargs/locales/pl.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Polecenia:", + "Options:": "Opcje:", + "Examples:": "Przykłady:", + "boolean": "boolean", + "count": "ilość", + "string": "ciąg znaków", + "number": "liczba", + "array": "tablica", + "required": "wymagany", + "default": "domyślny", + "default:": "domyślny:", + "choices:": "dostępne:", + "aliases:": "aliasy:", + "generated-value": "wygenerowana-wartość", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", + "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", + "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s" + }, + "Missing argument value: %s": { + "one": "Brak wartości dla argumentu: %s", + "other": "Brak wartości dla argumentów: %s" + }, + "Missing required argument: %s": { + "one": "Brak wymaganego argumentu: %s", + "other": "Brak wymaganych argumentów: %s" + }, + "Unknown argument: %s": { + "one": "Nieznany argument: %s", + "other": "Nieznane argumenty: %s" + }, + "Invalid values:": "Nieprawidłowe wartości:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", + "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", + "Implications failed:": "Założenia nie zostały spełnione:", + "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", + "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", + "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", + "Show help": "Pokaż pomoc", + "Show version number": "Pokaż numer wersji", + "Did you mean %s?": "Czy chodziło Ci o %s?", + "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", + "Positionals:": "Pozycyjne:", + "command": "polecenie" +} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json new file mode 100644 index 000000000..0c8ac99c8 --- /dev/null +++ b/node_modules/yargs/locales/pt.json @@ -0,0 +1,45 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "boolean", + "count": "contagem", + "string": "cadeia de caracteres", + "number": "número", + "array": "arranjo", + "required": "requerido", + "default": "padrão", + "default:": "padrão:", + "choices:": "escolhas:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", + "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", + "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s" + }, + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", + "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", + "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", + "Show help": "Mostra ajuda", + "Show version number": "Mostra número de versão", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" +} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json new file mode 100644 index 000000000..eae1ec60d --- /dev/null +++ b/node_modules/yargs/locales/pt_BR.json @@ -0,0 +1,48 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "booleano", + "count": "contagem", + "string": "string", + "number": "número", + "array": "array", + "required": "obrigatório", + "default:": "padrão:", + "choices:": "opções:", + "aliases:": "sinônimos:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", + "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Excesso de argumentos: recebido %s, máximo de %s", + "other": "Excesso de argumentos: recebido %s, máximo de %s" + }, + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", + "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", + "Path to JSON config file": "Caminho para o arquivo JSON de configuração", + "Show help": "Exibe ajuda", + "Show version number": "Exibe a versão", + "Did you mean %s?": "Você quis dizer %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", + "Positionals:": "Posicionais:", + "command": "comando" +} diff --git a/node_modules/yargs/locales/ru.json b/node_modules/yargs/locales/ru.json new file mode 100644 index 000000000..d5c9e323b --- /dev/null +++ b/node_modules/yargs/locales/ru.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Команды:", + "Options:": "Опции:", + "Examples:": "Примеры:", + "boolean": "булевый тип", + "count": "подсчет", + "string": "строковой тип", + "number": "число", + "array": "массив", + "required": "необходимо", + "default": "по умолчанию", + "default:": "по умолчанию:", + "choices:": "возможности:", + "aliases:": "алиасы:", + "generated-value": "генерированное значение", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", + "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", + "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s" + }, + "Missing argument value: %s": { + "one": "Не хватает значения аргумента: %s", + "other": "Не хватает значений аргументов: %s" + }, + "Missing required argument: %s": { + "one": "Не хватает необходимого аргумента: %s", + "other": "Не хватает необходимых аргументов: %s" + }, + "Unknown argument: %s": { + "one": "Неизвестный аргумент: %s", + "other": "Неизвестные аргументы: %s" + }, + "Invalid values:": "Недействительные значения:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", + "Argument check failed: %s": "Проверка аргументов не удалась: %s", + "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", + "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", + "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", + "Path to JSON config file": "Путь к файлу конфигурации JSON", + "Show help": "Показать помощь", + "Show version number": "Показать номер версии", + "Did you mean %s?": "Вы имели в виду %s?", + "Arguments %s and %s are mutually exclusive": "Аргументы %s и %s являются взаимоисключающими", + "Positionals:": "Позиционные аргументы:", + "command": "команда", + "deprecated": "устар.", + "deprecated: %s": "устар.: %s" +} diff --git a/node_modules/yargs/locales/th.json b/node_modules/yargs/locales/th.json new file mode 100644 index 000000000..33b048e2a --- /dev/null +++ b/node_modules/yargs/locales/th.json @@ -0,0 +1,46 @@ +{ + "Commands:": "คอมมาน", + "Options:": "ออฟชั่น", + "Examples:": "ตัวอย่าง", + "boolean": "บูลีน", + "count": "นับ", + "string": "สตริง", + "number": "ตัวเลข", + "array": "อาเรย์", + "required": "จำเป็น", + "default": "ค่าเริ่มต้", + "default:": "ค่าเริ่มต้น", + "choices:": "ตัวเลือก", + "aliases:": "เอเลียส", + "generated-value": "ค่าที่ถูกสร้างขึ้น", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", + "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", + "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า" + }, + "Missing argument value: %s": { + "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", + "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" + }, + "Missing required argument: %s": { + "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", + "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" + }, + "Unknown argument: %s": { + "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", + "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" + }, + "Invalid values:": "ค่าไม่ถูกต้อง:", + "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", + "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", + "Implications failed:": "Implications ไม่สำเร็จ:", + "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", + "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", + "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", + "Show help": "ขอความช่วยเหลือ", + "Show version number": "แสดงตัวเลขเวอร์ชั่น", + "Did you mean %s?": "คุณหมายถึง %s?" +} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json new file mode 100644 index 000000000..0d0d2ccd8 --- /dev/null +++ b/node_modules/yargs/locales/tr.json @@ -0,0 +1,48 @@ +{ + "Commands:": "Komutlar:", + "Options:": "Seçenekler:", + "Examples:": "Örnekler:", + "boolean": "boolean", + "count": "sayı", + "string": "string", + "number": "numara", + "array": "array", + "required": "zorunlu", + "default": "varsayılan", + "default:": "varsayılan:", + "choices:": "seçimler:", + "aliases:": "takma adlar:", + "generated-value": "oluşturulan-değer", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", + "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", + "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s" + }, + "Missing argument value: %s": { + "one": "Eksik argüman değeri: %s", + "other": "Eksik argüman değerleri: %s" + }, + "Missing required argument: %s": { + "one": "Eksik zorunlu argüman: %s", + "other": "Eksik zorunlu argümanlar: %s" + }, + "Unknown argument: %s": { + "one": "Bilinmeyen argüman: %s", + "other": "Bilinmeyen argümanlar: %s" + }, + "Invalid values:": "Geçersiz değerler:", + "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", + "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", + "Implications failed:": "Sonuçlar başarısız oldu:", + "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", + "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", + "Path to JSON config file": "JSON yapılandırma dosya konumu", + "Show help": "Yardım detaylarını göster", + "Show version number": "Versiyon detaylarını göster", + "Did you mean %s?": "Bunu mu demek istediniz: %s?", + "Positionals:": "Sıralılar:", + "command": "komut" +} diff --git a/node_modules/yargs/locales/uk_UA.json b/node_modules/yargs/locales/uk_UA.json new file mode 100644 index 000000000..0af0e99cb --- /dev/null +++ b/node_modules/yargs/locales/uk_UA.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Команди:", + "Options:": "Опції:", + "Examples:": "Приклади:", + "boolean": "boolean", + "count": "кількість", + "string": "строка", + "number": "число", + "array": "масива", + "required": "обов'язково", + "default": "за замовчуванням", + "default:": "за замовчуванням:", + "choices:": "доступні варіанти:", + "aliases:": "псевдоніми:", + "generated-value": "згенероване значення", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недостатньо аргументів: наразі %s, потрібно %s або більше", + "other": "Недостатньо аргументів: наразі %s, потрібно %s або більше" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Забагато аргументів: наразі %s, максимум %s", + "other": "Too many non-option arguments: наразі %s, максимум of %s" + }, + "Missing argument value: %s": { + "one": "Відсутнє значення для аргументу: %s", + "other": "Відсутні значення для аргументу: %s" + }, + "Missing required argument: %s": { + "one": "Відсутній обов'язковий аргумент: %s", + "other": "Відсутні обов'язкові аргументи: %s" + }, + "Unknown argument: %s": { + "one": "Аргумент %s не підтримується", + "other": "Аргументи %s не підтримуються" + }, + "Invalid values:": "Некоректні значення:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Введено: %s, Доступні варіанти: %s", + "Argument check failed: %s": "Аргумент не пройшов перевірку: %s", + "Implications failed:": "Відсутні залежні аргументи:", + "Not enough arguments following: %s": "Не достатньо аргументів після: %s", + "Invalid JSON config file: %s": "Некоректний JSON-файл конфігурації: %s", + "Path to JSON config file": "Шлях до JSON-файлу конфігурації", + "Show help": "Показати довідку", + "Show version number": "Показати версію", + "Did you mean %s?": "Можливо, ви мали на увазі %s?", + "Arguments %s and %s are mutually exclusive" : "Аргументи %s та %s взаємовиключні", + "Positionals:": "Позиційні:", + "command": "команда", + "deprecated": "застарілий", + "deprecated: %s": "застарілий: %s" +} diff --git a/node_modules/yargs/locales/uz.json b/node_modules/yargs/locales/uz.json new file mode 100644 index 000000000..0d0716819 --- /dev/null +++ b/node_modules/yargs/locales/uz.json @@ -0,0 +1,52 @@ +{ + "Commands:": "Buyruqlar:", + "Options:": "Imkoniyatlar:", + "Examples:": "Misollar:", + "boolean": "boolean", + "count": "sanoq", + "string": "satr", + "number": "raqam", + "array": "massiv", + "required": "majburiy", + "default": "boshlang'ich", + "default:": "boshlang'ich:", + "choices:": "tanlovlar:", + "aliases:": "taxalluslar:", + "generated-value": "yaratilgan-qiymat", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s", + "other": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "No-imkoniyat argumentlar juda ko'p: berilgan %s, maksimum %s", + "other": "No-imkoniyat argumentlar juda ko'p: got %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Argument qiymati berilmagan: %s", + "other": "Argument qiymatlari berilmagan: %s" + }, + "Missing required argument: %s": { + "one": "Majburiy argument berilmagan: %s", + "other": "Majburiy argumentlar berilmagan: %s" + }, + "Unknown argument: %s": { + "one": "Noma'lum argument berilmagan: %s", + "other": "Noma'lum argumentlar berilmagan: %s" + }, + "Invalid values:": "Nosoz qiymatlar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Berilgan: %s, Tanlovlar: %s", + "Argument check failed: %s": "Muvaffaqiyatsiz argument tekshiruvi: %s", + "Implications failed:": "Bog'liq argumentlar berilmagan:", + "Not enough arguments following: %s": "Quyidagi argumentlar yetarli emas: %s", + "Invalid JSON config file: %s": "Nosoz JSON konfiguratsiya fayli: %s", + "Path to JSON config file": "JSON konfiguratsiya fayli joylashuvi", + "Show help": "Yordam ko'rsatish", + "Show version number": "Versiyani ko'rsatish", + "Did you mean %s?": "%s ni nazarda tutyapsizmi?", + "Arguments %s and %s are mutually exclusive" : "%s va %s argumentlari alohida", + "Positionals:": "Positsionallar:", + "command": "buyruq", + "deprecated": "eskirgan", + "deprecated: %s": "eskirgan: %s" + } + \ No newline at end of file diff --git a/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs/locales/zh_CN.json new file mode 100644 index 000000000..257d26bab --- /dev/null +++ b/node_modules/yargs/locales/zh_CN.json @@ -0,0 +1,48 @@ +{ + "Commands:": "命令:", + "Options:": "选项:", + "Examples:": "示例:", + "boolean": "布尔", + "count": "计数", + "string": "字符串", + "number": "数字", + "array": "数组", + "required": "必需", + "default": "默认值", + "default:": "默认值:", + "choices:": "可选值:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", + "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", + "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个" + }, + "Missing argument value: %s": { + "one": "没有给此选项指定值:%s", + "other": "没有给这些选项指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必须的选项:%s", + "other": "缺少这些必须的选项:%s" + }, + "Unknown argument: %s": { + "one": "无法识别的选项:%s", + "other": "无法识别这些选项:%s" + }, + "Invalid values:": "无效的选项值:", + "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", + "Argument check failed: %s": "选项值验证失败:%s", + "Implications failed:": "缺少依赖的选项:", + "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", + "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", + "Path to JSON config file": "JSON 配置文件的路径", + "Show help": "显示帮助信息", + "Show version number": "显示版本号", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", + "Positionals:": "位置:", + "command": "命令" +} diff --git a/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs/locales/zh_TW.json new file mode 100644 index 000000000..e38495d3a --- /dev/null +++ b/node_modules/yargs/locales/zh_TW.json @@ -0,0 +1,51 @@ +{ + "Commands:": "命令:", + "Options:": "選項:", + "Examples:": "範例:", + "boolean": "布林", + "count": "次數", + "string": "字串", + "number": "數字", + "array": "陣列", + "required": "必填", + "default": "預設值", + "default:": "預設值:", + "choices:": "可選值:", + "aliases:": "別名:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", + "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", + "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個" + }, + "Missing argument value: %s": { + "one": "此引數無指定值:%s", + "other": "這些引數無指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必須的引數:%s", + "other": "缺少這些必須的引數:%s" + }, + "Unknown argument: %s": { + "one": "未知的引數:%s", + "other": "未知的引數:%s" + }, + "Invalid values:": "無效的選項值:", + "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", + "Argument check failed: %s": "引數驗證失敗:%s", + "Implications failed:": "缺少依賴引數:", + "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", + "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", + "Path to JSON config file": "JSON 設置文件的路徑", + "Show help": "顯示說明", + "Show version number": "顯示版本", + "Did you mean %s?": "您是指 %s 嗎?", + "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 互斥", + "Positionals:": "位置:", + "command": "命令", + "deprecated": "已淘汰", + "deprecated: %s": "已淘汰:%s" + } diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json new file mode 100644 index 000000000..e30bd8626 --- /dev/null +++ b/node_modules/yargs/package.json @@ -0,0 +1,103 @@ +{ + "name": "yargs", + "version": "18.2.0", + "description": "yargs the modern, pirate-themed, successor to optimist.", + "main": "./index.mjs", + "exports": { + "./package.json": "./package.json", + "./helpers": "./helpers/helpers.mjs", + "./browser": { + "types": "./browser.d.ts", + "import": "./browser.mjs" + }, + ".": "./index.mjs", + "./yargs": "./index.mjs" + }, + "type": "module", + "module": "./index.mjs", + "contributors": [ + { + "name": "Yargs Contributors", + "url": "https://github.com/yargs/yargs/graphs/contributors" + } + ], + "files": [ + "browser.mjs", + "browser.d.ts", + "helpers/*.js", + "helpers/*", + "index.mjs", + "build", + "locales", + "LICENSE", + "lib/platform-shims/*.mjs", + "!*.d.ts", + "!**/*.d.ts" + ], + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "devDependencies": { + "@babel/eslint-parser": "^7.26.10", + "@babel/preset-typescript": "^7.26.0", + "@types/chai": "^5.2.3", + "@types/mocha": "^9.0.0", + "@types/node": "^20.0.0", + "@typescript-eslint/eslint-plugin": "^8.26.1", + "browserslist-generator": "^3.0.0", + "c8": "^11.0.0", + "chai": "^6.2.2", + "chalk": "^5.6.2", + "cpr": "^3.0.1", + "cross-env": "^10.0.0", + "cross-spawn": "^7.0.6", + "eslint": "^8.57.1", + "eslint-plugin-prettier": "^5.1.2", + "gts": "^5.3.1", + "hashish": "0.0.4", + "mocha": "^11.7.6", + "rimraf": "^3.0.2", + "typescript": "^5.9.3", + "which": "^2.0.2", + "yargs-test-extends": "^1.0.1" + }, + "scripts": { + "fix": "gts fix && npm run fix:js", + "fix:js": "eslint . --ext mjs --ext js --fix", + "posttest": "npm run check", + "test": "c8 mocha --enable-source-maps ./test/*.mjs --require ./test/before.mjs --timeout=24000 --check-leaks", + "test:esm": "c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks", + "coverage": "c8 report --check-coverage", + "prepare": "npm run compile", + "pretest": "npm run compile -- -p tsconfig.test.json", + "compile": "rimraf build && tsc", + "check": "gts lint && npm run check:js", + "check:js": "eslint . --ext mjs --ext js", + "clean": "gts clean", + "watch": "rimraf build && npm:watch:tsc", + "watch:tsc": "tsc --watch" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs.git" + }, + "homepage": "https://yargs.js.org/", + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } +} diff --git a/package-lock.json b/package-lock.json index 4ea57be3a..69f5517dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,28 @@ { - "name": "yv-1461", + "name": "yieldvault-rwa", "lockfileVersion": 3, "requires": true, "packages": { "": { + "name": "yieldvault-rwa", + "license": "MIT", "devDependencies": { "@commitlint/cli": "^21.2.3", + "concurrently": "^9.1.2", "husky": "^9.1.7", "jsdom": "^29.1.1", + "license-checker": "^25.0.1", "lint-staged": "^17.6.0", "tsx": "^4.0.0", "vitest": "^4.1.5" + }, + "engines": { + "node": ">=20", + "pnpm": ">=9.12" } }, "node_modules/@asamuzakjp/css-color": { "version": "5.1.11", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", - "integrity": "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==", "dev": true, "license": "MIT", "dependencies": { @@ -32,8 +38,6 @@ }, "node_modules/@asamuzakjp/dom-selector": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz", - "integrity": "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==", "dev": true, "license": "MIT", "dependencies": { @@ -49,8 +53,6 @@ }, "node_modules/@asamuzakjp/generational-cache": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz", - "integrity": "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==", "dev": true, "license": "MIT", "engines": { @@ -59,8 +61,6 @@ }, "node_modules/@asamuzakjp/nwsapi": { "version": "2.3.9", - "resolved": "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz", - "integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==", "dev": true, "license": "MIT" }, @@ -91,8 +91,6 @@ }, "node_modules/@bramus/specificity": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz", - "integrity": "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==", "dev": true, "license": "MIT", "dependencies": { @@ -354,22 +352,22 @@ } }, "node_modules/@conventional-changelog/git-client": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-3.1.2.tgz", - "integrity": "sha512-jZqwnJwf7nboIlAcw/mkOjVa6DexCcUOgT2oOQgkoi3z9vR8tGFkcMy2BFcYwjhL9sYcDDXkRQDayiDieCoW7A==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-3.2.0.tgz", + "integrity": "sha512-sD/E0vzpkoDz/dqM1Hhv0ihC4KBw6RXjefeO8SG1XrX+wGkMxe1pKeedkKDPCtr2JjuhbuS9aJNgOvnT8hbeBw==", "dev": true, "license": "MIT", "dependencies": { "@simple-libs/child-process-utils": "^2.0.0", "@simple-libs/stream-utils": "^2.0.0", - "semver": "^7.5.2" + "verkit": "^0.5.0" }, "engines": { "node": ">=22" }, "peerDependencies": { "conventional-commits-filter": "^6.0.1", - "conventional-commits-parser": "^7.1.2" + "conventional-commits-parser": "^7.1.3" }, "peerDependenciesMeta": { "conventional-commits-filter": { @@ -392,8 +390,6 @@ }, "node_modules/@csstools/color-helpers": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.0.tgz", - "integrity": "sha512-064IFJdjTfUqnjpCVpMOdbr8FLQBhinbZj6yRv2An2E41O/pLEXqfFRWqGq/SxlE5PEUYTlvWsG2r8MswAVvkg==", "dev": true, "funding": [ { @@ -412,8 +408,6 @@ }, "node_modules/@csstools/css-calc": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.2.1.tgz", - "integrity": "sha512-DtdHlgXh5ZkA43cwBcAm+huzgJiwx3ZTWVjBs94kwz2xKqSimDA3lBgCjphYgwgVUMWatSM0pDd8TILB1yrVVg==", "dev": true, "funding": [ { @@ -436,8 +430,6 @@ }, "node_modules/@csstools/css-color-parser": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.9.tgz", - "integrity": "sha512-paQcIaOO53Rk5+YrBaBjm/SgrV4INImjo2BT1DtQRYr+XeTRbeAYlS+jxXp9drqvKmtFnWRJKIalDLhZZDu42A==", "dev": true, "funding": [ { @@ -464,8 +456,6 @@ }, "node_modules/@csstools/css-parser-algorithms": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", - "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==", "dev": true, "funding": [ { @@ -478,6 +468,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" }, @@ -487,8 +478,6 @@ }, "node_modules/@csstools/css-syntax-patches-for-csstree": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.5.tgz", - "integrity": "sha512-oNjBvzLq2GPZtJphCjLqXow/cHySHSgtxvKZb7OqSZ/xHgw6NWNhfad+6AB9cLeVm6eA9d/qMll3JdEHjy6M+A==", "dev": true, "funding": [ { @@ -512,8 +501,6 @@ }, "node_modules/@csstools/css-tokenizer": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz", - "integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==", "dev": true, "funding": [ { @@ -526,33 +513,11 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" } }, - "node_modules/@emnapi/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", - "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", - "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", @@ -838,8 +803,6 @@ }, "node_modules/@esbuild/linux-x64": { "version": "0.28.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", - "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", "cpu": [ "x64" ], @@ -991,8 +954,6 @@ }, "node_modules/@esbuild/win32-x64": { "version": "0.28.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", - "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", "cpu": [ "x64" ], @@ -1008,8 +969,6 @@ }, "node_modules/@exodus/bytes": { "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", - "integrity": "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==", "dev": true, "license": "MIT", "engines": { @@ -1026,34 +985,33 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", - "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.5.tgz", + "integrity": "sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA==", "dev": true, "license": "MIT", "optional": true, "dependencies": { "@tybys/wasm-util": "^0.10.3" }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, "funding": { "type": "github", "url": "https://github.com/sponsors/Brooooooklyn" }, "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" } }, "node_modules/@oxc-project/types": { "version": "0.137.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", - "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", "dev": true, "license": "MIT", "funding": { @@ -1215,8 +1173,6 @@ }, "node_modules/@rolldown/binding-linux-x64-gnu": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz", - "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==", "cpu": [ "x64" ], @@ -1232,8 +1188,6 @@ }, "node_modules/@rolldown/binding-linux-x64-musl": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz", - "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==", "cpu": [ "x64" ], @@ -1302,8 +1256,6 @@ }, "node_modules/@rolldown/binding-win32-x64-msvc": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.3.tgz", - "integrity": "sha512-OL4OMk7UPXOeVGGd3qo5zJyPIljf4AFgk5QAkPPS+OoLuOOozhuaQGC18MxVTnw/06q93gShAJzlwnSCY9YtqA==", "cpu": [ "x64" ], @@ -1319,8 +1271,6 @@ }, "node_modules/@rolldown/pluginutils": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "dev": true, "license": "MIT" }, @@ -1355,15 +1305,13 @@ }, "node_modules/@standard-schema/spec": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "dev": true, "license": "MIT" }, "node_modules/@tybys/wasm-util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", - "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", + "integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==", "dev": true, "license": "MIT", "optional": true, @@ -1373,8 +1321,6 @@ }, "node_modules/@types/chai": { "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", "dependencies": { @@ -1384,22 +1330,18 @@ }, "node_modules/@types/deep-eql": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", "dev": true, "license": "MIT" }, "node_modules/@types/estree": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.3.tgz", - "integrity": "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg==", + "version": "26.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.5.tgz", + "integrity": "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==", "dev": true, "license": "MIT", "peer": true, @@ -1420,7 +1362,6 @@ "os": [ "aix" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1438,7 +1379,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1456,7 +1396,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1474,7 +1413,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1492,7 +1430,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1510,7 +1447,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1528,7 +1464,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1546,7 +1481,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1564,7 +1498,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1582,7 +1515,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1600,7 +1532,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1618,7 +1549,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1636,7 +1566,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1654,7 +1583,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1672,7 +1600,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1690,7 +1617,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1708,7 +1634,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1726,7 +1651,6 @@ "os": [ "sunos" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1744,7 +1668,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=16.20.0" } @@ -1762,15 +1685,12 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=16.20.0" } }, "node_modules/@vitest/expect": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz", - "integrity": "sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==", "dev": true, "license": "MIT", "dependencies": { @@ -1787,8 +1707,6 @@ }, "node_modules/@vitest/mocker": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.9.tgz", - "integrity": "sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==", "dev": true, "license": "MIT", "dependencies": { @@ -1814,8 +1732,6 @@ }, "node_modules/@vitest/pretty-format": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.9.tgz", - "integrity": "sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==", "dev": true, "license": "MIT", "dependencies": { @@ -1827,8 +1743,6 @@ }, "node_modules/@vitest/runner": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.9.tgz", - "integrity": "sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==", "dev": true, "license": "MIT", "dependencies": { @@ -1841,8 +1755,6 @@ }, "node_modules/@vitest/snapshot": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.9.tgz", - "integrity": "sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==", "dev": true, "license": "MIT", "dependencies": { @@ -1857,8 +1769,6 @@ }, "node_modules/@vitest/spy": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.9.tgz", - "integrity": "sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==", "dev": true, "license": "MIT", "funding": { @@ -1867,8 +1777,6 @@ }, "node_modules/@vitest/utils": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.9.tgz", - "integrity": "sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==", "dev": true, "license": "MIT", "dependencies": { @@ -1880,6 +1788,13 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "license": "ISC" + }, "node_modules/ajv": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", @@ -1911,13 +1826,16 @@ } }, "node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -1943,26 +1861,57 @@ "url": "https://ko-fi.com/dangreen" } }, + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "license": "MIT" + }, "node_modules/assertion-error": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, "license": "MIT", "engines": { "node": ">=12" } }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/bidi-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", - "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", "dev": true, "license": "MIT", "dependencies": { "require-from-string": "^2.0.2" } }, + "node_modules/brace-expansion": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1975,14 +1924,42 @@ }, "node_modules/chai": { "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, "license": "MIT", "engines": { "node": ">=18" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cliui": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", @@ -2016,6 +1993,165 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently": { + "version": "9.2.5", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.5.tgz", + "integrity": "sha512-YMZlvWrTPQEhjKp60XSmMGt60+pffbv6DyRnOMvVO98+J7aF8w8Ui9FhdcOwvSixc/kyR6SoVvmejcn/2lZBqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.12.0", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/concurrently/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/concurrently/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/conventional-changelog-angular": { "version": "9.4.0", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-9.4.0.tgz", @@ -2030,9 +2166,9 @@ } }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-10.4.0.tgz", - "integrity": "sha512-Rriac6ZrAlVm6cy9Bz4NSp+WMHpwNXoPIYex+HjCgduAVUSbnew29DQjQw0C4g9u3HtSYzGiGY+pdBXAZo+4aA==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-10.4.1.tgz", + "integrity": "sha512-jS1LRFSbRoAr6JbhhRy1JYfNNUj5LM3+v49hRE03CgccsiYqgdVj/RTmrw4J1rylrqijHwdOlJWiJa61JHOgHg==", "dev": true, "license": "ISC", "dependencies": { @@ -2043,9 +2179,9 @@ } }, "node_modules/conventional-commits-parser": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-7.1.2.tgz", - "integrity": "sha512-O+x4N2yH+ijvqWlIyTHsXTAP+algNWgGbjY2duCe8w2vUMvUB95cLRslCPfTMQyLAKlet3bhZTdu6ozn4M+QJQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-7.1.3.tgz", + "integrity": "sha512-Q9oWm1o9uy/oEsZQIraoFMZ4RuPD+79KgwWj6mJVP356tazolCB0piRLZ5Kz9te9p027uSEcUW+Gu44Eh+X79g==", "dev": true, "license": "MIT", "dependencies": { @@ -2061,8 +2197,6 @@ }, "node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, @@ -2072,6 +2206,7 @@ "integrity": "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -2113,8 +2248,6 @@ }, "node_modules/css-tree": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", - "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", "dev": true, "license": "MIT", "dependencies": { @@ -2127,8 +2260,6 @@ }, "node_modules/data-urls": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", - "integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==", "dev": true, "license": "MIT", "dependencies": { @@ -2139,23 +2270,51 @@ "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/decimal.js": { "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", "dev": true, "license": "MIT" }, "node_modules/detect-libc": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8" } }, + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "dev": true, + "license": "ISC", + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, "node_modules/emoji-regex": { "version": "10.6.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", @@ -2165,8 +2324,6 @@ }, "node_modules/entities": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-8.0.0.tgz", - "integrity": "sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -2196,10 +2353,18 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", - "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", "dev": true, "license": "MIT" }, @@ -2218,8 +2383,6 @@ }, "node_modules/esbuild": { "version": "0.28.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", - "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -2268,10 +2431,18 @@ "node": ">=6" } }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/estree-walker": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", "dependencies": { @@ -2280,8 +2451,6 @@ }, "node_modules/expect-type": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2314,8 +2483,6 @@ }, "node_modules/fdir": { "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { @@ -2330,6 +2497,13 @@ } } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2345,6 +2519,16 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2368,6 +2552,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/global-directory": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-5.0.0.tgz", @@ -2384,10 +2590,45 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, "node_modules/html-encoding-sniffer": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", - "integrity": "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==", "dev": true, "license": "MIT", "dependencies": { @@ -2399,8 +2640,6 @@ }, "node_modules/husky": { "version": "9.1.7", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", - "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "dev": true, "license": "MIT", "bin": { @@ -2440,6 +2679,25 @@ "node": ">=4" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, "node_modules/ini": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", @@ -2457,7 +2715,33 @@ "dev": true, "license": "MIT" }, - "node_modules/is-plain-obj": { + "node_modules/is-core-module": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.17.0.tgz", + "integrity": "sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", @@ -2472,8 +2756,6 @@ }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true, "license": "MIT" }, @@ -2519,10 +2801,9 @@ }, "node_modules/jsdom": { "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz", - "integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@asamuzakjp/css-color": "^5.1.11", "@asamuzakjp/dom-selector": "^7.1.1", @@ -2572,10 +2853,108 @@ "dev": true, "license": "MIT" }, + "node_modules/license-checker": { + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz", + "integrity": "sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "chalk": "^2.4.1", + "debug": "^3.1.0", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "read-installed": "~4.0.3", + "semver": "^5.5.0", + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-satisfies": "^4.0.0", + "treeify": "^1.1.0" + }, + "bin": { + "license-checker": "bin/license-checker" + } + }, + "node_modules/license-checker/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/license-checker/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/license-checker/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/license-checker/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/license-checker/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/lightningcss": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -2751,8 +3130,6 @@ }, "node_modules/lightningcss-linux-x64-gnu": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", "cpu": [ "x64" ], @@ -2772,8 +3149,6 @@ }, "node_modules/lightningcss-linux-x64-musl": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", "cpu": [ "x64" ], @@ -2814,8 +3189,6 @@ }, "node_modules/lightningcss-win32-x64-msvc": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", "cpu": [ "x64" ], @@ -2833,6 +3206,13 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, "node_modules/lint-staged": { "version": "17.6.0", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.6.0.tgz", @@ -2856,17 +3236,9 @@ "optionalDependencies": { "yaml": "^2.9.1" } - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" }, "node_modules/lru-cache": { "version": "11.5.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz", - "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==", "dev": true, "license": "BlueOak-1.0.0", "engines": { @@ -2875,8 +3247,6 @@ }, "node_modules/magic-string": { "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2885,15 +3255,54 @@ }, "node_modules/mdn-data": { "version": "2.27.1", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", - "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", "dev": true, "license": "CC0-1.0" }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/nanoid": { "version": "3.3.15", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", - "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", "dev": true, "funding": [ { @@ -2909,10 +3318,52 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true, + "license": "ISC" + }, "node_modules/obug": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.3.tgz", - "integrity": "sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==", "dev": true, "funding": [ "https://github.com/sponsors/sxzz", @@ -2923,6 +3374,48 @@ "node": ">=12.20.0" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2957,8 +3450,6 @@ }, "node_modules/parse5": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", - "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==", "dev": true, "license": "MIT", "dependencies": { @@ -2968,17 +3459,30 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, "node_modules/pathe": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -2997,8 +3501,6 @@ }, "node_modules/postcss": { "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", "dev": true, "funding": [ { @@ -3026,24 +3528,109 @@ }, "node_modules/punycode": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha512-O03wg/IYuV/VtnK2h/KXEt9VIbMUFbk3ERG0Iu4FhLZw0EP0T9znqrYDGn6ncbEsXUFaUjiVAWXHzxwt3lhRPQ==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "debuglog": "^1.0.1", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + } + }, + "node_modules/read-installed/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-package-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "node_modules/readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "license": "ISC", + "dependencies": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.13", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.13.tgz", + "integrity": "sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.17.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -3056,8 +3643,6 @@ }, "node_modules/rolldown": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz", - "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==", "dev": true, "license": "MIT", "dependencies": { @@ -3088,10 +3673,18 @@ "@rolldown/binding-win32-x64-msvc": "1.1.3" } }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/saxes": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "license": "ISC", "dependencies": { @@ -3114,34 +3707,116 @@ "node": ">=10" } }, + "node_modules/shell-quote": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz", + "integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/siginfo": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, "license": "ISC" }, + "node_modules/slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "*" + } + }, "node_modules/source-map-js": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, + "node_modules/spdx-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", + "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-find-index": "^1.0.2", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.24.tgz", + "integrity": "sha512-cLS9TtWkIQFyLkJ3/5aFQAOHOSKTlOs/7WDut/XPSdjom1fJhUdkepeJAKXa9Y05+FabHd0sti+Et559vDtkpQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/spdx-ranges": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", + "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==", + "dev": true, + "license": "(MIT AND CC-BY-3.0)" + }, + "node_modules/spdx-satisfies": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz", + "integrity": "sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-compare": "^1.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, "node_modules/stackback": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, "license": "MIT" }, "node_modules/std-env": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", - "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", "dev": true, "license": "MIT" }, @@ -3153,6 +3828,8 @@ "license": "MIT", "engines": { "node": ">=0.6.19" + } + }, "node_modules/string-width": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", @@ -3186,17 +3863,42 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true, "license": "MIT" }, "node_modules/tinybench": { "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true, "license": "MIT" }, @@ -3212,8 +3914,6 @@ }, "node_modules/tinyglobby": { "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { @@ -3229,8 +3929,6 @@ }, "node_modules/tinyrainbow": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", - "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", "dev": true, "license": "MIT", "engines": { @@ -3239,8 +3937,6 @@ }, "node_modules/tldts": { "version": "7.4.4", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.4.tgz", - "integrity": "sha512-kFXFK7O4WPextIUAOk8qtnw9dxR9UIXP9CjuH1cTBVBZMDeQcUPgr/IazGiw1B0Yiw5L75gHLWeW4iD793r90g==", "dev": true, "license": "MIT", "dependencies": { @@ -3252,15 +3948,11 @@ }, "node_modules/tldts-core": { "version": "7.4.4", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.4.tgz", - "integrity": "sha512-vwVLJVvvpslm7vqAH7+XNj/neA/Ynq7DT2EEcMuwc5YzN5XaMyRAqxwU+uX3azZ1FQtB2gvrvnLnAEkvYlVdfg==", "dev": true, "license": "MIT" }, "node_modules/tough-cookie": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", - "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3272,8 +3964,6 @@ }, "node_modules/tr46": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", - "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", "dev": true, "license": "MIT", "dependencies": { @@ -3283,20 +3973,38 @@ "node": ">=20" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, - "license": "0BSD", - "optional": true + "license": "0BSD" }, "node_modules/tsx": { "version": "4.22.4", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", - "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "~0.28.0" }, @@ -3348,8 +4056,6 @@ }, "node_modules/undici": { "version": "7.28.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz", - "integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==", "dev": true, "license": "MIT", "engines": { @@ -3361,15 +4067,44 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", "dev": true, + "license": "MIT" + }, + "node_modules/util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/verkit": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.5.0.tgz", + "integrity": "sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==", + "dev": true, "license": "MIT", - "peer": true + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } }, "node_modules/vite": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.0.tgz", - "integrity": "sha512-BuJcQK/56NQTWDGn4ABea3q4SSBdNPWwNZKTkkUpcMPnLoquSYH8llRtSUIgoL1KSCpHt5eghLShn50mH36y7Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", @@ -3444,8 +4179,6 @@ }, "node_modules/vitest": { "version": "4.1.9", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.9.tgz", - "integrity": "sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3534,8 +4267,6 @@ }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", - "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "license": "MIT", "dependencies": { @@ -3547,8 +4278,6 @@ }, "node_modules/webidl-conversions": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", - "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -3557,8 +4286,6 @@ }, "node_modules/whatwg-mimetype": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", - "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", "dev": true, "license": "MIT", "engines": { @@ -3567,8 +4294,6 @@ }, "node_modules/whatwg-url": { "version": "16.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz", - "integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==", "dev": true, "license": "MIT", "dependencies": { @@ -3582,8 +4307,6 @@ }, "node_modules/why-is-node-running": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { @@ -3615,6 +4338,19 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/wrap-ansi/node_modules/string-width": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", @@ -3633,10 +4369,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, "node_modules/xml-name-validator": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -3645,11 +4386,19 @@ }, "node_modules/xmlchars": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, "license": "MIT" }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yaml": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", @@ -3665,14 +4414,6 @@ }, "funding": { "url": "https://github.com/sponsors/eemeli" - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" } }, "node_modules/yargs": { diff --git a/package.json b/package.json index 6d94b23b0..7f9c206b5 100644 --- a/package.json +++ b/package.json @@ -79,8 +79,5 @@ "resolutions": { "lodash": "^4.17.21" }, - "lint-staged": { - "{frontend,backend}/**/*.{ts,tsx}": "node scripts/lint-staged-runners.js eslint", - "contracts/**/*.rs": "node scripts/lint-staged-runners.js rustfmt" - } + }