diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 9ebb2686..a27af54b 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -118,8 +118,8 @@ jobs: verify-wasm: strategy: matrix: - os: [ macos-latest, windows-latest, ubuntu-latest ] - node: [ 14, 16 ] + os: [ macos-latest, ubuntu-latest ] + node: [ 16, 18, 20, 22 ] fail-fast: false runs-on: ${{ matrix.os }} defaults: diff --git a/Cargo.toml b/Cargo.toml index 2df33468..62e6f6d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,17 +42,12 @@ sha2 = '0.9' bs58 = "0.4.0" varint = "0.9.0" lazy_static = { version = "1.4.0", optional = true } +askar-crypto = { version = "0.2", features = ['std'] } [dependencies.serde] version = '1.0' features = ['derive'] -[dependencies.askar-crypto] -version = '0.2' -features = ['std'] -git = 'https://github.com/hyperledger/aries-askar' -rev = '4f29d43d584c4a1f1f982c4511824421aeccd2db' - [dependencies.uuid] version = "0.8" features = ["v4"] diff --git a/README.md b/README.md index c31425fd..efc95f7e 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ let msg = Message::build( // --- Pack encrypted and authenticated message --- let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); -let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); +let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -110,7 +110,7 @@ let (msg, metadata) = msg Some(ALICE_DID), None, &did_resolver, - &secrets_resolver, + &kms, &PackEncryptedOptions::default(), ) .await @@ -123,12 +123,12 @@ println!("Sending message \n{}\n", msg); // --- Unpacking message --- let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); -let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); +let kms = ExampleSecretsResolver::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, &did_resolver, - &secrets_resolver, + &kms, &UnpackOptions::default(), ) .await @@ -147,7 +147,7 @@ let (msg, metadata) = msg None, // Keep sender as None here None, &did_resolver, - &secrets_resolver, + &kms, &PackEncryptedOptions::default(), ) .await @@ -163,7 +163,7 @@ let (msg, metadata) = msg Some(ALICE_DID), Some(ALICE_DID), // Provide information about signer here &did_resolver, - &secrets_resolver, + &kms, &PackEncryptedOptions::default(), ) .await @@ -194,7 +194,7 @@ let msg = Message::build( .finalize(); let (msg, metadata) = msg - .pack_signed(ALICE_DID, &did_resolver, &secrets_resolver) + .pack_signed(ALICE_DID, &did_resolver, &kms) .await .expect("Unable pack_signed"); @@ -202,7 +202,7 @@ let (msg, metadata) = msg let (msg, metadata) = Message::unpack( &msg, &did_resolver, - &secrets_resolver, + &kms, &UnpackOptions::default(), ) .await @@ -237,7 +237,7 @@ let msg = msg let (msg, metadata) = Message::unpack( &msg, &did_resolver, - &secrets_resolver, + &kms, &UnpackOptions::default(), ) .await diff --git a/benches/pack_encrypted.rs b/benches/pack_encrypted.rs index 39f0d37d..7cacdeba 100644 --- a/benches/pack_encrypted.rs +++ b/benches/pack_encrypted.rs @@ -8,8 +8,8 @@ mod test_vectors; use criterion::{async_executor::FuturesExecutor, criterion_group, criterion_main, Criterion}; use didcomm::{ - algorithms::AnonCryptAlg, did::resolvers::ExampleDIDResolver, - secrets::resolvers::ExampleSecretsResolver, PackEncryptedOptions, + algorithms::AnonCryptAlg, did::resolvers::ExampleDIDResolver, secrets::resolvers::ExampleKMS, + PackEncryptedOptions, }; use test_vectors::{ @@ -24,11 +24,11 @@ async fn pack_encrypted( from: Option<&str>, sign_by: Option<&str>, did_resolver: &ExampleDIDResolver, - secrets_resolver: &ExampleSecretsResolver, + kms: &ExampleKMS, opts: &PackEncryptedOptions, ) { MESSAGE_SIMPLE - .pack_encrypted(to, from, sign_by, did_resolver, secrets_resolver, opts) + .pack_encrypted(to, from, sign_by, did_resolver, kms, opts) .await .expect("Unable pack_encrypted"); } @@ -42,7 +42,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -50,9 +50,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_authcrypt_ed25519_1key", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -64,7 +63,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -76,9 +75,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_anoncrypt_a256cbc", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -89,7 +87,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -101,9 +99,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_anoncrypt_a256gsm", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -114,7 +111,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -126,9 +123,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_anoncrypt_xc20p", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -139,7 +135,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -147,9 +143,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_authcrypt_ed25519_3keys", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -161,7 +156,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -173,9 +168,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_3keys_anoncrypt_a256cbc", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -186,7 +180,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -198,9 +192,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_3keys_anoncrypt_a256gsm", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -211,7 +204,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -223,9 +216,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_3keys_anoncrypt_xc20p", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -236,7 +228,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -246,9 +238,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_anoncrypt_ed25519_a256cbc_1key", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -258,7 +249,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -268,9 +259,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_anoncrypt_ed25519_a256gcm_1key", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -280,7 +270,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -290,9 +280,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_anoncrypt_ed25519_xc20p_1key", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -302,7 +291,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -310,9 +299,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_anoncrypt_ed25519_a256cbc_3keys", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -322,7 +310,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -332,9 +320,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_anoncrypt_ed25519_a256gsm_3keys", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -344,7 +331,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -354,9 +341,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_anoncrypt_ed25519_xc20p_3keys", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -368,7 +354,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -376,9 +362,8 @@ fn benchmarks(c: &mut Criterion) { }; c.bench_function("pack_encrypted_authcrypt_p256_1key", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }); } @@ -390,7 +375,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -402,9 +387,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_p256_1key_anoncrypt_a256cbc", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -415,7 +399,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -427,9 +411,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_p256_1key_anoncrypt_a256gsm", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -440,7 +423,7 @@ fn benchmarks(c: &mut Criterion) { let sign_by = None; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -452,9 +435,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_p256_1key_anoncrypt_xc20p", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -467,7 +449,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -477,9 +459,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_sign_x25519", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -492,7 +473,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -502,9 +483,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_sign_p256", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -517,7 +497,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -527,9 +507,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_sign_k256", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -542,7 +521,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -554,9 +533,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_anoncrypt_a256cbc_sign_x25519", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -569,7 +547,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -581,9 +559,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_anoncrypt_a256cbc_sign_p256", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -596,7 +573,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -608,9 +585,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_ed25519_1key_anoncrypt_a256cbc_sign_k256", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -623,7 +599,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -635,9 +611,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_p256_1key_anoncrypt_a256cbc_sign_e25519", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -650,7 +625,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -662,9 +637,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_p256_1key_anoncrypt_a256cbc_sign_p256", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } @@ -677,7 +651,7 @@ fn benchmarks(c: &mut Criterion) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let opts = PackEncryptedOptions { forward: false, @@ -689,9 +663,8 @@ fn benchmarks(c: &mut Criterion) { c.bench_function( "pack_encrypted_authcrypt_p256_1key_anoncrypt_a256cbc_sign_k256", move |b| { - b.to_async(FuturesExecutor).iter(|| { - pack_encrypted(to, from, sign_by, &did_resolver, &secrets_resolver, &opts) - }); + b.to_async(FuturesExecutor) + .iter(|| pack_encrypted(to, from, sign_by, &did_resolver, &kms, &opts)); }, ); } diff --git a/benches/pack_signed.rs b/benches/pack_signed.rs index e8bcb9d4..e5dc30e6 100644 --- a/benches/pack_signed.rs +++ b/benches/pack_signed.rs @@ -6,7 +6,7 @@ pub(crate) use didcomm; mod test_vectors; use criterion::{async_executor::FuturesExecutor, criterion_group, criterion_main, Criterion}; -use didcomm::{did::resolvers::ExampleDIDResolver, secrets::resolvers::ExampleSecretsResolver}; +use didcomm::{did::resolvers::ExampleDIDResolver, secrets::resolvers::ExampleKMS}; use test_vectors::{ ALICE_AUTH_METHOD_25519, ALICE_AUTH_METHOD_P256, ALICE_AUTH_METHOD_SECPP256K1, ALICE_DID_DOC, @@ -14,13 +14,9 @@ use test_vectors::{ }; // Here we have an async function to benchmark -async fn pack_signed( - sign_by: &str, - did_resolver: &ExampleDIDResolver, - secrets_resolver: &ExampleSecretsResolver, -) { +async fn pack_signed(sign_by: &str, did_resolver: &ExampleDIDResolver, kms: &ExampleKMS) { MESSAGE_SIMPLE - .pack_signed(sign_by, did_resolver, secrets_resolver) + .pack_signed(sign_by, did_resolver, kms) .await .expect("Unable pack_signed"); } @@ -28,29 +24,29 @@ async fn pack_signed( fn benchmarks(c: &mut Criterion) { let sign_by = &ALICE_AUTH_METHOD_25519.id; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); c.bench_function("pack_signed_ed25519", move |b| { b.to_async(FuturesExecutor) - .iter(|| pack_signed(sign_by, &did_resolver, &secrets_resolver)); + .iter(|| pack_signed(sign_by, &did_resolver, &kms)); }); let sign_by = &ALICE_AUTH_METHOD_P256.id; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); c.bench_function("pack_signed_p256", move |b| { b.to_async(FuturesExecutor) - .iter(|| pack_signed(sign_by, &did_resolver, &secrets_resolver)); + .iter(|| pack_signed(sign_by, &did_resolver, &kms)); }); let sign_by = &ALICE_AUTH_METHOD_SECPP256K1.id; let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); c.bench_function("pack_signed_k256", move |b| { b.to_async(FuturesExecutor) - .iter(|| pack_signed(sign_by, &did_resolver, &secrets_resolver)); + .iter(|| pack_signed(sign_by, &did_resolver, &kms)); }); } diff --git a/examples/advanced_params.rs b/examples/advanced_params.rs index a0c1f154..3d97c72a 100644 --- a/examples/advanced_params.rs +++ b/examples/advanced_params.rs @@ -10,10 +10,10 @@ use didcomm::{ algorithms::{AnonCryptAlg, AuthCryptAlg}, did::resolvers::ExampleDIDResolver, protocols::routing::try_parse_forward, - secrets::resolvers::ExampleSecretsResolver, + secrets::resolvers::ExampleKMS, Message, PackEncryptedOptions, UnpackOptions, }; -use serde_json::json; +use serde_json::{json, Number, Value}; use std::collections::HashMap; use std::iter::FromIterator; use test_vectors::{ @@ -33,6 +33,11 @@ async fn main() { .to(BOB_DID.to_owned()) .created_time(1516269022) .expires_time(1516385931) + .header("extra_header1".parse().unwrap(), Value::Bool(false)) + .header( + "extra_header2".parse().unwrap(), + Value::Number(Number::from(12)), + ) .finalize(); // --- Packing encrypted and authenticated message --- @@ -42,7 +47,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -50,7 +55,7 @@ async fn main() { "did:example:alice#key-p256-1".into(), "did:example:alice#key-2".into(), &did_resolver, - &secrets_resolver, + &kms, &PackEncryptedOptions { protect_sender: true, forward: true, @@ -78,16 +83,11 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let kms = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); - let (msg, metadata) = Message::unpack( - &msg, - &did_resolver, - &secrets_resolver, - &UnpackOptions::default(), - ) - .await - .expect("Unable unpack"); + let (msg, metadata) = Message::unpack(&msg, &did_resolver, &kms, &UnpackOptions::default()) + .await + .expect("Unable unpack"); println!("Mediator1 received message is \n{:?}\n", msg); @@ -108,16 +108,11 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let kms = ExampleKMS::new(BOB_SECRETS.clone()); - let (msg, metadata) = Message::unpack( - &msg, - &did_resolver, - &secrets_resolver, - &UnpackOptions::default(), - ) - .await - .expect("Unable unpack"); + let (msg, metadata) = Message::unpack(&msg, &did_resolver, &kms, &UnpackOptions::default()) + .await + .expect("Unable unpack"); println!("Bob received message is \n{:?}\n", msg); println!("Bob received message unpack metadata is \n{:?}\n", metadata); diff --git a/examples/attachments.rs b/examples/attachments.rs index 6984d0da..bb67d394 100644 --- a/examples/attachments.rs +++ b/examples/attachments.rs @@ -8,8 +8,8 @@ pub(crate) use didcomm; use didcomm::{ did::resolvers::ExampleDIDResolver, protocols::routing::try_parse_forward, - secrets::resolvers::ExampleSecretsResolver, Attachment, AttachmentData, JsonAttachmentData, - Message, PackEncryptedOptions, UnpackOptions, + secrets::resolvers::ExampleKMS, Attachment, AttachmentData, JsonAttachmentData, Message, + PackEncryptedOptions, UnpackOptions, }; use serde_json::json; use test_vectors::{ @@ -51,7 +51,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -77,7 +77,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -107,7 +107,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, diff --git a/examples/basic.rs b/examples/basic.rs index b4f0eccc..066e5bba 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -8,7 +8,7 @@ pub(crate) use didcomm; use didcomm::{ did::resolvers::ExampleDIDResolver, protocols::routing::try_parse_forward, - secrets::resolvers::ExampleSecretsResolver, Message, PackEncryptedOptions, UnpackOptions, + secrets::resolvers::ExampleKMS, Message, PackEncryptedOptions, UnpackOptions, }; use serde_json::json; use test_vectors::{ @@ -51,7 +51,7 @@ async fn non_repudiable_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -77,7 +77,7 @@ async fn non_repudiable_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -107,7 +107,7 @@ async fn non_repudiable_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -143,7 +143,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg_bob, metadata_bob) = msg .pack_encrypted( @@ -193,7 +193,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg_bob, @@ -226,7 +226,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -250,7 +250,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR3_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR3_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg_charlie, @@ -283,7 +283,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR2_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR2_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -316,7 +316,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -349,7 +349,7 @@ async fn multi_recipient() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(CHARLIE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(CHARLIE_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -386,7 +386,7 @@ async fn repudiable_authenticated_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -412,7 +412,7 @@ async fn repudiable_authenticated_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -442,7 +442,7 @@ async fn repudiable_authenticated_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -475,7 +475,7 @@ async fn repudiable_non_authenticated_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(vec![]); + let secrets_resolver = ExampleKMS::new(vec![]); let (msg, metadata) = msg .pack_encrypted( @@ -501,7 +501,7 @@ async fn repudiable_non_authenticated_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -531,7 +531,7 @@ async fn repudiable_non_authenticated_encryption() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -559,7 +559,7 @@ async fn signed_unencrypted() { // --- Packing signed message --- let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_signed(ALICE_DID, &did_resolver, &secrets_resolver) @@ -573,7 +573,7 @@ async fn signed_unencrypted() { // --- Unpacking message --- let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(vec![]); + let secrets_resolver = ExampleKMS::new(vec![]); let (msg, metadata) = Message::unpack( &msg, @@ -612,7 +612,7 @@ async fn plaintext_unencrypted() { // --- Unpacking message --- let did_resolver = ExampleDIDResolver::new(vec![]); - let secrets_resolver = ExampleSecretsResolver::new(vec![]); + let secrets_resolver = ExampleKMS::new(vec![]); let (msg, metadata) = Message::unpack( &msg, diff --git a/examples/rotate_did.rs b/examples/rotate_did.rs index 5f630673..9858972a 100644 --- a/examples/rotate_did.rs +++ b/examples/rotate_did.rs @@ -8,8 +8,7 @@ pub(crate) use didcomm; use didcomm::{ did::resolvers::ExampleDIDResolver, protocols::routing::try_parse_forward, - secrets::resolvers::ExampleSecretsResolver, FromPrior, Message, PackEncryptedOptions, - UnpackOptions, + secrets::resolvers::ExampleKMS, FromPrior, Message, PackEncryptedOptions, UnpackOptions, }; use serde_json::json; use test_vectors::{ @@ -26,7 +25,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); // --- Building from_prior header let from_prior = FromPrior::build(CHARLIE_DID.into(), ALICE_DID.into()) @@ -88,7 +87,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -119,7 +118,7 @@ async fn main() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, diff --git a/examples/routing.rs b/examples/routing.rs index 8151379f..4829f83e 100644 --- a/examples/routing.rs +++ b/examples/routing.rs @@ -10,7 +10,7 @@ use didcomm::{ algorithms::AnonCryptAlg, did::resolvers::ExampleDIDResolver, protocols::routing::{try_parse_forward, wrap_in_forward}, - secrets::resolvers::ExampleSecretsResolver, + secrets::resolvers::ExampleKMS, Message, PackEncryptedOptions, UnpackOptions, }; use serde_json::json; @@ -55,7 +55,7 @@ async fn single_mediator() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -81,7 +81,7 @@ async fn single_mediator() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -111,7 +111,7 @@ async fn single_mediator() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -146,7 +146,7 @@ async fn multiple_mediators_with_alternative_endpoints() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -174,7 +174,7 @@ async fn multiple_mediators_with_alternative_endpoints() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR3_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR3_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -206,7 +206,7 @@ async fn multiple_mediators_with_alternative_endpoints() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR2_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR2_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -238,7 +238,7 @@ async fn multiple_mediators_with_alternative_endpoints() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -270,7 +270,7 @@ async fn multiple_mediators_with_alternative_endpoints() { MEDIATOR3_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(CHARLIE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(CHARLIE_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -306,7 +306,7 @@ async fn re_wrapping_for_final_recipient() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -332,7 +332,7 @@ async fn re_wrapping_for_final_recipient() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -380,7 +380,7 @@ async fn re_wrapping_for_final_recipient() { MEDIATOR1_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -414,7 +414,7 @@ async fn re_wrapping_for_mediator_unknown_to_sender() { MEDIATOR2_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = msg .pack_encrypted( @@ -441,7 +441,7 @@ async fn re_wrapping_for_mediator_unknown_to_sender() { MEDIATOR2_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -490,7 +490,7 @@ async fn re_wrapping_for_mediator_unknown_to_sender() { MEDIATOR2_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(MEDIATOR2_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(MEDIATOR2_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, @@ -520,7 +520,7 @@ async fn re_wrapping_for_mediator_unknown_to_sender() { MEDIATOR2_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, metadata) = Message::unpack( &msg, diff --git a/src/jwe/decrypt.rs b/src/jwe/decrypt.rs index 5aea6d56..d41fcfba 100644 --- a/src/jwe/decrypt.rs +++ b/src/jwe/decrypt.rs @@ -4,32 +4,39 @@ use askar_crypto::{ kdf::{FromKeyDerivation, KeyExchange}, repr::{KeyGen, KeySecretBytes}, }; +use std::future::Future; +use crate::error::ResultContext; use crate::{ - error::{err_msg, ErrorKind, Result, ResultContext, ResultExt}, + error::{err_msg, ErrorKind, Result, ResultExt}, jwe::ParsedJWE, jwk::{FromJwkValue, ToJwkValue}, utils::crypto::{JoseKDF, KeyWrap}, }; impl<'a, 'b> ParsedJWE<'a, 'b> { - pub(crate) fn decrypt( - &self, - sender: Option<(&str, &KE)>, - recipient: (&str, &KE), + pub(crate) async fn decrypt( + &'a self, + sender: Option<(&str, &'a KE)>, + recipient: ( + &'a str, + impl FnOnce(String, Option, String, Vec, Vec, Vec, Vec) -> FUT, + ), ) -> Result> where + 'b: 'a, CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, + FUT: Future>, { let (skid, skey) = match sender { Some((skid, skey)) => (Some(skid), Some(skey)), None => (None, None), }; - let (kid, key) = recipient; + let (kid, derive_func) = recipient; if skid.map(str::as_bytes) != self.apu.as_deref() { Err(err_msg(ErrorKind::InvalidState, "Wrong skid used"))? @@ -48,22 +55,24 @@ impl<'a, 'b> ParsedJWE<'a, 'b> { .kind(ErrorKind::Malformed, "Unable decode encrypted_key")? }; - let epk = KE::from_jwk_value(&self.protected.epk).context("Unable instantiate epk")?; - let tag = base64::decode_config(self.jwe.tag, base64::URL_SAFE_NO_PAD) .kind(ErrorKind::Malformed, "Unable decode tag")?; - let kw = KDF::derive_key( - &epk, - skey, - &key, - self.protected.alg.as_str().as_bytes(), - self.apu.as_deref().unwrap_or(&[]), - &self.apv, - &tag, - true, + let kw = derive_func( + self.protected.epk.to_string(), + skey.map(|key| { + key.to_jwk_public(None) + .kind(ErrorKind::Malformed, "Unable to serialize sender key") + }) + .transpose()?, + kid.to_string(), + self.protected.alg.as_str().as_bytes().to_vec(), + self.apu.as_deref().unwrap_or(&[]).to_vec(), + self.apv.to_vec(), + tag.clone(), ) - .kind(ErrorKind::InvalidState, "Unable derive kw")?; + .await + .context("Unable derive kw")?; let cek: CE = kw .unwrap_key(&encrypted_key) @@ -104,6 +113,7 @@ mod tests { repr::{KeyGen, KeySecretBytes}, }; + use crate::error::ResultExt; use crate::{ error::{Error, ErrorKind}, jwe::{self, test_support::*}, @@ -111,8 +121,8 @@ mod tests { utils::crypto::{JoseKDF, KeyWrap}, }; - #[test] - fn decrypt_works() { + #[tokio::test] + async fn decrypt_works() { // from RFC: https://tools.ietf.org/html/draft-madden-jose-ecdh-1pu-04#appendix-B _decrypt_works::< AesKey, @@ -124,7 +134,8 @@ mod tests { (BOB_KID_ECDH_1PU_APP_B, BOB_KEY_ECDH_1PU_APP_B), MSG_ECDH_1PU_APP_B, PAYLOAD_ECDH_1PU_APP_B, - ); + ) + .await; // from RFC: https://tools.ietf.org/html/draft-madden-jose-ecdh-1pu-04#appendix-B _decrypt_works::< @@ -137,7 +148,8 @@ mod tests { (CHARLIE_KID_ECDH_1PU_APP_B, CHARLIE_KEY_ECDH_1PU_APP_B), MSG_ECDH_1PU_APP_B, PAYLOAD_ECDH_1PU_APP_B, - ); + ) + .await; _decrypt_works::< Chacha20Key, @@ -149,7 +161,8 @@ mod tests { (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P, PAYLOAD, - ); + ) + .await; _decrypt_works::< Chacha20Key, @@ -161,7 +174,8 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_XC20P, PAYLOAD, - ); + ) + .await; _decrypt_works::< Chacha20Key, @@ -173,7 +187,8 @@ mod tests { (BOB_KID_X25519_3, BOB_KEY_X25519_3), MSG_ANONCRYPT_X25519_XC20P, PAYLOAD, - ); + ) + .await; _decrypt_works::< AesKey, @@ -185,7 +200,8 @@ mod tests { (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_A256CBC, PAYLOAD, - ); + ) + .await; _decrypt_works::< AesKey, @@ -197,63 +213,68 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_A256CBC, PAYLOAD, - ); + ) + .await; _decrypt_works::, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey>( None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_A256GSM, PAYLOAD, - ); + ).await; _decrypt_works::, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey>( None, (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_A256GSM, PAYLOAD, - ); + ).await; _decrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_XC20P, PAYLOAD, - ); + ) + .await; _decrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_XC20P, PAYLOAD, - ); + ) + .await; _decrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256CBC, PAYLOAD, - ); + ).await; _decrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_A256CBC, PAYLOAD, - ); + ).await; _decrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256GSM, PAYLOAD, - ); + ) + .await; _decrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_A256GSM, PAYLOAD, - ); + ) + .await; _decrypt_works::< AesKey, @@ -265,7 +286,8 @@ mod tests { (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_AUTHCRYPT_X25519_A256CBC, PAYLOAD, - ); + ) + .await; _decrypt_works::< AesKey, @@ -277,25 +299,26 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_AUTHCRYPT_X25519_A256CBC, PAYLOAD, - ); + ) + .await; _decrypt_works::, Ecdh1PU<'_, P256KeyPair>, P256KeyPair, AesKey>( Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_AUTHCRYPT_P256_A256CBC, PAYLOAD, - ); + ).await; _decrypt_works::, Ecdh1PU<'_, P256KeyPair>, P256KeyPair, AesKey>( Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_AUTHCRYPT_P256_A256CBC, PAYLOAD, - ); + ).await; /// TODO: P-384 and P-521 support after solving https://github.com/hyperledger/aries-askar/issues/10 - fn _decrypt_works( + async fn _decrypt_works( sender: Option<(&str, &str)>, recipient: (&str, &str), msg: &str, @@ -303,17 +326,17 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { - let res = _decrypt::(sender, recipient, msg); + let res = _decrypt::(sender, recipient, msg).await; let res = res.expect("res is err"); assert_eq!(res, payload.as_bytes()); } } - #[test] - fn decrypt_works_authcrypt_different_skid() { + #[tokio::test] + async fn decrypt_works_authcrypt_different_skid() { let res = _decrypt::< AesKey, Ecdh1PU<'_, P256KeyPair>, @@ -323,15 +346,16 @@ mod tests { Some((ALICE_KID_X25519_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_AUTHCRYPT_P256_A256CBC, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); assert_eq!(format!("{}", err), "Invalid state: Wrong skid used"); } - #[test] - fn decrypt_works_authcrypt_no_skid() { + #[tokio::test] + async fn decrypt_works_authcrypt_no_skid() { let res = _decrypt::< AesKey, Ecdh1PU<'_, P256KeyPair>, @@ -341,29 +365,31 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_AUTHCRYPT_P256_A256CBC, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); assert_eq!(format!("{}", err), "Invalid state: Wrong skid used"); } - #[test] - fn decrypt_works_anoncrypt_skid_present() { + #[tokio::test] + async fn decrypt_works_anoncrypt_skid_present() { let res = _decrypt::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256CBC, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); assert_eq!(format!("{}", err), "Invalid state: Wrong skid used"); } - #[test] - fn decrypt_works_recipient_not_found() { + #[tokio::test] + async fn decrypt_works_recipient_not_found() { let res = _decrypt::< AesKey, Ecdh1PU<'_, P256KeyPair>, @@ -373,15 +399,16 @@ mod tests { Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_X25519_1, BOB_KEY_P256_1), MSG_AUTHCRYPT_P256_A256CBC, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); assert_eq!(format!("{}", err), "Invalid state: Recipient not found"); } - #[test] - fn decrypt_works_undecodable_encrypted_key() { + #[tokio::test] + async fn decrypt_works_undecodable_encrypted_key() { let res = _decrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -391,7 +418,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_UNDECODABLE_EC, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -401,8 +429,8 @@ mod tests { ); } - #[test] - fn decrypt_works_undecodable_tag() { + #[tokio::test] + async fn decrypt_works_undecodable_tag() { let res = _decrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -412,7 +440,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_UNDECODABLE_TAG, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -423,8 +452,8 @@ mod tests { ); } - #[test] - fn decrypt_works_undecodable_iv() { + #[tokio::test] + async fn decrypt_works_undecodable_iv() { let res = _decrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -434,7 +463,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_UNDECODABLE_IV, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -445,8 +475,8 @@ mod tests { ); } - #[test] - fn decrypt_works_undecodable_ciphertext() { + #[tokio::test] + async fn decrypt_works_undecodable_ciphertext() { let res = _decrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -456,7 +486,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_UNDECODABLE_CIPHERTEXT, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -467,12 +498,12 @@ mod tests { ); } - #[test] + #[tokio::test] #[ignore = "https://github.com/hyperledger/aries-askar/issues/28"] // There is no key type or curve checking for FromJwk implementations in askar crypto // Most probably it can't open invalid curve attack vectors as invalid points should be // found by rust crypto, but still looks dangerous. - fn decrypt_works_epk_different_curve() { + async fn decrypt_works_epk_different_curve() { let res = _decrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -482,7 +513,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_EPK_DIFFERENT_CURVE, - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -492,26 +524,28 @@ mod tests { ); } - #[test] - fn decrypt_works_epk_wrong_point() { + #[tokio::test] + async fn decrypt_works_epk_wrong_point() { let res = _decrypt::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_XC20P_EPK_WRONG_POINT, - ); + ) + .await; let err = res.expect_err("res is ok"); + println!("{}", err); assert_eq!(err.kind(), ErrorKind::Malformed); assert_eq!( format!("{}", err), - "Malformed: Unable instantiate epk: Unable produce jwk: Invalid key data", + "Malformed: Unable derive kw: Unable to instantiate ephem key: Invalid key data", ); } - #[test] - fn decrypt_works_different_recipient_key() { + #[tokio::test] + async fn decrypt_works_different_recipient_key() { _decrypt_works_different_recipient_key::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -521,7 +555,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_XC20P, - ); + ) + .await; _decrypt_works_different_recipient_key::< AesKey, @@ -532,7 +567,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_A256CBC, - ); + ) + .await; _decrypt_works_different_recipient_key::< AesKey, @@ -543,7 +579,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_A256GSM, - ); + ) + .await; _decrypt_works_different_recipient_key::< Chacha20Key, @@ -554,7 +591,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_XC20P, - ); + ) + .await; _decrypt_works_different_recipient_key::< AesKey, @@ -565,7 +603,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_A256CBC, - ); + ) + .await; _decrypt_works_different_recipient_key::< AesKey, @@ -576,7 +615,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_A256GSM, - ); + ) + .await; _decrypt_works_different_recipient_key::< AesKey, @@ -587,7 +627,8 @@ mod tests { Some((ALICE_KID_X25519_1, ALICE_PKEY_X25519_1)), (BOB_KID_X25519_1, BOB_KEY_X25519_2), MSG_AUTHCRYPT_X25519_A256CBC, - ); + ) + .await; _decrypt_works_different_recipient_key::< AesKey, @@ -598,19 +639,20 @@ mod tests { Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_1, BOB_KEY_P256_2), MSG_AUTHCRYPT_P256_A256CBC, - ); + ) + .await; - fn _decrypt_works_different_recipient_key( + async fn _decrypt_works_different_recipient_key( sender: Option<(&str, &str)>, recipient: (&str, &str), msg: &str, ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { - let res = _decrypt::(sender, recipient, msg); + let res = _decrypt::(sender, recipient, msg).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -622,8 +664,8 @@ mod tests { } } - #[test] - fn decrypt_works_changed_enc_key() { + #[tokio::test] + async fn decrypt_works_changed_enc_key() { _decrypt_works_changed_enc_key::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -633,7 +675,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< AesKey, @@ -644,7 +687,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_A256CBC_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< AesKey, @@ -655,7 +699,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_A256GSM_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< Chacha20Key, @@ -666,7 +711,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_XC20P_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< AesKey, @@ -677,7 +723,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256CBC_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< AesKey, @@ -688,7 +735,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256GSM_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< AesKey, @@ -699,7 +747,8 @@ mod tests { Some((ALICE_KID_X25519_1, ALICE_PKEY_X25519_1)), (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_AUTHCRYPT_X25519_A256CBC_CHANGED_ENC_KEY, - ); + ) + .await; _decrypt_works_changed_enc_key::< AesKey, @@ -710,19 +759,20 @@ mod tests { Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_AUTHCRYPT_P256_A256CBC_CHANGED_ENC_KEY, - ); + ) + .await; - fn _decrypt_works_changed_enc_key( + async fn _decrypt_works_changed_enc_key( sender: Option<(&str, &str)>, recipient: (&str, &str), msg: &str, ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { - let res = _decrypt::(sender, recipient, msg); + let res = _decrypt::(sender, recipient, msg).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -734,8 +784,8 @@ mod tests { } } - #[test] - fn decrypt_works_changed_second_enc_key() { + #[tokio::test] + async fn decrypt_works_changed_second_enc_key() { decrypt_works_changed_second_enc_key::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -746,7 +796,8 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_XC20P_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< AesKey, @@ -758,7 +809,8 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_A256CBC_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< AesKey, @@ -770,7 +822,8 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_ANONCRYPT_X25519_A256GSM_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< Chacha20Key, @@ -782,7 +835,8 @@ mod tests { (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_XC20P_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< AesKey, @@ -794,7 +848,8 @@ mod tests { (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_A256CBC_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< AesKey, @@ -806,7 +861,8 @@ mod tests { (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_ANONCRYPT_P256_A256GSM_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< AesKey, @@ -818,7 +874,8 @@ mod tests { (BOB_KID_X25519_2, BOB_KEY_X25519_2), MSG_AUTHCRYPT_X25519_A256CBC_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; decrypt_works_changed_second_enc_key::< AesKey, @@ -830,9 +887,10 @@ mod tests { (BOB_KID_P256_2, BOB_KEY_P256_2), MSG_AUTHCRYPT_P256_A256CBC_CHANGED_ENC_KEY, PAYLOAD, - ); + ) + .await; - fn decrypt_works_changed_second_enc_key( + async fn decrypt_works_changed_second_enc_key( sender: Option<(&str, &str)>, recipient: (&str, &str), msg: &str, @@ -840,17 +898,17 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { - let res = _decrypt::(sender, recipient, msg); + let res = _decrypt::(sender, recipient, msg).await; let res = res.expect("res is err"); assert_eq!(&res, payload.as_bytes()); } } - #[test] - fn decrypt_works_changed_ciphertext() { + #[tokio::test] + async fn decrypt_works_changed_ciphertext() { _decrypt_works_changed_ciphertext::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, @@ -860,7 +918,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_XC20P_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< AesKey, @@ -871,7 +930,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_A256CBC_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< AesKey, @@ -882,7 +942,8 @@ mod tests { None, (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_ANONCRYPT_X25519_A256GSM_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< Chacha20Key, @@ -893,7 +954,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_XC20P_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< AesKey, @@ -904,7 +966,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256CBC_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< AesKey, @@ -915,7 +978,8 @@ mod tests { None, (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_ANONCRYPT_P256_A256GSM_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< AesKey, @@ -926,7 +990,8 @@ mod tests { Some((ALICE_KID_X25519_1, ALICE_PKEY_X25519_1)), (BOB_KID_X25519_1, BOB_KEY_X25519_1), MSG_AUTHCRYPT_X25519_A256CBC_CHANGED_CIPHERTEXT, - ); + ) + .await; _decrypt_works_changed_ciphertext::< AesKey, @@ -937,19 +1002,20 @@ mod tests { Some((ALICE_KID_P256_1, ALICE_PKEY_P256_1)), (BOB_KID_P256_1, BOB_KEY_P256_1), MSG_AUTHCRYPT_P256_A256CBC_CHANGED_CIPHERTEXT, - ); + ) + .await; - fn _decrypt_works_changed_ciphertext( + async fn _decrypt_works_changed_ciphertext( sender: Option<(&str, &str)>, recipient: (&str, &str), msg: &str, ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { - let res = _decrypt::(sender, recipient, msg); + let res = _decrypt::(sender, recipient, msg).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Malformed); @@ -961,7 +1027,7 @@ mod tests { } } - fn _decrypt( + async fn _decrypt( sender: Option<(&str, &str)>, recipient: (&str, &str), msg: &str, @@ -969,21 +1035,47 @@ mod tests { where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { let _sender = sender.map(|(kid, k)| (kid, KE::from_jwk(k).expect("Unable from_jwk"))); let sender = _sender.as_ref().map(|(kid, k)| (*kid, k)); - let recipient = ( - recipient.0, - &KE::from_jwk(recipient.1).expect("Unable from_jwk"), - ); + let derive_func = |ephem_key: String, + sender_key: Option, + _recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let ephem_key = KE::from_jwk(&ephem_key) + .kind(ErrorKind::Malformed, "Unable to instantiate ephem key")?; + let sender_key = sender_key + .map(|sk_jwk| { + KE::from_jwk(&sk_jwk) + .kind(ErrorKind::Malformed, "Unable to instantiate sender key") + }) + .transpose()?; + KDF::derive_key( + &ephem_key, + sender_key.as_ref(), + &KE::from_jwk(recipient.1).expect("Unable from_jwk"), + &alg, + &apu, + &apv, + &cc_tag, + true, + ) + } + }; + + let recipient = (recipient.0, derive_func); let mut buf = vec![]; let msg = jwe::parse(&msg, &mut buf).expect("Unable parse"); - msg.decrypt::(sender, recipient) + msg.decrypt::(sender, recipient).await } const PAYLOAD: &str = r#"{"id":"1234567890","typ":"application/didcomm-plain+json","type":"http://example.com/protocols/lets_do_lunch/1.0/proposal","from":"did:example:alice","to":["did:example:bob"],"created_time":1516269022,"expires_time":1516385931,"body":{"messagespecificattribute":"and its value"}}"#; diff --git a/src/jwe/encrypt.rs b/src/jwe/encrypt.rs index 1deb0858..1e48abd1 100644 --- a/src/jwe/encrypt.rs +++ b/src/jwe/encrypt.rs @@ -5,10 +5,11 @@ use askar_crypto::{ random, repr::{KeyGen, ToSecretBytes}, }; -use std::borrow::Cow; - use sha2::{Digest, Sha256}; +use std::borrow::Cow; +use std::future::Future; +use crate::error::{err_msg, ResultContext}; use crate::{ error::{ErrorKind, Result, ResultExt}, jwe::envelope::{Algorithm, EncAlgorithm, PerRecipientHeader, ProtectedHeader, Recipient, JWE}, @@ -16,26 +17,35 @@ use crate::{ utils::crypto::{JoseKDF, KeyWrap}, }; -pub(crate) fn encrypt( +pub(crate) async fn encrypt( plaintext: &[u8], alg: Algorithm, enc: EncAlgorithm, - sender: Option<(&str, &KE)>, // (skid, sender key) - recipients: &[(&str, &KE)], // (kid, recipient key) + sender: Option<( + &str, + impl Fn(String, Option, String, Vec, Vec, Vec, Vec) -> FUT, + )>, // (skid, derive func) + recipients: &[(&str, &KE)], // (kid, recipient key) ) -> Result where CE: KeyAeadInPlace + KeyAeadMeta + KeyGen + ToSecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, + FUT: Future>, { - let (skid, skey) = match sender { - Some((skid, skey)) => (Some(skid), Some(skey)), + let (skid, derive_func) = match sender { + Some((skid, f)) => (Some(skid), Some(f)), None => (None, None), }; - let mut rng = random::default_rng(); - let cek = CE::generate(&mut rng).kind(ErrorKind::InvalidState, "Unable generate cek")?; + let (cek, epk) = { + // drop the rng imediatelly to avoid problems because it is not send. + let mut rng = random::default_rng(); + let cek = CE::generate(&mut rng).kind(ErrorKind::InvalidState, "Unable generate cek")?; + let epk = KE::generate(&mut rng).kind(ErrorKind::InvalidState, "Unable generate epk")?; + (cek, epk) + }; let apv = { let mut kids = recipients.iter().map(|r| r.0).collect::>(); @@ -43,8 +53,6 @@ where Sha256::digest(kids.join(".").as_bytes()) }; - let epk = KE::generate(&mut rng).kind(ErrorKind::InvalidState, "Unable generate epk")?; - let protected = { let epk = epk.to_jwk_public_value()?; let apu = skid.map(|skid| base64::encode_config(skid, base64::URL_SAFE_NO_PAD)); @@ -95,24 +103,46 @@ where let mut encrypted_keys: Vec<(&str, String)> = Vec::with_capacity(recipients.len()); for (kid, key) in recipients { - let kw = KDF::derive_key( - &epk, - skey, - &key, - alg.as_str().as_bytes(), - skid.as_ref().map(|s| s.as_bytes()).unwrap_or(&[]), - apv.as_slice(), - &tag_raw, - false, - ) - .kind(ErrorKind::InvalidState, "Unable derive kw")?; //TODO Check this test and move to decrypt + let kw = match derive_func { + None => KDF::derive_key( + &epk, + None, + &key, + alg.as_str().as_bytes(), + skid.as_ref().map(|s| s.as_bytes()).unwrap_or(&[]), + apv.as_slice(), + &tag_raw, + false, + ), + Some(ref derive_func) => { + derive_func( + epk.to_jwk_secret(None) + .kind(ErrorKind::InvalidState, "Unable to serialize epk")? + .as_opt_str() + .ok_or(err_msg(ErrorKind::InvalidState, "Unable to serialize epk"))? + .to_string(), + skid.map(|x| x.to_string()), + key.to_jwk_public(None) + .kind(ErrorKind::Malformed, "Unable to serialize recip key")?, + alg.as_str().as_bytes().to_owned(), + skid.as_ref() + .map(|s| s.as_bytes()) + .unwrap_or(&[]) + .to_owned(), + apv.as_slice().to_owned(), + tag_raw.to_owned(), + ) + .await + } + } + .context("Unable to derive kw")?; let encrypted_key = kw .wrap_key(&cek) .kind(ErrorKind::InvalidState, "Unable wrap key")?; let encrypted_key = base64::encode_config(&encrypted_key, base64::URL_SAFE_NO_PAD); - encrypted_keys.push((kid.clone(), encrypted_key)); + encrypted_keys.push((&kid, encrypted_key)); } encrypted_keys @@ -154,8 +184,10 @@ mod tests { repr::{KeyGen, KeyPublicBytes, KeySecretBytes, ToPublicBytes, ToSecretBytes}, }; + use crate::error::{err_msg, ResultExt}; + use crate::utils::DummyFuture; use crate::{ - error::ErrorKind, + error::{ErrorKind, Result}, jwe::{ self, envelope::{Algorithm, EncAlgorithm}, @@ -165,8 +197,8 @@ mod tests { utils::crypto::{JoseKDF, KeyWrap}, }; - #[test] - fn encrypt_works() { + #[tokio::test] + async fn encrypt_works() { _encrypt_works::< AesKey, Ecdh1PU<'_, X25519KeyPair>, @@ -177,7 +209,8 @@ mod tests { &[(BOB_KID_X25519_1, BOB_KEY_X25519_1, BOB_PKEY_X25519_1)], Algorithm::Ecdh1puA256kw, EncAlgorithm::A256cbcHs512, - ); + ) + .await; _encrypt_works::< AesKey, @@ -193,14 +226,15 @@ mod tests { ], Algorithm::Ecdh1puA256kw, EncAlgorithm::A256cbcHs512, - ); + ) + .await; _encrypt_works::, Ecdh1PU<'_, P256KeyPair>, P256KeyPair, AesKey>( Some((ALICE_KID_P256_1, ALICE_KEY_P256_1, ALICE_PKEY_P256_1)), &[(BOB_KID_P256_1, BOB_KEY_P256_1, BOB_PKEY_P256_1)], Algorithm::Ecdh1puA256kw, EncAlgorithm::A256cbcHs512, - ); + ).await; _encrypt_works::, Ecdh1PU<'_, P256KeyPair>, P256KeyPair, AesKey>( Some((ALICE_KID_P256_1, ALICE_KEY_P256_1, ALICE_PKEY_P256_1)), @@ -210,7 +244,7 @@ mod tests { ], Algorithm::Ecdh1puA256kw, EncAlgorithm::A256cbcHs512, - ); + ).await; _encrypt_works::< AesKey, @@ -222,7 +256,8 @@ mod tests { &[(BOB_KID_X25519_1, BOB_KEY_X25519_1, BOB_PKEY_X25519_1)], Algorithm::EcdhEsA256kw, EncAlgorithm::A256cbcHs512, - ); + ) + .await; _encrypt_works::< AesKey, @@ -238,14 +273,15 @@ mod tests { ], Algorithm::EcdhEsA256kw, EncAlgorithm::A256cbcHs512, - ); + ) + .await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, &[(BOB_KID_P256_1, BOB_KEY_P256_1, BOB_PKEY_P256_1)], Algorithm::EcdhEsA256kw, EncAlgorithm::A256cbcHs512, - ); + ).await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, @@ -255,14 +291,14 @@ mod tests { ], Algorithm::EcdhEsA256kw, EncAlgorithm::A256cbcHs512, - ); + ).await; _encrypt_works::, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey>( None, &[(BOB_KID_X25519_1, BOB_KEY_X25519_1, BOB_PKEY_X25519_1)], Algorithm::EcdhEsA256kw, EncAlgorithm::A256Gcm, - ); + ).await; _encrypt_works::, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey>( None, @@ -273,14 +309,15 @@ mod tests { ], Algorithm::EcdhEsA256kw, EncAlgorithm::A256Gcm, - ); + ).await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, &[(BOB_KID_P256_1, BOB_KEY_P256_1, BOB_PKEY_P256_1)], Algorithm::EcdhEsA256kw, EncAlgorithm::A256Gcm, - ); + ) + .await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, @@ -290,7 +327,8 @@ mod tests { ], Algorithm::EcdhEsA256kw, EncAlgorithm::A256Gcm, - ); + ) + .await; _encrypt_works::< Chacha20Key, @@ -302,7 +340,8 @@ mod tests { &[(BOB_KID_X25519_1, BOB_KEY_X25519_1, BOB_PKEY_X25519_1)], Algorithm::EcdhEsA256kw, EncAlgorithm::Xc20P, - ); + ) + .await; _encrypt_works::< Chacha20Key, @@ -318,14 +357,16 @@ mod tests { ], Algorithm::EcdhEsA256kw, EncAlgorithm::Xc20P, - ); + ) + .await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, &[(BOB_KID_P256_1, BOB_KEY_P256_1, BOB_PKEY_P256_1)], Algorithm::EcdhEsA256kw, EncAlgorithm::Xc20P, - ); + ) + .await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, @@ -335,7 +376,8 @@ mod tests { ], Algorithm::EcdhEsA256kw, EncAlgorithm::Xc20P, - ); + ) + .await; _encrypt_works::, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey>( None, @@ -345,10 +387,11 @@ mod tests { ], Algorithm::Other("otherAlg".to_owned()), EncAlgorithm::A256Gcm, - ); + ) + .await; /// TODO: P-384 and P-521 support after solving https://github.com/hyperledger/aries-askar/issues/10 - fn _encrypt_works( + async fn _encrypt_works( alice: Option<(&str, &str, &str)>, bob: &[(&str, &str, &str)], alg: Algorithm, @@ -356,7 +399,13 @@ mod tests { ) where CE: KeyAeadInPlace + KeyAeadMeta + KeyGen + ToSecretBytes + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + ToPublicBytes + KeyPublicBytes, + KE: KeyExchange + + KeyGen + + ToJwkValue + + FromJwkValue + + ToPublicBytes + + KeyPublicBytes + + Clone, KW: KeyWrap + FromKeyDerivation, { let alice = alice.map(|a| { @@ -387,13 +436,53 @@ mod tests { let plaintext = "Some plaintext."; - let msg = jwe::encrypt::( + let msg = jwe::encrypt::( plaintext.as_bytes(), alg.clone(), enc_alg.clone(), - alice_priv, + alice_priv.map(|(kid, key)| { + ( + kid, + move |ephem_key: String, + send_kid: Option, + recip_key: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + if send_kid.map(|x| x.as_str() == kid).unwrap_or(false) { + let ephem_key = KE::from_jwk(&ephem_key).kind( + ErrorKind::InvalidState, + "Unable to deserialize ephemeral key", + )?; + let recip_key = KE::from_jwk(&recip_key).kind( + ErrorKind::InvalidState, + "Unable to deserialize recip key", + )?; + KDF::derive_key( + &ephem_key, + Some(&key), + &recip_key, + &alg, + &apu, + &apv, + &cc_tag, + false, + ) + } else { + Err(err_msg( + ErrorKind::InvalidState, + "No sender key for requested kid", + )) + } + } + }, + ) + }), &bob_pub, ) + .await .expect("Unable encrypt"); let mut buf = vec![]; @@ -412,7 +501,45 @@ mod tests { .expect("recipient not found."); let plaintext_ = msg - .decrypt::(alice_pub, *bob_edge_priv) + .decrypt::( + alice_pub, + ( + bob_edge_priv.0, + |ephem_key: String, + sender_key: Option, + _recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let ephem_key = KE::from_jwk(&ephem_key).kind( + ErrorKind::InvalidState, + "Unable to deserialize ephem key", + )?; + let sender_key = sender_key + .map(|sk_jwk| { + KE::from_jwk(&sk_jwk).kind( + ErrorKind::InvalidState, + "Unable to deserialize ephem key", + ) + }) + .transpose()?; + KDF::derive_key( + &ephem_key, + sender_key.as_ref(), + &bob_edge_priv.1, + &alg, + &apu, + &apv, + &cc_tag, + true, + ) + } + }, + ), + ) + .await .expect("unable decrypt."); assert_eq!(plaintext_, plaintext.as_bytes()); @@ -420,8 +547,8 @@ mod tests { } } - #[test] - fn encrypt_works_no_sender() { + #[tokio::test] + async fn encrypt_works_no_sender() { let bob_kid = BOB_KID_X25519_1; let bob_pkey = X25519KeyPair::from_jwk(BOB_PKEY_X25519_1).expect("unable from_jwk"); let plaintext = "Some plaintext."; @@ -431,16 +558,32 @@ mod tests { Ecdh1PU<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( plaintext.as_bytes(), Algorithm::Ecdh1puA256kw, EncAlgorithm::A256cbcHs512, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &[(bob_kid, &bob_pkey)], - ); + ) + .await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); - assert_eq!(format!("{}", err), "Invalid state: Unable derive kw: Invalid state: No sender key for ecdh-1pu: No sender key for ecdh-1pu"); + assert_eq!( + format!("{}", err), + "Invalid state: Unable to derive kw: No sender key for ecdh-1pu" + ); } } diff --git a/src/jws/mod.rs b/src/jws/mod.rs index f7f5e805..ba92443a 100644 --- a/src/jws/mod.rs +++ b/src/jws/mod.rs @@ -31,15 +31,21 @@ mod tests { use askar_crypto::{alg::ed25519::Ed25519KeyPair, jwk::FromJwk}; use crate::jws::{self, Algorithm}; + use crate::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; + use crate::secrets::resolvers::ExampleKMS; - #[test] - fn demo_works() { + #[tokio::test] + async fn demo_works() { // Identifier of Alice key let alice_kid = "did:example:alice#key-1"; // Alice private key - let alice_key = Ed25519KeyPair::from_jwk( - r#" + let alice_secret = Secret { + id: alice_kid.to_string(), + type_: SecretType::JsonWebKey2020, + secret_material: SecretMaterial::JWK { + private_key_jwk: serde_json::from_str( + r#" { "kty":"OKP", "d":"pFRUKkyzx4kHdJtFSnlPA9WzqkDT1HWV0xZ5OYZd2SY", @@ -47,8 +53,11 @@ mod tests { "x":"G-boxFB6vOZBu-wXkm-9Lh79I8nf9Z50cILaOgKKGww" } "#, - ) - .expect("Unable from_jwk"); + ) + .expect("Unable from_jwk"), + }, + }; + let kms = ExampleKMS::new(vec![alice_secret]); // Alice public key let alice_pkey = Ed25519KeyPair::from_jwk( @@ -67,12 +76,9 @@ mod tests { // Produce signed message - let msg = jws::sign( - payload.as_bytes(), - (alice_kid, &alice_key), - Algorithm::EdDSA, - ) - .expect("unable sign"); + let msg = jws::sign(payload.as_bytes(), alice_kid, Algorithm::EdDSA, &kms) + .await + .expect("unable sign"); // Parse message diff --git a/src/jws/sign.rs b/src/jws/sign.rs index 822aba6d..7131e2cf 100644 --- a/src/jws/sign.rs +++ b/src/jws/sign.rs @@ -1,18 +1,17 @@ -use askar_crypto::sign::KeySign; use std::borrow::Cow; +use crate::secrets::KeyManagementService; use crate::{ error::{ErrorKind, Result, ResultExt}, jws::envelope::{Algorithm, CompactHeader, Header, ProtectedHeader, Signature, JWS}, }; -pub(crate) fn sign( +pub(crate) async fn sign( payload: &[u8], - signer: (&str, &Key), + kid: &str, alg: Algorithm, + kms: &dyn KeyManagementService, ) -> Result { - let (kid, key) = signer; - let sig_type = alg.sig_type()?; let protected = { @@ -35,8 +34,9 @@ pub(crate) fn sign( // is ASCII(BASE64URL(UTF8(JWS Protected Header)) || '.' || BASE64URL(JWS Payload)). let sign_input = format!("{}.{}", protected, payload); - let signature = key - .create_signature(sign_input.as_bytes(), Some(sig_type)) + let signature = kms + .create_signature(kid, sign_input.as_bytes(), Some(sig_type.into())) + .await .kind(ErrorKind::InvalidState, "Unable create signature")?; base64::encode_config(&signature, base64::URL_SAFE_NO_PAD) @@ -58,14 +58,13 @@ pub(crate) fn sign( Ok(jws) } -pub(crate) fn sign_compact( +pub(crate) async fn sign_compact( payload: &[u8], - signer: (&str, &Key), + kid: &str, typ: &str, alg: Algorithm, + kms: &dyn KeyManagementService, ) -> Result { - let (kid, key) = signer; - let sig_type = alg.sig_type()?; let header = { @@ -85,9 +84,9 @@ pub(crate) fn sign_compact( // is ASCII(BASE64URL(UTF8(JWS Protected Header)) || '.' || BASE64URL(JWS Payload)). let sign_input = format!("{}.{}", header, payload); - let signature = key - .create_signature(sign_input.as_bytes(), Some(sig_type)) - .kind(ErrorKind::InvalidState, "Unable create signature")?; + let signature = kms + .create_signature(kid, sign_input.as_bytes(), Some(sig_type.into())) + .await?; base64::encode_config(&signature, base64::URL_SAFE_NO_PAD) }; @@ -105,20 +104,23 @@ mod tests { sign::{KeySigVerify, KeySign}, }; + use crate::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; + use crate::secrets::resolvers::ExampleKMS; use crate::{ error::{ErrorKind, Result}, jws::{self, envelope::Algorithm}, }; - #[test] - fn sign_works() { + #[tokio::test] + async fn sign_works() { _sign_works::( ALICE_KID_ED25519, ALICE_KEY_ED25519, ALICE_PKEY_ED25519, Algorithm::EdDSA, PAYLOAD, - ); + ) + .await; _sign_works::( ALICE_KID_P256, @@ -126,7 +128,8 @@ mod tests { ALICE_PKEY_P256, Algorithm::Es256, PAYLOAD, - ); + ) + .await; _sign_works::( ALICE_KID_K256, @@ -134,16 +137,17 @@ mod tests { ALICE_PKEY_K256, Algorithm::Es256K, PAYLOAD, - ); + ) + .await; - fn _sign_works( + async fn _sign_works( kid: &str, key: &str, pkey: &str, alg: Algorithm, payload: &str, ) { - let res = _sign::(kid, key, alg.clone(), payload); + let res = _sign(kid, key, alg.clone(), payload).await; let msg = res.expect("Unable _sign"); @@ -169,112 +173,83 @@ mod tests { } } - #[test] - fn sign_works_incompatible_alg() { - _sign_works_incompatible_alg::( + #[tokio::test] + async fn sign_works_incompatible_alg() { + _sign_works_incompatible_alg( ALICE_KID_ED25519, ALICE_KEY_ED25519, Algorithm::Es256, PAYLOAD, - ); + ) + .await; - _sign_works_incompatible_alg::( + _sign_works_incompatible_alg( ALICE_KID_ED25519, ALICE_KEY_ED25519, Algorithm::Es256K, PAYLOAD, - ); + ) + .await; - _sign_works_incompatible_alg::( - ALICE_KID_P256, - ALICE_KEY_P256, - Algorithm::Es256K, - PAYLOAD, - ); + _sign_works_incompatible_alg(ALICE_KID_P256, ALICE_KEY_P256, Algorithm::Es256K, PAYLOAD) + .await; - _sign_works_incompatible_alg::( - ALICE_KID_P256, - ALICE_KEY_P256, - Algorithm::EdDSA, - PAYLOAD, - ); + _sign_works_incompatible_alg(ALICE_KID_P256, ALICE_KEY_P256, Algorithm::EdDSA, PAYLOAD) + .await; - _sign_works_incompatible_alg::( - ALICE_KID_P256, - ALICE_KEY_P256, - Algorithm::Es256K, - PAYLOAD, - ); + _sign_works_incompatible_alg(ALICE_KID_P256, ALICE_KEY_P256, Algorithm::Es256K, PAYLOAD) + .await; - _sign_works_incompatible_alg::( - ALICE_KID_K256, - ALICE_KEY_K256, - Algorithm::Es256, - PAYLOAD, - ); + _sign_works_incompatible_alg(ALICE_KID_K256, ALICE_KEY_K256, Algorithm::Es256, PAYLOAD) + .await; - _sign_works_incompatible_alg::( - ALICE_KID_K256, - ALICE_KEY_K256, - Algorithm::EdDSA, - PAYLOAD, - ); + _sign_works_incompatible_alg(ALICE_KID_K256, ALICE_KEY_K256, Algorithm::EdDSA, PAYLOAD) + .await; - _sign_works_incompatible_alg::( - ALICE_KID_K256, - ALICE_KEY_K256, - Algorithm::Es256, - PAYLOAD, - ); + _sign_works_incompatible_alg(ALICE_KID_K256, ALICE_KEY_K256, Algorithm::Es256, PAYLOAD) + .await; - fn _sign_works_incompatible_alg( - kid: &str, - key: &str, - alg: Algorithm, - payload: &str, - ) { - let res = _sign::(kid, key, alg.clone(), payload); + async fn _sign_works_incompatible_alg(kid: &str, key: &str, alg: Algorithm, payload: &str) { + let res = _sign(kid, key, alg.clone(), payload).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); assert_eq!( format!("{}", err), - "Invalid state: Unable create signature: Unsupported signature type" + "Invalid state: Unable create signature: Invalid state: Unable create signature: Unsupported signature type: Unable create signature: Unsupported signature type" ); } } - #[test] - fn sign_works_unknown_alg() { - _sign_works_unknown_alg::( + #[tokio::test] + async fn sign_works_unknown_alg() { + _sign_works_unknown_alg( ALICE_KID_ED25519, ALICE_KEY_ED25519, Algorithm::Other("bls".to_owned()), PAYLOAD, - ); + ) + .await; - _sign_works_unknown_alg::( + _sign_works_unknown_alg( ALICE_KID_P256, ALICE_KEY_P256, Algorithm::Other("bls".to_owned()), PAYLOAD, - ); + ) + .await; - _sign_works_unknown_alg::( + _sign_works_unknown_alg( ALICE_KID_K256, ALICE_KEY_K256, Algorithm::Other("bls".to_owned()), PAYLOAD, - ); + ) + .await; - fn _sign_works_unknown_alg( - kid: &str, - key: &str, - alg: Algorithm, - payload: &str, - ) { - let res = _sign::(kid, key, alg.clone(), payload); + async fn _sign_works_unknown_alg(kid: &str, key: &str, alg: Algorithm, payload: &str) { + let res = _sign(kid, key, alg.clone(), payload).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Unsupported); @@ -286,8 +261,8 @@ mod tests { } } - #[test] - fn sign_compact_works() { + #[tokio::test] + async fn sign_compact_works() { _sign_compact_works::( ALICE_KID_ED25519, ALICE_KEY_ED25519, @@ -295,7 +270,8 @@ mod tests { "example-typ-1", Algorithm::EdDSA, PAYLOAD, - ); + ) + .await; _sign_compact_works::( ALICE_KID_P256, @@ -304,7 +280,8 @@ mod tests { "example-typ-2", Algorithm::Es256, PAYLOAD, - ); + ) + .await; _sign_compact_works::( ALICE_KID_K256, @@ -313,9 +290,10 @@ mod tests { "example-typ-3", Algorithm::Es256K, PAYLOAD, - ); + ) + .await; - fn _sign_compact_works( + async fn _sign_compact_works( kid: &str, key: &str, pkey: &str, @@ -323,7 +301,7 @@ mod tests { alg: Algorithm, payload: &str, ) { - let res = _sign_compact::(kid, key, typ, alg.clone(), payload); + let res = _sign_compact(kid, key, typ, alg.clone(), payload).await; let msg = res.expect("Unable _sign_compact"); @@ -339,6 +317,8 @@ mod tests { assert_eq!(msg.parsed_header.alg, alg); assert_eq!(msg.parsed_header.kid, kid); + println!("pkey: {}", pkey); + let pkey = K::from_jwk(pkey).expect("Unable from_jwk"); let valid = msg.verify::(&pkey).expect("Unable verify"); @@ -346,80 +326,88 @@ mod tests { } } - #[test] - fn sign_compact_works_incompatible_alg() { - _sign_compact_works_incompatible_alg::( + #[tokio::test] + async fn sign_compact_works_incompatible_alg() { + _sign_compact_works_incompatible_alg( ALICE_KID_ED25519, ALICE_KEY_ED25519, "example-typ-1", Algorithm::Es256, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_ED25519, ALICE_KEY_ED25519, "example-typ-1", Algorithm::Es256K, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_P256, ALICE_KEY_P256, "example-typ-1", Algorithm::Es256K, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_P256, ALICE_KEY_P256, "example-typ-1", Algorithm::EdDSA, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_P256, ALICE_KEY_P256, "example-typ-1", Algorithm::Es256K, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_K256, ALICE_KEY_K256, "example-typ-1", Algorithm::Es256, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_K256, ALICE_KEY_K256, "example-typ-1", Algorithm::EdDSA, PAYLOAD, - ); + ) + .await; - _sign_compact_works_incompatible_alg::( + _sign_compact_works_incompatible_alg( ALICE_KID_K256, ALICE_KEY_K256, "example-typ-1", Algorithm::Es256, PAYLOAD, - ); + ) + .await; - fn _sign_compact_works_incompatible_alg( + async fn _sign_compact_works_incompatible_alg( kid: &str, key: &str, typ: &str, alg: Algorithm, payload: &str, ) { - let res = _sign_compact::(kid, key, typ, alg.clone(), payload); + let res = _sign_compact(kid, key, typ, alg.clone(), payload).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::InvalidState); @@ -431,40 +419,43 @@ mod tests { } } - #[test] - fn sign_compact_works_unknown_alg() { - _sign_compact_works_unknown_alg::( + #[tokio::test] + async fn sign_compact_works_unknown_alg() { + _sign_compact_works_unknown_alg( ALICE_KID_ED25519, ALICE_KEY_ED25519, "example-typ-1", Algorithm::Other("bls".to_owned()), PAYLOAD, - ); + ) + .await; - _sign_compact_works_unknown_alg::( + _sign_compact_works_unknown_alg( ALICE_KID_P256, ALICE_KEY_P256, "example-typ-1", Algorithm::Other("bls".to_owned()), PAYLOAD, - ); + ) + .await; - _sign_compact_works_unknown_alg::( + _sign_compact_works_unknown_alg( ALICE_KID_K256, ALICE_KEY_K256, "example-typ-1", Algorithm::Other("bls".to_owned()), PAYLOAD, - ); + ) + .await; - fn _sign_compact_works_unknown_alg( + async fn _sign_compact_works_unknown_alg( kid: &str, key: &str, typ: &str, alg: Algorithm, payload: &str, ) { - let res = _sign_compact::(kid, key, typ, alg.clone(), payload); + let res = _sign_compact(kid, key, typ, alg.clone(), payload).await; let err = res.expect_err("res is ok"); assert_eq!(err.kind(), ErrorKind::Unsupported); @@ -476,25 +467,34 @@ mod tests { } } - fn _sign( - kid: &str, - key: &str, - alg: Algorithm, - payload: &str, - ) -> Result { - let key = K::from_jwk(key).expect("Unable from_jwk"); - jws::sign(payload.as_bytes(), (&kid, &key), alg.clone()) + async fn _sign(kid: &str, key: &str, alg: Algorithm, payload: &str) -> Result { + let secret = Secret { + id: kid.to_string(), + type_: SecretType::JsonWebKey2020, + secret_material: SecretMaterial::JWK { + private_key_jwk: serde_json::from_str(key)?, + }, + }; + let kms = ExampleKMS::new(vec![secret]); + jws::sign(payload.as_bytes(), kid, alg.clone(), &kms).await } - fn _sign_compact( + async fn _sign_compact( kid: &str, key: &str, typ: &str, alg: Algorithm, payload: &str, ) -> Result { - let key = K::from_jwk(key).expect("Unable from_jwk"); - jws::sign_compact(payload.as_bytes(), (&kid, &key), typ, alg.clone()) + let secret = Secret { + id: kid.to_string(), + type_: SecretType::JsonWebKey2020, + secret_material: SecretMaterial::JWK { + private_key_jwk: serde_json::from_str(key)?, + }, + }; + let kms = ExampleKMS::new(vec![secret]); + jws::sign_compact(payload.as_bytes(), kid, typ, alg.clone(), &kms).await } const ALICE_KID_ED25519: &str = "did:example:alice#key-1"; @@ -552,6 +552,7 @@ mod tests { const ALICE_PKEY_K256: &str = r#" { "kty":"EC", + "crv":"secp256k1", "d":"N3Hm1LXA210YVGGsXw_GklMwcLu_bMgnzDese6YQIyA", "x":"aToW5EaTq5mlAf8C5ECYDSkqsJycrW-e1SQ6_GJcAOk", "y":"JAGX94caA21WKreXwYUaOCYTBMrqaX4KWIlsQZTHWCk" diff --git a/src/jws/verify.rs b/src/jws/verify.rs index a59809bf..74702b2e 100644 --- a/src/jws/verify.rs +++ b/src/jws/verify.rs @@ -489,6 +489,7 @@ mod tests { const ALICE_PKEY_K256: &str = r#" { "kty":"EC", + "crv":"secp256k1", "d":"N3Hm1LXA210YVGGsXw_GklMwcLu_bMgnzDese6YQIyA", "x":"aToW5EaTq5mlAf8C5ECYDSkqsJycrW-e1SQ6_GJcAOk", "y":"JAGX94caA21WKreXwYUaOCYTBMrqaX4KWIlsQZTHWCk" diff --git a/src/lib.rs b/src/lib.rs index 5c857ab2..572b98e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,7 +34,7 @@ mod tests { use serde_json::json; use crate::{ - did::resolvers::ExampleDIDResolver, secrets::resolvers::ExampleSecretsResolver, Message, + did::resolvers::ExampleDIDResolver, secrets::resolvers::ExampleKMS, Message, PackEncryptedOptions, UnpackOptions, }; @@ -58,7 +58,7 @@ mod tests { // --- Packing message --- let sender_did_resolver = ExampleDIDResolver::new(vec![]); - let sender_secrets_resolver = ExampleSecretsResolver::new(vec![]); + let sender_kms = ExampleKMS::new(vec![]); let (packed_msg, metadata) = msg .pack_encrypted( @@ -66,7 +66,7 @@ mod tests { Some(sender), None, &sender_did_resolver, - &sender_secrets_resolver, + &sender_kms, &PackEncryptedOptions::default(), ) .await @@ -84,12 +84,12 @@ mod tests { // --- Unpacking message --- let recipient_did_resolver = ExampleDIDResolver::new(vec![]); - let recipient_secrets_resolver = ExampleSecretsResolver::new(vec![]); + let recipient_kms = ExampleKMS::new(vec![]); let (msg, metadata) = Message::unpack( &packed_msg, &recipient_did_resolver, - &recipient_secrets_resolver, + &recipient_kms, &UnpackOptions::default(), ) .await diff --git a/src/message/from_prior/pack.rs b/src/message/from_prior/pack.rs index a16b1809..5973f6b6 100644 --- a/src/message/from_prior/pack.rs +++ b/src/message/from_prior/pack.rs @@ -1,13 +1,11 @@ +use crate::secrets::KnownKeyAlg; use crate::{ did::DIDResolver, error::{err_msg, ErrorKind, Result, ResultContext, ResultExt}, jws::{self, Algorithm}, message::from_prior::JWT_TYP, - secrets::SecretsResolver, - utils::{ - crypto::{AsKnownKeyPair, KnownKeyPair}, - did::{did_or_url, is_did}, - }, + secrets::KeyManagementService, + utils::did::{did_or_url, is_did}, FromPrior, }; @@ -18,7 +16,7 @@ impl FromPrior { /// # Parameters /// - `issuer_kid` (optional) identifier of the issuer key being used to sign `from_prior` JWT value. /// - `did_resolver` instance of `DIDResolver` to resolve DIDs. - /// - `secrets_resolver` instance of `SecretsResolver` to resolve issuer DID keys secrets. + /// - `kms` instance of `SecretsResolver` to resolve issuer DID keys secrets. /// /// # Returns /// Tuple (signed `from_prior` JWT, identifier of the issuer key actually used to sign `from_prior`) @@ -35,7 +33,7 @@ impl FromPrior { &self, issuer_kid: Option<&str>, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), ) -> Result<(String, String)> { self.validate_pack(issuer_kid)?; @@ -86,7 +84,7 @@ impl FromPrior { did_doc.authentication.iter().map(|s| s.as_str()).collect() }; - let kid = *secrets_resolver + let kid = *kms .find_secrets(&authentication_kids) .await .context("Unable to find secrets")? @@ -98,42 +96,38 @@ impl FromPrior { ) })?; - let secret = secrets_resolver - .get_secret(kid) - .await - .context("Unable to find secret")? - .ok_or_else(|| { - err_msg( - ErrorKind::SecretNotFound, - "from_prior issuer secret not found", - ) - })?; - - let sign_key = secret - .as_key_pair() - .context("Unable to instantiate from_prior issuer key")?; + let secret_alg = kms.get_key_alg(kid).await.map_err(|_| { + err_msg( + ErrorKind::SecretNotFound, + "from_prior issuer secret not found", + ) + })?; - let from_prior_jwt = match sign_key { - KnownKeyPair::Ed25519(ref key) => jws::sign_compact( + let from_prior_jwt = match secret_alg { + KnownKeyAlg::Ed25519 => jws::sign_compact( from_prior_str.as_bytes(), - (kid, key), + kid, JWT_TYP, Algorithm::EdDSA, + kms, ), - KnownKeyPair::P256(ref key) => jws::sign_compact( + KnownKeyAlg::P256 => jws::sign_compact( from_prior_str.as_bytes(), - (kid, key), + kid, JWT_TYP, Algorithm::Es256, + kms, ), - KnownKeyPair::K256(ref key) => jws::sign_compact( + KnownKeyAlg::K256 => jws::sign_compact( from_prior_str.as_bytes(), - (kid, key), + kid, JWT_TYP, Algorithm::Es256K, + kms, ), _ => Err(err_msg(ErrorKind::Unsupported, "Unsupported signature alg"))?, } + .await .context("Unable to produce signature")?; Ok((from_prior_jwt, String::from(kid))) @@ -188,7 +182,7 @@ mod tests { use crate::{ did::resolvers::ExampleDIDResolver, error::ErrorKind, - secrets::resolvers::ExampleSecretsResolver, + secrets::resolvers::ExampleKMS, test_vectors::{ ALICE_DID, ALICE_DID_DOC, ALICE_SECRETS, ALICE_SECRET_AUTH_KEY_ED25519, CHARLIE_DID, CHARLIE_DID_DOC, CHARLIE_ROTATED_TO_ALICE_SECRETS, CHARLIE_SECRET_AUTH_KEY_ED25519, @@ -209,7 +203,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), CHARLIE_DID_DOC.clone()]); let charlie_rotated_to_alice_secrets_resolver = - ExampleSecretsResolver::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); + ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); let (from_prior_jwt, pack_kid) = from_prior .pack( @@ -241,7 +235,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), CHARLIE_DID_DOC.clone()]); let charlie_rotated_to_alice_secrets_resolver = - ExampleSecretsResolver::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); + ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); let (from_prior_jwt, pack_kid) = from_prior .pack( @@ -300,7 +294,7 @@ mod tests { ) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), CHARLIE_DID_DOC.clone()]); - let alice_secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let alice_secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let err = from_prior .pack(Some(issuer_kid), &did_resolver, &alice_secrets_resolver) @@ -357,7 +351,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), CHARLIE_DID_DOC.clone()]); let charlie_rotated_to_alice_secrets_resolver = - ExampleSecretsResolver::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); + ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); let err = from_prior .pack( diff --git a/src/message/pack_encrypted/anoncrypt.rs b/src/message/pack_encrypted/anoncrypt.rs index d0ed1f49..eab24fb5 100644 --- a/src/message/pack_encrypted/anoncrypt.rs +++ b/src/message/pack_encrypted/anoncrypt.rs @@ -8,6 +8,7 @@ use askar_crypto::{ kdf::ecdh_es::EcdhEs, }; +use crate::utils::DummyFuture; use crate::{ algorithms::AnonCryptAlg, did::DIDResolver, @@ -106,39 +107,78 @@ pub(crate) async fn anoncrypt<'dr, 'sr>( EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg, jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256cbcHs512, - None, + None::<( + &str, + fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce anoncrypt envelope")?, AnonCryptAlg::Xc20pEcdhEsA256kw => jwe::encrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg, jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::Xc20P, - None, + None::<( + &str, + fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce anoncrypt envelope")?, AnonCryptAlg::A256gcmEcdhEsA256kw => jwe::encrypt::< AesKey, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg, jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256Gcm, - None, + None::<( + &str, + fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce anoncrypt envelope")?, } } @@ -159,39 +199,78 @@ pub(crate) async fn anoncrypt<'dr, 'sr>( EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg, jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256cbcHs512, - None, + None::<( + &str, + fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce anoncrypt envelope")?, AnonCryptAlg::Xc20pEcdhEsA256kw => jwe::encrypt::< Chacha20Key, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg, jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::Xc20P, - None, + None::<( + &str, + fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce anoncrypt envelope")?, AnonCryptAlg::A256gcmEcdhEsA256kw => jwe::encrypt::< AesKey, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg, jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256Gcm, - None, + None::<( + &str, + fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce anoncrypt envelope")?, } } diff --git a/src/message/pack_encrypted/authcrypt.rs b/src/message/pack_encrypted/authcrypt.rs index 06f787c8..9b3f8c02 100644 --- a/src/message/pack_encrypted/authcrypt.rs +++ b/src/message/pack_encrypted/authcrypt.rs @@ -1,30 +1,31 @@ -use askar_crypto::{ - alg::{ - aes::{A256CbcHs512, A256Gcm, A256Kw, AesKey}, - chacha20::{Chacha20Key, XC20P}, - p256::P256KeyPair, - x25519::X25519KeyPair, - }, - kdf::{ecdh_1pu::Ecdh1PU, ecdh_es::EcdhEs}, -}; - +use crate::secrets::KidOrJwk; +use crate::utils::DummyFuture; use crate::{ algorithms::{AnonCryptAlg, AuthCryptAlg}, did::DIDResolver, error::{err_msg, ErrorKind, Result, ResultContext}, jwe, - secrets::SecretsResolver, + secrets::KeyManagementService, utils::{ crypto::{AsKnownKeyPair, KnownKeyAlg}, did::did_or_url, }, }; +use askar_crypto::{ + alg::{ + aes::{A256CbcHs512, A256Gcm, A256Kw, AesKey}, + chacha20::{Chacha20Key, XC20P}, + p256::P256KeyPair, + x25519::X25519KeyPair, + }, + kdf::{ecdh_1pu::Ecdh1PU, ecdh_es::EcdhEs}, +}; pub(crate) async fn authcrypt<'dr, 'sr>( to: &str, from: &str, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), msg: &[u8], enc_alg_auth: &AuthCryptAlg, enc_alg_anon: &AnonCryptAlg, @@ -65,7 +66,7 @@ pub(crate) async fn authcrypt<'dr, 'sr>( } // Keep only sender keys present in the wallet - let from_kids = secrets_resolver + let from_kids = kms .find_secrets(&from_kids) .await .context("Unable find secrets")?; @@ -154,13 +155,6 @@ pub(crate) async fn authcrypt<'dr, 'sr>( ) })?; - // Resolve secret for found sender key - let from_priv_key = secrets_resolver - .get_secret(&from_key.id) - .await - .context("Unable resolve sender secret")? - .ok_or_else(|| err_msg(ErrorKind::InvalidState, "Sender secret not found"))?; - let key_alg = from_key.key_alg(); // Keep only recipient keys compatible with sender key @@ -187,13 +181,42 @@ pub(crate) async fn authcrypt<'dr, 'sr>( Ecdh1PU<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg, jwe::Algorithm::Ecdh1puA256kw, jwe::EncAlgorithm::A256cbcHs512, - Some((&from_key.id, &from_priv_key.as_x25519()?)), + Some(( + &from_key.id, + |ephem_key: String, + send_kid: Option, + recip_key: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let send_kid = send_kid.ok_or_else(|| { + err_msg(ErrorKind::InvalidState, "No sender key for ecdh-1pu") + })?; + + kms.derive_aes_key_using_ecdh_1pu( + KidOrJwk::X25519Key(ephem_key), + KidOrJwk::Kid(send_kid), + KidOrJwk::X25519Key(recip_key), + alg, + apu, + apv, + cc_tag, + false, + ) + .await + } + }, + )), &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, }; @@ -204,39 +227,78 @@ pub(crate) async fn authcrypt<'dr, 'sr>( EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg.as_bytes(), jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256cbcHs512, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, AnonCryptAlg::Xc20pEcdhEsA256kw => jwe::encrypt::< Chacha20Key, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg.as_bytes(), jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::Xc20P, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, AnonCryptAlg::A256gcmEcdhEsA256kw => jwe::encrypt::< AesKey, EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, + _, >( msg.as_bytes(), jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256Gcm, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, } } else { @@ -260,13 +322,42 @@ pub(crate) async fn authcrypt<'dr, 'sr>( Ecdh1PU<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg, jwe::Algorithm::Ecdh1puA256kw, jwe::EncAlgorithm::A256cbcHs512, - Some((&from_key.id, &from_priv_key.as_p256()?)), + Some(( + &from_key.id, + &move |ephem_key: String, + send_kid: Option, + recip_key: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let send_kid = send_kid.ok_or_else(|| { + err_msg(ErrorKind::InvalidState, "No sender key for ecdh-1pu") + })?; + + kms.derive_aes_key_using_ecdh_1pu( + KidOrJwk::P256Key(ephem_key), + KidOrJwk::Kid(send_kid), + KidOrJwk::P256Key(recip_key), + alg, + apu, + apv, + cc_tag, + false, + ) + .await + } + }, + )), &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, }; @@ -277,39 +368,78 @@ pub(crate) async fn authcrypt<'dr, 'sr>( EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg.as_bytes(), jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256cbcHs512, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, AnonCryptAlg::Xc20pEcdhEsA256kw => jwe::encrypt::< Chacha20Key, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg.as_bytes(), jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::Xc20P, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, AnonCryptAlg::A256gcmEcdhEsA256kw => jwe::encrypt::< AesKey, EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, + _, >( msg.as_bytes(), jwe::Algorithm::EcdhEsA256kw, jwe::EncAlgorithm::A256Gcm, - None, + None::<( + &str, + &fn( + String, + Option, + String, + Vec, + Vec, + Vec, + Vec, + ) -> DummyFuture>>, + )>, &to_keys, ) + .await .context("Unable produce authcrypt envelope")?, } } else { diff --git a/src/message/pack_encrypted/mod.rs b/src/message/pack_encrypted/mod.rs index d731e6be..a344ec88 100644 --- a/src/message/pack_encrypted/mod.rs +++ b/src/message/pack_encrypted/mod.rs @@ -1,17 +1,16 @@ mod anoncrypt; mod authcrypt; -use std::collections::HashMap; - use serde::{Deserialize, Serialize}; use serde_json::Value; +use std::collections::HashMap; use crate::{ algorithms::{AnonCryptAlg, AuthCryptAlg}, did::DIDResolver, error::{err_msg, ErrorKind, Result, ResultContext}, protocols::routing::wrap_in_forward_if_needed, - secrets::SecretsResolver, + secrets::KeyManagementService, utils::did::{did_or_url, is_did}, Message, PackSignedMetadata, }; @@ -56,7 +55,7 @@ impl Message { /// Adding a signature when one is not needed can degrade rather than enhance security because /// it relinquishes the sender’s ability to speak off the record. /// - `did_resolver` instance of `DIDResolver` to resolve DIDs. - /// - `secrets_resolver` instance of SecretsResolver` to resolve sender DID keys secrets. + /// - `kms` instance of SecretsResolver` to resolve sender DID keys secrets. /// - `options` allow fine configuration of packing process and have implemented `Default`. /// /// # Returns @@ -80,7 +79,7 @@ impl Message { from: Option<&str>, sign_by: Option<&str>, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), options: &PackEncryptedOptions, ) -> Result<(String, PackEncryptedMetadata)> { self._validate_pack_encrypted(to, from, sign_by)?; @@ -96,7 +95,7 @@ impl Message { let (msg, sign_by_kid) = if let Some(sign_by) = sign_by { let (msg, PackSignedMetadata { sign_by_kid }) = self - .pack_signed(sign_by, did_resolver, secrets_resolver) + .pack_signed(sign_by, did_resolver, kms) .await .context("Unable produce sign envelope")?; @@ -114,7 +113,7 @@ impl Message { to, from, did_resolver, - secrets_resolver, + kms, msg.as_bytes(), &options.enc_alg_auth, &options.enc_alg_anon, @@ -294,6 +293,7 @@ mod tests { use serde_json::{json, Value}; + use crate::error::ResultExt; use crate::{ algorithms::AnonCryptAlg, did::{resolvers::ExampleDIDResolver, VerificationMaterial, VerificationMethod}, @@ -303,7 +303,10 @@ mod tests { jws, message::MessagingServiceMetadata, protocols::routing::{try_parse_forward, wrap_in_forward}, - secrets::{resolvers::ExampleSecretsResolver, Secret, SecretMaterial}, + secrets::resolvers::{ + example::{Secret, SecretMaterial}, + ExampleKMS, + }, test_vectors::{ ALICE_AUTH_METHOD_25519, ALICE_AUTH_METHOD_P256, ALICE_AUTH_METHOD_SECPP256K1, ALICE_DID, ALICE_DID_DOC, ALICE_DID_DOC_WITH_NO_SECRETS, ALICE_SECRETS, @@ -450,13 +453,13 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -464,7 +467,7 @@ mod tests { Some(from), None, &did_resolver, - &secrets_resolver, + &kms, &PackEncryptedOptions { forward: false, ..PackEncryptedOptions::default() @@ -483,7 +486,7 @@ mod tests { } ); - let msg = _verify_authcrypt::(&msg, to_keys, from_key); + let msg = _verify_authcrypt::(&msg, to_keys, from_key).await; _verify_plaintext(&msg, PLAINTEXT_MSG_SIMPLE); } } @@ -764,17 +767,17 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, ACE: KeyAeadInPlace + KeySecretBytes, AKDF: JoseKDF, - AKE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + AKE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, AKW: KeyWrap + FromKeyDerivation, { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -804,8 +807,9 @@ mod tests { ); let msg = - _verify_anoncrypt::(&msg, to_keys.clone(), enc_alg_anon_jwe); - let msg = _verify_authcrypt::(&msg, to_keys, from_key); + _verify_anoncrypt::(&msg, to_keys.clone(), enc_alg_anon_jwe) + .await; + let msg = _verify_authcrypt::(&msg, to_keys, from_key).await; _verify_plaintext(&msg, PLAINTEXT_MSG_SIMPLE); } } @@ -914,18 +918,18 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, ACE: KeyAeadInPlace + KeySecretBytes, AKDF: JoseKDF, - AKE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + AKE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, AKW: KeyWrap + FromKeyDerivation, SK: KeySigVerify + FromJwkValue, { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -955,8 +959,9 @@ mod tests { ); let msg = - _verify_anoncrypt::(&msg, to_keys.clone(), enc_alg_anon_jwe); - let msg = _verify_authcrypt::(&msg, to_keys, from_key); + _verify_anoncrypt::(&msg, to_keys.clone(), enc_alg_anon_jwe) + .await; + let msg = _verify_authcrypt::(&msg, to_keys, from_key).await; let msg = _verify_signed::(&msg, sign_by_key, sign_alg); _verify_plaintext(&msg, PLAINTEXT_MSG_SIMPLE); } @@ -1050,14 +1055,14 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, SK: KeySigVerify + FromJwkValue, { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -1084,7 +1089,7 @@ mod tests { } ); - let msg = _verify_authcrypt::(&msg, to_keys, from_key); + let msg = _verify_authcrypt::(&msg, to_keys, from_key).await; let msg = _verify_signed::(&msg, sign_by_key, sign_alg); _verify_plaintext(&msg, PLAINTEXT_MSG_SIMPLE); } @@ -1307,13 +1312,13 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -1341,7 +1346,7 @@ mod tests { } ); - let msg = _verify_anoncrypt::(&msg, to_keys, enc_alg_jwe); + let msg = _verify_anoncrypt::(&msg, to_keys, enc_alg_jwe).await; _verify_plaintext(&msg, PLAINTEXT_MSG_SIMPLE); } } @@ -1473,14 +1478,14 @@ mod tests { ) where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, SK: KeySigVerify + FromJwkValue, { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -1508,7 +1513,7 @@ mod tests { } ); - let msg = _verify_anoncrypt::(&msg, to_keys, enc_alg_jwe); + let msg = _verify_anoncrypt::(&msg, to_keys, enc_alg_jwe).await; let msg = _verify_signed::(&msg, sign_by_key, sign_alg); _verify_plaintext(&msg, PLAINTEXT_MSG_SIMPLE); } @@ -1563,11 +1568,9 @@ mod tests { MEDIATOR1_DID_DOC.clone(), ]); - let alice_secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); - - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); - - let mediator1_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let alice_kms = ExampleKMS::new(ALICE_SECRETS.clone()); + let bob_kms = ExampleKMS::new(BOB_SECRETS.clone()); + let mediator1_kms = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, pack_metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -1575,7 +1578,7 @@ mod tests { from, sign_by, &did_resolver, - &alice_secrets_resolver, + &alice_kms, &PackEncryptedOptions::default(), ) .await @@ -1621,7 +1624,7 @@ mod tests { let (unpacked_msg_mediator1, unpack_metadata_mediator1) = Message::unpack( &msg, &did_resolver, - &mediator1_secrets_resolver, + &mediator1_kms, &UnpackOptions::default(), ) .await @@ -1645,7 +1648,7 @@ mod tests { let (unpacked_msg, unpack_metadata) = Message::unpack( &forwarded_msg, &did_resolver, - &bob_secrets_resolver, + &bob_kms, &UnpackOptions::default(), ) .await @@ -1742,15 +1745,11 @@ mod tests { MEDIATOR3_DID_DOC.clone(), ]); - let alice_secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); - - let charlie_secrets_resolver = ExampleSecretsResolver::new(CHARLIE_SECRETS.clone()); - - let mediator1_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); - - let mediator2_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR2_SECRETS.clone()); - - let mediator3_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR3_SECRETS.clone()); + let alice_kms = ExampleKMS::new(ALICE_SECRETS.clone()); + let charlie_kms = ExampleKMS::new(CHARLIE_SECRETS.clone()); + let mediator1_kms = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); + let mediator2_kms = ExampleKMS::new(MEDIATOR2_SECRETS.clone()); + let mediator3_kms = ExampleKMS::new(MEDIATOR3_SECRETS.clone()); let (packed_msg, pack_metadata) = msg .pack_encrypted( @@ -1758,7 +1757,7 @@ mod tests { from, sign_by, &did_resolver, - &alice_secrets_resolver, + &alice_kms, &PackEncryptedOptions { forward_headers: Some(HashMap::from_iter([ ("example-header-1".into(), json!("example-header-1-value")), @@ -1810,7 +1809,7 @@ mod tests { let (unpacked_msg_mediator3, unpack_metadata_mediator3) = Message::unpack( &packed_msg, &did_resolver, - &mediator3_secrets_resolver, + &mediator3_kms, &UnpackOptions::default(), ) .await @@ -1847,7 +1846,7 @@ mod tests { let (unpacked_msg_mediator2, unpack_metadata_mediator2) = Message::unpack( &forwarded_msg_at_mediator3, &did_resolver, - &mediator2_secrets_resolver, + &mediator2_kms, &UnpackOptions::default(), ) .await @@ -1884,7 +1883,7 @@ mod tests { let (unpacked_msg_mediator1, unpack_metadata_mediator1) = Message::unpack( &forwarded_msg_at_mediator2, &did_resolver, - &mediator1_secrets_resolver, + &mediator1_kms, &UnpackOptions::default(), ) .await @@ -1918,7 +1917,7 @@ mod tests { let (unpacked_msg, unpack_metadata) = Message::unpack( &forwarded_msg_at_mediator1, &did_resolver, - &charlie_secrets_resolver, + &charlie_kms, &UnpackOptions::default(), ) .await @@ -1992,13 +1991,13 @@ mod tests { MEDIATOR2_DID_DOC.clone(), ]); - let alice_secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let alice_secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let bob_secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); - let mediator1_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let mediator1_secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); - let mediator2_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR2_SECRETS.clone()); + let mediator2_secrets_resolver = ExampleKMS::new(MEDIATOR2_SECRETS.clone()); let (msg, pack_metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -2113,7 +2112,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_encrypted( @@ -2143,7 +2142,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_encrypted( @@ -2173,7 +2172,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_encrypted( @@ -2203,7 +2202,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.from = CHARLIE_DID.to_string().into(); @@ -2235,7 +2234,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.to = Some(vec![CHARLIE_DID.to_string()]); @@ -2267,7 +2266,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.to = Some(vec![CHARLIE_DID.to_string(), BOB_DID.to_string()]); @@ -2291,7 +2290,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.from = "not-a-did".to_string().into(); @@ -2323,7 +2322,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.to = Some(vec!["not-a-did".to_string()]); @@ -2355,7 +2354,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let _ = MESSAGE_SIMPLE .pack_encrypted( @@ -2377,7 +2376,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.to = Some(vec![ALICE_DID.to_string(), BOB_DID.to_string()]); @@ -2401,7 +2400,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let _ = MESSAGE_SIMPLE .pack_encrypted( @@ -2423,7 +2422,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.from = "did:example:alice#key-x25519-1".to_string().into(); @@ -2456,7 +2455,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.to = Some(vec!["did:example:bob#key-x25519-1".into()]); @@ -2488,7 +2487,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.from = "did:example:unknown".to_string().into(); @@ -2517,7 +2516,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let from = ALICE_DID.to_string() + "#unknown-key"; let res = MESSAGE_SIMPLE @@ -2548,7 +2547,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let mut msg = MESSAGE_SIMPLE.clone(); msg.to = Some(vec!["did:example:unknown".into()]); @@ -2580,7 +2579,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let to = BOB_DID.to_string() + "#unknown-key"; let res = MESSAGE_SIMPLE @@ -2611,7 +2610,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let sign_by = ALICE_DID.to_string() + "#unknown-key"; let res = MESSAGE_SIMPLE @@ -2642,7 +2641,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_encrypted( @@ -2674,7 +2673,7 @@ mod tests { BOB_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_encrypted( @@ -2704,7 +2703,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC_NO_SECRETS.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let to = "did:example:bob#key-x25519-not-secrets-1"; let _ = MESSAGE_SIMPLE @@ -2759,7 +2758,7 @@ mod tests { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_encrypted( @@ -2793,8 +2792,8 @@ mod tests { CHARLIE_DID_DOC.clone(), ]); let charlie_rotated_to_alice_secrets_resolver = - ExampleSecretsResolver::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); + let bob_secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (packed_msg, _pack_metadata) = MESSAGE_FROM_PRIOR_FULL .pack_encrypted( @@ -2828,7 +2827,7 @@ mod tests { assert_eq!(unpack_metadata.from_prior.as_ref(), Some(&*FROM_PRIOR_FULL)); } - fn _verify_authcrypt( + async fn _verify_authcrypt( msg: &str, to_keys: Vec<&Secret>, from_key: &VerificationMethod, @@ -2836,7 +2835,7 @@ mod tests { where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { let mut buf = vec![]; @@ -2880,8 +2879,38 @@ mod tests { _ => panic!("Unexpected verification method"), }; + let derive_func = |ephem_key: String, + sender_key: Option, + _recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let ephem_key = KE::from_jwk(&ephem_key) + .kind(ErrorKind::InvalidState, "Unable to deserialize ephem key")?; + let sender_key = sender_key + .map(|sk_jwk| { + KE::from_jwk(&sk_jwk) + .kind(ErrorKind::InvalidState, "Unable to deserialize ephem key") + }) + .transpose()?; + KDF::derive_key( + &ephem_key, + sender_key.as_ref(), + &to_key, + &alg, + &apu, + &apv, + &cc_tag, + true, + ) + } + }; + let msg = msg - .decrypt::(Some((from_kid, &from_key)), (to_kid, &to_key)) + .decrypt::(Some((from_kid, &from_key)), (to_kid, derive_func)) + .await .expect("Unable decrypt msg"); common_msg = if let Some(ref res) = common_msg { @@ -2896,7 +2925,7 @@ mod tests { String::from_utf8(msg).expect("Unable from_utf8") } - fn _verify_anoncrypt( + async fn _verify_anoncrypt( msg: &str, to_keys: Vec<&Secret>, enc_alg: jwe::EncAlgorithm, @@ -2904,7 +2933,7 @@ mod tests { where CE: KeyAeadInPlace + KeySecretBytes, KDF: JoseKDF, - KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue, + KE: KeyExchange + KeyGen + ToJwkValue + FromJwkValue + Clone, KW: KeyWrap + FromKeyDerivation, { let mut buf = vec![]; @@ -2940,8 +2969,38 @@ mod tests { _ => panic!("Unexpected verification method"), }; + let derive_func = |ephem_key: String, + sender_key: Option, + _recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let ephem_key = KE::from_jwk(&ephem_key) + .kind(ErrorKind::InvalidState, "Unable to deserialize ephem key")?; + let sender_key = sender_key + .map(|sk_jwk| { + KE::from_jwk(&sk_jwk) + .kind(ErrorKind::InvalidState, "Unable to deserialize ephem key") + }) + .transpose()?; + KDF::derive_key( + &ephem_key, + sender_key.as_ref(), + &to_key, + &alg, + &apu, + &apv, + &cc_tag, + true, + ) + } + }; + let msg = msg - .decrypt::(None, (to_kid, &to_key)) + .decrypt::(None, (to_kid, derive_func)) + .await .expect("Unable decrypt msg"); common_msg = if let Some(ref res) = common_msg { diff --git a/src/message/pack_plaintext.rs b/src/message/pack_plaintext.rs index f14054e1..cfac9bc0 100644 --- a/src/message/pack_plaintext.rs +++ b/src/message/pack_plaintext.rs @@ -74,7 +74,7 @@ mod tests { use crate::{ did::resolvers::ExampleDIDResolver, error::ErrorKind, - secrets::resolvers::ExampleSecretsResolver, + secrets::resolvers::ExampleKMS, test_vectors::{ ALICE_DID_DOC, BOB_DID_DOC, BOB_SECRETS, CHARLIE_DID_DOC, CHARLIE_SECRET_AUTH_KEY_ED25519, FROM_PRIOR_FULL, MESSAGE_ATTACHMENT_BASE64, @@ -131,7 +131,7 @@ mod tests { BOB_DID_DOC.clone(), CHARLIE_DID_DOC.clone(), ]); - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let bob_kms = ExampleKMS::new(BOB_SECRETS.clone()); let packed_msg = MESSAGE_FROM_PRIOR_FULL .pack_plaintext(&did_resolver) @@ -141,7 +141,7 @@ mod tests { let (unpacked_msg, unpack_metadata) = Message::unpack( &packed_msg, &did_resolver, - &bob_secrets_resolver, + &bob_kms, &UnpackOptions::default(), ) .await diff --git a/src/message/pack_signed.rs b/src/message/pack_signed.rs index cdd92e56..573e1920 100644 --- a/src/message/pack_signed.rs +++ b/src/message/pack_signed.rs @@ -1,14 +1,12 @@ use serde::Serialize; +use crate::secrets::KnownKeyAlg; use crate::{ did::DIDResolver, error::{err_msg, ErrorKind, Result, ResultContext}, jws::{self, Algorithm}, - secrets::SecretsResolver, - utils::{ - crypto::{AsKnownKeyPair, KnownKeyPair}, - did::{did_or_url, is_did}, - }, + secrets::KeyManagementService, + utils::did::{did_or_url, is_did}, Message, }; @@ -27,7 +25,7 @@ impl Message { /// # Parameters /// - `sign_by` a DID or key ID the sender uses for signing /// - `did_resolver` instance of `DIDResolver` to resolve DIDs. - /// - `secrets_resolver` instance of SecretsResolver` to resolve sender DID keys secrets + /// - `kms` instance of SecretsResolver` to resolve sender DID keys secrets /// /// # Returns /// Tuple (signed_message, metadata) @@ -46,7 +44,7 @@ impl Message { &self, sign_by: &str, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), ) -> Result<(String, PackSignedMetadata)> { self._validate_pack_signed(sign_by)?; @@ -75,37 +73,29 @@ impl Message { did_doc.authentication.iter().map(|s| s.as_str()).collect() }; - let key_id = *secrets_resolver + let key_id = *kms .find_secrets(&authentications) .await .context("Unable find secrets")? .get(0) .ok_or_else(|| err_msg(ErrorKind::SecretNotFound, "No signer secrets found"))?; - let secret = secrets_resolver - .get_secret(key_id) + let key_alg = kms + .get_key_alg(key_id) .await - .context("Unable get secret")? - .ok_or_else(|| err_msg(ErrorKind::SecretNotFound, "Signer secret not found"))?; - - let sign_key = secret - .as_key_pair() - .context("Unable instantiate sign key")?; + .context("Signer secret not found")?; let payload = self.pack_plaintext(did_resolver).await?; - let msg = match sign_key { - KnownKeyPair::Ed25519(ref key) => { - jws::sign(payload.as_bytes(), (key_id, key), Algorithm::EdDSA) - } - KnownKeyPair::P256(ref key) => { - jws::sign(payload.as_bytes(), (key_id, key), Algorithm::Es256) - } - KnownKeyPair::K256(ref key) => { - jws::sign(payload.as_bytes(), (key_id, key), Algorithm::Es256K) - } + let msg = match key_alg { + KnownKeyAlg::Ed25519 => jws::sign(payload.as_bytes(), key_id, Algorithm::EdDSA, kms), + // p256 + KnownKeyAlg::P256 => jws::sign(payload.as_bytes(), key_id, Algorithm::Es256, kms), + // k256 + KnownKeyAlg::K256 => jws::sign(payload.as_bytes(), key_id, Algorithm::Es256K, kms), _ => Err(err_msg(ErrorKind::Unsupported, "Unsupported signature alg"))?, } + .await .context("Unable produce signatire")?; let metadata = PackSignedMetadata { @@ -153,7 +143,11 @@ mod tests { jwk::FromJwkValue, jws::{self, Algorithm, Header, ProtectedHeader}, secrets::{ - resolvers::ExampleSecretsResolver, Secret, SecretMaterial, SecretType, SecretsResolver, + resolvers::{ + example::{Secret, SecretMaterial, SecretType}, + ExampleKMS, + }, + KeyManagementService, }, test_vectors::{ ALICE_AUTH_METHOD_25519, ALICE_AUTH_METHOD_P256, ALICE_AUTH_METHOD_SECPP256K1, @@ -168,11 +162,11 @@ mod tests { #[tokio::test] async fn pack_signed_works() { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); _pack_signed_works::( &did_resolver, - &secrets_resolver, + &kms, &MESSAGE_SIMPLE, ALICE_DID, &ALICE_AUTH_METHOD_25519.id, @@ -184,7 +178,7 @@ mod tests { _pack_signed_works::( &did_resolver, - &secrets_resolver, + &kms, &MESSAGE_SIMPLE, &ALICE_AUTH_METHOD_25519.id, &ALICE_AUTH_METHOD_25519.id, @@ -196,7 +190,7 @@ mod tests { _pack_signed_works::( &did_resolver, - &secrets_resolver, + &kms, &MESSAGE_SIMPLE, &ALICE_AUTH_METHOD_P256.id, &ALICE_AUTH_METHOD_P256.id, @@ -208,7 +202,7 @@ mod tests { _pack_signed_works::( &did_resolver, - &secrets_resolver, + &kms, &MESSAGE_SIMPLE, &ALICE_AUTH_METHOD_SECPP256K1.id, &ALICE_AUTH_METHOD_SECPP256K1.id, @@ -220,7 +214,7 @@ mod tests { async fn _pack_signed_works<'dr, 'sr, Key: KeySigVerify + FromJwkValue>( did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), message: &Message, sign_by: &str, sign_by_kid: &str, @@ -229,7 +223,7 @@ mod tests { verification_material: &VerificationMaterial, ) { let (msg, metadata) = message - .pack_signed(sign_by, did_resolver, secrets_resolver) + .pack_signed(sign_by, did_resolver, kms) .await .expect("Unable pack_signed"); @@ -288,10 +282,10 @@ mod tests { #[tokio::test] async fn pack_signed_works_signer_did_not_found() { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE - .pack_signed("did:example:unknown", &did_resolver, &secrets_resolver) + .pack_signed("did:example:unknown", &did_resolver, &kms) .await; let err = res.expect_err("res is ok"); @@ -305,10 +299,10 @@ mod tests { let mut did_doc = ALICE_DID_DOC.clone(); did_doc.id = "not-a-did".into(); let did_resolver = ExampleDIDResolver::new(vec![did_doc]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE - .pack_signed("not-a-did", &did_resolver, &secrets_resolver) + .pack_signed("not-a-did", &did_resolver, &kms) .await; let err = res.expect_err("res is ok"); @@ -323,14 +317,10 @@ mod tests { #[tokio::test] async fn pack_signed_works_signer_did_url_not_found() { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE - .pack_signed( - &format!("{}#unkown", ALICE_DID), - &did_resolver, - &secrets_resolver, - ) + .pack_signed(&format!("{}#unkown", ALICE_DID), &did_resolver, &kms) .await; let err = res.expect_err("res is ok"); @@ -347,10 +337,10 @@ mod tests { let did_resolver = MockDidResolver::new(vec![Err(err_msg(ErrorKind::InvalidState, "Mock error"))]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE - .pack_signed(ALICE_DID, &did_resolver, &secrets_resolver) + .pack_signed(ALICE_DID, &did_resolver, &kms) .await; let err = res.expect_err("res is ok"); @@ -365,13 +355,13 @@ mod tests { #[tokio::test] async fn pack_signed_works_signer_secrets_not_found() { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC_WITH_NO_SECRETS.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let res = MESSAGE_SIMPLE .pack_signed( &"did:example:alice#key-not-in-secrets-1", &did_resolver, - &secrets_resolver, + &kms, ) .await; @@ -405,7 +395,7 @@ mod tests { }, }); let did_resolver = ExampleDIDResolver::new(vec![did_doc]); - let secrets_resolver = ExampleSecretsResolver::new(secrets); + let secrets_resolver = ExampleKMS::new(secrets); let res = MESSAGE_SIMPLE .pack_signed( @@ -416,11 +406,12 @@ mod tests { .await; let err = res.expect_err("res is ok"); + println!("{:?}", err); assert_eq!(err.kind(), ErrorKind::Unsupported); assert_eq!( format!("{}", err), - "Unsupported crypto or method: Unable instantiate sign key: Unsupported key type or curve" + "Unsupported crypto or method: Signer secret not found: Unsupported key type or curve" ); } @@ -432,8 +423,8 @@ mod tests { CHARLIE_DID_DOC.clone(), ]); let charlie_rotated_to_alice_secrets_resolver = - ExampleSecretsResolver::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone()); + let bob_secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (packed_msg, _pack_metadata) = MESSAGE_FROM_PRIOR_FULL .pack_signed( diff --git a/src/message/unpack/anoncrypt.rs b/src/message/unpack/anoncrypt.rs index 4ae804a4..1b21f9de 100644 --- a/src/message/unpack/anoncrypt.rs +++ b/src/message/unpack/anoncrypt.rs @@ -1,3 +1,12 @@ +use crate::secrets::{KidOrJwk, KnownKeyAlg}; +use crate::{ + algorithms::AnonCryptAlg, + error::{err_msg, ErrorKind, Result, ResultExt}, + jwe::{self, envelope::JWE}, + secrets::KeyManagementService, + utils::did::did_or_url, + UnpackMetadata, UnpackOptions, +}; use askar_crypto::{ alg::{ aes::{A256CbcHs512, A256Gcm, A256Kw, AesKey}, @@ -8,21 +17,9 @@ use askar_crypto::{ kdf::ecdh_es::EcdhEs, }; -use crate::{ - algorithms::AnonCryptAlg, - error::{err_msg, ErrorKind, Result, ResultExt}, - jwe::{self, envelope::JWE}, - secrets::SecretsResolver, - utils::{ - crypto::{AsKnownKeyPair, KnownKeyPair}, - did::did_or_url, - }, - UnpackMetadata, UnpackOptions, -}; - pub(crate) async fn _try_unpack_anoncrypt<'sr>( msg: &str, - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), opts: &UnpackOptions, metadata: &mut UnpackMetadata, ) -> Result> { @@ -69,7 +66,7 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( metadata.encrypted = true; metadata.anonymous_sender = true; - let to_kids_found = secrets_resolver.find_secrets(&to_kids).await?; + let to_kids_found = kms.find_secrets(&to_kids).await?; if to_kids_found.is_empty() { Err(err_msg( @@ -81,19 +78,13 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( let mut payload: Option> = None; for to_kid in to_kids_found { - let to_key = secrets_resolver - .get_secret(to_kid) - .await? - .ok_or_else(|| { - err_msg( - ErrorKind::InvalidState, - "Recipient secret not found after existence checking", - ) - })? - .as_key_pair()?; - - let _payload = match (to_key, &parsed_jwe.protected.enc) { - (KnownKeyPair::X25519(ref to_key), jwe::EncAlgorithm::A256cbcHs512) => { + let to_key_alg = kms.get_key_alg(to_kid).await.kind( + ErrorKind::InvalidState, + "Recipient secret not found after existence checking", + )?; + + let _payload = match (to_key_alg, &parsed_jwe.protected.enc) { + (KnownKeyAlg::X25519, jwe::EncAlgorithm::A256cbcHs512) => { metadata.enc_alg_anon = Some(AnonCryptAlg::A256cbcHs512EcdhEsA256kw); parsed_jwe.decrypt::< @@ -101,9 +92,21 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, - >(None, (to_kid, to_key))? + _ + >(None, (to_kid, + |ephem_key: String, + _send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + _cc_tag: Vec| { + kms.derive_aes_key_using_ecdh_es( + KidOrJwk::X25519Key(ephem_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, true, + ) + })).await? } - (KnownKeyPair::X25519(ref to_key), jwe::EncAlgorithm::Xc20P) => { + (KnownKeyAlg::X25519, jwe::EncAlgorithm::Xc20P) => { metadata.enc_alg_anon = Some(AnonCryptAlg::Xc20pEcdhEsA256kw); parsed_jwe.decrypt::< @@ -111,9 +114,20 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, - >(None, (to_kid, to_key))? + _ + >(None, (to_kid, |ephem_key: String, + _send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + _cc_tag: Vec| { + kms.derive_aes_key_using_ecdh_es( + KidOrJwk::X25519Key(ephem_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, true, + ) + })).await? } - (KnownKeyPair::X25519(ref to_key), jwe::EncAlgorithm::A256Gcm) => { + (KnownKeyAlg::X25519, jwe::EncAlgorithm::A256Gcm) => { metadata.enc_alg_anon = Some(AnonCryptAlg::A256gcmEcdhEsA256kw); parsed_jwe.decrypt::< @@ -121,9 +135,21 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( EcdhEs<'_, X25519KeyPair>, X25519KeyPair, AesKey, - >(None, (to_kid, to_key))? + _ + >(None, (to_kid, |ephem_key: String, + _send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + _cc_tag: Vec| { + kms.derive_aes_key_using_ecdh_es( + KidOrJwk::X25519Key(ephem_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, true, + ) + })).await? } - (KnownKeyPair::P256(ref to_key), jwe::EncAlgorithm::A256cbcHs512) => { + // p256 + (KnownKeyAlg::P256, jwe::EncAlgorithm::A256cbcHs512) => { metadata.enc_alg_anon = Some(AnonCryptAlg::A256cbcHs512EcdhEsA256kw); parsed_jwe.decrypt::< @@ -131,9 +157,20 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, - >(None, (to_kid, to_key))? + _ + >(None, (to_kid, |ephem_key: String, + _send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + _cc_tag: Vec| { + kms.derive_aes_key_using_ecdh_es( + KidOrJwk::P256Key(ephem_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, true, + ) + })).await? } - (KnownKeyPair::P256(ref to_key), jwe::EncAlgorithm::Xc20P) => { + (KnownKeyAlg::P256, jwe::EncAlgorithm::Xc20P) => { metadata.enc_alg_anon = Some(AnonCryptAlg::Xc20pEcdhEsA256kw); parsed_jwe.decrypt::< @@ -141,9 +178,20 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, - >(None, (to_kid, to_key))? + _ + >(None, (to_kid, |ephem_key: String, + _send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + _cc_tag: Vec| { + kms.derive_aes_key_using_ecdh_es( + KidOrJwk::P256Key(ephem_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, true, + ) + })).await? } - (KnownKeyPair::P256(ref to_key), jwe::EncAlgorithm::A256Gcm) => { + (KnownKeyAlg::P256, jwe::EncAlgorithm::A256Gcm) => { metadata.enc_alg_anon = Some(AnonCryptAlg::A256gcmEcdhEsA256kw); parsed_jwe.decrypt::< @@ -151,7 +199,18 @@ pub(crate) async fn _try_unpack_anoncrypt<'sr>( EcdhEs<'_, P256KeyPair>, P256KeyPair, AesKey, - >(None, (to_kid, to_key))? + _ + >(None, (to_kid, |ephem_key: String, + _send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + _cc_tag: Vec| { + kms.derive_aes_key_using_ecdh_es( + KidOrJwk::P256Key(ephem_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, true, + ) + })).await? } _ => Err(err_msg( ErrorKind::Unsupported, diff --git a/src/message/unpack/authcrypt.rs b/src/message/unpack/authcrypt.rs index 9d6bd1b9..8550e173 100644 --- a/src/message/unpack/authcrypt.rs +++ b/src/message/unpack/authcrypt.rs @@ -1,30 +1,30 @@ -use askar_crypto::{ - alg::{ - aes::{A256CbcHs512, A256Kw, AesKey}, - p256::P256KeyPair, - x25519::X25519KeyPair, - }, - kdf::ecdh_1pu::Ecdh1PU, -}; - use crate::jwe::envelope::JWE; +use crate::secrets::{KidOrJwk, KnownKeyAlg}; use crate::{ algorithms::AuthCryptAlg, did::DIDResolver, error::{err_msg, ErrorKind, Result, ResultExt}, jwe, - secrets::SecretsResolver, + secrets::KeyManagementService, utils::{ crypto::{AsKnownKeyPair, KnownKeyPair}, did::did_or_url, }, UnpackMetadata, UnpackOptions, }; +use askar_crypto::{ + alg::{ + aes::{A256CbcHs512, A256Kw, AesKey}, + p256::P256KeyPair, + x25519::X25519KeyPair, + }, + kdf::ecdh_1pu::Ecdh1PU, +}; pub(crate) async fn _try_unpack_authcrypt<'dr, 'sr>( msg: &str, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), opts: &UnpackOptions, metadata: &mut UnpackMetadata, ) -> Result> { @@ -118,7 +118,7 @@ pub(crate) async fn _try_unpack_authcrypt<'dr, 'sr>( metadata.encrypted = true; metadata.encrypted_from_kid = Some(from_kid.into()); - let to_kids_found = secrets_resolver.find_secrets(&to_kids).await?; + let to_kids_found = kms.find_secrets(&to_kids).await?; if to_kids_found.is_empty() { Err(err_msg( @@ -130,21 +130,15 @@ pub(crate) async fn _try_unpack_authcrypt<'dr, 'sr>( let mut payload: Option> = None; for to_kid in to_kids_found { - let to_key = secrets_resolver - .get_secret(to_kid) - .await? - .ok_or_else(|| { - err_msg( - ErrorKind::InvalidState, - "Recipient secret not found after existence checking", - ) - })? - .as_key_pair()?; - - let _payload = match (&from_key, &to_key, &parsed_jwe.protected.enc) { + let to_key_alg = kms.get_key_alg(to_kid).await.kind( + ErrorKind::InvalidState, + "Recipient secret not found after existence checking", + )?; + + let _payload = match (&from_key, to_key_alg, &parsed_jwe.protected.enc) { ( KnownKeyPair::X25519(ref from_key), - KnownKeyPair::X25519(ref to_key), + KnownKeyAlg::X25519, jwe::EncAlgorithm::A256cbcHs512, ) => { metadata.enc_alg_auth = Some(AuthCryptAlg::A256cbcHs512Ecdh1puA256kw); @@ -154,11 +148,28 @@ pub(crate) async fn _try_unpack_authcrypt<'dr, 'sr>( Ecdh1PU<'_, X25519KeyPair>, X25519KeyPair, AesKey, - >(Some((from_kid, from_key)), (to_kid, to_key))? + _ + >(Some((from_kid, from_key)), (to_kid, |ephem_key: String, + send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let send_key = send_key.ok_or_else(|| { + err_msg(ErrorKind::InvalidState, "No sender key for ecdh-1pu") + })?; + + kms.derive_aes_key_using_ecdh_1pu( + KidOrJwk::X25519Key(ephem_key), KidOrJwk::X25519Key(send_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, cc_tag, true, + ).await + } + })).await? } ( KnownKeyPair::P256(ref from_key), - KnownKeyPair::P256(ref to_key), + KnownKeyAlg::P256, jwe::EncAlgorithm::A256cbcHs512, ) => { metadata.enc_alg_auth = Some(AuthCryptAlg::A256cbcHs512Ecdh1puA256kw); @@ -168,13 +179,30 @@ pub(crate) async fn _try_unpack_authcrypt<'dr, 'sr>( Ecdh1PU<'_, P256KeyPair>, P256KeyPair, AesKey, - >(Some((from_kid, from_key)), (to_kid, to_key))? + _ + >(Some((from_kid, from_key)), (to_kid, |ephem_key: String, + send_key: Option, + recip_kid: String, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec| { + async move { + let send_key = send_key.ok_or_else(|| { + err_msg(ErrorKind::InvalidState, "No sender key for ecdh-1pu") + })?; + + kms.derive_aes_key_using_ecdh_1pu( + KidOrJwk::P256Key(ephem_key), KidOrJwk::P256Key(send_key), KidOrJwk::Kid(recip_kid), alg, apu, apv, cc_tag, true, + ).await + } + })).await? } - (KnownKeyPair::X25519(_), KnownKeyPair::P256(_), _) => Err(err_msg( + (KnownKeyPair::X25519(_), KnownKeyAlg::P256, _) => Err(err_msg( ErrorKind::Malformed, "Incompatible sender and recipient key agreement curves", ))?, - (KnownKeyPair::P256(_), KnownKeyPair::X25519(_), _) => Err(err_msg( + (KnownKeyPair::P256(_), KnownKeyAlg::X25519, _) => Err(err_msg( ErrorKind::Malformed, "Incompatible sender and recipient key agreement curves", ))?, diff --git a/src/message/unpack/mod.rs b/src/message/unpack/mod.rs index 7ee3052f..a2514b6e 100644 --- a/src/message/unpack/mod.rs +++ b/src/message/unpack/mod.rs @@ -10,7 +10,7 @@ use crate::{ error::{err_msg, ErrorKind, Result, ResultExt}, message::unpack::plaintext::_try_unpack_plaintext, protocols::routing::try_parse_forward, - secrets::SecretsResolver, + secrets::KeyManagementService, utils::did::did_or_url, FromPrior, Message, }; @@ -31,7 +31,7 @@ impl Message { /// # Params /// - `packed_msg` the message as JSON string to be unpacked /// - `did_resolver` instance of `DIDResolver` to resolve DIDs - /// - `secrets_resolver` instance of SecretsResolver` to resolve sender DID keys secrets + /// - `kms` instance of SecretsResolver` to resolve sender DID keys secrets /// - `options` allow fine configuration of unpacking process and imposing additional restrictions /// to message to be trusted. /// @@ -53,7 +53,7 @@ impl Message { pub async fn unpack<'dr, 'sr>( msg: &str, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), options: &UnpackOptions, ) -> Result<(Self, UnpackMetadata)> { let mut metadata = UnpackMetadata { @@ -78,14 +78,13 @@ impl Message { let mut forwarded_msg: String; loop { - anoncrypted = - _try_unpack_anoncrypt(msg, secrets_resolver, options, &mut metadata).await?; + anoncrypted = _try_unpack_anoncrypt(msg, kms, options, &mut metadata).await?; if options.unwrap_re_wrapping_forward && anoncrypted.is_some() { let forwarded_msg_opt = Self::_try_unwrap_forwarded_message( anoncrypted.as_deref().unwrap(), did_resolver, - secrets_resolver, + kms, ) .await?; @@ -105,8 +104,7 @@ impl Message { let msg = anoncrypted.as_deref().unwrap_or(msg); let authcrypted = - _try_unpack_authcrypt(msg, did_resolver, secrets_resolver, options, &mut metadata) - .await?; + _try_unpack_authcrypt(msg, did_resolver, kms, options, &mut metadata).await?; let msg = authcrypted.as_deref().unwrap_or(msg); let signed = _try_unpack_sign(msg, did_resolver, options, &mut metadata).await?; @@ -127,7 +125,7 @@ impl Message { async fn _try_unwrap_forwarded_message<'dr, 'sr>( msg: &str, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), ) -> Result> { let plaintext = match Message::from_str(msg) { Ok(m) => m, @@ -136,7 +134,7 @@ impl Message { }; if let Some(forward_msg) = try_parse_forward(&plaintext) { - if has_key_agreement_secret(&forward_msg.next, did_resolver, secrets_resolver).await? { + if has_key_agreement_secret(&forward_msg.next, did_resolver, kms).await? { // TODO: Think how to avoid extra serialization of forwarded_msg here. // (This serializtion is a double work because forwarded_msg will then // be deserialized in _try_unpack_anoncrypt.) @@ -227,7 +225,7 @@ pub struct UnpackMetadata { async fn has_key_agreement_secret<'dr, 'sr>( did_or_kid: &str, did_resolver: &'dr (dyn DIDResolver + 'dr), - secrets_resolver: &'sr (dyn SecretsResolver + 'sr), + kms: &'sr (dyn KeyManagementService + 'sr), ) -> Result { let kids = match did_or_url(did_or_kid) { (_, Some(kid)) => { @@ -244,7 +242,7 @@ async fn has_key_agreement_secret<'dr, 'sr>( let kids = kids.iter().map(|k| k as &str).collect::>(); - let secrets_ids = secrets_resolver.find_secrets(&kids[..]).await?; + let secrets_ids = kms.find_secrets(&kids[..]).await?; return Ok(!secrets_ids.is_empty()); } @@ -255,7 +253,7 @@ mod test { did::resolvers::ExampleDIDResolver, message::MessagingServiceMetadata, protocols::routing::wrap_in_forward, - secrets::resolvers::ExampleSecretsResolver, + secrets::resolvers::ExampleKMS, test_vectors::{ remove_field, remove_protected_field, update_field, update_protected_field, ALICE_AUTH_METHOD_25519, ALICE_AUTH_METHOD_P256, ALICE_AUTH_METHOD_SECPP256K1, @@ -497,7 +495,7 @@ mod test { sign_alg: SignAlg, ) { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (msg, _) = message .pack_signed(sign_by, &did_resolver, &secrets_resolver) @@ -630,11 +628,11 @@ mod test { MEDIATOR1_DID_DOC.clone(), ]); - let alice_secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let alice_secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let bob_secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); - let mediator1_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let mediator1_secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, pack_metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -755,11 +753,11 @@ mod test { MEDIATOR1_DID_DOC.clone(), ]); - let alice_secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let alice_secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); - let bob_secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let bob_secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); - let mediator1_secrets_resolver = ExampleSecretsResolver::new(MEDIATOR1_SECRETS.clone()); + let mediator1_secrets_resolver = ExampleKMS::new(MEDIATOR1_SECRETS.clone()); let (msg, pack_metadata) = MESSAGE_SIMPLE .pack_encrypted( @@ -1003,7 +1001,7 @@ mod test { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (packed, _) = msg .pack_encrypted( @@ -1137,7 +1135,7 @@ mod test { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let kms = ExampleKMS::new(ALICE_SECRETS.clone()); let (packed, _) = msg .pack_encrypted( @@ -1145,7 +1143,7 @@ mod test { None, Some(sign_by), &did_resolver, - &secrets_resolver, + &kms, &PackEncryptedOptions { forward: false, enc_alg_anon: enc_alg.clone(), @@ -1328,7 +1326,7 @@ mod test { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (packed, _) = msg .pack_encrypted( @@ -1503,7 +1501,7 @@ mod test { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (packed, _) = msg .pack_encrypted( @@ -1615,7 +1613,7 @@ mod test { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (packed, _) = msg .pack_encrypted( @@ -1733,7 +1731,7 @@ mod test { let did_resolver = ExampleDIDResolver::new(vec![ALICE_DID_DOC.clone(), BOB_DID_DOC.clone()]); - let secrets_resolver = ExampleSecretsResolver::new(ALICE_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(ALICE_SECRETS.clone()); let (packed, _) = msg .pack_encrypted( @@ -1778,7 +1776,7 @@ mod test { async fn unpack_works_invalid_epk_point() { _verify_unpack_malformed( &INVALID_ENCRYPTED_MSG_ANON_P256_EPK_WRONG_POINT, - "Malformed: Unable instantiate epk: Unable produce jwk: Invalid key data", + "Malformed: Unable derive kw: Unable parse jwk: Invalid key data", ) .await; } @@ -2095,16 +2093,11 @@ mod test { CHARLIE_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let kms = ExampleKMS::new(BOB_SECRETS.clone()); - let (msg, metadata) = Message::unpack( - msg, - &did_resolver, - &secrets_resolver, - &UnpackOptions::default(), - ) - .await - .expect("unpack is ok."); + let (msg, metadata) = Message::unpack(msg, &did_resolver, &kms, &UnpackOptions::default()) + .await + .expect("unpack is ok."); assert_eq!(&msg, exp_msg); assert_eq!(&metadata, exp_metadata); @@ -2122,7 +2115,7 @@ mod test { CHARLIE_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let (msg, mut metadata) = Message::unpack( msg, @@ -2150,7 +2143,7 @@ mod test { CHARLIE_DID_DOC.clone(), ]); - let secrets_resolver = ExampleSecretsResolver::new(BOB_SECRETS.clone()); + let secrets_resolver = ExampleKMS::new(BOB_SECRETS.clone()); let err = Message::unpack( msg, diff --git a/src/secrets/mod.rs b/src/secrets/mod.rs index 20393ece..63b77e02 100644 --- a/src/secrets/mod.rs +++ b/src/secrets/mod.rs @@ -2,107 +2,210 @@ pub mod resolvers; +pub use askar_crypto::{ + alg::{ + aes::{A256Kw, AesKey}, + KeyAlg, + }, + buffer::SecretBytes, + repr::KeySecretBytes, +}; use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use serde_json::Value; use crate::error::Result; +pub use crate::utils::crypto::KnownKeyAlg; +pub use crate::utils::crypto::KnownSignatureType; -/// Interface for secrets resolver. +#[derive(Serialize, Deserialize)] +pub enum KidOrJwk { + Kid(String), + X25519Key(String), + P256Key(String), +} + +/// Interface for KeyManagementService. /// Resolves secrets such as private keys to be used for signing and encryption. #[cfg(feature = "uniffi")] #[async_trait] -pub trait SecretsResolver: Sync { +pub trait KeyManagementService: Sync { /// Finds secret (usually private key) identified by the given key ID. /// /// # Parameters /// - `secret_id` the ID (in form of DID URL) identifying a secret /// /// # Returns - /// A secret (usually private key) or None of there is no secret for the given ID + /// A key algorithm of the secret or None of there is no secret for the given ID /// /// # Errors /// - IOError /// - InvalidState - async fn get_secret(&self, secret_id: &str) -> Result>; + async fn get_key_alg(&self, secret_id: &str) -> Result; /// Find all secrets that have one of the given IDs. - /// Return secrets only for key IDs for which a secret is present. + /// Return ids of secrets only for key IDs for which a secret is present. /// /// # Parameters - /// - `secret_ids` the IDs find secrets for + /// - `secret_ids` the IDs to check for existence /// /// # Returns - /// possible empty list of all secrets that have one of the given IDs. + /// possible empty list of all secrets IDs that have one of the given IDs. async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> Result>; + + /// Create a signature of the requested type and return an allocated + /// buffer. + /// + /// # Parameters + /// - `secret_id` the ID (in form of DID URL) identifying a secret + /// - `message` bytes to be signed + /// - `sig_type`: signature type to be used. + /// + /// # Returns + /// Signature + /// + /// # Errors + /// - IOError + /// - IvalidState + /// - Unsupported + async fn create_signature( + &self, + secret_id: &str, + message: &[u8], + sig_type: Option, + ) -> Result; + + /// ECDH-1PU derivation of key + /// + /// # Parameters + /// - `ephem_key` Ephemeral key (cannot be kid) + /// - `send_key` Sender key (or kid to be resolved by KMS) + /// - `recip_key`: Recipient key (or kid to be resolved by KMS) + /// - `alg`: algorithm + /// - `apu`: Sender info + /// - `apv`: Receiver info + /// - `cc_tag`: tag + /// - `receive`: Whether derived key is used on receive or send side. + async fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwk, + send_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + ) -> Result>; + + /// ECDH-ES derivation of key + /// + /// # Parameters + /// - `ephem_key` Ephemeral key (cannot be kid) + /// - `recip_key`: Recipient key (or kid to be resolved by KMS) + /// - `alg`: algorithm + /// - `apu`: Sender info + /// - `apv`: Receiver info + /// - `receive`: Whether derived key is used on receive or send side. + async fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + ) -> Result>; } /// Interface for secrets resolver. /// Resolves secrets such as private keys to be used for signing and encryption. #[cfg(not(feature = "uniffi"))] #[async_trait(?Send)] -pub trait SecretsResolver { +pub trait KeyManagementService { /// Finds secret (usually private key) identified by the given key ID. /// /// # Parameters /// - `secret_id` the ID (in form of DID URL) identifying a secret /// /// # Returns - /// A secret (usually private key) or None of there is no secret for the given ID + /// A key algorithm of the secret or None of there is no secret for the given ID /// /// # Errors /// - IOError /// - InvalidState - async fn get_secret(&self, secret_id: &str) -> Result>; + async fn get_key_alg(&self, secret_id: &str) -> Result; /// Find all secrets that have one of the given IDs. - /// Return secrets only for key IDs for which a secret is present. + /// Return ids of secrets only for key IDs for which a secret is present. /// /// # Parameters - /// - `secret_ids` the IDs find secrets for + /// - `secret_ids` the IDs to check for existence /// /// # Returns - /// possible empty list of all secrets that have one of the given IDs. + /// possible empty list of all secrets IDs that have one of the given IDs. async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> Result>; -} -/// Represents secret. -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct Secret { - /// A key ID identifying a secret (private key). - pub id: String, - - /// Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. - #[serde(rename = "type")] - pub type_: SecretType, - - /// Value of the secret (private key) - #[serde(flatten)] - pub secret_material: SecretMaterial, -} - -/// Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. -#[derive(Debug, Clone, Deserialize, Serialize)] -pub enum SecretType { - JsonWebKey2020, - X25519KeyAgreementKey2019, - X25519KeyAgreementKey2020, - Ed25519VerificationKey2018, - Ed25519VerificationKey2020, - EcdsaSecp256k1VerificationKey2019, - Other, -} - -/// Represents secret crypto material. -#[derive(Debug, Clone, Deserialize, Serialize)] -#[serde(untagged)] -pub enum SecretMaterial { - #[serde(rename_all = "camelCase")] - JWK { private_key_jwk: Value }, + /// Create a signature of the requested type and return an allocated + /// buffer. + /// + /// # Parameters + /// - `secret_id` the ID (in form of DID URL) identifying a secret + /// - `message` bytes to be signed + /// - `sig_type`: signature type to be used. + /// + /// # Returns + /// Signature + /// + /// # Errors + /// - IOError + /// - IvalidState + /// - Unsupported + async fn create_signature( + &self, + secret_id: &str, + message: &[u8], + sig_type: Option, + ) -> Result; - #[serde(rename_all = "camelCase")] - Multibase { private_key_multibase: String }, + /// ECDH-1PU derivation of key + /// + /// # Parameters + /// - `ephem_key` Ephemeral key (cannot be kid) + /// - `send_key` Sender key (or kid to be resolved by KMS) + /// - `recip_key`: Recipient key (or kid to be resolved by KMS) + /// - `alg`: algorithm + /// - `apu`: Sender info + /// - `apv`: Receiver info + /// - `cc_tag`: tag + /// - `receive`: Whether derived key is used on receive or send side. + async fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwk, + send_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + ) -> Result>; - #[serde(rename_all = "camelCase")] - Base58 { private_key_base58: String }, + /// ECDH-1PU derivation of key + /// + /// # Parameters + /// - `ephem_key` Ephemeral key (cannot be kid) + /// - `recip_key`: Recipient key (or kid to be resolved by KMS) + /// - `alg`: algorithm + /// - `apu`: Sender info + /// - `apv`: Receiver info + /// - `receive`: Whether derived key is used on receive or send side. + async fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + ) -> Result>; } diff --git a/src/secrets/resolvers/example.rs b/src/secrets/resolvers/example.rs index 56f66333..16e51dae 100644 --- a/src/secrets/resolvers/example.rs +++ b/src/secrets/resolvers/example.rs @@ -1,29 +1,116 @@ -use async_trait::async_trait; - -use crate::{ - error::Result, - secrets::{Secret, SecretsResolver}, +use crate::error::{err_msg, ErrorKind, ResultExt, ToResult}; +use crate::jwk::FromJwkValue; +use crate::secrets::{KidOrJwk, KnownSignatureType}; +use crate::utils::crypto::{AsKnownKeyPair, JoseKDF, KnownKeyAlg, KnownKeyPair}; +use crate::utils::did::{Codec, _from_multicodec}; +use crate::{error::Result, secrets::KeyManagementService}; +use askar_crypto::{ + alg::{ + aes::{A256Kw, AesKey}, + ed25519::Ed25519KeyPair, + k256::K256KeyPair, + p256::P256KeyPair, + x25519::X25519KeyPair, + AnyKey, AnyKeyCreate, + }, + buffer::SecretBytes, + jwk::FromJwk, + kdf::{ecdh_1pu::Ecdh1PU, ecdh_es::EcdhEs}, + repr::{KeyPublicBytes, KeySecretBytes}, + sign::KeySign, }; +use async_trait::async_trait; +use serde::{Deserialize, Serialize}; +use serde_json::{json, Value}; +use std::sync::Arc; -pub struct ExampleSecretsResolver { +pub struct ExampleKMS { known_secrets: Vec, } -impl ExampleSecretsResolver { +impl ExampleKMS { pub fn new(known_secrets: Vec) -> Self { - ExampleSecretsResolver { known_secrets } + ExampleKMS { known_secrets } + } + + fn get_secret(&self, secret_id: &str) -> Result { + self.known_secrets + .iter() + .find(|s| s.id == secret_id) + .map(|s| s.clone()) + .ok_or(err_msg(ErrorKind::InvalidState, "Secret not found")) + } + + fn resolve_key(&self, x: KidOrJwk) -> Result { + match x { + KidOrJwk::Kid(kid) => self.get_secret(&kid)?.as_key_pair(), + KidOrJwk::X25519Key(jwk) => X25519KeyPair::from_jwk(&jwk) + .kind(ErrorKind::Malformed, "Unable parse jwk") + .map(KnownKeyPair::X25519), + KidOrJwk::P256Key(jwk) => P256KeyPair::from_jwk(&jwk) + .kind(ErrorKind::Malformed, "Unable parse jwk") + .map(KnownKeyPair::P256), + } } } #[cfg_attr(feature = "uniffi", async_trait)] #[cfg_attr(not(feature = "uniffi"), async_trait(?Send))] -impl SecretsResolver for ExampleSecretsResolver { - async fn get_secret(&self, secret_id: &str) -> Result> { - Ok(self - .known_secrets - .iter() - .find(|s| s.id == secret_id) - .map(|s| s.clone())) +impl KeyManagementService for ExampleKMS { + async fn get_key_alg(&self, secret_id: &str) -> Result { + let secret = self.get_secret(secret_id)?; + + match (&secret.type_, &secret.secret_material) { + ( + SecretType::JsonWebKey2020, + SecretMaterial::JWK { + private_key_jwk: ref value, + }, + ) => match (value["kty"].as_str(), value["crv"].as_str()) { + (Some(kty), Some(crv)) if kty == "EC" && crv == "P-256" => Ok(KnownKeyAlg::P256), + (Some(kty), Some(crv)) if kty == "EC" && crv == "secp256k1" => { + Ok(KnownKeyAlg::K256) + } + (Some(kty), Some(crv)) if kty == "OKP" && crv == "Ed25519" => { + Ok(KnownKeyAlg::Ed25519) + } + (Some(kty), Some(crv)) if kty == "OKP" && crv == "X25519" => { + Ok(KnownKeyAlg::X25519) + } + _ => Err(err_msg( + ErrorKind::Unsupported, + "Unsupported key type or curve", + )), + }, + ( + SecretType::X25519KeyAgreementKey2019, + SecretMaterial::Base58 { + private_key_base58: _, + }, + ) => Ok(KnownKeyAlg::X25519), + ( + SecretType::Ed25519VerificationKey2018, + SecretMaterial::Base58 { + private_key_base58: _, + }, + ) => Ok(KnownKeyAlg::Ed25519), + ( + SecretType::X25519KeyAgreementKey2020, + SecretMaterial::Multibase { + private_key_multibase: _, + }, + ) => Ok(KnownKeyAlg::X25519), + ( + SecretType::Ed25519VerificationKey2020, + SecretMaterial::Multibase { + private_key_multibase: _, + }, + ) => Ok(KnownKeyAlg::Ed25519), + _ => Err(err_msg( + ErrorKind::Unsupported, + "Unsupported key type or curve", + )), + } } async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> Result> { @@ -33,4 +120,391 @@ impl SecretsResolver for ExampleSecretsResolver { .map(|sid| *sid) .collect()) } + + async fn create_signature( + &self, + secret_id: &str, + message: &[u8], + sig_type: Option, + ) -> Result { + let secret = self.get_secret(secret_id)?; + + match secret.as_key_pair()? { + KnownKeyPair::X25519(_) => { + Err(err_msg(ErrorKind::Unsupported, "Unsupported signature alg")) + } + KnownKeyPair::Ed25519(key) => key + .create_signature(message, sig_type.map(|x| x.into())) + .kind(ErrorKind::InvalidState, "Unable create signature"), + KnownKeyPair::P256(key) => key + .create_signature(message, sig_type.map(|x| x.into())) + .kind(ErrorKind::InvalidState, "Unable create signature"), + KnownKeyPair::K256(key) => key + .create_signature(message, sig_type.map(|x| x.into())) + .kind(ErrorKind::InvalidState, "Unable create signature"), + } + } + + async fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwk, // epk + sk + rk -> cek + send_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + ) -> Result> { + let ephem_key = self.resolve_key(ephem_key)?; + let send_key = self.resolve_key(send_key)?; + let recip_key = self.resolve_key(recip_key)?; + + match (ephem_key, send_key, recip_key) { + ( + KnownKeyPair::X25519(ephem_key), + KnownKeyPair::X25519(send_key), + KnownKeyPair::X25519(recip_key), + ) => Ecdh1PU::derive_key( + &ephem_key, + Some(&send_key), + &recip_key, + &alg, + &apu, + &apv, + &cc_tag, + receive, + ), + ( + KnownKeyPair::P256(ephem_key), + KnownKeyPair::P256(send_key), + KnownKeyPair::P256(recip_key), + ) => Ecdh1PU::derive_key( + &ephem_key, + Some(&send_key), + &recip_key, + &alg, + &apu, + &apv, + &cc_tag, + receive, + ), + _ => Err(err_msg(ErrorKind::Unsupported, "Unsupported derive keys")), + } + } + + async fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + ) -> Result> { + let ephem_key = self.resolve_key(ephem_key)?; + let recip_key = self.resolve_key(recip_key)?; + + match (ephem_key, recip_key) { + (KnownKeyPair::X25519(ephem_key), KnownKeyPair::X25519(recip_key)) => { + EcdhEs::derive_key(&ephem_key, None, &recip_key, &alg, &apu, &apv, &[], receive) + } + (KnownKeyPair::P256(ephem_key), KnownKeyPair::P256(recip_key)) => { + EcdhEs::derive_key(&ephem_key, None, &recip_key, &alg, &apu, &apv, &[], receive) + } + _ => Err(err_msg(ErrorKind::Unsupported, "Unsupported derive keys")), + } + } +} + +/// Represents secret. +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct Secret { + /// A key ID identifying a secret (private key). + pub id: String, + + /// Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. + #[serde(rename = "type")] + pub type_: SecretType, + + /// Value of the secret (private key) + #[serde(flatten)] + pub secret_material: SecretMaterial, +} + +/// Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. +#[derive(Debug, Clone, Deserialize, Serialize)] +pub enum SecretType { + JsonWebKey2020, + X25519KeyAgreementKey2019, + X25519KeyAgreementKey2020, + Ed25519VerificationKey2018, + Ed25519VerificationKey2020, + EcdsaSecp256k1VerificationKey2019, + Other, +} + +/// Represents secret crypto material. +#[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(untagged)] +pub enum SecretMaterial { + #[serde(rename_all = "camelCase")] + JWK { private_key_jwk: Value }, + + #[serde(rename_all = "camelCase")] + Multibase { private_key_multibase: String }, + + #[serde(rename_all = "camelCase")] + Base58 { private_key_base58: String }, +} + +impl Secret { + pub fn to_key(&self) -> Result> { + // Box::new(KeyT(self.as_key_pair().unwrap())) + let any_key = match self.as_key_pair()? { + KnownKeyPair::Ed25519(key) => Arc::::from_key(key), + KnownKeyPair::X25519(key) => Arc::::from_key(key), + KnownKeyPair::P256(key) => Arc::::from_key(key), + KnownKeyPair::K256(key) => Arc::::from_key(key), + }; + Ok(any_key) + } +} + +impl AsKnownKeyPair for Secret { + fn key_alg(&self) -> KnownKeyAlg { + match (&self.type_, &self.secret_material) { + ( + SecretType::JsonWebKey2020, + SecretMaterial::JWK { + private_key_jwk: ref value, + }, + ) => match (value["kty"].as_str(), value["crv"].as_str()) { + (Some(kty), Some(crv)) if kty == "EC" && crv == "P-256" => KnownKeyAlg::P256, + (Some(kty), Some(crv)) if kty == "EC" && crv == "secp256k1" => KnownKeyAlg::K256, + (Some(kty), Some(crv)) if kty == "OKP" && crv == "Ed25519" => KnownKeyAlg::Ed25519, + (Some(kty), Some(crv)) if kty == "OKP" && crv == "X25519" => KnownKeyAlg::X25519, + _ => KnownKeyAlg::Unsupported, + }, + ( + SecretType::X25519KeyAgreementKey2019, + SecretMaterial::Base58 { + private_key_base58: _, + }, + ) => KnownKeyAlg::X25519, + ( + SecretType::Ed25519VerificationKey2018, + SecretMaterial::Base58 { + private_key_base58: _, + }, + ) => KnownKeyAlg::Ed25519, + ( + SecretType::X25519KeyAgreementKey2020, + SecretMaterial::Multibase { + private_key_multibase: _, + }, + ) => KnownKeyAlg::X25519, + ( + SecretType::Ed25519VerificationKey2020, + SecretMaterial::Multibase { + private_key_multibase: _, + }, + ) => KnownKeyAlg::Ed25519, + _ => KnownKeyAlg::Unsupported, + } + } + + fn as_key_pair(&self) -> Result { + match (&self.type_, &self.secret_material) { + ( + SecretType::JsonWebKey2020, + SecretMaterial::JWK { + private_key_jwk: ref value, + }, + ) => match (value["kty"].as_str(), value["crv"].as_str()) { + (Some(kty), Some(crv)) if kty == "EC" && crv == "P-256" => { + P256KeyPair::from_jwk_value(value) + .kind(ErrorKind::Malformed, "Unable parse jwk") + .map(KnownKeyPair::P256) + } + (Some(kty), Some(crv)) if kty == "EC" && crv == "secp256k1" => { + K256KeyPair::from_jwk_value(value) + .kind(ErrorKind::Malformed, "Unable parse jwk") + .map(KnownKeyPair::K256) + } + (Some(kty), Some(crv)) if kty == "OKP" && crv == "Ed25519" => { + Ed25519KeyPair::from_jwk_value(value) + .kind(ErrorKind::Malformed, "Unable parse jwk") + .map(KnownKeyPair::Ed25519) + } + (Some(kty), Some(crv)) if kty == "OKP" && crv == "X25519" => { + X25519KeyPair::from_jwk_value(value) + .kind(ErrorKind::Malformed, "Unable parse jwk") + .map(KnownKeyPair::X25519) + } + _ => Err(err_msg( + ErrorKind::Unsupported, + "Unsupported key type or curve", + )), + }, + + ( + SecretType::X25519KeyAgreementKey2019, + SecretMaterial::Base58 { + private_key_base58: ref value, + }, + ) => { + let decoded_value = bs58::decode(value) + .into_vec() + .to_didcomm("Wrong base58 value in secret material")?; + + let key_pair = X25519KeyPair::from_secret_bytes(&decoded_value) + .kind(ErrorKind::Malformed, "Unable parse x25519 secret material")?; + + let mut jwk = json!({ + "kty": "OKP", + "crv": "X25519", + }); + + key_pair.with_public_bytes(|buf| { + jwk["x"] = Value::String(base64::encode_config(buf, base64::URL_SAFE_NO_PAD)) + }); + + key_pair.with_secret_bytes(|buf| { + if let Some(sk) = buf { + jwk["d"] = Value::String(base64::encode_config(sk, base64::URL_SAFE_NO_PAD)) + } + }); + + X25519KeyPair::from_jwk_value(&jwk) + .kind(ErrorKind::Malformed, "Unable parse base58 secret material") + .map(KnownKeyPair::X25519) + } + + ( + SecretType::Ed25519VerificationKey2018, + SecretMaterial::Base58 { + private_key_base58: ref value, + }, + ) => { + let decoded_value = bs58::decode(value) + .into_vec() + .to_didcomm("Wrong base58 value in secret material")?; + + let curve25519_point_size = 32; + let (d_value, x_value) = decoded_value.split_at(curve25519_point_size); + let base64_url_d_value = base64::encode_config(&d_value, base64::URL_SAFE_NO_PAD); + let base64_url_x_value = base64::encode_config(&x_value, base64::URL_SAFE_NO_PAD); + + let jwk = json!({"kty": "OKP", + "crv": "Ed25519", + "x": base64_url_x_value, + "d": base64_url_d_value + }); + + Ed25519KeyPair::from_jwk_value(&jwk) + .kind(ErrorKind::Malformed, "Unable parse base58 secret material") + .map(KnownKeyPair::Ed25519) + } + + ( + SecretType::X25519KeyAgreementKey2020, + SecretMaterial::Multibase { + private_key_multibase: ref value, + }, + ) => { + if !value.starts_with('z') { + Err(err_msg( + ErrorKind::IllegalArgument, + "Multibase must start with 'z'", + ))? + } + let decoded_multibase_value = bs58::decode(&value[1..]) + .into_vec() + .to_didcomm("Wrong multibase value in secret material")?; + + let (codec, decoded_value) = _from_multicodec(&decoded_multibase_value)?; + if codec != Codec::X25519Priv { + Err(err_msg( + ErrorKind::IllegalArgument, + "Wrong codec in multibase secret material", + ))? + } + + let key_pair = X25519KeyPair::from_secret_bytes(&decoded_value) + .kind(ErrorKind::Malformed, "Unable parse x25519 secret material")?; + + let mut jwk = json!({ + "kty": "OKP", + "crv": "X25519", + }); + + key_pair.with_public_bytes(|buf| { + jwk["x"] = Value::String(base64::encode_config(buf, base64::URL_SAFE_NO_PAD)) + }); + + key_pair.with_secret_bytes(|buf| { + if let Some(sk) = buf { + jwk["d"] = Value::String(base64::encode_config(sk, base64::URL_SAFE_NO_PAD)) + } + }); + + X25519KeyPair::from_jwk_value(&jwk) + .kind( + ErrorKind::Malformed, + "Unable parse multibase secret material", + ) + .map(KnownKeyPair::X25519) + } + + ( + SecretType::Ed25519VerificationKey2020, + SecretMaterial::Multibase { + private_key_multibase: ref value, + }, + ) => { + if !value.starts_with('z') { + Err(err_msg( + ErrorKind::IllegalArgument, + "Multibase must start with 'z'", + ))? + } + let decoded_multibase_value = bs58::decode(&value[1..]) + .into_vec() + .to_didcomm("Wrong multibase value in secret material")?; + + let (codec, decoded_value) = _from_multicodec(&decoded_multibase_value)?; + if codec != Codec::Ed25519Priv { + Err(err_msg( + ErrorKind::IllegalArgument, + "Wrong codec in multibase secret material", + ))? + } + + let curve25519_point_size = 32; + let (d_value, x_value) = decoded_value.split_at(curve25519_point_size); + let base64_url_d_value = base64::encode_config(&d_value, base64::URL_SAFE_NO_PAD); + let base64_url_x_value = base64::encode_config(&x_value, base64::URL_SAFE_NO_PAD); + + let jwk = json!({ + "kty": "OKP", + "crv": "Ed25519", + "x": base64_url_x_value, + "d": base64_url_d_value + }); + + Ed25519KeyPair::from_jwk_value(&jwk) + .kind( + ErrorKind::Malformed, + "Unable parse multibase secret material", + ) + .map(KnownKeyPair::Ed25519) + } + + _ => Err(err_msg( + ErrorKind::Unsupported, + "Unsupported secret method type and material combination", + )), + } + } } diff --git a/src/secrets/resolvers/mod.rs b/src/secrets/resolvers/mod.rs index a3f0d0fd..d6bd7088 100644 --- a/src/secrets/resolvers/mod.rs +++ b/src/secrets/resolvers/mod.rs @@ -1,3 +1,3 @@ -mod example; +pub mod example; -pub use example::ExampleSecretsResolver; +pub use example::ExampleKMS; diff --git a/src/test_vectors/secrets/alice.rs b/src/test_vectors/secrets/alice.rs index 96ae6c3b..c555f394 100644 --- a/src/test_vectors/secrets/alice.rs +++ b/src/test_vectors/secrets/alice.rs @@ -1,7 +1,7 @@ use lazy_static::lazy_static; use serde_json::json; -use crate::didcomm::secrets::{Secret, SecretMaterial, SecretType}; +use crate::didcomm::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; lazy_static! { pub static ref ALICE_SECRET_AUTH_KEY_ED25519: Secret = Secret { diff --git a/src/test_vectors/secrets/bob.rs b/src/test_vectors/secrets/bob.rs index 38fad114..635edd4b 100644 --- a/src/test_vectors/secrets/bob.rs +++ b/src/test_vectors/secrets/bob.rs @@ -1,7 +1,7 @@ use lazy_static::lazy_static; use serde_json::json; -use crate::didcomm::secrets::{Secret, SecretMaterial, SecretType}; +use crate::didcomm::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; lazy_static! { pub static ref BOB_SECRET_KEY_AGREEMENT_KEY_X25519_1: Secret = Secret { diff --git a/src/test_vectors/secrets/charlie.rs b/src/test_vectors/secrets/charlie.rs index 2257bf1f..778f3a64 100644 --- a/src/test_vectors/secrets/charlie.rs +++ b/src/test_vectors/secrets/charlie.rs @@ -1,7 +1,7 @@ use lazy_static::lazy_static; use serde_json::json; -use crate::didcomm::secrets::{Secret, SecretMaterial, SecretType}; +use crate::didcomm::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; lazy_static! { pub static ref CHARLIE_SECRET_KEY_AGREEMENT_KEY_X25519: Secret = Secret { diff --git a/src/test_vectors/secrets/charlie_rotated_to_alice.rs b/src/test_vectors/secrets/charlie_rotated_to_alice.rs index c4034f7e..d32bb9a9 100644 --- a/src/test_vectors/secrets/charlie_rotated_to_alice.rs +++ b/src/test_vectors/secrets/charlie_rotated_to_alice.rs @@ -1,6 +1,6 @@ use lazy_static::lazy_static; -use crate::didcomm::secrets::Secret; +use crate::didcomm::secrets::resolvers::example::Secret; use super::{ alice::{ diff --git a/src/test_vectors/secrets/mediator1.rs b/src/test_vectors/secrets/mediator1.rs index 2908b3b7..35372aa4 100644 --- a/src/test_vectors/secrets/mediator1.rs +++ b/src/test_vectors/secrets/mediator1.rs @@ -1,7 +1,7 @@ use lazy_static::lazy_static; use serde_json::json; -use crate::didcomm::secrets::{Secret, SecretMaterial, SecretType}; +use crate::didcomm::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; lazy_static! { pub static ref MEDIATOR1_SECRET_KEY_AGREEMENT_KEY_X25519_1: Secret = Secret { diff --git a/src/test_vectors/secrets/mediator2.rs b/src/test_vectors/secrets/mediator2.rs index 315a30b8..ba494388 100644 --- a/src/test_vectors/secrets/mediator2.rs +++ b/src/test_vectors/secrets/mediator2.rs @@ -1,7 +1,7 @@ use lazy_static::lazy_static; use serde_json::json; -use crate::didcomm::secrets::{Secret, SecretMaterial, SecretType}; +use crate::didcomm::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; lazy_static! { pub static ref MEDIATOR2_SECRET_KEY_AGREEMENT_KEY_X25519_1: Secret = Secret { diff --git a/src/test_vectors/secrets/mediator3.rs b/src/test_vectors/secrets/mediator3.rs index 8df9b858..66f55436 100644 --- a/src/test_vectors/secrets/mediator3.rs +++ b/src/test_vectors/secrets/mediator3.rs @@ -1,7 +1,7 @@ use lazy_static::lazy_static; use serde_json::json; -use crate::didcomm::secrets::{Secret, SecretMaterial, SecretType}; +use crate::didcomm::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; lazy_static! { pub static ref MEDIATOR3_SECRET_KEY_AGREEMENT_KEY_X25519_1: Secret = Secret { diff --git a/src/utils/crypto.rs b/src/utils/crypto.rs index 364d105e..7a9816df 100644 --- a/src/utils/crypto.rs +++ b/src/utils/crypto.rs @@ -10,7 +10,9 @@ use askar_crypto::{ encrypt::KeyAeadInPlace, kdf::{ecdh_1pu::Ecdh1PU, ecdh_es::EcdhEs, FromKeyDerivation, KeyExchange}, repr::{KeySecretBytes, ToSecretBytes}, + sign::SignatureType, }; +use serde::{Deserialize, Serialize}; use crate::error::{err_msg, ErrorKind, Result, ResultExt}; @@ -112,8 +114,8 @@ impl JoseKDF } } -#[derive(Debug, PartialEq, Eq)] -pub(crate) enum KnownKeyAlg { +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] +pub enum KnownKeyAlg { Ed25519, X25519, P256, @@ -177,3 +179,33 @@ pub(crate) trait AsKnownKeyPair { } } } + +#[derive(Debug, Serialize, Deserialize)] +pub enum KnownSignatureType { + /// Standard signature output for ed25519 + EdDSA, + /// Elliptic curve DSA using P-256 and SHA-256 + ES256, + /// Elliptic curve DSA using K-256 and SHA-256 + ES256K, +} + +impl From for KnownSignatureType { + fn from(value: SignatureType) -> Self { + match value { + SignatureType::EdDSA => KnownSignatureType::EdDSA, + SignatureType::ES256 => KnownSignatureType::ES256, + SignatureType::ES256K => KnownSignatureType::ES256K, + } + } +} + +impl From for SignatureType { + fn from(value: KnownSignatureType) -> Self { + match value { + KnownSignatureType::EdDSA => SignatureType::EdDSA, + KnownSignatureType::ES256 => SignatureType::ES256, + KnownSignatureType::ES256K => SignatureType::ES256K, + } + } +} diff --git a/src/utils/did.rs b/src/utils/did.rs index 72045b11..b4785f72 100644 --- a/src/utils/did.rs +++ b/src/utils/did.rs @@ -1,8 +1,7 @@ use askar_crypto::alg::{ ed25519::Ed25519KeyPair, k256::K256KeyPair, p256::P256KeyPair, x25519::X25519KeyPair, }; -use askar_crypto::repr::{KeyPublicBytes, KeySecretBytes}; -use serde_json::{json, Value}; +use serde_json::json; use std::io::Cursor; use varint::{VarintRead, VarintWrite}; @@ -11,7 +10,6 @@ use crate::{ did::{did_doc::VerificationMethodType, VerificationMaterial, VerificationMethod}, error::{err_msg, ErrorKind, Result, ResultExt}, jwk::FromJwkValue, - secrets::{Secret, SecretMaterial, SecretType}, utils::crypto::{AsKnownKeyPair, KnownKeyAlg, KnownKeyPair}, }; @@ -245,244 +243,6 @@ impl AsKnownKeyPair for VerificationMethod { } } -impl AsKnownKeyPair for Secret { - fn key_alg(&self) -> KnownKeyAlg { - match (&self.type_, &self.secret_material) { - ( - SecretType::JsonWebKey2020, - SecretMaterial::JWK { - private_key_jwk: ref value, - }, - ) => match (value["kty"].as_str(), value["crv"].as_str()) { - (Some(kty), Some(crv)) if kty == "EC" && crv == "P-256" => KnownKeyAlg::P256, - (Some(kty), Some(crv)) if kty == "EC" && crv == "secp256k1" => KnownKeyAlg::K256, - (Some(kty), Some(crv)) if kty == "OKP" && crv == "Ed25519" => KnownKeyAlg::Ed25519, - (Some(kty), Some(crv)) if kty == "OKP" && crv == "X25519" => KnownKeyAlg::X25519, - _ => KnownKeyAlg::Unsupported, - }, - ( - SecretType::X25519KeyAgreementKey2019, - SecretMaterial::Base58 { - private_key_base58: _, - }, - ) => KnownKeyAlg::X25519, - ( - SecretType::Ed25519VerificationKey2018, - SecretMaterial::Base58 { - private_key_base58: _, - }, - ) => KnownKeyAlg::Ed25519, - ( - SecretType::X25519KeyAgreementKey2020, - SecretMaterial::Multibase { - private_key_multibase: _, - }, - ) => KnownKeyAlg::X25519, - ( - SecretType::Ed25519VerificationKey2020, - SecretMaterial::Multibase { - private_key_multibase: _, - }, - ) => KnownKeyAlg::Ed25519, - _ => KnownKeyAlg::Unsupported, - } - } - - fn as_key_pair(&self) -> Result { - match (&self.type_, &self.secret_material) { - ( - SecretType::JsonWebKey2020, - SecretMaterial::JWK { - private_key_jwk: ref value, - }, - ) => match (value["kty"].as_str(), value["crv"].as_str()) { - (Some(kty), Some(crv)) if kty == "EC" && crv == "P-256" => { - P256KeyPair::from_jwk_value(value) - .kind(ErrorKind::Malformed, "Unable parse jwk") - .map(KnownKeyPair::P256) - } - (Some(kty), Some(crv)) if kty == "EC" && crv == "secp256k1" => { - K256KeyPair::from_jwk_value(value) - .kind(ErrorKind::Malformed, "Unable parse jwk") - .map(KnownKeyPair::K256) - } - (Some(kty), Some(crv)) if kty == "OKP" && crv == "Ed25519" => { - Ed25519KeyPair::from_jwk_value(value) - .kind(ErrorKind::Malformed, "Unable parse jwk") - .map(KnownKeyPair::Ed25519) - } - (Some(kty), Some(crv)) if kty == "OKP" && crv == "X25519" => { - X25519KeyPair::from_jwk_value(value) - .kind(ErrorKind::Malformed, "Unable parse jwk") - .map(KnownKeyPair::X25519) - } - _ => Err(err_msg( - ErrorKind::Unsupported, - "Unsupported key type or curve", - )), - }, - - ( - SecretType::X25519KeyAgreementKey2019, - SecretMaterial::Base58 { - private_key_base58: ref value, - }, - ) => { - let decoded_value = bs58::decode(value) - .into_vec() - .to_didcomm("Wrong base58 value in secret material")?; - - let key_pair = X25519KeyPair::from_secret_bytes(&decoded_value) - .kind(ErrorKind::Malformed, "Unable parse x25519 secret material")?; - - let mut jwk = json!({ - "kty": "OKP", - "crv": "X25519", - }); - - key_pair.with_public_bytes(|buf| { - jwk["x"] = Value::String(base64::encode_config(buf, base64::URL_SAFE_NO_PAD)) - }); - - key_pair.with_secret_bytes(|buf| { - if let Some(sk) = buf { - jwk["d"] = Value::String(base64::encode_config(sk, base64::URL_SAFE_NO_PAD)) - } - }); - - X25519KeyPair::from_jwk_value(&jwk) - .kind(ErrorKind::Malformed, "Unable parse base58 secret material") - .map(KnownKeyPair::X25519) - } - - ( - SecretType::Ed25519VerificationKey2018, - SecretMaterial::Base58 { - private_key_base58: ref value, - }, - ) => { - let decoded_value = bs58::decode(value) - .into_vec() - .to_didcomm("Wrong base58 value in secret material")?; - - let curve25519_point_size = 32; - let (d_value, x_value) = decoded_value.split_at(curve25519_point_size); - let base64_url_d_value = base64::encode_config(&d_value, base64::URL_SAFE_NO_PAD); - let base64_url_x_value = base64::encode_config(&x_value, base64::URL_SAFE_NO_PAD); - - let jwk = json!({"kty": "OKP", - "crv": "Ed25519", - "x": base64_url_x_value, - "d": base64_url_d_value - }); - - Ed25519KeyPair::from_jwk_value(&jwk) - .kind(ErrorKind::Malformed, "Unable parse base58 secret material") - .map(KnownKeyPair::Ed25519) - } - - ( - SecretType::X25519KeyAgreementKey2020, - SecretMaterial::Multibase { - private_key_multibase: ref value, - }, - ) => { - if !value.starts_with('z') { - Err(err_msg( - ErrorKind::IllegalArgument, - "Multibase must start with 'z'", - ))? - } - let decoded_multibase_value = bs58::decode(&value[1..]) - .into_vec() - .to_didcomm("Wrong multibase value in secret material")?; - - let (codec, decoded_value) = _from_multicodec(&decoded_multibase_value)?; - if codec != Codec::X25519Priv { - Err(err_msg( - ErrorKind::IllegalArgument, - "Wrong codec in multibase secret material", - ))? - } - - let key_pair = X25519KeyPair::from_secret_bytes(&decoded_value) - .kind(ErrorKind::Malformed, "Unable parse x25519 secret material")?; - - let mut jwk = json!({ - "kty": "OKP", - "crv": "X25519", - }); - - key_pair.with_public_bytes(|buf| { - jwk["x"] = Value::String(base64::encode_config(buf, base64::URL_SAFE_NO_PAD)) - }); - - key_pair.with_secret_bytes(|buf| { - if let Some(sk) = buf { - jwk["d"] = Value::String(base64::encode_config(sk, base64::URL_SAFE_NO_PAD)) - } - }); - - X25519KeyPair::from_jwk_value(&jwk) - .kind( - ErrorKind::Malformed, - "Unable parse multibase secret material", - ) - .map(KnownKeyPair::X25519) - } - - ( - SecretType::Ed25519VerificationKey2020, - SecretMaterial::Multibase { - private_key_multibase: ref value, - }, - ) => { - if !value.starts_with('z') { - Err(err_msg( - ErrorKind::IllegalArgument, - "Multibase must start with 'z'", - ))? - } - let decoded_multibase_value = bs58::decode(&value[1..]) - .into_vec() - .to_didcomm("Wrong multibase value in secret material")?; - - let (codec, decoded_value) = _from_multicodec(&decoded_multibase_value)?; - if codec != Codec::Ed25519Priv { - Err(err_msg( - ErrorKind::IllegalArgument, - "Wrong codec in multibase secret material", - ))? - } - - let curve25519_point_size = 32; - let (d_value, x_value) = decoded_value.split_at(curve25519_point_size); - let base64_url_d_value = base64::encode_config(&d_value, base64::URL_SAFE_NO_PAD); - let base64_url_x_value = base64::encode_config(&x_value, base64::URL_SAFE_NO_PAD); - - let jwk = json!({ - "kty": "OKP", - "crv": "Ed25519", - "x": base64_url_x_value, - "d": base64_url_d_value - }); - - Ed25519KeyPair::from_jwk_value(&jwk) - .kind( - ErrorKind::Malformed, - "Unable parse multibase secret material", - ) - .map(KnownKeyPair::Ed25519) - } - - _ => Err(err_msg( - ErrorKind::Unsupported, - "Unsupported secret method type and material combination", - )), - } - } -} - #[derive(Clone, Debug, PartialEq)] pub enum Codec { X25519Pub, @@ -503,7 +263,7 @@ impl Codec { } } -fn _from_multicodec(value: &Vec) -> Result<(Codec, &[u8])> { +pub(crate) fn _from_multicodec(value: &Vec) -> Result<(Codec, &[u8])> { let mut val: Cursor> = Cursor::new(value.clone()); let prefix_int = val .read_unsigned_varint_32() @@ -522,7 +282,7 @@ fn _from_multicodec(value: &Vec) -> Result<(Codec, &[u8])> { mod tests { use crate::did::{VerificationMaterial, VerificationMethod, VerificationMethodType}; use crate::jwk::FromJwkValue; - use crate::secrets::{Secret, SecretMaterial, SecretType}; + use crate::secrets::resolvers::example::{Secret, SecretMaterial, SecretType}; use crate::utils::crypto::{AsKnownKeyPair, KnownKeyPair}; use crate::utils::did::{did_or_url, is_did}; use askar_crypto::alg::ed25519::Ed25519KeyPair; diff --git a/src/utils/mod.rs b/src/utils/mod.rs index e5faaecb..6f5a428e 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1,3 +1,22 @@ +use std::future::Future; +use std::pin::Pin; +use std::task::{Context, Poll}; + pub(crate) mod crypto; pub(crate) mod did; pub(crate) mod serde; + +/// Sized feature needed just for compiler to deduce Sized type +/// Do NOT use as a real feature. +pub struct DummyFuture { + #[allow(dead_code)] + value: OUT, +} + +impl Future for DummyFuture { + type Output = OUT; + + fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll { + Poll::Pending + } +} diff --git a/uniffi/Cargo.toml b/uniffi/Cargo.toml index befd811f..90b2dd34 100644 --- a/uniffi/Cargo.toml +++ b/uniffi/Cargo.toml @@ -29,6 +29,7 @@ futures = { version = "0.3.17", features = ["thread-pool"] } num_cpus = "1.8.0" async-trait = '0.1' serde_json = '1.0' +aries-askar = "0.2" [dev-dependencies.tokio] version = '1.9' diff --git a/uniffi/src/didcomm.udl b/uniffi/src/didcomm.udl index 93d0f771..c6106443 100644 --- a/uniffi/src/didcomm.udl +++ b/uniffi/src/didcomm.udl @@ -4,7 +4,7 @@ typedef string JsonValue; // 1. MAIN DIDCOMM INTERFACE interface DIDComm { - constructor(DIDResolver did_resolver, SecretsResolver secret_resolver); + constructor(DIDResolver did_resolver, KeyManagementService kms); ErrorCode pack_plaintext([ByRef] Message msg, OnPackPlaintextResult cb); ErrorCode pack_signed([ByRef] Message msg, string sign_by, OnPackSignedResult cb); @@ -168,14 +168,17 @@ interface ExampleDIDResolver { // 5. SECRETS RESOLVER -callback interface SecretsResolver { - ErrorCode get_secret(string secretid, OnGetSecretResult cb); // should be in camel case +callback interface KeyManagementService { + ErrorCode get_key_alg(string secretid, OnGetKeyAlgResult cb); // should be in camel case ErrorCode find_secrets(sequence secretids, OnFindSecretsResult cb); // should be in camel case + ErrorCode create_signature(string secretid, bytes message, KnownSignatureType? sigtype, OnSecretBytesResult cb); + ErrorCode derive_aes_key_using_ecdh_1pu(KidOrJwkAdapted epk, KidOrJwkAdapted sk, KidOrJwkAdapted rk, bytes alg, bytes apu, bytes apv, bytes tag, boolean recive, OnSecretBytesResult cb); + ErrorCode derive_aes_key_using_ecdh_es(KidOrJwkAdapted epk, KidOrJwkAdapted rk, bytes alg, bytes apu, bytes apv, boolean recive, OnSecretBytesResult cb); }; -interface OnGetSecretResult { +interface OnGetKeyAlgResult { [Throws=ErrorKind] - void success(Secret? result); + void success(KnownKeyAlg result); [Throws=ErrorKind] void error(ErrorKind err, string msg); @@ -189,6 +192,14 @@ interface OnFindSecretsResult { void error(ErrorKind err, string msg); }; +interface OnSecretBytesResult { + [Throws=ErrorKind] + void success(bytes result); + + [Throws=ErrorKind] + void error(ErrorKind err, string msg); +}; + dictionary Secret { string id; SecretType type_; @@ -212,10 +223,33 @@ enum SecretType { "Other", }; -interface ExampleSecretsResolver { +enum KnownKeyAlg { + "Ed25519", + "X25519", + "P256", + "K256", + "Unsupported", +}; + +enum KnownSignatureType { + "EdDSA", + "ES256", + "ES256K", +}; + +[Enum] +interface KidOrJwkAdapted { + Kid(string kid); + Jwk(string jwk); +}; + +interface ExampleKMS { constructor(sequence known_secrets); - ErrorCode get_secret(string secret_id, OnGetSecretResult cb); + ErrorCode get_key_alg(string secret_id, OnGetKeyAlgResult cb); ErrorCode find_secrets(sequence secret_ids, OnFindSecretsResult cb); + ErrorCode create_signature(string secretid, bytes message, KnownSignatureType? sigtype, OnSecretBytesResult cb); + ErrorCode derive_aes_key_using_ecdh_1pu(KidOrJwkAdapted epk, KidOrJwkAdapted sk, KidOrJwkAdapted rk, bytes alg, bytes apu, bytes apv, bytes tag, boolean recive, OnSecretBytesResult cb); + ErrorCode derive_aes_key_using_ecdh_es(KidOrJwkAdapted epk, KidOrJwkAdapted rk, bytes alg, bytes apu, bytes apv, boolean recive, OnSecretBytesResult cb); }; diff --git a/uniffi/src/didcomm/from_prior.rs b/uniffi/src/didcomm/from_prior.rs index 3f370f7f..59217e2c 100644 --- a/uniffi/src/didcomm/from_prior.rs +++ b/uniffi/src/didcomm/from_prior.rs @@ -4,7 +4,7 @@ use crate::DIDComm; use crate::common::{ErrorCode, EXECUTOR}; use crate::did_resolver_adapter::DIDResolverAdapter; -use crate::secrets_resolver_adapter::SecretsResolverAdapter; +use crate::kms_adapter::KeyManagementServiceAdapter; pub trait OnFromPriorPackResult: Sync + Send { fn success(&self, from_prior_jwt: String, kid: String); @@ -25,12 +25,9 @@ impl DIDComm { ) -> ErrorCode { let msg = msg.clone(); let did_resolver = DIDResolverAdapter::new(self.did_resolver.clone()); - let secret_resolver = SecretsResolverAdapter::new(self.secret_resolver.clone()); + let kms = KeyManagementServiceAdapter::new(self.kms.clone()); - let future = async move { - msg.pack(issuer_kid.as_deref(), &did_resolver, &secret_resolver) - .await - }; + let future = async move { msg.pack(issuer_kid.as_deref(), &did_resolver, &kms).await }; EXECUTOR.spawn_ok(async move { match future.await { Ok((from_prior_jwt, kid)) => cb.success(from_prior_jwt, kid), @@ -66,7 +63,7 @@ mod tests { use crate::{ test_helper::{create_did_resolver, get_ok, FromPriorPackResult, FromPriorUnpackResult}, - DIDComm, ExampleSecretsResolver, + DIDComm, ExampleKMS, }; use didcomm_core::test_vectors::{ ALICE_DID, CHARLIE_DID, CHARLIE_ROTATED_TO_ALICE_SECRETS, CHARLIE_SECRET_AUTH_KEY_ED25519, @@ -80,9 +77,7 @@ mod tests { DIDComm::new( create_did_resolver(), - Box::new(ExampleSecretsResolver::new( - CHARLIE_ROTATED_TO_ALICE_SECRETS.clone(), - )), + Box::new(ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone())), ) .pack_from_prior( &from_prior, @@ -99,9 +94,7 @@ mod tests { let (cb, receiver) = FromPriorPackResult::new(); let did_comm = DIDComm::new( create_did_resolver(), - Box::new(ExampleSecretsResolver::new( - CHARLIE_ROTATED_TO_ALICE_SECRETS.clone(), - )), + Box::new(ExampleKMS::new(CHARLIE_ROTATED_TO_ALICE_SECRETS.clone())), ); let from_prior = FromPrior::build(CHARLIE_DID.into(), ALICE_DID.into()) diff --git a/uniffi/src/didcomm/mod.rs b/uniffi/src/didcomm/mod.rs index d6f91e72..79a94329 100644 --- a/uniffi/src/didcomm/mod.rs +++ b/uniffi/src/didcomm/mod.rs @@ -14,21 +14,18 @@ pub use unpack::OnUnpackResult; use std::sync::Arc; -use crate::{DIDResolver, SecretsResolver}; +use crate::{DIDResolver, KeyManagementService}; pub struct DIDComm { did_resolver: Arc>, - secret_resolver: Arc>, + kms: Arc>, } impl DIDComm { - pub fn new( - did_resolver: Box, - secret_resolver: Box, - ) -> Self { + pub fn new(did_resolver: Box, kms: Box) -> Self { DIDComm { did_resolver: Arc::new(did_resolver), - secret_resolver: Arc::new(secret_resolver), + kms: Arc::new(kms), } } } diff --git a/uniffi/src/didcomm/pack_encrypted.rs b/uniffi/src/didcomm/pack_encrypted.rs index 2f86b73b..109f265a 100644 --- a/uniffi/src/didcomm/pack_encrypted.rs +++ b/uniffi/src/didcomm/pack_encrypted.rs @@ -3,7 +3,7 @@ use didcomm_core::{Message, PackEncryptedMetadata, PackEncryptedOptions}; use crate::common::{ErrorCode, EXECUTOR}; use crate::did_resolver_adapter::DIDResolverAdapter; -use crate::secrets::secrets_resolver_adapter::SecretsResolverAdapter; +use crate::secrets::kms_adapter::KeyManagementServiceAdapter; use crate::DIDComm; pub trait OnPackEncryptedResult: Sync + Send { @@ -24,7 +24,7 @@ impl DIDComm { let msg = msg.clone(); let options = options.clone(); let did_resolver = DIDResolverAdapter::new(self.did_resolver.clone()); - let secret_resolver = SecretsResolverAdapter::new(self.secret_resolver.clone()); + let kms = KeyManagementServiceAdapter::new(self.kms.clone()); let future = async move { msg.pack_encrypted( @@ -32,7 +32,7 @@ impl DIDComm { from.as_deref(), sign_by.as_deref(), &did_resolver, - &secret_resolver, + &kms, &options, ) .await @@ -50,9 +50,7 @@ impl DIDComm { #[cfg(test)] mod tests { - use crate::test_helper::{ - create_did_resolver, create_secrets_resolver, get_error, get_ok, PackResult, - }; + use crate::test_helper::{create_did_resolver, create_kms, get_error, get_ok, PackResult}; use crate::DIDComm; use didcomm_core::error::ErrorKind; use didcomm_core::test_vectors::{ALICE_DID, BOB_DID, MESSAGE_SIMPLE}; @@ -63,7 +61,7 @@ mod tests { async fn pack_encrypted_works() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_encrypted( + DIDComm::new(create_did_resolver(), create_kms()).pack_encrypted( &MESSAGE_SIMPLE, String::from(BOB_DID), Some(String::from(ALICE_DID)), @@ -89,7 +87,7 @@ mod tests { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_encrypted( + DIDComm::new(create_did_resolver(), create_kms()).pack_encrypted( &msg, String::from("did:unknown:bob"), Some(String::from(ALICE_DID)), @@ -106,7 +104,7 @@ mod tests { async fn pack_encrypted_works_did_url_not_found() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_encrypted( + DIDComm::new(create_did_resolver(), create_kms()).pack_encrypted( &MESSAGE_SIMPLE, String::from(format!("{}#unknown-fragment", BOB_DID)), Some(String::from(ALICE_DID)), @@ -123,7 +121,7 @@ mod tests { async fn pack_encrypted_works_secret_not_found() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_encrypted( + DIDComm::new(create_did_resolver(), create_kms()).pack_encrypted( &MESSAGE_SIMPLE, String::from(BOB_DID), Some(String::from(format!( @@ -143,7 +141,7 @@ mod tests { async fn pack_encrypted_works_illegal_argument() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_encrypted( + DIDComm::new(create_did_resolver(), create_kms()).pack_encrypted( &MESSAGE_SIMPLE, String::from("not-a-did"), Some(String::from(ALICE_DID)), diff --git a/uniffi/src/didcomm/pack_plaintext.rs b/uniffi/src/didcomm/pack_plaintext.rs index 8b7126ce..01c83cae 100644 --- a/uniffi/src/didcomm/pack_plaintext.rs +++ b/uniffi/src/didcomm/pack_plaintext.rs @@ -33,15 +33,14 @@ mod tests { use crate::DIDComm; - use crate::test_helper::{create_did_resolver, create_secrets_resolver, get_ok, PackResult}; + use crate::test_helper::{create_did_resolver, create_kms, get_ok, PackResult}; use didcomm_core::test_vectors::MESSAGE_SIMPLE; #[tokio::test] async fn pack_plaintext_works() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()) - .pack_plaintext(&MESSAGE_SIMPLE, cb); + DIDComm::new(create_did_resolver(), create_kms()).pack_plaintext(&MESSAGE_SIMPLE, cb); let res = get_ok(receiver).await; assert!(res.contains("body")); diff --git a/uniffi/src/didcomm/pack_signed.rs b/uniffi/src/didcomm/pack_signed.rs index 9981307a..dd3493d0 100644 --- a/uniffi/src/didcomm/pack_signed.rs +++ b/uniffi/src/didcomm/pack_signed.rs @@ -3,7 +3,7 @@ use didcomm_core::{error::ErrorKind, PackSignedMetadata}; use crate::common::{ErrorCode, EXECUTOR}; use crate::did_resolver_adapter::DIDResolverAdapter; -use crate::secrets::secrets_resolver_adapter::SecretsResolverAdapter; +use crate::secrets::kms_adapter::KeyManagementServiceAdapter; use crate::DIDComm; pub trait OnPackSignedResult: Sync + Send { @@ -20,12 +20,9 @@ impl DIDComm { ) -> ErrorCode { let msg = msg.clone(); let did_resolver = DIDResolverAdapter::new(self.did_resolver.clone()); - let secret_resolver = SecretsResolverAdapter::new(self.secret_resolver.clone()); + let kms = KeyManagementServiceAdapter::new(self.kms.clone()); - let future = async move { - msg.pack_signed(&sign_by, &did_resolver, &secret_resolver) - .await - }; + let future = async move { msg.pack_signed(&sign_by, &did_resolver, &kms).await }; EXECUTOR.spawn_ok(async move { match future.await { @@ -44,9 +41,7 @@ mod tests { use didcomm_core::Message; use serde_json::json; - use crate::test_helper::{ - create_did_resolver, create_secrets_resolver, get_error, get_ok, PackResult, - }; + use crate::test_helper::{create_did_resolver, create_kms, get_error, get_ok, PackResult}; use crate::DIDComm; use didcomm_core::test_vectors::{ALICE_DID, MESSAGE_SIMPLE}; @@ -55,7 +50,7 @@ mod tests { async fn pack_signed_works() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_signed( + DIDComm::new(create_did_resolver(), create_kms()).pack_signed( &MESSAGE_SIMPLE, String::from(ALICE_DID), cb, @@ -78,7 +73,7 @@ mod tests { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_signed( + DIDComm::new(create_did_resolver(), create_kms()).pack_signed( &msg, String::from("did:unknown:alice"), cb, @@ -92,7 +87,7 @@ mod tests { async fn pack_signed_works_did_url_not_found() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_signed( + DIDComm::new(create_did_resolver(), create_kms()).pack_signed( &MESSAGE_SIMPLE, String::from(format!("{}#unknown-fragment", ALICE_DID)), cb, @@ -106,7 +101,7 @@ mod tests { async fn pack_signed_works_secret_not_found() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_signed( + DIDComm::new(create_did_resolver(), create_kms()).pack_signed( &MESSAGE_SIMPLE, String::from(format!("{}#key-not-in-secrets-1", ALICE_DID)), cb, @@ -120,7 +115,7 @@ mod tests { async fn pack_signed_works_illegal_argument() { let (cb, receiver) = PackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).pack_signed( + DIDComm::new(create_did_resolver(), create_kms()).pack_signed( &MESSAGE_SIMPLE, String::from("not-a-did"), cb, diff --git a/uniffi/src/didcomm/protocols/routing/mod.rs b/uniffi/src/didcomm/protocols/routing/mod.rs index 44442722..c1b13ef3 100644 --- a/uniffi/src/didcomm/protocols/routing/mod.rs +++ b/uniffi/src/didcomm/protocols/routing/mod.rs @@ -58,8 +58,7 @@ mod tests { use std::iter::FromIterator; use crate::test_helper::{ - create_did_resolver, create_secrets_resolver, get_ok, PackResult, UnpackResult, - WrapInForwardResult, + create_did_resolver, create_kms, get_ok, PackResult, UnpackResult, WrapInForwardResult, }; use crate::DIDComm; use didcomm_core::algorithms::AnonCryptAlg; @@ -73,7 +72,7 @@ mod tests { #[tokio::test] async fn pack_encrypted_works_single_mediator() { - let didcomm = DIDComm::new(create_did_resolver(), create_secrets_resolver()); + let didcomm = DIDComm::new(create_did_resolver(), create_kms()); let msg = MESSAGE_SIMPLE.clone(); // ALICE @@ -113,7 +112,7 @@ mod tests { #[tokio::test] async fn pack_encrypted_works_multiple_mediators_alternative_endpoints() { - let didcomm = DIDComm::new(create_did_resolver(), create_secrets_resolver()); + let didcomm = DIDComm::new(create_did_resolver(), create_kms()); let msg = Message::build( "1234567890".to_owned(), "http://example.com/protocols/lets_do_lunch/1.0/proposal".to_owned(), @@ -193,7 +192,7 @@ mod tests { #[tokio::test] async fn wrap_in_forward_works_mediator_unknown_by_sender() { - let didcomm = DIDComm::new(create_did_resolver(), create_secrets_resolver()); + let didcomm = DIDComm::new(create_did_resolver(), create_kms()); let msg = MESSAGE_SIMPLE.clone(); // ALICE diff --git a/uniffi/src/didcomm/unpack.rs b/uniffi/src/didcomm/unpack.rs index 67c069e3..085cebab 100644 --- a/uniffi/src/didcomm/unpack.rs +++ b/uniffi/src/didcomm/unpack.rs @@ -3,7 +3,7 @@ use didcomm_core::{error::ErrorKind, Message, UnpackMetadata, UnpackOptions}; use crate::common::EXECUTOR; use crate::did_resolver_adapter::DIDResolverAdapter; use crate::DIDComm; -use crate::{secrets_resolver_adapter::SecretsResolverAdapter, ErrorCode}; +use crate::{kms_adapter::KeyManagementServiceAdapter, ErrorCode}; pub trait OnUnpackResult: Sync + Send { fn success(&self, result: Message, metadata: UnpackMetadata); @@ -20,10 +20,9 @@ impl DIDComm { let msg = msg.clone(); let options = options.clone(); let did_resolver = DIDResolverAdapter::new(self.did_resolver.clone()); - let secret_resolver = SecretsResolverAdapter::new(self.secret_resolver.clone()); + let kms = KeyManagementServiceAdapter::new(self.kms.clone()); - let future = - async move { Message::unpack(&msg, &did_resolver, &secret_resolver, &options).await }; + let future = async move { Message::unpack(&msg, &did_resolver, &kms, &options).await }; EXECUTOR.spawn_ok(async move { match future.await { Ok((result, metadata)) => cb.success(result, metadata), @@ -38,7 +37,7 @@ impl DIDComm { #[cfg(test)] mod tests { use crate::test_helper::{ - create_did_resolver, create_secrets_resolver, get_error, get_ok, PackResult, UnpackResult, + create_did_resolver, create_kms, get_error, get_ok, PackResult, UnpackResult, }; use crate::DIDComm; use didcomm_core::error::ErrorKind; @@ -49,7 +48,7 @@ mod tests { #[tokio::test] async fn unpack_works_plaintext() { let msg = MESSAGE_SIMPLE.clone(); - let didcomm = DIDComm::new(create_did_resolver(), create_secrets_resolver()); + let didcomm = DIDComm::new(create_did_resolver(), create_kms()); let (cb, receiver) = PackResult::new(); didcomm.pack_plaintext(&MESSAGE_SIMPLE, cb); @@ -65,7 +64,7 @@ mod tests { #[tokio::test] async fn unpack_works_signed() { let msg = MESSAGE_SIMPLE.clone(); - let didcomm = DIDComm::new(create_did_resolver(), create_secrets_resolver()); + let didcomm = DIDComm::new(create_did_resolver(), create_kms()); let (cb, receiver) = PackResult::new(); didcomm.pack_signed(&msg, String::from(ALICE_DID), cb); @@ -81,7 +80,7 @@ mod tests { #[tokio::test] async fn unpack_works_encrypted() { let msg = MESSAGE_SIMPLE.clone(); - let didcomm = DIDComm::new(create_did_resolver(), create_secrets_resolver()); + let didcomm = DIDComm::new(create_did_resolver(), create_kms()); let (cb, receiver) = PackResult::new(); didcomm.pack_encrypted( @@ -107,7 +106,7 @@ mod tests { #[tokio::test] async fn unpack_works_malformed() { let (cb, receiver) = UnpackResult::new(); - DIDComm::new(create_did_resolver(), create_secrets_resolver()).unpack( + DIDComm::new(create_did_resolver(), create_kms()).unpack( String::from("invalid message"), &UnpackOptions::default(), cb, diff --git a/uniffi/src/lib.rs b/uniffi/src/lib.rs index 42040163..2a97c57b 100644 --- a/uniffi/src/lib.rs +++ b/uniffi/src/lib.rs @@ -3,19 +3,25 @@ mod did; mod didcomm; mod secrets; +use crate::kms::KidOrJwkAdapted; pub use common::ErrorCode; pub use common::JsonValue; pub use did::resolvers::*; pub use did::*; pub use didcomm::*; -pub use didcomm_core::algorithms::*; -pub use didcomm_core::did::{ - DIDCommMessagingService, DIDDoc, Service, ServiceKind, VerificationMaterial, - VerificationMethod, VerificationMethodType, +pub use didcomm_core::{ + algorithms::*, + did::{ + DIDCommMessagingService, DIDDoc, Service, ServiceKind, VerificationMaterial, + VerificationMethod, VerificationMethodType, + }, + error::*, + secrets::{ + resolvers::example::{Secret, SecretMaterial, SecretType}, + KidOrJwk, KnownKeyAlg, KnownSignatureType, + }, + *, }; -pub use didcomm_core::error::*; -pub use didcomm_core::secrets::{Secret, SecretMaterial, SecretType}; -pub use didcomm_core::*; pub use secrets::resolvers::*; pub use secrets::*; diff --git a/uniffi/src/secrets/kms.rs b/uniffi/src/secrets/kms.rs new file mode 100644 index 00000000..81910bdb --- /dev/null +++ b/uniffi/src/secrets/kms.rs @@ -0,0 +1,131 @@ +use std::sync::Arc; + +use didcomm_core::secrets::{KidOrJwk, KnownKeyAlg, KnownSignatureType}; + +use crate::common::{ErrorCode, OnResult}; + +pub enum KidOrJwkAdapted { + Kid { kid: String }, + Jwk { jwk: String }, +} + +impl From for KidOrJwkAdapted { + fn from(x: KidOrJwk) -> Self { + match x { + KidOrJwk::Kid(kid) => Self::Kid { kid }, + KidOrJwk::P256Key(jwk) => Self::Jwk { jwk }, + KidOrJwk::X25519Key(jwk) => Self::Jwk { jwk }, + } + } +} + +/// Interface for secrets resolver. +/// Resolves secrets such as private keys to be used for signing and encryption. +pub trait KeyManagementService: Sync + Send { + /// Finds secret (usually private key) identified by the given key ID. + /// + /// # Parameters + /// - `secret_id` the ID (in form of DID URL) identifying a secret + /// - `cb` a callback with a result + /// + /// # Returns + /// A secret (usually private key) or None of there is no secret for the given ID + /// + // fn get_secret(&self, secret_id: String, cb: Arc) -> ErrorCode; + + /// Finds secret (usually private key) identified by the given key ID. + /// + /// # Parameters + /// - `secret_id` the ID (in form of DID URL) identifying a secret + /// + /// # Returns + /// A key algorithm of the secret or None of there is no secret for the given ID + /// + /// # Errors + /// - IOError + /// - InvalidState + fn get_key_alg(&self, secret_id: String, cb: Arc) -> ErrorCode; + + /// Find all secrets that have one of the given IDs. + /// Return secrets only for key IDs for which a secret is present. + /// + /// # Parameters + /// - `secret_ids` the IDs find secrets for + /// - `cb` a callback with a result + /// + /// # Returns + /// A secret (usually private key) or None of there is no secret for the given ID + /// + fn find_secrets(&self, secret_ids: Vec, cb: Arc) -> ErrorCode; + + /// Create a signature of the requested type and return an allocated + /// buffer. + /// + /// # Parameters + /// - `secret_id` the ID (in form of DID URL) identifying a secret + /// - `message` bytes to be signed + /// - `sig_type`: signature type to be used. + /// + /// # Returns + /// Signature + /// + /// # Errors + /// - IOError + /// - IvalidState + /// - Unsupported + fn create_signature( + &self, + secret_id: String, + message: Vec, + sig_type: Option, + cb: Arc, + ) -> ErrorCode; + + /// ECDH-1PU derivation of key + /// + /// # Parameters + /// - `ephem_key` Ephemeral key (cannot be kid) + /// - `send_key` Sender key (or kid to be resolved by KMS) + /// - `recip_key`: Recipient key (or kid to be resolved by KMS) + /// - `alg`: algorithm + /// - `apu`: Sender info + /// - `apv`: Receiver info + /// - `cc_tag`: tag + /// - `receive`: Whether derived key is used on receive or send side. + fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwkAdapted, + send_key: KidOrJwkAdapted, + recip_key: KidOrJwkAdapted, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + cb: Arc, + ) -> ErrorCode; + + /// ECDH-ES derivation of key + /// + /// # Parameters + /// - `ephem_key` Ephemeral key (cannot be kid) + /// - `recip_key`: Recipient key (or kid to be resolved by KMS) + /// - `alg`: algorithm + /// - `apu`: Sender info + /// - `apv`: Receiver info + /// - `receive`: Whether derived key is used on receive or send side. + fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwkAdapted, + recip_key: KidOrJwkAdapted, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + cb: Arc, + ) -> ErrorCode; +} + +pub type OnGetKeyAlgResult = OnResult; +pub type OnFindSecretsResult = OnResult>; +pub type OnSecretBytesResult = OnResult>; diff --git a/uniffi/src/secrets/kms_adapter.rs b/uniffi/src/secrets/kms_adapter.rs new file mode 100644 index 00000000..70dab13f --- /dev/null +++ b/uniffi/src/secrets/kms_adapter.rs @@ -0,0 +1,143 @@ +use std::sync::Arc; + +use async_trait::async_trait; +use didcomm_core::{ + error::{ErrorKind, Result, ResultExt}, + secrets::{ + A256Kw, AesKey, KeyManagementService as _KeyManagementService, KeySecretBytes, KidOrJwk, + KnownKeyAlg, KnownSignatureType, SecretBytes, + }, +}; + +use crate::kms::{OnFindSecretsResult, OnGetKeyAlgResult, OnSecretBytesResult}; + +use super::KeyManagementService; + +pub struct KeyManagementServiceAdapter { + kms: Arc>, +} + +impl KeyManagementServiceAdapter { + pub fn new(kms: Arc>) -> Self { + KeyManagementServiceAdapter { kms } + } +} + +#[async_trait] +impl _KeyManagementService for KeyManagementServiceAdapter { + async fn get_key_alg(&self, secret_id: &str) -> Result { + let (cb, receiver) = OnGetKeyAlgResult::new(); + + self.kms.get_key_alg(String::from(secret_id), cb); + + let res = receiver + .get() + .await + .kind(ErrorKind::InvalidState, "can not get key alg")?; + Ok(res) + } + + async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> Result> { + let (cb, receiver) = OnFindSecretsResult::new(); + + self.kms + .find_secrets(secret_ids.iter().map(|&s| String::from(s)).collect(), cb); + + let res = receiver + .get() + .await + .kind(ErrorKind::InvalidState, "can not get secret")?; + + Ok(secret_ids + .iter() + .filter(|&&sid| res.iter().find(|&s| s == sid).is_some()) + .map(|sid| *sid) + .collect()) + } + + async fn create_signature( + &self, + secret_id: &str, + message: &[u8], + sig_type: Option, + ) -> Result { + let (cb, receiver) = OnSecretBytesResult::new(); + + self.kms + .create_signature(secret_id.to_string(), message.to_vec(), sig_type, cb); + + let res = receiver + .get() + .await + .kind(ErrorKind::InvalidState, "can not create signature")?; + Ok(SecretBytes::from_slice(&res)) + } + + async fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwk, + send_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + ) -> Result> { + let (cb, receiver) = OnSecretBytesResult::new(); + + self.kms.derive_aes_key_using_ecdh_1pu( + ephem_key.into(), + send_key.into(), + recip_key.into(), + alg, + apu, + apv, + cc_tag, + receive, + cb, + ); + + let res = receiver + .get() + .await + .kind(ErrorKind::InvalidState, "can not derive key using ECDH-1PU")?; + let res = AesKey::from_secret_bytes(&res).kind( + ErrorKind::InvalidState, + "can not convert derived key from secret bytes", + )?; + Ok(res) + } + + async fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + ) -> Result> { + let (cb, receiver) = OnSecretBytesResult::new(); + + self.kms.derive_aes_key_using_ecdh_es( + ephem_key.into(), + recip_key.into(), + alg, + apu, + apv, + receive, + cb, + ); + + let res = receiver + .get() + .await + .kind(ErrorKind::InvalidState, "can not derive key using ECDH-1PU")?; + let res = AesKey::from_secret_bytes(&res).kind( + ErrorKind::InvalidState, + "can not convert derived key from secret bytes", + )?; + Ok(res) + } +} diff --git a/uniffi/src/secrets/mod.rs b/uniffi/src/secrets/mod.rs index d97a502f..3846ebd4 100644 --- a/uniffi/src/secrets/mod.rs +++ b/uniffi/src/secrets/mod.rs @@ -1,6 +1,6 @@ pub mod resolvers; -pub(crate) mod secrets_resolver; -pub(crate) mod secrets_resolver_adapter; +pub(crate) mod kms; +pub(crate) mod kms_adapter; -pub use secrets_resolver::{OnFindSecretsResult, OnGetSecretResult, SecretsResolver}; +pub use kms::{KeyManagementService, OnFindSecretsResult, OnGetKeyAlgResult, OnSecretBytesResult}; diff --git a/uniffi/src/secrets/resolvers/example.rs b/uniffi/src/secrets/resolvers/example.rs index bd6e862e..199cad92 100644 --- a/uniffi/src/secrets/resolvers/example.rs +++ b/uniffi/src/secrets/resolvers/example.rs @@ -1,31 +1,66 @@ +use std::collections::HashMap; use std::sync::Arc; +use aries_askar::crypto::repr::ToSecretBytes; +use aries_askar::crypto::{ + alg::{AnyKey, EcCurves}, + jwk::FromJwk, + kdf::{ecdh_1pu::Ecdh1PU, ecdh_es::EcdhEs, FromKeyDerivation}, + sign::KeySign, +}; use async_trait::async_trait; -use didcomm_core::secrets::Secret; +use didcomm_core::secrets::{ + resolvers::example::Secret, A256Kw, AesKey, KeyAlg, KnownKeyAlg, KnownSignatureType, +}; -use crate::{common::ErrorCode, secrets::SecretsResolver, OnFindSecretsResult, OnGetSecretResult}; +use crate::secrets::kms::KidOrJwkAdapted; +use crate::{ + common::ErrorCode, secrets::KeyManagementService, OnFindSecretsResult, OnGetKeyAlgResult, + OnSecretBytesResult, +}; /// Allows resolve pre-defined did's for `example` and other methods. -pub struct ExampleSecretsResolver { - known_secrets: Vec, +pub struct ExampleKMS { + known_secrets: HashMap>, } -impl ExampleSecretsResolver { - pub fn new(known_secrets: Vec) -> Self { - ExampleSecretsResolver { known_secrets } +impl ExampleKMS { + pub fn new(secrets: Vec) -> Self { + let known_secrets = secrets + .iter() + .map(|s| (s.id.clone(), s.to_key())) + // remove all invalid/not-supported keys + .filter(|(_id, key_result)| key_result.is_ok()) + .map(|(id, key_result)| (id, key_result.unwrap())) + .collect(); + Self { known_secrets } + } + + fn resolve_key(&self, x: KidOrJwkAdapted) -> Arc { + match x { + KidOrJwkAdapted::Kid { kid } => self.known_secrets.get(&kid).unwrap().clone(), + KidOrJwkAdapted::Jwk { jwk } => Arc::::from_jwk(&jwk).unwrap(), + } } } #[async_trait] -impl SecretsResolver for ExampleSecretsResolver { - fn get_secret(&self, secret_id: String, cb: Arc) -> ErrorCode { - let secret = self - .known_secrets - .iter() - .find(|s| s.id == secret_id) - .map(|s| s.clone()); +impl KeyManagementService for ExampleKMS { + fn get_key_alg(&self, secret_id: String, cb: Arc) -> ErrorCode { + let key = match self.known_secrets.get(&secret_id) { + Some(secret) => secret, + None => return ErrorCode::Error, + }; - match cb.success(secret) { + let alg = match key.algorithm() { + KeyAlg::Ed25519 => KnownKeyAlg::Ed25519, + KeyAlg::X25519 => KnownKeyAlg::X25519, + KeyAlg::EcCurve(EcCurves::Secp256r1) => KnownKeyAlg::P256, + KeyAlg::EcCurve(EcCurves::Secp256k1) => KnownKeyAlg::K256, + _ => KnownKeyAlg::Unsupported, + }; + + match cb.success(alg) { Ok(_) => ErrorCode::Success, Err(_) => ErrorCode::Error, } @@ -34,7 +69,7 @@ impl SecretsResolver for ExampleSecretsResolver { fn find_secrets(&self, secret_ids: Vec, cb: Arc) -> ErrorCode { let res = secret_ids .iter() - .filter(|sid| self.known_secrets.iter().find(|s| s.id == **sid).is_some()) + .filter(|sid| self.known_secrets.contains_key(*sid)) .map(|sid| sid.clone()) .collect(); @@ -43,4 +78,108 @@ impl SecretsResolver for ExampleSecretsResolver { Err(_) => ErrorCode::Error, } } + + fn create_signature( + &self, + secret_id: String, + message: Vec, + sig_type: Option, + cb: Arc, + ) -> ErrorCode { + let key = match self.known_secrets.get(&secret_id) { + Some(secret) => secret, + None => return ErrorCode::Error, + }; + + let signature = match key.create_signature(&message, sig_type.map(|x| x.into())) { + Ok(signature) => signature, + Err(_) => return ErrorCode::Error, + }; + + match cb.success(signature.into_vec()) { + Ok(_) => ErrorCode::Success, + Err(_) => ErrorCode::Error, + } + } + + fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwkAdapted, + send_key: KidOrJwkAdapted, + recip_key: KidOrJwkAdapted, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + cb: Arc, + ) -> ErrorCode { + let ephem_key = self.resolve_key(ephem_key); + let send_key = self.resolve_key(send_key); + let recip_key = self.resolve_key(recip_key); + + let deriviation = Ecdh1PU::new( + ephem_key.as_ref(), + send_key.as_ref(), + recip_key.as_ref(), + &alg, + &apu, + &apv, + &cc_tag, + receive, + ); + + let kw = match AesKey::::from_key_derivation(deriviation) { + Ok(kw) => kw, + Err(_) => return ErrorCode::Error, + }; + + let kw = match kw.to_secret_bytes() { + Ok(sb) => sb.to_vec(), + Err(_) => return ErrorCode::Error, + }; + + match cb.success(kw) { + Ok(_) => ErrorCode::Success, + Err(_) => ErrorCode::Error, + } + } + + fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwkAdapted, + recip_key: KidOrJwkAdapted, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + cb: Arc, + ) -> ErrorCode { + let ephem_key = self.resolve_key(ephem_key); + let recip_key = self.resolve_key(recip_key); + + let deriviation = EcdhEs::new( + ephem_key.as_ref(), + recip_key.as_ref(), + &alg, + &apu, + &apv, + receive, + ); + + let kw = match AesKey::::from_key_derivation(deriviation) { + Ok(kw) => kw, + Err(_) => return ErrorCode::Error, + }; + + let kw = match kw.to_secret_bytes() { + Ok(sb) => sb.to_vec(), + Err(_) => return ErrorCode::Error, + }; + + match cb.success(kw) { + Ok(_) => ErrorCode::Success, + Err(_) => ErrorCode::Error, + } + } } diff --git a/uniffi/src/secrets/resolvers/mod.rs b/uniffi/src/secrets/resolvers/mod.rs index a3f0d0fd..47a62ab7 100644 --- a/uniffi/src/secrets/resolvers/mod.rs +++ b/uniffi/src/secrets/resolvers/mod.rs @@ -1,3 +1,3 @@ mod example; -pub use example::ExampleSecretsResolver; +pub use example::ExampleKMS; diff --git a/uniffi/src/secrets/secrets_resolver.rs b/uniffi/src/secrets/secrets_resolver.rs deleted file mode 100644 index 0da676a8..00000000 --- a/uniffi/src/secrets/secrets_resolver.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::sync::Arc; - -use didcomm_core::secrets::Secret; - -use crate::common::{ErrorCode, OnResult}; - -/// Interface for secrets resolver. -/// Resolves secrets such as private keys to be used for signing and encryption. -pub trait SecretsResolver: Sync + Send { - /// Finds secret (usually private key) identified by the given key ID. - /// - /// # Parameters - /// - `secret_id` the ID (in form of DID URL) identifying a secret - /// - `cb` a callback with a result - /// - /// # Returns - /// A secret (usually private key) or None of there is no secret for the given ID - /// - fn get_secret(&self, secret_id: String, cb: Arc) -> ErrorCode; - - /// Find all secrets that have one of the given IDs. - /// Return secrets only for key IDs for which a secret is present. - /// - /// # Parameters - /// - `secret_ids` the IDs find secrets for - /// - `cb` a callback with a result - /// - /// # Returns - /// A secret (usually private key) or None of there is no secret for the given ID - /// - fn find_secrets(&self, secret_ids: Vec, cb: Arc) -> ErrorCode; -} - -pub type OnGetSecretResult = OnResult>; -pub type OnFindSecretsResult = OnResult>; diff --git a/uniffi/src/secrets/secrets_resolver_adapter.rs b/uniffi/src/secrets/secrets_resolver_adapter.rs deleted file mode 100644 index 03a38c5f..00000000 --- a/uniffi/src/secrets/secrets_resolver_adapter.rs +++ /dev/null @@ -1,53 +0,0 @@ -use std::sync::Arc; - -use async_trait::async_trait; -use didcomm_core::error::{ErrorKind, Result, ResultExt}; -use didcomm_core::secrets::{Secret, SecretsResolver as _SecretsResolver}; - -use crate::secrets_resolver::{OnFindSecretsResult, OnGetSecretResult}; - -use super::SecretsResolver; - -pub struct SecretsResolverAdapter { - secrets_resolver: Arc>, -} - -impl SecretsResolverAdapter { - pub fn new(secrets_resolver: Arc>) -> Self { - SecretsResolverAdapter { secrets_resolver } - } -} - -#[async_trait] -impl _SecretsResolver for SecretsResolverAdapter { - async fn get_secret(&self, secret_id: &str) -> Result> { - let (cb, receiver) = OnGetSecretResult::new(); - - self.secrets_resolver - .get_secret(String::from(secret_id), cb); - - let res = receiver - .get() - .await - .kind(ErrorKind::InvalidState, "can not get secret")?; - Ok(res) - } - - async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> Result> { - let (cb, receiver) = OnFindSecretsResult::new(); - - self.secrets_resolver - .find_secrets(secret_ids.iter().map(|&s| String::from(s)).collect(), cb); - - let res = receiver - .get() - .await - .kind(ErrorKind::InvalidState, "can not get secret")?; - - Ok(secret_ids - .iter() - .filter(|&&sid| res.iter().find(|&s| s == sid).is_some()) - .map(|sid| *sid) - .collect()) - } -} diff --git a/uniffi/src/test_helper.rs b/uniffi/src/test_helper.rs index c8019c91..a6b5a47e 100644 --- a/uniffi/src/test_helper.rs +++ b/uniffi/src/test_helper.rs @@ -7,9 +7,9 @@ use didcomm_core::{FromPrior, Message, PackEncryptedMetadata, PackSignedMetadata use futures::channel::oneshot::{self, Receiver}; use crate::{ - DIDResolver, ExampleDIDResolver, ExampleSecretsResolver, OnFromPriorPackResult, + DIDResolver, ExampleDIDResolver, ExampleKMS, KeyManagementService, OnFromPriorPackResult, OnFromPriorUnpackResult, OnPackEncryptedResult, OnPackPlaintextResult, OnPackSignedResult, - OnUnpackResult, OnWrapInForwardResult, SecretsResolver, + OnUnpackResult, OnWrapInForwardResult, }; use didcomm_core::test_vectors::{ ALICE_DID_DOC_WITH_NO_SECRETS, ALICE_SECRETS, BOB_DID_DOC, BOB_SECRETS, CHARLIE_DID_DOC, @@ -32,8 +32,8 @@ pub(crate) async fn get_error(receiver: Receiver>) -> Error { .expect("result is ok") } -pub(crate) fn create_secrets_resolver() -> Box { - Box::new(ExampleSecretsResolver::new( +pub(crate) fn create_kms() -> Box { + Box::new(ExampleKMS::new( ALICE_SECRETS .clone() .into_iter() diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index eea38583..c05638fb 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -23,6 +23,7 @@ async-trait = '0.1' wasm-bindgen-futures = '0.4' js-sys = '0.3' serde_json = '1.0' +serde-wasm-bindgen = "0.4" [dependencies.didcomm] path = '..' diff --git a/wasm/README.md b/wasm/README.md index 62c48ace..5d3174e2 100644 --- a/wasm/README.md +++ b/wasm/README.md @@ -36,7 +36,7 @@ npm run start - This library requires `wasm32` compatible environment (modern browsers and recent NodeJS are supported). - In order to use the library, `SecretsResolver` and `DIDResolver` interfaces must be implemented on the application level. Demo application provides 2 simple implementations `ExampleDIDResolver` - and `ExampleSecretsResolver` that allows resolve locally known DID docs and secrets for tests/demo purposes. + and `ExampleKMS` that allows resolve locally known DID docs and secrets for tests/demo purposes. - Verification materials are expected in JWK, Base58 and Multibase (internally Base58 only) formats. - In Base58 and Multibase formats, keys using only X25519 and Ed25519 curves are supported. - For private keys in Base58 and Multibase formats, the verification material value contains both private and public parts (concatenated bytes). @@ -106,14 +106,14 @@ const msg = new Message({ // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); -let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); +let kms = new ExampleKMS(ALICE_SECRETS); const [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( BOB_DID, ALICE_DID, null, didResolver, - secretsResolver, + kms, { forward: false, // Forward wrapping is unsupported in current version } @@ -126,12 +126,12 @@ console.log("Sending message\n", encryptedMsg); // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); -secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); +kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( encrypted_msg, didResolver, - secretsResolver, + kms, {} ); @@ -147,7 +147,7 @@ let [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( null, // Keep sender as None here null, didResolver, - secretsResolver, + kms, { forward: false, // Forward wrapping is unsupported in current version } @@ -162,7 +162,7 @@ let [encrypted_msg, encrypt_metadata] = await msg.pack_encrypted( ALICE_DID, ALICE_DID, // Provide information about signer here did_resolver, - secrets_resolver, + kms, { forward: false, // Forward wrapping is unsupported in current version } @@ -186,7 +186,7 @@ See `Message.pack_signed` documentation for more details. let [signed, metadata] = await msg.pack_signed( ALICE_DID, didResolver, - secretsResolver + kms ); ``` diff --git a/wasm/demo/package-lock.json b/wasm/demo/package-lock.json index 79f42505..f27723d4 100644 --- a/wasm/demo/package-lock.json +++ b/wasm/demo/package-lock.json @@ -1,12 +1,12 @@ { "name": "didcomm-demo", - "version": "1.0.0", + "version": "0.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "didcomm-demo", - "version": "1.0.0", + "version": "0.4.0", "license": "Apache-2.0", "dependencies": { "didcomm": "file:../pkg", @@ -19,8 +19,9 @@ } }, "../pkg": { - "name": "didcomm", - "version": "0.0.1" + "name": "didcomm-js", + "version": "0.4.1", + "license": "Apache-2.0" }, "node_modules/@babel/code-frame": { "version": "7.16.0", @@ -428,9 +429,9 @@ } }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -885,9 +886,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "sprintf-js": { diff --git a/wasm/demo/src/advanced-params.ts b/wasm/demo/src/advanced-params.ts index 0fef5566..9dd7fe84 100644 --- a/wasm/demo/src/advanced-params.ts +++ b/wasm/demo/src/advanced-params.ts @@ -9,7 +9,7 @@ import { } from "./test-vectors"; import { ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, } from "../../tests-js/src/test-vectors"; async function main() { @@ -27,14 +27,14 @@ async function main() { // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( "did:example:bob#key-p256-1", "did:example:alice#key-p256-1", "did:example:alice#key-2", didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default protect_sender: true, @@ -51,12 +51,12 @@ async function main() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( encryptedMsg, didResolver, - secretsResolver, + kms, {} ); diff --git a/wasm/demo/src/attachments.ts b/wasm/demo/src/attachments.ts index 734dc3ff..fb202926 100644 --- a/wasm/demo/src/attachments.ts +++ b/wasm/demo/src/attachments.ts @@ -9,7 +9,7 @@ import { } from "./test-vectors"; import { ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, } from "../../tests-js/src/test-vectors"; async function main() { @@ -37,14 +37,14 @@ async function main() { // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( BOB_DID, ALICE_DID, ALICE_DID, didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default } @@ -57,12 +57,12 @@ async function main() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( encryptedMsg, didResolver, - secretsResolver, + kms, {} ); diff --git a/wasm/demo/src/main.ts b/wasm/demo/src/main.ts index 599bcf70..85c19952 100644 --- a/wasm/demo/src/main.ts +++ b/wasm/demo/src/main.ts @@ -7,11 +7,12 @@ import { BOB_SECRETS, } from "./test-vectors"; -import { Message, DIDDoc, DIDResolver, Secret, SecretsResolver } from "didcomm"; +import { Message, DIDDoc, DIDResolver, KeyManagementService } from "didcomm"; import { CHARLIE_DID, CHARLIE_DID_DOC, CHARLIE_SECRETS, + ExampleKMS, } from "../../tests-js/src/test-vectors"; class ExampleDIDResolver implements DIDResolver { @@ -26,24 +27,6 @@ class ExampleDIDResolver implements DIDResolver { } } -class ExampleSecretsResolver implements SecretsResolver { - knownSecrets: Secret[]; - - constructor(knownSecrets: Secret[]) { - this.knownSecrets = knownSecrets; - } - - async get_secret(secretId: string): Promise { - return this.knownSecrets.find((secret) => secret.id === secretId) || null; - } - - async find_secrets(secretIds: string[]): Promise { - return secretIds.filter((id) => - this.knownSecrets.find((secret) => secret.id === id) - ); - } -} - async function main() { console.log( "=================== NON REPUDIABLE ENCRYPTION ===================\n" @@ -80,14 +63,14 @@ async function nonRepudiableEncryption() { // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( BOB_DID, ALICE_DID, ALICE_DID, didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default } @@ -100,12 +83,12 @@ async function nonRepudiableEncryption() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( encryptedMsg, didResolver, - secretsResolver, + kms, {} ); @@ -131,7 +114,7 @@ async function multiRecipient() { BOB_DID_DOC, CHARLIE_DID_DOC, ]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); // --- Packing encrypted and authenticated message for Bob --- const [encryptedMsgBob, encryptMetadataBob] = await msg.pack_encrypted( @@ -139,7 +122,7 @@ async function multiRecipient() { ALICE_DID, null, didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default } @@ -157,7 +140,7 @@ async function multiRecipient() { ALICE_DID, null, didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default } @@ -170,12 +153,12 @@ async function multiRecipient() { // --- Unpacking message for Bob --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsgBob, unpackMetadataBob] = await Message.unpack( encryptedMsgBob, didResolver, - secretsResolver, + kms, {} ); @@ -187,12 +170,12 @@ async function multiRecipient() { // --- Unpacking message for Charlie --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, CHARLIE_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(CHARLIE_SECRETS); + kms = new ExampleKMS(CHARLIE_SECRETS); const [unpackedMsgCharlie, unpackMetadataCharlie] = await Message.unpack( encryptedMsgCharlie, didResolver, - secretsResolver, + kms, {} ); @@ -221,14 +204,14 @@ async function repudiableAuthentcatedEncryption() { // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( BOB_DID, ALICE_DID, null, didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default } @@ -241,12 +224,12 @@ async function repudiableAuthentcatedEncryption() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( encryptedMsg, didResolver, - secretsResolver, + kms, {} ); @@ -269,14 +252,14 @@ async function repudiableNonAuthentcatedEncryption() { // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encryptedMsg, encryptMetadata] = await msg.pack_encrypted( BOB_DID, null, null, didResolver, - secretsResolver, + kms, { forward: false, // TODO: should be true by default } @@ -289,12 +272,12 @@ async function repudiableNonAuthentcatedEncryption() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( encryptedMsg, didResolver, - secretsResolver, + kms, {} ); @@ -317,12 +300,12 @@ async function signedUnencrypteed() { // --- Packing encrypted and authenticated message --- let didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [signedMsg, signMetadata] = await msg.pack_signed( ALICE_DID, didResolver, - secretsResolver + kms ); console.log("Encryption metadata is\n", signMetadata); @@ -332,12 +315,12 @@ async function signedUnencrypteed() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( signedMsg, didResolver, - secretsResolver, + kms, {} ); @@ -368,12 +351,12 @@ async function plaintext() { // --- Unpacking message --- didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - const secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + const kms = new ExampleKMS(BOB_SECRETS); const [unpackedMsg, unpackMetadata] = await Message.unpack( plaintextMsg, didResolver, - secretsResolver, + kms, {} ); diff --git a/wasm/src/did/did_resolver.rs b/wasm/src/did/did_resolver.rs index 282aa998..c0d05601 100644 --- a/wasm/src/did/did_resolver.rs +++ b/wasm/src/did/did_resolver.rs @@ -27,13 +27,13 @@ interface DIDResolver { * @param `did` a DID to be resolved. * * @returns An instance of resolved DID DOC or null if DID is not found. - * + * * @throws DIDCommMalformed - Resolved DID Doc looks malformed * @throws DIDCommIoError - IO error in resolving process * @throws DIDCommInvalidState - Code error or unexpected state was detected - * + * * Note to throw compatible error use code like this - * + * * ``` * let e = Error("Unble perform io operation"); * e.name = "DIDCommIoError" diff --git a/wasm/src/lib.rs b/wasm/src/lib.rs index fe3e5ff0..9da06361 100644 --- a/wasm/src/lib.rs +++ b/wasm/src/lib.rs @@ -7,9 +7,9 @@ mod utils; pub use crate::{ did::DIDResolver, message::{FromPrior, Message}, - secrets::SecretsResolver, + secrets::KeyManagementService, }; -use crate::{did::JsDIDResolver, secrets::JsSecretsResolver}; +use crate::{did::JsDIDResolver, secrets::JsKeyManagementService}; // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global // allocator. diff --git a/wasm/src/message/from_prior/pack.rs b/wasm/src/message/from_prior/pack.rs index 5b80cc57..d7379d36 100644 --- a/wasm/src/message/from_prior/pack.rs +++ b/wasm/src/message/from_prior/pack.rs @@ -3,7 +3,8 @@ use wasm_bindgen::prelude::*; use wasm_bindgen_futures::future_to_promise; use crate::{ - error::JsResult, DIDResolver, FromPrior, JsDIDResolver, JsSecretsResolver, SecretsResolver, + error::JsResult, DIDResolver, FromPrior, JsDIDResolver, JsKeyManagementService, + KeyManagementService, }; #[wasm_bindgen] @@ -13,15 +14,15 @@ impl FromPrior { &self, issuer_kid: Option, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: KeyManagementService, ) -> Promise { let from_prior = self.0.clone(); let did_resolver = JsDIDResolver(did_resolver); - let secrets_resolver = JsSecretsResolver(secrets_resolver); + let kms = JsKeyManagementService(kms); future_to_promise(async move { let (msg, metadata) = from_prior - .pack(issuer_kid.as_deref(), &did_resolver, &secrets_resolver) + .pack(issuer_kid.as_deref(), &did_resolver, &kms) .await .as_js()?; @@ -43,14 +44,14 @@ interface FromPrior { /** * Packs a plaintext `from_prior` value into a signed JWT. * https://identity.foundation/didcomm-messaging/spec/#did-rotation - * + * * @param issuer_kid (optional) identifier of the issuer key being used to sign `from_prior` JWT value * @param did_resolver instance of `DIDResolver` to resolve DIDs - * @param secrets_resolver instance of `SecretsResolver` to resolve issuer DID keys secrets - * + * @param kms instance of `SecretsResolver` to resolve issuer DID keys secrets + * * @returns promise resolving to a tuple of the signed `from_prior` JWT and the identifier of the issuer key * actually used to sign `from_prior` - * + * * @throws DIDCommMalformed `from_prior` plaintext value has invalid format. * @throws DIDCommIllegalArgument `issuer_kid` is invalid or does not consist with `from_prior` plaintext value. * @throws DIDCommDIDNotResolved Issuer DID not found. @@ -62,7 +63,7 @@ interface FromPrior { pack( issuer_kid: string | null, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: SecretsResolver, ): Promise<[string, string]>; } "#; diff --git a/wasm/src/message/pack_encrypted.rs b/wasm/src/message/pack_encrypted.rs index 5bfde027..66aa0607 100644 --- a/wasm/src/message/pack_encrypted.rs +++ b/wasm/src/message/pack_encrypted.rs @@ -7,7 +7,8 @@ use wasm_bindgen::prelude::*; use wasm_bindgen_futures::future_to_promise; use crate::{ - error::JsResult, DIDResolver, JsDIDResolver, JsSecretsResolver, Message, SecretsResolver, + error::JsResult, DIDResolver, JsDIDResolver, JsKeyManagementService, KeyManagementService, + Message, }; #[wasm_bindgen] @@ -19,12 +20,12 @@ impl Message { from: Option, sign_by: Option, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: KeyManagementService, options: JsValue, ) -> Promise { let msg = self.0.clone(); let did_resolver = JsDIDResolver(did_resolver); - let secrets_resolver = JsSecretsResolver(secrets_resolver); + let kms = JsKeyManagementService(kms); future_to_promise(async move { let options: PackEncryptedOptions = options @@ -38,7 +39,7 @@ impl Message { from.as_deref(), sign_by.as_deref(), &did_resolver, - &secrets_resolver, + &kms, &options, ) .await @@ -101,14 +102,14 @@ interface Message { * Adding a signature when one is not needed can degrade rather than enhance security because * it relinquishes the sender’s ability to speak off the record. * @param `did_resolver` instance of `DIDResolver` to resolve DIDs. - * @param `secrets_resolver` instance of SecretsResolver` to resolve sender DID keys secrets. + * @param `kms` instance of `KeyManagementService` to resolve sender DID keys secrets. * @param `options` allow fine configuration of packing process. * * @returns Tuple `[encrypted_message, metadata]`. * - `encrypted_message` A DIDComm encrypted message as a JSON string. * - `metadata` additional metadata about this `pack` execution like used keys identifiers, * used messaging service. - * + * * @throws DIDCommDIDNotResolved * @throws DIDCommDIDUrlNotFound * @throws DIDCommMalformed @@ -119,11 +120,11 @@ interface Message { * @throws DIDCommIllegalArgument */ pack_encrypted( - to: string, + to: string, from: string | null, - sign_by: string | null, + sign_by: string | null, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: KeyManagementService, options: PackEncryptedOptions, ): Promise<[string, PackEncryptedMetadata]>; } @@ -189,7 +190,7 @@ type PackEncryptedMetadata = { */ messaging_service?: MessagingServiceMetadata, - /** + /** * Identifier (DID URL) of sender key used for message encryption. */ from_kid?: string, diff --git a/wasm/src/message/pack_signed.rs b/wasm/src/message/pack_signed.rs index ff4577fb..0def102c 100644 --- a/wasm/src/message/pack_signed.rs +++ b/wasm/src/message/pack_signed.rs @@ -4,7 +4,8 @@ use wasm_bindgen::prelude::*; use wasm_bindgen_futures::future_to_promise; use crate::{ - error::JsResult, DIDResolver, JsDIDResolver, JsSecretsResolver, Message, SecretsResolver, + error::JsResult, DIDResolver, JsDIDResolver, JsKeyManagementService, KeyManagementService, + Message, }; #[wasm_bindgen(skip_typescript)] @@ -14,15 +15,15 @@ impl Message { &self, sign_by: String, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: KeyManagementService, ) -> Promise { let msg = self.0.clone(); let did_resolver = JsDIDResolver(did_resolver); - let secrets_resolver = JsSecretsResolver(secrets_resolver); + let kms = JsKeyManagementService(kms); future_to_promise(async move { let (msg, metadata) = msg - .pack_signed(&sign_by, &did_resolver, &secrets_resolver) + .pack_signed(&sign_by, &did_resolver, &kms) .await .as_js()?; @@ -48,7 +49,7 @@ impl Message { #[wasm_bindgen(typescript_custom_section)] const MESSAGE_PACK_ENCRYPTED_TS: &'static str = r#" interface Message { - /** + /** * Produces `DIDComm Signed Message` * https://identity.foundation/didcomm-messaging/spec/#didcomm-signed-message. * @@ -62,7 +63,7 @@ interface Message { * * @param `sign_by` a DID or key ID the sender uses for signing * @param `did_resolver` instance of `DIDResolver` to resolve DIDs. - * @param `secrets_resolver` instance of SecretsResolver` to resolve sender DID keys secrets + * @param `kms` instance of SecretsResolver` to resolve sender DID keys secrets * * @returns Tuple (signed_message, metadata) * - `signed_message` a DIDComm signed message as JSON string @@ -80,7 +81,7 @@ interface Message { pack_signed( sign_by: string, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: SecretsResolver, ): Promise<[string, PackSignedMetadata]>; } "#; diff --git a/wasm/src/message/unpack.rs b/wasm/src/message/unpack.rs index dcd53315..320df76b 100644 --- a/wasm/src/message/unpack.rs +++ b/wasm/src/message/unpack.rs @@ -9,8 +9,8 @@ use wasm_bindgen::prelude::*; use wasm_bindgen_futures::future_to_promise; use crate::{ - error::JsResult, utils::set_panic_hook, DIDResolver, JsDIDResolver, JsSecretsResolver, Message, - SecretsResolver, + error::JsResult, utils::set_panic_hook, DIDResolver, JsDIDResolver, JsKeyManagementService, + KeyManagementService, Message, }; #[wasm_bindgen(skip_typescript)] @@ -19,14 +19,14 @@ impl Message { pub fn unpack( msg: String, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: KeyManagementService, options: JsValue, ) -> Promise { // TODO: Better place? set_panic_hook(); let did_resolver = JsDIDResolver(did_resolver); - let secrets_resolver = JsSecretsResolver(secrets_resolver); + let kms = JsKeyManagementService(kms); future_to_promise(async move { let options: UnpackOptions = options @@ -34,10 +34,9 @@ impl Message { .kind(ErrorKind::Malformed, "Options param is malformed") .as_js()?; - let (msg, metadata) = - didcomm::Message::unpack(&msg, &did_resolver, &secrets_resolver, &options) - .await - .as_js()?; + let (msg, metadata) = didcomm::Message::unpack(&msg, &did_resolver, &kms, &options) + .await + .as_js()?; let metadata = JsValue::from_serde(&metadata) .kind(ErrorKind::InvalidState, "Unable serialize UnpackMetadata") @@ -58,7 +57,7 @@ impl Message { #[wasm_bindgen(typescript_custom_section)] const MESSAGE_UNPACK_TS: &'static str = r#" export namespace Message { - /** + /** * Unpacks the packed message by doing decryption and verifying the signatures. * This method supports all DID Comm message types (encrypted, signed, plaintext). * @@ -68,7 +67,7 @@ export namespace Message { * * @param `packed_msg` the message as JSON string to be unpacked * @param `did_resolver` instance of `DIDResolver` to resolve DIDs - * @param `secrets_resolver` instance of SecretsResolver` to resolve sender DID keys secrets + * @param `kms` instance of SecretsResolver` to resolve sender DID keys secrets * @param `options` allow fine configuration of unpacking process and imposing additional restrictions * to message to be trusted. * @@ -89,7 +88,7 @@ export namespace Message { function unpack( msg: string, did_resolver: DIDResolver, - secrets_resolver: SecretsResolver, + kms: SecretsResolver, options: UnpackOptions, ): Promise<[Message, UnpackMetadata]>; } @@ -175,7 +174,7 @@ type UnpackMetadata = { * Default "A256cbcHs512Ecdh1puA256kw" */ enc_alg_auth?: "A256cbcHs512Ecdh1puA256kw", - + /** * Algorithm used for anonymous encryption. * Default "Xc20pEcdhEsA256kw" diff --git a/wasm/src/secrets/kms.rs b/wasm/src/secrets/kms.rs new file mode 100644 index 00000000..fc1b0876 --- /dev/null +++ b/wasm/src/secrets/kms.rs @@ -0,0 +1,278 @@ +use async_trait::async_trait; +use didcomm::{ + error::{err_msg, ErrorKind, Result as _Result, ResultContext, ResultExt}, + secrets::{ + A256Kw, AesKey, KeyManagementService as _KeyManagementService, KeySecretBytes, KidOrJwk, + KnownKeyAlg, KnownSignatureType, SecretBytes, + }, +}; +use js_sys::{Array, Uint8Array}; +use wasm_bindgen::{prelude::*, JsCast}; + +use crate::error::FromJsResult; + +#[wasm_bindgen] +extern "C" { + pub type KeyManagementService; + + // Promise resolves to JsValue(object) that can be deserialized to Secret + #[wasm_bindgen(structural, method, catch)] + pub async fn get_key_alg( + this: &KeyManagementService, + secret_id: &str, + ) -> Result; + + // Promise resolves to JsValue(object) that can be casted to Array + #[wasm_bindgen(structural, method, catch)] + pub async fn find_secrets( + this: &KeyManagementService, + secret_ids: Array, + ) -> Result; + + #[wasm_bindgen(structural, method, catch)] + pub async fn create_signature( + this: &KeyManagementService, + secret_id: &str, + message: &[u8], + sig_type: JsValue, + ) -> Result; + + #[wasm_bindgen(structural, method, catch)] + async fn derive_aes_key_using_ecdh_1pu( + this: &KeyManagementService, + ephem_key: JsValue, + send_key: JsValue, + recip_key: JsValue, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + ) -> Result; + + #[wasm_bindgen(structural, method, catch)] + async fn derive_aes_key_using_ecdh_es( + this: &KeyManagementService, + ephem_key: JsValue, + recip_key: JsValue, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + ) -> Result; +} + +#[wasm_bindgen(typescript_custom_section)] +const KNOWN_KEY_ALG: &'static str = r#" +type KnownKeyAlg = "Ed25519" | "X25519" | "P256" | "K256" | "Unsupported" | string +"#; + +#[wasm_bindgen(typescript_custom_section)] +const KEY_MANAGEMENT_SERVICE_TS: &'static str = r#" +/** + * Interface for key management service. + * Manages secrets such as private keys to be used for signing and encryption. + */ +interface KeyManagementService { + /** + * Finds secret (usually private key) identified by the given key ID. + * + * @param `secret_id` the ID (in form of DID URL) identifying a secret + * + * @returns A secret (usually private key) or None of there is no secret for the given ID + * + * @throws DIDCommIoError - IO error in resolving process + * @throws DIDCommInvalidState - Code error or unexpected state was detected + * + * ``` + * let e = Error("Unble perform io operation"); + * e.name = "DIDCommIoError" + * throw e + * ``` + */ + get_key_alg(secret_id: string): Promise; + + /** + * Find all secrets that have one of the given IDs. + * Return secrets only for key IDs for which a secret is present. + * + * @param `secret_ids` the IDs find secrets for + * + * @returns possible empty list of all secrets that have one of the given IDs. + * + * @throws DIDCommIoError - IO error in resolving process + * @throws DIDCommInvalidState - Code error or unexpected state was detected + * + * Note to throw compatible error use code like this + * + * ``` + * let e = Error("Unble perform io operation"); + * e.name = "DIDCommIoError" + * throw e + * ``` + */ + find_secrets(secret_ids: Array): Promise>; + + create_signature(secret_id: string, message: Uint8Array, sig_type: KnownSignatureType | null): Promise; + + derive_aes_key_using_ecdh_1pu(ephem_key: KidOrJwk, send_key: KidOrJwk, recip_key: KidOrJwk, alg: Uint8Array, apu: Uint8Array, apv: Uint8Array, cc_tag: Uint8Array, receive: bool): Promise; + + derive_aes_key_using_ecdh_es(ephem_key: KidOrJwk, recip_key: KidOrJwk, alg: Uint8Array, apu: Uint8Array, apv: Uint8Array, receive: boolean): Promise _Result { + let key_alg = self + .0 + .get_key_alg(secret_id) + .await + .from_js() + .context("Unable get key alg")?; + + let key_alg = serde_wasm_bindgen::from_value(key_alg).map_err(|_| { + err_msg( + ErrorKind::InvalidState, + "Unable deserialize KeyAlg from JsValue", + ) + })?; + + Ok(key_alg) + } + + async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> _Result> { + let _secret_ids = secret_ids + .into_iter() + .map(|s| JsValue::from_str(s)) + .collect::(); + + // TODO: better error conversion + let found = self + .0 + .find_secrets(_secret_ids) + .await + .from_js() + .context("Unable find secrets")?; + + let found: Vec<_> = found + .dyn_into::() + .map_err(|_| { + err_msg( + ErrorKind::InvalidState, + "Unable covert secret ids JsValue to Array", + ) + })? + .iter() + .map(|v| v.as_string()) + .flatten() + .collect(); + + let found: Vec<_> = secret_ids + .iter() + .filter(|&s| found.iter().find(|_s| _s == s).is_some()) + .map(|&s| s) + .collect(); + + Ok(found) + } + + async fn create_signature( + &self, + secret_id: &str, + message: &[u8], + sig_type: Option, + ) -> _Result { + let sig_type = serde_wasm_bindgen::to_value(&sig_type).map_err(|_| { + err_msg( + ErrorKind::InvalidState, + "Unable covert KnownSignatureType to JsValue", + ) + })?; + + let secret_bytes = self + .0 + .create_signature(secret_id, message, sig_type) + .await + .from_js() + .context("Unable to create signature")?; + + let secret_bytes = Uint8Array::new(&secret_bytes); + + Ok(SecretBytes::from_slice(&secret_bytes.to_vec())) + } + + async fn derive_aes_key_using_ecdh_1pu( + &self, + ephem_key: KidOrJwk, + send_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + cc_tag: Vec, + receive: bool, + ) -> _Result> { + let ephem_key = serde_wasm_bindgen::to_value(&ephem_key) + .map_err(|_| err_msg(ErrorKind::InvalidState, "Unable covert KidOrJwk to JsValue"))?; + + let send_key = serde_wasm_bindgen::to_value(&send_key) + .map_err(|_| err_msg(ErrorKind::InvalidState, "Unable covert KidOrJwk to JsValue"))?; + + let recip_key = serde_wasm_bindgen::to_value(&recip_key) + .map_err(|_| err_msg(ErrorKind::InvalidState, "Unable covert KidOrJwk to JsValue"))?; + + let derived_key = self + .0 + .derive_aes_key_using_ecdh_1pu( + ephem_key, send_key, recip_key, alg, apu, apv, cc_tag, receive, + ) + .await + .from_js() + .context("Unable to derive key")?; + + let derived_key = Uint8Array::new(&derived_key); + + let derived_key = AesKey::from_secret_bytes(&derived_key.to_vec()).kind( + ErrorKind::InvalidState, + format!("Unable deserialize derived_key"), + )?; + + Ok(derived_key) + } + + async fn derive_aes_key_using_ecdh_es( + &self, + ephem_key: KidOrJwk, + recip_key: KidOrJwk, + alg: Vec, + apu: Vec, + apv: Vec, + receive: bool, + ) -> _Result> { + let ephem_key = serde_wasm_bindgen::to_value(&ephem_key) + .map_err(|_| err_msg(ErrorKind::InvalidState, "Unable covert KidOrJwk to JsValue"))?; + + let recip_key = serde_wasm_bindgen::to_value(&recip_key) + .map_err(|_| err_msg(ErrorKind::InvalidState, "Unable covert KidOrJwk to JsValue"))?; + + let derived_key = self + .0 + .derive_aes_key_using_ecdh_es(ephem_key, recip_key, alg, apu, apv, receive) + .await + .from_js() + .context("Unable to derive key")?; + + let derived_key = Uint8Array::new(&derived_key); + + let derived_key = AesKey::from_secret_bytes(&derived_key.to_vec()).kind( + ErrorKind::InvalidState, + format!("Unable deserialize derived_key"), + )?; + + Ok(derived_key) + } +} diff --git a/wasm/src/secrets/mod.rs b/wasm/src/secrets/mod.rs index fca5d2cd..4a5afd51 100644 --- a/wasm/src/secrets/mod.rs +++ b/wasm/src/secrets/mod.rs @@ -1,5 +1,4 @@ -mod secret; -mod secrets_resolver; +mod kms; -pub(crate) use secrets_resolver::JsSecretsResolver; -pub use secrets_resolver::SecretsResolver; +pub(crate) use kms::JsKeyManagementService; +pub use kms::KeyManagementService; diff --git a/wasm/src/secrets/secret.rs b/wasm/src/secrets/secret.rs deleted file mode 100644 index f0053d76..00000000 --- a/wasm/src/secrets/secret.rs +++ /dev/null @@ -1,36 +0,0 @@ -use wasm_bindgen::prelude::*; - -#[wasm_bindgen(typescript_custom_section)] -const SECRET_TS: &'static str = r#" -/** - * Represents secret. - */ -type Secret = { - /** - * A key ID identifying a secret (private key). - */ - id: string, - - /** - * Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. - */ - type: SecretType, - - /** - * Possible value of the secret (private key) - */ - privateKeyJwk?: any, - privateKeyMultibase?: string, - privateKeyBase58?: string, -} -"#; - -#[wasm_bindgen(typescript_custom_section)] -const SECRET_TYPE_TS: &'static str = r#" -/** - * Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. - */ -type SecretType = - "JsonWebKey2020" | "X25519KeyAgreementKey2019" - | "Ed25519VerificationKey2018" | "EcdsaSecp256k1VerificationKey2019" | string -"#; diff --git a/wasm/src/secrets/secrets_resolver.rs b/wasm/src/secrets/secrets_resolver.rs deleted file mode 100644 index f4b1be23..00000000 --- a/wasm/src/secrets/secrets_resolver.rs +++ /dev/null @@ -1,132 +0,0 @@ -use async_trait::async_trait; -use didcomm::{ - error::{err_msg, ErrorKind, Result as _Result, ResultContext, ResultExt}, - secrets::{Secret, SecretsResolver as _SecretsResolver}, -}; -use js_sys::Array; -use wasm_bindgen::{prelude::*, JsCast}; - -use crate::error::FromJsResult; - -#[wasm_bindgen] -extern "C" { - pub type SecretsResolver; - - // Promise resolves to JsValue(object) that can be deserialized to Secret - #[wasm_bindgen(structural, method, catch)] - pub async fn get_secret(this: &SecretsResolver, secret_id: &str) -> Result; - - // Promise resolves to JsValue(object) that can be casted to Array - #[wasm_bindgen(structural, method, catch)] - pub async fn find_secrets( - this: &SecretsResolver, - secret_ids: Array, - ) -> Result; -} - -#[wasm_bindgen(typescript_custom_section)] -const SECRET_RESOLVER_TS: &'static str = r#" -/** - * Interface for secrets resolver. - * Resolves secrets such as private keys to be used for signing and encryption. - */ -interface SecretsResolver { - /** - * Finds secret (usually private key) identified by the given key ID. - * - * @param `secret_id` the ID (in form of DID URL) identifying a secret - * - * @returns A secret (usually private key) or None of there is no secret for the given ID - * - * @throws DIDCommIoError - IO error in resolving process - * @throws DIDCommInvalidState - Code error or unexpected state was detected - * - * ``` - * let e = Error("Unble perform io operation"); - * e.name = "DIDCommIoError" - * throw e - * ``` - */ - get_secret(secret_id: string): Promise; - - /** - * Find all secrets that have one of the given IDs. - * Return secrets only for key IDs for which a secret is present. - * - * @param `secret_ids` the IDs find secrets for - * - * @returns possible empty list of all secrets that have one of the given IDs. - * - * @throws DIDCommIoError - IO error in resolving process - * @throws DIDCommInvalidState - Code error or unexpected state was detected - * - * Note to throw compatible error use code like this - * - * ``` - * let e = Error("Unble perform io operation"); - * e.name = "DIDCommIoError" - * throw e - * ``` - */ - find_secrets(secret_ids: Array): Promise>; -} -"#; - -// TODO: think is it possible to avoid ownership on DIDResolver -pub(crate) struct JsSecretsResolver(pub(crate) SecretsResolver); - -#[async_trait(?Send)] -impl _SecretsResolver for JsSecretsResolver { - async fn get_secret(&self, secret_id: &str) -> _Result> { - // TODO: better error conversion - let secret = self - .0 - .get_secret(secret_id) - .await - .from_js() - .context("Unable get secret")?; - - let secret: Option = secret.into_serde().kind( - ErrorKind::InvalidState, - "Unable deserialize Secret from JsValue", - )?; - - Ok(secret) - } - - async fn find_secrets<'a>(&self, secret_ids: &'a [&'a str]) -> _Result> { - let _secret_ids = secret_ids - .into_iter() - .map(|s| JsValue::from_str(s)) - .collect::(); - - // TODO: better error conversion - let found = self - .0 - .find_secrets(_secret_ids) - .await - .from_js() - .context("Unable find secrets")?; - - let found: Vec<_> = found - .dyn_into::() - .map_err(|_| { - err_msg( - ErrorKind::InvalidState, - "Unable covert secret ids JsValue to Array", - ) - })? - .iter() - .map(|v| v.as_string()) - .flatten() - .collect(); - - let found: Vec<_> = secret_ids - .iter() - .filter(|&s| found.iter().find(|_s| _s == s).is_some()) - .map(|&s| s) - .collect(); - - Ok(found) - } -} diff --git a/wasm/tests-js/package-lock.json b/wasm/tests-js/package-lock.json index 9342b9dc..ff9a6ec1 100644 --- a/wasm/tests-js/package-lock.json +++ b/wasm/tests-js/package-lock.json @@ -1,7 +1,7 @@ { "name": "didcomm-tests", "version": "0.3.4", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -13,6 +13,8 @@ "typescript": "^4.5.2" }, "devDependencies": { + "@hyperledger/aries-askar-nodejs": "^0.1.1", + "@hyperledger/aries-askar-shared": "^0.1.1", "@types/jest": "^27.0.2", "@types/jest-environment-puppeteer": "^4.4.1", "@types/puppeteer": "^5.4.4", @@ -26,8 +28,22 @@ } }, "../pkg": { - "name": "didcomm", - "version": "0.0.1" + "name": "didcomm-js", + "version": "0.4.1", + "license": "Apache-2.0" + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } }, "node_modules/@babel/code-frame": { "version": "7.22.13", @@ -114,33 +130,35 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.16.0", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", + "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.16.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", - "convert-source-map": "^1.7.0", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.0.tgz", + "integrity": "sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helpers": "^7.23.0", + "@babel/parser": "^7.23.0", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.0", + "@babel/types": "^7.23.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -150,12 +168,19 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/source-map": { - "version": "0.5.7", + "node_modules/@babel/core/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 + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" + "bin": { + "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { @@ -174,20 +199,28 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.3", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.17.5", - "semver": "^6.3.0" + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, "node_modules/@babel/helper-environment-visitor": { @@ -224,85 +257,53 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.16.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.0", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.16.0", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.16.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.16.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.16.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -339,21 +340,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.16.3", + "version": "7.23.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.1.tgz", + "integrity": "sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", - "@babel/types": "^7.16.0" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.0", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -458,8 +461,9 @@ }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -469,8 +473,9 @@ }, "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -480,8 +485,9 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -491,8 +497,9 @@ }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -502,8 +509,9 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -513,8 +521,9 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -524,8 +533,9 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -535,8 +545,9 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -546,8 +557,9 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -557,8 +569,9 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -568,8 +581,9 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -579,8 +593,9 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -592,11 +607,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -620,9 +636,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.0.tgz", + "integrity": "sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", @@ -656,45 +672,77 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 12" - } + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "license": "MIT", "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" } }, - "node_modules/@hapi/hoek": { - "version": "9.2.1", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "license": "BSD-3-Clause" + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true }, "node_modules/@hapi/topo": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0" } }, + "node_modules/@hyperledger/aries-askar-nodejs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@hyperledger/aries-askar-nodejs/-/aries-askar-nodejs-0.1.1.tgz", + "integrity": "sha512-mgTioLL22Q+Ie8RMY446bRtp/+D3rskhKJuW/qZUOinb8w8t0JKrFSfCr3OBs0/FVsm7cBN9ZqJdJY0+0BkVhQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@hyperledger/aries-askar-shared": "0.1.1", + "@mapbox/node-pre-gyp": "^1.0.10", + "ffi-napi": "^4.0.3", + "node-cache": "^5.1.2", + "ref-array-di": "^1.2.2", + "ref-napi": "^3.0.3", + "ref-struct-di": "^1.1.1" + } + }, + "node_modules/@hyperledger/aries-askar-shared": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@hyperledger/aries-askar-shared/-/aries-askar-shared-0.1.1.tgz", + "integrity": "sha512-9jJSgqHt29JEuQ/tBzHmhWaSLyTyw/t7H+Ell/YSHtL9DE0KN0Ew/vuXoDqlt117+EBeQTDKG0hy0ov8K41rmw==", + "dev": true, + "dependencies": { + "fast-text-encoding": "^1.0.3" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -708,57 +756,85 @@ }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/console": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.3.1", - "jest-util": "^27.3.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", "slash": "^3.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/console/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/console/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/core": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.3.1", - "@jest/reporters": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.3.0", - "jest-config": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-resolve-dependencies": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "jest-watcher": "^27.3.1", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -776,74 +852,178 @@ } } }, + "node_modules/@jest/core/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/core/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/environment": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/environment/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "jest-mock": "^27.3.0" + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/environment/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/fake-timers": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.5.1", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/fake-timers/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/fake-timers/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/globals": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/globals/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/types": "^27.2.5", - "expect": "^27.3.1" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/globals/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/reporters": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", "dev": true, - "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -862,13 +1042,39 @@ } } }, + "node_modules/@jest/reporters/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/source-map": { - "version": "27.0.6", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "source-map": "^0.6.0" }, "engines": { @@ -876,12 +1082,13 @@ } }, "node_modules/@jest/test-result": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -889,37 +1096,64 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/test-result/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/test-result/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/test-sequencer": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/test-result": "^27.3.1", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-runtime": "^27.3.1" + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/transform": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^27.2.5", - "babel-plugin-istanbul": "^6.0.0", + "@jest/types": "^27.5.1", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-util": "^27.3.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", "micromatch": "^4.0.4", - "pirates": "^4.0.1", + "pirates": "^4.0.4", "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" @@ -928,10 +1162,11 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/@jest/types": { - "version": "27.2.5", + "node_modules/@jest/transform/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", @@ -943,6 +1178,31 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/transform/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -991,332 +1251,310 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@sideway/address": { - "version": "4.1.2", + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@hapi/hoek": "^9.0.0" + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" } }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "dev": true - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", + "node_modules/@puppeteer/browsers": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-0.5.0.tgz", + "integrity": "sha512-Uw6oB7VvmPRLE4iKsjuOh8zgDabhNX67dzo8U/BB0f9527qx+4eeUs+korU98OhG5C4ubg7ufBgVi63XYwS6TQ==", "dev": true, - "license": "BSD-3-Clause" + "dependencies": { + "debug": "4.3.4", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "yargs": "17.7.1" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=14.1.0" + }, + "peerDependencies": { + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@puppeteer/browsers/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, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@puppeteer/browsers/node_modules/yargs": { + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "dev": true, + "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/@puppeteer/browsers/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, + "engines": { + "node": ">=12" + } + }, + "node_modules/@sideway/address": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "dev": true + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.7.0" } }, "node_modules/@tootallnate/once": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "dev": true, - "license": "MIT" + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "dev": true, - "license": "MIT" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true }, "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "dev": true, - "license": "MIT" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true }, "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "dev": true, - "license": "MIT" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true }, "node_modules/@types/babel__core": { - "version": "7.1.16", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", + "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.3", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz", + "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz", + "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__traverse": { - "version": "7.14.2", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz", + "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.7.tgz", + "integrity": "sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.3", - "dev": true, - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { - "version": "27.0.2", + "version": "27.5.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", + "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", "dev": true, - "license": "MIT", "dependencies": { - "jest-diff": "^27.0.0", + "jest-matcher-utils": "^27.0.0", "pretty-format": "^27.0.0" } }, "node_modules/@types/jest-environment-puppeteer": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@types/jest-environment-puppeteer/-/jest-environment-puppeteer-4.4.1.tgz", + "integrity": "sha512-LiZTD6i63le6QMnxi7pJB0SFv/fWtss6VVEEDm/UaeowBgjduf8txyE//j3WEeDPxngTvioUjbzA7Rc6Wc3cBA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": ">=24 <=26", "@types/puppeteer": "*", "jest-environment-node": ">=24 <=26" } }, - "node_modules/@types/jest-environment-puppeteer/node_modules/@jest/environment": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/@jest/fake-timers": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^26.6.2", - "@sinonjs/fake-timers": "^6.0.1", - "@types/node": "*", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/@jest/types": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/@sinonjs/fake-timers": { - "version": "6.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/@types/yargs": { - "version": "15.0.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/jest-environment-node": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/jest-message-util": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.2" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/jest-mock": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^26.6.2", - "@types/node": "*" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/jest-util": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/@types/jest-environment-puppeteer/node_modules/pretty-format": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/@types/node": { - "version": "16.11.7", - "dev": true, - "license": "MIT" + "version": "20.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.0.tgz", + "integrity": "sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==", + "dev": true }, "node_modules/@types/prettier": { - "version": "2.4.1", - "dev": true, - "license": "MIT" + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true }, "node_modules/@types/puppeteer": { - "version": "5.4.4", + "version": "5.4.7", + "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-5.4.7.tgz", + "integrity": "sha512-JdGWZZYL0vKapXF4oQTC5hLVNfOgdPrqeZ1BiQnGk5cB7HeE91EWUiTdVSdQPobRN8rIcdffjiOgCYJ/S8QrnQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/stack-utils": { "version": "2.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true }, "node_modules/@types/yargs": { - "version": "16.0.4", + "version": "15.0.16", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.16.tgz", + "integrity": "sha512-2FeD5qezW3FvLpZ0JpfuaEWepgNLl9b2gQYiz/ce0NhoB1W/D+VZu98phITXkADYerfr/jb7JcDcVhITsc9bwg==", "dev": true, - "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "20.2.1", - "dev": true, - "license": "MIT" + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==", + "dev": true }, "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.1.tgz", + "integrity": "sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==", "dev": true, "optional": true, "dependencies": { @@ -1324,14 +1562,22 @@ } }, "node_modules/abab": { - "version": "2.0.5", - "dev": true, - "license": "BSD-3-Clause" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "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 }, "node_modules/acorn": { - "version": "8.5.0", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1341,8 +1587,9 @@ }, "node_modules/acorn-globals": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, - "license": "MIT", "dependencies": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" @@ -1350,8 +1597,9 @@ }, "node_modules/acorn-globals/node_modules/acorn": { "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1361,16 +1609,18 @@ }, "node_modules/acorn-walk": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/agent-base": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, - "license": "MIT", "dependencies": { "debug": "4" }, @@ -1380,8 +1630,9 @@ }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -1394,16 +1645,18 @@ }, "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/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": { "color-convert": "^2.0.1" }, @@ -1415,9 +1668,10 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1426,52 +1680,105 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/arg": { "version": "4.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "node_modules/argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/arr-union": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/array-index": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-index/-/array-index-1.0.0.tgz", + "integrity": "sha512-jesyNbBkLQgGZMSwA1FanaFjalb1mZUGxGeUEkSDidzgrbjBGhvizJkaItdhkt8eIHFOJC7nDsrXk+BaehTdRw==", + "dev": true, + "dependencies": { + "debug": "^2.2.0", + "es6-symbol": "^3.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/array-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/array-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, "node_modules/asynckit": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "node_modules/axios": { - "version": "0.21.4", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", "dev": true, - "license": "MIT", "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.7" } }, "node_modules/babel-jest": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", + "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^27.2.0", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^27.5.1", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { @@ -1481,40 +1788,52 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", + "node_modules/babel-jest/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.1.0", + "node_modules/babel-jest/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", + "@types/yargs-parser": "*" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" }, "engines": { "node": ">=8" } }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.2.0", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", + "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -1527,8 +1846,9 @@ }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -1548,11 +1868,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "27.2.0", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", + "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, - "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "^27.2.0", + "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -1564,8 +1885,9 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -1600,8 +1922,9 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1609,8 +1932,9 @@ }, "node_modules/braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -1620,35 +1944,47 @@ }, "node_modules/browser-process-hrtime": { "version": "1.0.0", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true }, "node_modules/browserslist": { - "version": "4.17.6", + "version": "4.21.11", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.11.tgz", + "integrity": "sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001274", - "electron-to-chromium": "^1.3.886", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001538", + "electron-to-chromium": "^1.4.526", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/bs-logger": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, - "license": "MIT", "dependencies": { "fast-json-stable-stringify": "2.x" }, @@ -1658,8 +1994,9 @@ }, "node_modules/bser": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -1699,13 +2036,14 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1713,33 +2051,47 @@ }, "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/camelcase": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001279", + "version": "1.0.30001539", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001539.tgz", + "integrity": "sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA==", "dev": true, - "license": "CC-BY-4.0", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "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" @@ -1753,42 +2105,80 @@ }, "node_modules/char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chromium-bidi": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.7.tgz", + "integrity": "sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ==", + "dev": true, + "dependencies": { + "mitt": "3.0.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } }, "node_modules/ci-info": { - "version": "3.2.0", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, - "license": "MIT" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "dev": true, - "license": "MIT" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true }, "node_modules/cliui": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/clone-deep": { "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha512-we+NuQo2DHhSl+DP6jlUiAhyAjBQrYnpOk15rN6c6JSPScjiCLh8IbSU+VTcph6YS3o7mASE8a0+gbZ7ChLpgg==", "dev": true, - "license": "MIT", "dependencies": { "for-own": "^0.1.3", "is-plain-object": "^2.0.1", @@ -1802,22 +2192,25 @@ }, "node_modules/co": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "dev": true, - "license": "MIT" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true }, "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" }, @@ -1827,13 +2220,24 @@ }, "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 + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true, - "license": "MIT" + "bin": { + "color-support": "bin.js" + } }, "node_modules/combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1843,29 +2247,35 @@ }, "node_modules/commander": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true }, "node_modules/convert-source-map": { - "version": "1.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.1" - } + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true }, "node_modules/cosmiconfig": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz", - "integrity": "sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", + "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", "dev": true, "dependencies": { "import-fresh": "^3.2.1", @@ -1875,6 +2285,9 @@ }, "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" } }, "node_modules/cosmiconfig/node_modules/argparse": { @@ -1897,8 +2310,9 @@ }, "node_modules/create-require": { "version": "1.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "node_modules/cross-fetch": { "version": "3.1.5", @@ -1909,10 +2323,53 @@ "node-fetch": "2.6.7" } }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/cross-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/cross-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/cross-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1924,13 +2381,15 @@ }, "node_modules/cssom": { "version": "0.4.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true }, "node_modules/cssstyle": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, - "license": "MIT", "dependencies": { "cssom": "~0.3.6" }, @@ -1940,13 +2399,15 @@ }, "node_modules/cssstyle/node_modules/cssom": { "version": "0.3.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true }, "node_modules/cwd": { "version": "0.10.0", + "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", + "integrity": "sha512-YGZxdTTL9lmLkCUTpg4j0zQ7IhRB5ZmqNBbGCl3Tg6MP/d5/6sY7L5mmTjzbc6JKgVZYiqTQTNhPFsbXNGlRaA==", "dev": true, - "license": "MIT", "dependencies": { "find-pkg": "^0.1.2", "fs-exists-sync": "^0.1.0" @@ -1955,10 +2416,21 @@ "node": ">=0.8" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/data-urls": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, - "license": "MIT", "dependencies": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", @@ -1986,48 +2458,63 @@ } }, "node_modules/decimal.js": { - "version": "10.3.1", - "dev": true, - "license": "MIT" + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true }, "node_modules/dedent": { "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/devtools-protocol": { - "version": "0.0.1082910", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1082910.tgz", - "integrity": "sha512-RqoZ2GmqaNxyx+99L/RemY5CkwG9D0WEfOKxekwCRXOGrDCep62ngezEJUVMq6rISYQ+085fJnWDQqGHlxVNww==", + "version": "0.0.1107588", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz", + "integrity": "sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==", "dev": true }, "node_modules/didcomm": { @@ -2036,24 +2523,27 @@ }, "node_modules/diff": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/diff-sequences": { - "version": "27.0.6", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", "dev": true, - "license": "MIT", "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/domexception": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, - "license": "MIT", "dependencies": { "webidl-conversions": "^5.0.0" }, @@ -2063,21 +2553,24 @@ }, "node_modules/domexception/node_modules/webidl-conversions": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=8" } }, "node_modules/electron-to-chromium": { - "version": "1.3.894", - "dev": true, - "license": "ISC" + "version": "1.4.529", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.529.tgz", + "integrity": "sha512-6uyPyXTo8lkv8SWAmjKFbG42U073TXlzD4R8rW3EzuznhFS2olCIAfjjQtV2dV2ar/vRF55KUd3zQYnCB0dd3A==", + "dev": true }, "node_modules/emittery": { "version": "0.8.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", + "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2087,8 +2580,9 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/end-of-stream": { "version": "1.4.4", @@ -2108,31 +2602,69 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "node_modules/escalade": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/escodegen": { - "version": "2.0.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" + "esutils": "^2.0.2" }, "bin": { "escodegen": "bin/escodegen.js", @@ -2147,8 +2679,9 @@ }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -2159,24 +2692,27 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -2197,6 +2733,8 @@ }, "node_modules/exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -2204,8 +2742,9 @@ }, "node_modules/expand-tilde": { "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha512-rtmc+cjLZqnu9dSYosX9EWmSJhTwpACgJQTfj4hgg2JjOD/6SIQalZrt4a3aQeh++oNxkazcaxrhPUj6+g5G/Q==", "dev": true, - "license": "MIT", "dependencies": { "os-homedir": "^1.0.1" }, @@ -2214,37 +2753,66 @@ } }, "node_modules/expect": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", + "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "ansi-styles": "^5.0.0", - "jest-get-type": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6" + "@jest/types": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/expect-puppeteer": { - "version": "6.0.0", - "dev": true, - "license": "MIT" + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/expect-puppeteer/-/expect-puppeteer-6.1.1.tgz", + "integrity": "sha512-cnQF96qdoEcOD63j5NQMc0RtW9WRMW/WHKXEKsuDQ2tszhVH3qC7zkXXS4D0LTt9qCB3DEExioqylsQXvqPrUw==", + "dev": true }, - "node_modules/expect/node_modules/ansi-styles": { - "version": "5.2.0", + "node_modules/expect/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/expect/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" } }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -2282,18 +2850,21 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "dev": true }, "node_modules/fb-watchman": { - "version": "2.0.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -2307,10 +2878,29 @@ "pend": "~1.2.0" } }, + "node_modules/ffi-napi": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ffi-napi/-/ffi-napi-4.0.3.tgz", + "integrity": "sha512-PMdLCIvDY9mS32RxZ0XGb95sonPRal8aqRhLbeEtWKZTe2A87qRFG9HjOhvG8EX2UmQw5XNRMIOT+1MYlWmdeg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "debug": "^4.1.1", + "get-uv-event-loop-napi-h": "^1.0.5", + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.1", + "ref-napi": "^2.0.1 || ^3.0.2", + "ref-struct-di": "^1.1.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2320,8 +2910,9 @@ }, "node_modules/find-file-up": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-0.1.3.tgz", + "integrity": "sha512-mBxmNbVyjg1LQIIpgO8hN+ybWBgDQK8qjht+EbrTCGmmPV/sc7RF1i9stPTD6bpvXZywBdrwRYxhSdJv867L6A==", "dev": true, - "license": "MIT", "dependencies": { "fs-exists-sync": "^0.1.0", "resolve-dir": "^0.1.0" @@ -2332,8 +2923,9 @@ }, "node_modules/find-pkg": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-0.1.2.tgz", + "integrity": "sha512-0rnQWcFwZr7eO0513HahrWafsc3CTFioEB7DRiEYCUM/70QXSY8f3mCST17HXLcPvEhzH/Ty/Bxd72ZZsr/yvw==", "dev": true, - "license": "MIT", "dependencies": { "find-file-up": "^0.1.2" }, @@ -2342,9 +2934,10 @@ } }, "node_modules/find-process": { - "version": "1.4.5", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/find-process/-/find-process-1.4.7.tgz", + "integrity": "sha512-/U4CYp1214Xrp3u3Fqr9yNynUrr5Le4y0SsJh2lMDDSbpwYSz3M2SMWQC+wqcx79cN8PQtHQIL8KnuY9M66fdg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "commander": "^5.1.0", @@ -2356,8 +2949,9 @@ }, "node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -2367,9 +2961,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -2388,16 +2982,18 @@ }, "node_modules/for-in": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/for-own": { "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", "dev": true, - "license": "MIT", "dependencies": { "for-in": "^1.0.1" }, @@ -2407,8 +3003,9 @@ }, "node_modules/form-data": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -2426,23 +3023,57 @@ }, "node_modules/fs-exists-sync": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, - "license": "ISC" + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } }, - "node_modules/fsevents": { - "version": "2.3.2", + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": 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 + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ "darwin" ], "engines": { @@ -2451,37 +3082,62 @@ }, "node_modules/function-bind": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", "dev": true, - "license": "MIT" + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "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-package-type": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2489,15 +3145,31 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-from-current-process-h": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz", + "integrity": "sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==", + "dev": true + }, + "node_modules/get-uv-event-loop-napi-h": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz", + "integrity": "sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==", + "dev": true, + "dependencies": { + "get-symbol-from-current-process-h": "^1.0.1" + } + }, "node_modules/glob": { - "version": "7.2.0", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -2510,8 +3182,9 @@ }, "node_modules/global-modules": { "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha512-JeXuCbvYzYXcwE6acL9V2bAOeSIGl4dD+iwLY9iUx2VBJJ80R18HCn+JCwHM9Oegdfya3lEkGCdaRkSyc10hDA==", "dev": true, - "license": "MIT", "dependencies": { "global-prefix": "^0.1.4", "is-windows": "^0.2.0" @@ -2522,8 +3195,9 @@ }, "node_modules/global-prefix": { "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha512-gOPiyxcD9dJGCEArAhF4Hd0BAqvAe/JzERP7tYumE4yIkmIedPUVXcJFWbV3/p/ovIIvKjkrTk+f1UVkq7vvbw==", "dev": true, - "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.0", "ini": "^1.3.4", @@ -2536,8 +3210,9 @@ }, "node_modules/global-prefix/node_modules/which": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2547,21 +3222,24 @@ }, "node_modules/globals": { "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/graceful-fs": { - "version": "4.2.8", - "dev": true, - "license": "ISC" + "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 }, "node_modules/has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -2571,16 +3249,24 @@ }, "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/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, "node_modules/homedir-polyfill": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, - "license": "MIT", "dependencies": { "parse-passwd": "^1.0.0" }, @@ -2590,8 +3276,9 @@ }, "node_modules/html-encoding-sniffer": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, - "license": "MIT", "dependencies": { "whatwg-encoding": "^1.0.5" }, @@ -2601,13 +3288,15 @@ }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/http-proxy-agent": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, - "license": "MIT", "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -2632,16 +3321,18 @@ }, "node_modules/human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/iconv-lite": { "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -2695,9 +3386,10 @@ } }, "node_modules/import-local": { - "version": "3.0.3", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, - "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -2707,20 +3399,25 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } }, "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==", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2728,13 +3425,15 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ini": { "version": "1.3.8", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/is-arrayish": { "version": "0.2.1", @@ -2744,13 +3443,15 @@ }, "node_modules/is-buffer": { "version": "1.1.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true }, "node_modules/is-ci": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, - "license": "MIT", "dependencies": { "ci-info": "^2.0.0" }, @@ -2760,13 +3461,15 @@ }, "node_modules/is-ci/node_modules/ci-info": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, "node_modules/is-core-module": { - "version": "2.8.0", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, - "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -2776,40 +3479,45 @@ }, "node_modules/is-extendable": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "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-generator-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-plain-object": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -2819,13 +3527,15 @@ }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "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 }, "node_modules/is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -2835,69 +3545,102 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true }, "node_modules/is-windows": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha512-n67eJYmXbniZB7RF4I/FTjK1s6RPOCTxhYrVYLRaCt3lF0mpWZPKr3T2LSZAqyjQsxR2qMmGYXXzK0YWwcPM1Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/core": "^7.7.5", + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" }, "engines": { "node": ">=8" } }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -2908,9 +3651,10 @@ } }, "node_modules/istanbul-reports": { - "version": "3.0.5", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -2920,13 +3664,14 @@ } }, "node_modules/jest": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^27.3.1", + "@jest/core": "^27.5.1", "import-local": "^3.0.2", - "jest-cli": "^27.3.1" + "jest-cli": "^27.5.1" }, "bin": { "jest": "bin/jest.js" @@ -2944,11 +3689,12 @@ } }, "node_modules/jest-changed-files": { - "version": "27.3.0", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", + "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.5.1", "execa": "^5.0.0", "throat": "^6.0.1" }, @@ -2956,27 +3702,53 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/jest-changed-files/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/jest-circus": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", + "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.3.1", + "expect": "^27.5.1", "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" @@ -2985,21 +3757,47 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/jest-circus/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-circus/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/jest-cli": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", + "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/core": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-config": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "prompts": "^2.0.1", "yargs": "^16.2.0" }, @@ -3018,32 +3816,61 @@ } } }, + "node_modules/jest-cli/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-cli/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/jest-config": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", + "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.3.1", - "@jest/types": "^27.2.5", - "babel-jest": "^27.3.1", + "@babel/core": "^7.8.0", + "@jest/test-sequencer": "^27.5.1", + "@jest/types": "^27.5.1", + "babel-jest": "^27.5.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.3.1", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-jasmine2": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "graceful-fs": "^4.2.9", + "jest-circus": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-jasmine2": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "micromatch": "^4.0.4", - "pretty-format": "^27.3.1" + "parse-json": "^5.2.0", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -3057,38 +3884,83 @@ } } }, + "node_modules/jest-config/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-config/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-config/node_modules/jest-environment-node": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, "node_modules/jest-dev-server": { - "version": "6.0.0", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jest-dev-server/-/jest-dev-server-6.2.0.tgz", + "integrity": "sha512-ZWh8CuvxwjhYfvw4tGeftziqIvw/26R6AG3OTgNTQeXul8aZz48RQjDpnlDwnWX53jxJJl9fcigqIdSU5lYZuw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.2", "cwd": "^0.10.0", - "find-process": "^1.4.5", - "prompts": "^2.4.1", - "spawnd": "^6.0.0", + "find-process": "^1.4.7", + "prompts": "^2.4.2", + "spawnd": "^6.2.0", "tree-kill": "^1.2.2", - "wait-on": "^6.0.0" + "wait-on": "^6.0.1" } }, "node_modules/jest-diff": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.0.6", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-docblock": { - "version": "27.0.6", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", + "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, - "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -3097,5975 +3969,3158 @@ } }, "node_modules/jest-each": { - "version": "27.3.1", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", + "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-get-type": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-environment-jsdom": { - "version": "27.3.1", + "node_modules/jest-each/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1", - "jsdom": "^16.6.0" + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-environment-node": { - "version": "27.3.1", + "node_modules/jest-each/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-environment-jsdom": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", + "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1", + "jsdom": "^16.6.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-environment-puppeteer": { - "version": "6.0.0", + "node_modules/jest-environment-jsdom/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "chalk": "^4.1.1", - "cwd": "^0.10.0", - "jest-dev-server": "^6.0.0", - "jest-environment-node": "^27.0.1", - "merge-deep": "^3.0.3" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-get-type": { - "version": "27.3.1", + "node_modules/jest-environment-jsdom/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "dependencies": { + "@types/yargs-parser": "*" } }, - "node_modules/jest-haste-map": { - "version": "27.3.1", + "node_modules/jest-environment-node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "@types/graceful-fs": "^4.1.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.0.6", - "jest-serializer": "^27.0.6", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "node": ">= 10.14.2" } }, - "node_modules/jest-jasmine2": { - "version": "27.3.1", + "node_modules/jest-environment-node/node_modules/@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.3.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", - "throat": "^6.0.1" + "jest-mock": "^26.6.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 10.14.2" } }, - "node_modules/jest-leak-detector": { - "version": "27.3.1", + "node_modules/jest-environment-node/node_modules/@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", "dev": true, - "license": "MIT", "dependencies": { - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 10.14.2" } }, - "node_modules/jest-matcher-utils": { - "version": "27.3.1", + "node_modules/jest-environment-node/node_modules/@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", "dev": true, - "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "@sinonjs/commons": "^1.7.0" } }, - "node_modules/jest-message-util": { - "version": "27.3.1", + "node_modules/jest-environment-node/node_modules/jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.2.5", + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "micromatch": "^4.0.4", - "pretty-format": "^27.3.1", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "stack-utils": "^2.0.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 10.14.2" } }, - "node_modules/jest-mock": { - "version": "27.3.0", + "node_modules/jest-environment-node/node_modules/jest-mock": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^26.6.2", "@types/node": "*" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 10.14.2" } }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", + "node_modules/jest-environment-node/node_modules/jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" + "dependencies": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } + "engines": { + "node": ">= 10.14.2" } }, - "node_modules/jest-puppeteer": { - "version": "6.0.0", + "node_modules/jest-environment-node/node_modules/pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "dev": true, - "license": "MIT", "dependencies": { - "expect-puppeteer": "^6.0.0", - "jest-environment-puppeteer": "^6.0.0" + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" }, - "peerDependencies": { - "puppeteer": ">= 1.5.0" + "engines": { + "node": ">= 10" } }, - "node_modules/jest-regex-util": { - "version": "27.0.6", + "node_modules/jest-environment-puppeteer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jest-environment-puppeteer/-/jest-environment-puppeteer-6.2.0.tgz", + "integrity": "sha512-a/oSu6dO9D+XoDDe3ZY/0Sk79Jl2FcJl7Q0D+3x22l1eWNOYe4ikXnPGhtmNZ3mJIpuAVIX6LytA8EraOk/aqQ==", "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "dependencies": { + "chalk": "^4.1.2", + "cwd": "^0.10.0", + "jest-dev-server": "^6.2.0", + "jest-environment-node": "^27.5.1", + "merge-deep": "^3.0.3" } }, - "node_modules/jest-resolve": { - "version": "27.3.1", + "node_modules/jest-environment-puppeteer/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-resolve-dependencies": { - "version": "27.3.1", + "node_modules/jest-environment-puppeteer/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-environment-puppeteer/node_modules/jest-environment-node": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "jest-regex-util": "^27.0.6", - "jest-snapshot": "^27.3.1" + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-runner": { - "version": "27.3.1", + "node_modules/jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "dev": true, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.0.6", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-leak-detector": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/jest-runtime": { - "version": "27.3.1", + "node_modules/jest-haste-map/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/globals": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", "@types/yargs": "^16.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^16.2.0" + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-serializer": { - "version": "27.0.6", + "node_modules/jest-haste-map/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-jasmine2": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", + "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, - "license": "MIT", "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "graceful-fs": "^4.2.4" + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "throat": "^6.0.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-snapshot": { - "version": "27.3.1", + "node_modules/jest-jasmine2/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/parser": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.3.1", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.3.1", - "semver": "^7.3.2" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.5", + "node_modules/jest-jasmine2/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "ISC", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-leak-detector": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", + "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", + "dev": true, + "dependencies": { + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { - "node": ">=10" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-util": { - "version": "27.3.1", + "node_modules/jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "@types/node": "*", "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", - "picomatch": "^2.2.3" + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-validate": { - "version": "27.3.1", + "node_modules/jest-message-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", + "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "camelcase": "^6.2.0", + "@babel/code-frame": "^7.12.13", + "@jest/types": "^27.5.1", + "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", - "leven": "^3.1.0", - "pretty-format": "^27.3.1" + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.2.0", + "node_modules/jest-message-util/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-watcher": { - "version": "27.3.1", + "node_modules/jest-message-util/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.3.1", - "string-length": "^4.0.1" + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-mock": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", + "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", + "dev": true, + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-worker": { - "version": "27.3.1", + "node_modules/jest-mock/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", + "node_modules/jest-mock/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" - }, + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=6" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } } }, - "node_modules/joi": { - "version": "17.4.2", + "node_modules/jest-puppeteer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jest-puppeteer/-/jest-puppeteer-6.2.0.tgz", + "integrity": "sha512-4Ynkgcf9FkHlTNEpdsojGLb3KtsToWqjO6SCigxb9Qj3HzIqhzJzNbDJ/XhiciNDpqDe6KHW9sZ6fjHphNLr6g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.0", - "@sideway/formula": "^3.0.0", - "@sideway/pinpoint": "^2.0.0" + "expect-puppeteer": "^6.1.1", + "jest-environment-puppeteer": "^6.2.0" + }, + "peerDependencies": { + "puppeteer": ">= 1.5.0" } }, - "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 + "node_modules/jest-regex-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", + "dev": true, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } }, - "node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/jest-resolve": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", + "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, - "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jsdom": { - "version": "16.7.0", + "node_modules/jest-resolve-dependencies": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", + "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, - "license": "MIT", "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" + "@jest/types": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-snapshot": "^27.5.1" }, "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jsesc": { - "version": "2.5.2", + "node_modules/jest-resolve-dependencies/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": ">=4" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "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 - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "node_modules/jest-resolve-dependencies/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" + "dependencies": { + "@types/yargs-parser": "*" } }, - "node_modules/kind-of": { - "version": "3.2.2", + "node_modules/jest-resolve/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "is-buffer": "^1.1.5" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/kleur": { - "version": "3.0.3", + "node_modules/jest-resolve/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "@types/yargs-parser": "*" } }, - "node_modules/lazy-cache": { - "version": "1.0.4", + "node_modules/jest-runner": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", + "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, - "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-leak-detector": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "source-map-support": "^0.5.6", + "throat": "^6.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/leven": { - "version": "3.1.0", + "node_modules/jest-runner/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/levn": { - "version": "0.3.0", + "node_modules/jest-runner/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" + "@types/yargs-parser": "*" } }, - "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 - }, - "node_modules/locate-path": { - "version": "5.0.0", + "node_modules/jest-runner/node_modules/jest-environment-node": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, - "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" }, "engines": { - "node": ">=8" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" + "node_modules/jest-runtime": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", + "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/globals": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { - "node": ">=10" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/make-dir": { - "version": "3.1.0", + "node_modules/jest-runtime/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "semver": "^6.0.0" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", + "node_modules/jest-runtime/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "tmpl": "1.0.5" + "@types/yargs-parser": "*" } }, - "node_modules/merge-deep": { - "version": "3.0.3", + "node_modules/jest-serializer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, - "license": "MIT", "dependencies": { - "arr-union": "^3.1.0", - "clone-deep": "^0.2.4", - "kind-of": "^3.0.2" + "@types/node": "*", + "graceful-fs": "^4.2.9" }, "engines": { - "node": ">=0.10.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.4", + "node_modules/jest-snapshot": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", + "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, - "license": "MIT", "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "@babel/core": "^7.7.2", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.0.0", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^27.5.1", + "semver": "^7.3.2" }, "engines": { - "node": ">=8.6" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/mime-db": { - "version": "1.51.0", + "node_modules/jest-snapshot/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, "engines": { - "node": ">= 0.6" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/mime-types": { - "version": "2.1.34", + "node_modules/jest-snapshot/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT", "dependencies": { - "mime-db": "1.51.0" - }, - "engines": { - "node": ">= 0.6" + "@types/yargs-parser": "*" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", + "node_modules/jest-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", "dev": true, - "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, "engines": { - "node": ">=6" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/jest-util/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": "*" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "node_modules/jest-util/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "@types/yargs-parser": "*" } }, - "node_modules/mixin-object": { - "version": "2.0.1", + "node_modules/jest-validate": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", + "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, - "license": "MIT", "dependencies": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" + "@jest/types": "^27.5.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "leven": "^3.1.0", + "pretty-format": "^27.5.1" }, "engines": { - "node": ">=0.10.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/mixin-object/node_modules/for-in": { - "version": "0.1.8", + "node_modules/jest-validate/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/jest-validate/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "@types/yargs-parser": "*" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" + "node": ">=10" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/jest-watcher": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", + "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-modules-regexp": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/node-releases": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^27.5.1", + "string-length": "^4.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", + "node_modules/jest-watcher/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "license": "MIT", "dependencies": { - "path-key": "^3.0.0" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/nwsapi": { - "version": "2.2.0", + "node_modules/jest-watcher/node_modules/@types/yargs": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", + "integrity": "sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A==", "dev": true, - "license": "MIT" + "dependencies": { + "@types/yargs-parser": "*" + } }, - "node_modules/once": { - "version": "1.4.0", + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, - "license": "ISC", "dependencies": { - "wrappy": "1" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" } }, - "node_modules/onetime": { - "version": "5.1.2", + "node_modules/jest-worker/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": { - "mimic-fn": "^2.1.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/optionator": { - "version": "0.8.3", + "node_modules/joi": { + "version": "17.10.2", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.2.tgz", + "integrity": "sha512-hcVhjBxRNW/is3nNLdGLIjkgXetkeGc2wyhydhz8KumG23Aerk4HPjU5zaPAMRqXQFc0xNqXTC7+zQjxr0GlKA==", "dev": true, - "license": "MIT", "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" } }, - "node_modules/os-homedir": { - "version": "1.0.2", + "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 + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/p-limit": { - "version": "2.3.0", + "node_modules/jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", "dev": true, - "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/p-locate": { - "version": "4.1.0", + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/p-try": { - "version": "2.2.0", + "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 + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, "engines": { "node": ">=6" } }, - "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==", + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, "dependencies": { - "callsites": "^3.0.0" + "is-buffer": "^1.1.5" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "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==", + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "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": ">=6" } }, - "node_modules/parse-passwd": { - "version": "1.0.0", + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/parse5": { - "version": "6.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/path-exists": { - "version": "4.0.0", + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "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 }, - "node_modules/path-key": { - "version": "3.1.1", + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, "engines": { "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "license": "MIT" + "dependencies": { + "yallist": "^3.0.2" + } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.0", + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC" + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/picomatch": { - "version": "2.3.0", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "dependencies": { + "tmpl": "1.0.5" } }, - "node_modules/pirates": { - "version": "4.0.1", + "node_modules/merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", "dev": true, - "license": "MIT", "dependencies": { - "node-modules-regexp": "^1.0.0" + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, - "license": "MIT", "dependencies": { - "find-up": "^4.0.0" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, - "node_modules/prelude-ls": { - "version": "1.1.2", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.6" } }, - "node_modules/prettier": { - "version": "2.4.1", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" + "dependencies": { + "mime-db": "1.52.0" }, "engines": { - "node": ">=10.13.0" + "node": ">= 0.6" } }, - "node_modules/pretty-format": { - "version": "27.3.1", + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.2.5", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "*" } }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", + "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", - "engines": { - "node": ">=10" - }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/progress": { - "version": "2.0.3", + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">=0.4.0" + "node": ">=8" } }, - "node_modules/prompts": { - "version": "2.4.2", + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, - "license": "MIT", "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" + "minipass": "^3.0.0", + "yallist": "^4.0.0" }, "engines": { - "node": ">= 6" + "node": ">= 8" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, - "license": "MIT" + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/psl": { - "version": "1.8.0", - "dev": true, - "license": "MIT" + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, - "node_modules/pump": { + "node_modules/mitt": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", + "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==", + "dev": true + }, + "node_modules/mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha512-ALGF1Jt9ouehcaXaHhn6t1yGWRqGaHkPFndtFVHfZXOvkIZ/yoGaSi0AHVTafb3ZBGg4dr/bDwnaEKqCXzchMA==", "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/punycode": { - "version": "2.1.1", + "node_modules/mixin-object/node_modules/for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha512-F0to7vbBSHP8E3l6dCjxNOLuSFAACIxFy3UehTUlG7svlXi37HHsDkyVcHo0Pq8QwrE+pXvWSVX3ZT1T9wAZ9g==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/puppeteer": { - "version": "19.6.3", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-19.6.3.tgz", - "integrity": "sha512-K03xTtGDwS6cBXX/EoqoZxglCUKcX2SLIl92fMnGMRjYpPGXoAV2yKEh3QXmXzKqfZXd8TxjjFww+tEttWv8kw==", + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "hasInstallScript": true, - "dependencies": { - "cosmiconfig": "8.0.0", - "https-proxy-agent": "5.0.1", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "puppeteer-core": "19.6.3" + "bin": { + "mkdirp": "bin/cmd.js" }, "engines": { - "node": ">=14.1.0" + "node": ">=10" } }, - "node_modules/puppeteer-core": { - "version": "19.6.3", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.6.3.tgz", - "integrity": "sha512-8MbhioSlkDaHkmolpQf9Z7ui7jplFfOFTnN8d5kPsCazRRTNIH6/bVxPskn0v5Gh9oqOBlknw0eHH0/OBQAxpQ==", + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true + }, + "node_modules/node-cache": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.2.tgz", + "integrity": "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==", "dev": true, "dependencies": { - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.1082910", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.11.0" + "clone": "2.x" }, "engines": { - "node": ">=14.1.0" + "node": ">= 8.0.0" } }, - "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, "engines": { - "node": ">=10.0.0" + "node": "4.x || >=6.0.0" }, "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "encoding": "^0.1.0" }, "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { + "encoding": { "optional": true } } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/react-is": { - "version": "17.0.2", - "dev": true, - "license": "MIT" + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/require-directory": { - "version": "2.1.1", + "node_modules/node-gyp-build": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node_modules/resolve": { - "version": "1.20.0", + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, - "license": "MIT", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "abbrev": "1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" } }, - "node_modules/resolve-cwd": { + "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "license": "MIT", "dependencies": { - "resolve-from": "^5.0.0" + "path-key": "^3.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/resolve-dir": { - "version": "0.1.1", + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "dev": true, - "license": "MIT", "dependencies": { - "expand-tilde": "^1.2.2", - "global-modules": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0" + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" } }, - "node_modules/resolve-from": { - "version": "5.0.0", + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/resolve.exports": { - "version": "1.1.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": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "wrappy": "1" } }, - "node_modules/rimraf": { - "version": "3.0.2", + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "license": "ISC", "dependencies": { - "glob": "^7.1.3" + "mimic-fn": "^2.1.0" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rxjs": { - "version": "7.4.0", + "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": "Apache-2.0", - "dependencies": { - "tslib": "~2.1.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT" + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/saxes": { - "version": "5.0.1", + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "ISC", "dependencies": { - "xmlchars": "^2.2.0" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/semver": { - "version": "6.3.0", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=6" } }, - "node_modules/shallow-clone": { - "version": "0.1.2", + "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": { - "is-extendable": "^0.1.1", - "kind-of": "^2.0.1", - "lazy-cache": "^0.2.3", - "mixin-object": "^2.0.1" + "callsites": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/shallow-clone/node_modules/kind-of": { - "version": "2.0.1", + "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": { - "is-buffer": "^1.0.2" + "@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": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/shallow-clone/node_modules/lazy-cache": { - "version": "0.2.7", + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/shebang-command": { - "version": "2.0.0", + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", + "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": ">=8" + "node": ">=0.10.0" } }, - "node_modules/signal-exit": { - "version": "3.0.5", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "ISC" + "engines": { + "node": ">=8" + } }, - "node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" + "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 }, - "node_modules/slash": { - "version": "3.0.0", + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/source-map": { - "version": "0.6.1", + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "BSD-3-Clause", "engines": { - "node": ">=0.10.0" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/source-map-support": { - "version": "0.5.20", + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "engines": { + "node": ">= 6" } }, - "node_modules/spawnd": { - "version": "6.0.0", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", "dependencies": { - "exit": "^0.1.2", - "signal-exit": "^3.0.3", - "tree-kill": "^1.2.2" + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", + "node_modules/prettier": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", + "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", "dev": true, - "license": "BSD-3-Clause" + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } }, - "node_modules/stack-utils": { - "version": "2.0.5", + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, - "license": "MIT", "dependencies": { - "escape-string-regexp": "^2.0.0" + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" + "engines": { + "node": ">=0.4.0" } }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/string-length": { - "version": "4.0.2", - "dev": true, - "license": "MIT", "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" }, "engines": { - "node": ">=10" + "node": ">= 6" } }, - "node_modules/string-width": { - "version": "4.2.3", + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "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" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/strip-bom": { - "version": "4.0.0", + "node_modules/puppeteer": { + "version": "19.11.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-19.11.1.tgz", + "integrity": "sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "hasInstallScript": true, + "dependencies": { + "@puppeteer/browsers": "0.5.0", + "cosmiconfig": "8.1.3", + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "puppeteer-core": "19.11.1" } }, - "node_modules/strip-final-newline": { - "version": "2.0.0", + "node_modules/puppeteer-core": { + "version": "19.11.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.11.1.tgz", + "integrity": "sha512-qcuC2Uf0Fwdj9wNtaTZ2OvYRraXpAK+puwwVW8ofOhOgLPZyz1c68tsorfIZyCUOpyBisjr+xByu7BMbEYMepA==", "dev": true, - "license": "MIT", + "dependencies": { + "@puppeteer/browsers": "0.5.0", + "chromium-bidi": "0.4.7", + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.1107588", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "proxy-from-env": "1.1.0", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.13.0" + }, "engines": { - "node": ">=6" + "node": ">=14.14.0" + }, + "peerDependencies": { + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/supports-color": { - "version": "7.2.0", + "node_modules/puppeteer-core/node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/supports-hyperlinks": { + "node_modules/querystringify": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, - "license": "MIT", "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", + "node_modules/ref-array-di": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ref-array-di/-/ref-array-di-1.2.2.tgz", + "integrity": "sha512-jhCmhqWa7kvCVrWhR/d7RemkppqPUdxEil1CtTtm7FkZV8LcHHCK3Or9GinUiFP5WY3k0djUkMvhBhx49Jb2iA==", "dev": true, - "license": "MIT" + "dependencies": { + "array-index": "^1.0.0", + "debug": "^3.1.0" + } }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "node_modules/ref-array-di/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" + "ms": "^2.1.1" } }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "node_modules/ref-napi": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ref-napi/-/ref-napi-3.0.3.tgz", + "integrity": "sha512-LiMq/XDGcgodTYOMppikEtJelWsKQERbLQsYm0IOOnzhwE9xYZC7x8txNnFC9wJNOkPferQI4vD4ZkC0mDyrOA==", "dev": true, + "hasInstallScript": true, "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "debug": "^4.1.1", + "get-symbol-from-current-process-h": "^1.0.2", + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.1" }, "engines": { - "node": ">=6" + "node": ">= 10.0" } }, - "node_modules/terminal-link": { - "version": "2.1.1", + "node_modules/ref-struct-di": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ref-struct-di/-/ref-struct-di-1.1.1.tgz", + "integrity": "sha512-2Xyn/0Qgz89VT+++WP0sTosdm9oeowLP23wRJYhG4BFdMUrLj3jhwHZNEytYNYgtPKLNTP3KJX4HEgBvM1/Y2g==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "debug": "^3.1.0" } }, - "node_modules/test-exclude": { - "version": "6.0.0", + "node_modules/ref-struct-di/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": "ISC", "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" + "ms": "^2.1.1" } }, - "node_modules/throat": { - "version": "6.0.1", + "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/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", "dev": true }, - "node_modules/tmpl": { - "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", + "node_modules/resolve": { + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "resolve-from": "^5.0.0" }, "engines": { - "node": ">=8.0" + "node": ">=8" } }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "node_modules/resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha512-QxMPqI6le2u0dCLyiGzgy92kjkkL6zO0XyvHzjdTNH3zM6e5Hz3BwG6+aEyNgiQ5Xz6PwTwgQEj3U50dByPKIA==", "dev": true, "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" + "expand-tilde": "^1.2.2", + "global-modules": "^0.2.3" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/tr46": { - "version": "2.1.0", + "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", - "dependencies": { - "punycode": "^2.1.1" - }, "engines": { "node": ">=8" } }, - "node_modules/tree-kill": { - "version": "1.2.2", + "node_modules/resolve.exports": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", + "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", "dev": true, - "license": "MIT", - "bin": { - "tree-kill": "cli.js" + "engines": { + "node": ">=10" } }, - "node_modules/ts-jest": { - "version": "27.0.7", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" + "glob": "^7.1.3" }, "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" + "rimraf": "bin.js" }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "@types/jest": { - "optional": true + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "babel-jest": { - "optional": true + { + "type": "consulting", + "url": "https://feross.org/support" } - } + ] }, - "node_modules/ts-jest/node_modules/semver": { - "version": "7.3.5", + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, - "license": "ISC", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "xmlchars": "^2.2.0" }, "engines": { "node": ">=10" } }, - "node_modules/ts-node": { - "version": "10.4.0", + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, - "license": "MIT", "dependencies": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "yn": "3.1.1" + "lru-cache": "^6.0.0" }, "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" + "semver": "bin/semver.js" }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } + "engines": { + "node": ">=10" } }, - "node_modules/ts-node/node_modules/acorn-walk": { - "version": "8.2.0", + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "MIT", + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">=0.4.0" + "node": ">=10" } }, - "node_modules/tslib": { - "version": "2.1.0", - "dev": true, - "license": "0BSD" + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, - "node_modules/tslint": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", - "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", - "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.3", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.13.0", - "tsutils": "^2.29.0" - }, - "bin": { - "tslint": "bin/tslint" + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" }, "engines": { - "node": ">=4.8.0" - }, - "peerDependencies": { - "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + "node": ">=0.10.0" } }, - "node_modules/tslint/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==", + "node_modules/shallow-clone/node_modules/kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha512-0u8i1NZ/mg0b+W3MGGw5I7+6Eib2nx72S/QvXa0hYjEkjTknYmEYQJwGu3mLC0BrhtJjtQafTkyRUQ75Kx0LVg==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "is-buffer": "^1.0.2" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/tslint/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==", + "node_modules/shallow-clone/node_modules/lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha512-gkX52wvU/R8DVMMt78ATVPFMJqfW8FPz1GZ1sVHBVQHmu/WvhIWE4cE1GBzhJNFicDeYhnwp6Rl35BcAIM3YOQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/tslint/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==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "dependencies": { - "color-name": "1.1.3" + "engines": { + "node": ">=8" } }, - "node_modules/tslint/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/tslint/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, - "node_modules/tslint/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": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, - "node_modules/tslint/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/tslint/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/tslint/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==", + "node_modules/spawnd": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/spawnd/-/spawnd-6.2.0.tgz", + "integrity": "sha512-qX/I4lQy4KgVEcNle0kuc4FxFWHISzBhZW1YemPfwmrmQjyZmfTK/OhBKkhrD2ooAaFZEm1maEBLE6/6enwt+g==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "exit": "^0.1.2", + "signal-exit": "^3.0.7", + "tree-kill": "^1.2.2" } }, - "node_modules/tslint/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { - "tslib": "^1.8.1" + "escape-string-regexp": "^2.0.0" }, - "peerDependencies": { - "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + "engines": { + "node": ">=10" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } }, - "node_modules/type-check": { - "version": "0.3.2", + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2" + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=10" } }, - "node_modules/type-detect": { - "version": "4.0.8", + "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": ">=4" + "node": ">=8" } }, - "node_modules/type-fest": { - "version": "0.21.3", + "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 OR CC0-1.0)", - "engines": { - "node": ">=10" + "dependencies": { + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=8" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, "engines": { - "node": ">=4.2.0" + "node": ">=8" } }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" + "engines": { + "node": ">=6" } }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { - "node": ">= 4.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "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, "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "8.1.0", + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", "dev": true, - "license": "ISC", "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" }, "engines": { - "node": ">=10.12.0" + "node": ">=8" } }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.3", + "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": "BSD-3-Clause", "engines": { - "node": ">= 8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } + "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 }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", + "node_modules/tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", "dev": true, - "license": "MIT", "dependencies": { - "xml-name-validator": "^3.0.0" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, - "node_modules/wait-on": { - "version": "6.0.0", + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, - "license": "MIT", "dependencies": { - "axios": "^0.21.1", - "joi": "^17.4.0", - "lodash": "^4.17.21", - "minimist": "^1.2.5", - "rxjs": "^7.1.0" - }, - "bin": { - "wait-on": "bin/wait-on" - }, - "engines": { - "node": ">=10.0.0" + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" } }, - "node_modules/walker": { - "version": "1.0.8", + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "makeerror": "1.0.12" + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" } }, - "node_modules/webidl-conversions": { - "version": "6.1.0", + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", "dev": true, - "license": "BSD-2-Clause", + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, "engines": { - "node": ">=10.4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "license": "MIT", "dependencies": { - "iconv-lite": "0.4.24" + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" } }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "dev": true, - "license": "MIT" + "node_modules/throat": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", + "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==", + "dev": true }, - "node_modules/whatwg-url": { - "version": "8.7.0", + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/which": { - "version": "2.0.2", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "ISC", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "is-number": "^7.0.0" }, "engines": { - "node": ">= 8" + "node": ">=8.0" } }, - "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/wrap-ansi": { - "version": "7.0.0", + "node_modules/tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "punycode": "^2.1.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=8" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", + "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": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "bin": { + "tree-kill": "cli.js" } }, - "node_modules/ws": { - "version": "7.5.5", + "node_modules/ts-jest": { + "version": "27.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", + "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.3.0" + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^27.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@types/jest": "^27.0.0", + "babel-jest": ">=27.0.0 <28", + "jest": "^27.0.0", + "typescript": ">=3.8 <5.0" }, "peerDependenciesMeta": { - "bufferutil": { + "@babel/core": { "optional": true }, - "utf-8-validate": { + "@types/jest": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { "optional": true } } }, - "node_modules/xml-name-validator": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/xmlchars": { - "version": "2.2.0", + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, - "license": "MIT" + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } }, - "node_modules/y18n": { - "version": "5.0.8", + "node_modules/ts-node/node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, - "license": "ISC", "engines": { - "node": ">=10" + "node": ">=0.4.0" } }, - "node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, - "node_modules/yargs": { - "version": "16.2.0", + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", "dev": true, - "license": "MIT", "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" }, "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "node_modules/tslint/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, "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "dev": true, - "license": "MIT", + "color-convert": "^1.9.0" + }, "engines": { - "node": ">=6" + "node": ">=4" } - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + }, + "node_modules/tslint/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, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, "dependencies": { - "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, - "requires": { - "color-convert": "^1.9.0" - } - }, - "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, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "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, - "requires": { - "color-name": "1.1.3" - } - }, - "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 - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/compat-data": { - "version": "7.16.0", - "dev": true - }, - "@babel/core": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "requires": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "engines": { + "node": ">=4" } }, - "@babel/helper-compilation-targets": { - "version": "7.16.3", + "node_modules/tslint/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, - "requires": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.17.5", - "semver": "^6.3.0" + "dependencies": { + "color-name": "1.1.3" } }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "node_modules/tslint/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 }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-module-imports": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-module-transforms": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.14.5", + "node_modules/tslint/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "@babel/helper-replace-supers": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-simple-access": { - "version": "7.16.0", + "node_modules/tslint/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, - "requires": { - "@babel/types": "^7.16.0" + "engines": { + "node": ">=0.8.0" } }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "node_modules/tslint/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, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.14.5", - "dev": true - }, - "@babel/helpers": { - "version": "7.16.3", - "dev": true, - "requires": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", - "@babel/types": "^7.16.0" - } - }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "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, - "requires": { - "color-convert": "^1.9.0" - } - }, - "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, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "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, - "requires": { - "color-name": "1.1.3" - } - }, - "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 - }, - "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 - }, - "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 - }, - "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, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.16.0", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - } - }, - "@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true - }, - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "dev": true - }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "dev": true, - "requires": { - "@cspotcode/source-map-consumer": "0.8.0" - } - }, - "@hapi/hoek": { - "version": "9.2.1", - "dev": true - }, - "@hapi/topo": { - "version": "5.1.0", - "dev": true, - "requires": { - "@hapi/hoek": "^9.0.0" - } - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "dev": true - }, - "@jest/console": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.3.1", - "jest-util": "^27.3.1", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/console": "^27.3.1", - "@jest/reporters": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.3.0", - "jest-config": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-resolve-dependencies": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "jest-watcher": "^27.3.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "jest-mock": "^27.3.0" - } - }, - "@jest/fake-timers": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" - } - }, - "@jest/globals": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/environment": "^27.3.1", - "@jest/types": "^27.2.5", - "expect": "^27.3.1" - } - }, - "@jest/reporters": { - "version": "27.3.1", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - } - }, - "@jest/source-map": { - "version": "27.0.6", - "dev": true, - "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" - } - }, - "@jest/test-result": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/console": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/test-result": "^27.3.1", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-runtime": "^27.3.1" - } - }, - "@jest/transform": { - "version": "27.3.1", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.2.5", - "babel-plugin-istanbul": "^6.0.0", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-util": "^27.3.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.1", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - } - }, - "@jest/types": { - "version": "27.2.5", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "@sideway/address": { - "version": "4.1.2", - "dev": true, - "requires": { - "@hapi/hoek": "^9.0.0" - } - }, - "@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "dev": true - }, - "@sideway/pinpoint": { - "version": "2.0.0", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "8.1.0", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@tootallnate/once": { - "version": "1.1.2", - "dev": true - }, - "@tsconfig/node10": { - "version": "1.0.8", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.9", - "dev": true - }, - "@tsconfig/node14": { - "version": "1.0.1", - "dev": true - }, - "@tsconfig/node16": { - "version": "1.0.2", - "dev": true - }, - "@types/babel__core": { - "version": "7.1.16", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.3", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.1", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.14.2", - "dev": true, - "requires": { - "@babel/types": "^7.3.0" - } - }, - "@types/graceful-fs": { - "version": "4.1.5", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.3", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "dev": true, - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/jest": { - "version": "27.0.2", - "dev": true, - "requires": { - "jest-diff": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, - "@types/jest-environment-puppeteer": { - "version": "4.4.1", - "dev": true, - "requires": { - "@jest/types": ">=24 <=26", - "@types/puppeteer": "*", - "jest-environment-node": ">=24 <=26" - }, - "dependencies": { - "@jest/environment": { - "version": "26.6.2", - "dev": true, - "requires": { - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2" - } - }, - "@jest/fake-timers": { - "version": "26.6.2", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@sinonjs/fake-timers": "^6.0.1", - "@types/node": "*", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" - } - }, - "@jest/types": { - "version": "26.6.2", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "@sinonjs/fake-timers": { - "version": "6.0.1", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@types/yargs": { - "version": "15.0.14", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "jest-environment-node": { - "version": "26.6.2", - "dev": true, - "requires": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" - } - }, - "jest-message-util": { - "version": "26.6.2", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.2" - } - }, - "jest-mock": { - "version": "26.6.2", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*" - } - }, - "jest-util": { - "version": "26.6.2", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "pretty-format": { - "version": "26.6.2", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - } - } - }, - "@types/node": { - "version": "16.11.7", - "dev": true - }, - "@types/prettier": { - "version": "2.4.1", - "dev": true - }, - "@types/puppeteer": { - "version": "5.4.4", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/stack-utils": { - "version": "2.0.1", - "dev": true - }, - "@types/yargs": { - "version": "16.0.4", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "20.2.1", - "dev": true - }, - "@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "dev": true, - "optional": true, - "requires": { - "@types/node": "*" - } - }, - "abab": { - "version": "2.0.5", - "dev": true - }, - "acorn": { - "version": "8.5.0", - "dev": true - }, - "acorn-globals": { - "version": "6.0.0", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "dev": true - } - } - }, - "acorn-walk": { - "version": "7.2.0", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "dev": true, - "requires": { - "debug": "4" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - } - }, - "ansi-regex": { - "version": "5.0.1", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-union": { - "version": "3.1.0", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "dev": true - }, - "axios": { - "version": "0.21.4", - "dev": true, - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "babel-jest": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^27.2.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "slash": "^3.0.0" - } - }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "dependencies": { - "istanbul-lib-instrument": { - "version": "5.1.0", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - } - } - } - }, - "babel-plugin-jest-hoist": { - "version": "27.2.0", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "dev": true, - "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - } - }, - "babel-preset-jest": { - "version": "27.2.0", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^27.2.0", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-process-hrtime": { - "version": "1.0.0", - "dev": true - }, - "browserslist": { - "version": "4.17.6", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001274", - "electron-to-chromium": "^1.3.886", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - } - }, - "bs-logger": { - "version": "0.2.6", - "dev": true, - "requires": { - "fast-json-stable-stringify": "2.x" - } - }, - "bser": { - "version": "2.1.1", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "callsites": { - "version": "3.1.0", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001279", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "char-regex": { - "version": "1.0.2", - "dev": true - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "ci-info": { - "version": "3.2.0", - "dev": true - }, - "cjs-module-lexer": { - "version": "1.2.2", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "clone-deep": { - "version": "0.2.4", - "dev": true, - "requires": { - "for-own": "^0.1.3", - "is-plain-object": "^2.0.1", - "kind-of": "^3.0.2", - "lazy-cache": "^1.0.3", - "shallow-clone": "^0.1.2" - } - }, - "co": { - "version": "4.6.0", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.1", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "5.1.0", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "dev": true - }, - "convert-source-map": { - "version": "1.8.0", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cosmiconfig": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz", - "integrity": "sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==", - "dev": true, - "requires": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "dependencies": { - "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 - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "create-require": { - "version": "1.1.1", - "dev": true - }, - "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "requires": { - "node-fetch": "2.6.7" - } - }, - "cross-spawn": { - "version": "7.0.3", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "cssom": { - "version": "0.4.4", - "dev": true - }, - "cssstyle": { - "version": "2.3.0", - "dev": true, - "requires": { - "cssom": "~0.3.6" - }, - "dependencies": { - "cssom": { - "version": "0.3.8", - "dev": true - } - } - }, - "cwd": { - "version": "0.10.0", - "dev": true, - "requires": { - "find-pkg": "^0.1.2", - "fs-exists-sync": "^0.1.0" - } - }, - "data-urls": { - "version": "2.0.0", - "dev": true, - "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decimal.js": { - "version": "10.3.1", - "dev": true - }, - "dedent": { - "version": "0.7.0", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "dev": true - }, - "deepmerge": { - "version": "4.2.2", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "dev": true - }, - "detect-newline": { - "version": "3.1.0", - "dev": true - }, - "devtools-protocol": { - "version": "0.0.1082910", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1082910.tgz", - "integrity": "sha512-RqoZ2GmqaNxyx+99L/RemY5CkwG9D0WEfOKxekwCRXOGrDCep62ngezEJUVMq6rISYQ+085fJnWDQqGHlxVNww==", - "dev": true - }, - "didcomm": { - "version": "file:../pkg" - }, - "diff": { - "version": "4.0.2", - "dev": true - }, - "diff-sequences": { - "version": "27.0.6", - "dev": true - }, - "domexception": { - "version": "2.0.1", - "dev": true, - "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "dev": true - } - } - }, - "electron-to-chromium": { - "version": "1.3.894", - "dev": true - }, - "emittery": { - "version": "0.8.1", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escalade": { - "version": "3.1.1", - "dev": true - }, - "escape-string-regexp": { - "version": "2.0.0", - "dev": true - }, - "escodegen": { - "version": "2.0.0", - "dev": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - } - }, - "esprima": { - "version": "4.0.1", - "dev": true - }, - "estraverse": { - "version": "5.3.0", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "dev": true - }, - "execa": { - "version": "5.1.1", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "dev": true - }, - "expand-tilde": { - "version": "1.2.2", - "dev": true, - "requires": { - "os-homedir": "^1.0.1" - } - }, - "expect": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "ansi-styles": "^5.0.0", - "jest-get-type": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, - "expect-puppeteer": { - "version": "6.0.0", - "dev": true - }, - "extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "requires": { - "@types/yauzl": "^2.9.1", - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "dev": true - }, - "fb-watchman": { - "version": "2.0.1", - "dev": true, - "requires": { - "bser": "2.1.1" - } - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "fill-range": { - "version": "7.0.1", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-file-up": { - "version": "0.1.3", - "dev": true, - "requires": { - "fs-exists-sync": "^0.1.0", - "resolve-dir": "^0.1.0" - } - }, - "find-pkg": { - "version": "0.1.2", - "dev": true, - "requires": { - "find-file-up": "^0.1.2" - } - }, - "find-process": { - "version": "1.4.5", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "commander": "^5.1.0", - "debug": "^4.1.1" - } - }, - "find-up": { - "version": "4.1.0", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "form-data": { - "version": "3.0.1", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "fs-exists-sync": { - "version": "0.1.0", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "dev": true - }, - "glob": { - "version": "7.2.0", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "global-modules": { - "version": "0.2.3", - "dev": true, - "requires": { - "global-prefix": "^0.1.4", - "is-windows": "^0.2.0" - } - }, - "global-prefix": { - "version": "0.1.5", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.0", - "ini": "^1.3.4", - "is-windows": "^0.2.0", - "which": "^1.2.12" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "globals": { - "version": "11.12.0", - "dev": true - }, - "graceful-fs": { - "version": "4.2.8", - "dev": true - }, - "has": { - "version": "1.0.3", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.3", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "html-encoding-sniffer": { - "version": "2.0.1", - "dev": true, - "requires": { - "whatwg-encoding": "^1.0.5" - } - }, - "html-escaper": { - "version": "2.0.2", - "dev": true - }, - "http-proxy-agent": { - "version": "4.0.1", - "dev": true, - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "human-signals": { - "version": "2.1.0", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "dependencies": { - "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 - } - } - }, - "import-local": { - "version": "3.0.3", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "dev": true - }, - "ini": { - "version": "1.3.8", - "dev": true - }, - "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 - }, - "is-buffer": { - "version": "1.1.6", - "dev": true - }, - "is-ci": { - "version": "2.0.0", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - }, - "dependencies": { - "ci-info": { - "version": "2.0.0", - "dev": true - } - } - }, - "is-core-module": { - "version": "2.8.0", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extendable": { - "version": "0.1.1", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true - }, - "is-generator-fn": { - "version": "2.1.0", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "dev": true - }, - "is-windows": { - "version": "0.2.0", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.0.5", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/core": "^27.3.1", - "import-local": "^3.0.2", - "jest-cli": "^27.3.1" - } - }, - "jest-changed-files": { - "version": "27.3.0", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "execa": "^5.0.0", - "throat": "^6.0.1" - } - }, - "jest-circus": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.3.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - } - }, - "jest-cli": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/core": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "import-local": "^3.0.2", - "jest-config": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - } - }, - "jest-config": { - "version": "27.3.1", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.3.1", - "@jest/types": "^27.2.5", - "babel-jest": "^27.3.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.3.1", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-jasmine2": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "micromatch": "^4.0.4", - "pretty-format": "^27.3.1" - } - }, - "jest-dev-server": { - "version": "6.0.0", - "dev": true, - "requires": { - "chalk": "^4.1.2", - "cwd": "^0.10.0", - "find-process": "^1.4.5", - "prompts": "^2.4.1", - "spawnd": "^6.0.0", - "tree-kill": "^1.2.2", - "wait-on": "^6.0.0" - } - }, - "jest-diff": { - "version": "27.3.1", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.0.6", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" - } - }, - "jest-docblock": { - "version": "27.0.6", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1" - } - }, - "jest-environment-jsdom": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1", - "jsdom": "^16.6.0" - } - }, - "jest-environment-node": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" - } - }, - "jest-environment-puppeteer": { - "version": "6.0.0", - "dev": true, - "requires": { - "chalk": "^4.1.1", - "cwd": "^0.10.0", - "jest-dev-server": "^6.0.0", - "jest-environment-node": "^27.0.1", - "merge-deep": "^3.0.3" - } - }, - "jest-get-type": { - "version": "27.3.1", - "dev": true - }, - "jest-haste-map": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.0.6", - "jest-serializer": "^27.0.6", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-jasmine2": { - "version": "27.3.1", - "dev": true, - "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.3.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", - "throat": "^6.0.1" - } - }, - "jest-leak-detector": { - "version": "27.3.1", - "dev": true, - "requires": { - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" - } - }, - "jest-matcher-utils": { - "version": "27.3.1", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" - } - }, - "jest-message-util": { - "version": "27.3.1", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.2.5", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.4", - "pretty-format": "^27.3.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "27.3.0", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "@types/node": "*" - } - }, - "jest-pnp-resolver": { - "version": "1.2.2", - "dev": true, - "requires": {} - }, - "jest-puppeteer": { - "version": "6.0.0", - "dev": true, - "requires": { - "expect-puppeteer": "^6.0.0", - "jest-environment-puppeteer": "^6.0.0" - } - }, - "jest-regex-util": { - "version": "27.0.6", - "dev": true - }, - "jest-resolve": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "jest-regex-util": "^27.0.6", - "jest-snapshot": "^27.3.1" - } - }, - "jest-runner": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.0.6", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-leak-detector": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - } - }, - "jest-runtime": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/globals": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^16.2.0" - } - }, - "jest-serializer": { - "version": "27.0.6", - "dev": true, - "requires": { - "@types/node": "*", - "graceful-fs": "^4.2.4" - } - }, - "jest-snapshot": { - "version": "27.3.1", - "dev": true, - "requires": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/parser": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.3.1", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.3.1", - "semver": "^7.3.2" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "jest-util": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", - "leven": "^3.1.0", - "pretty-format": "^27.3.1" - }, - "dependencies": { - "camelcase": { - "version": "6.2.0", - "dev": true - } - } - }, - "jest-watcher": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.3.1", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "27.3.1", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "joi": { - "version": "17.4.2", - "dev": true, - "requires": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.0", - "@sideway/formula": "^3.0.0", - "@sideway/pinpoint": "^2.0.0" - } - }, - "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 - }, - "js-yaml": { - "version": "3.14.1", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsdom": { - "version": "16.7.0", - "dev": true, - "requires": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "dev": true - }, - "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 - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "kleur": { - "version": "3.0.3", - "dev": true - }, - "lazy-cache": { - "version": "1.0.4", - "dev": true - }, - "leven": { - "version": "3.1.0", - "dev": true - }, - "levn": { - "version": "0.3.0", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "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 - }, - "locate-path": { - "version": "5.0.0", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "make-error": { - "version": "1.3.6", - "dev": true - }, - "makeerror": { - "version": "1.0.12", - "dev": true, - "requires": { - "tmpl": "1.0.5" - } - }, - "merge-deep": { - "version": "3.0.3", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "clone-deep": "^0.2.4", - "kind-of": "^3.0.2" - } - }, - "merge-stream": { - "version": "2.0.0", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "mime-db": { - "version": "1.51.0", - "dev": true - }, - "mime-types": { - "version": "2.1.34", - "dev": true, - "requires": { - "mime-db": "1.51.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true - }, - "mixin-object": { - "version": "2.0.1", - "dev": true, - "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-in": { - "version": "0.1.8", - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "dev": true - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } - } - }, - "node-int64": { - "version": "0.4.0", - "dev": true - }, - "node-modules-regexp": { - "version": "1.0.0", - "dev": true - }, - "node-releases": { - "version": "2.0.1", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "nwsapi": { - "version": "2.2.0", - "dev": true - }, - "once": { - "version": "1.4.0", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.8.3", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "dev": true - }, - "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, - "requires": { - "callsites": "^3.0.0" - } - }, - "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, - "requires": { - "@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" - } - }, - "parse-passwd": { - "version": "1.0.0", - "dev": true - }, - "parse5": { - "version": "6.0.1", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "dev": true - }, - "picomatch": { - "version": "2.3.0", - "dev": true - }, - "pirates": { - "version": "4.0.1", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "prelude-ls": { - "version": "1.1.2", - "dev": true - }, - "prettier": { - "version": "2.4.1", - "dev": true - }, - "pretty-format": { - "version": "27.3.1", - "dev": true, - "requires": { - "@jest/types": "^27.2.5", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, - "progress": { - "version": "2.0.3", - "dev": true - }, - "prompts": { - "version": "2.4.2", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "proxy-from-env": { - "version": "1.1.0", - "dev": true - }, - "psl": { - "version": "1.8.0", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "dev": true - }, - "puppeteer": { - "version": "19.6.3", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-19.6.3.tgz", - "integrity": "sha512-K03xTtGDwS6cBXX/EoqoZxglCUKcX2SLIl92fMnGMRjYpPGXoAV2yKEh3QXmXzKqfZXd8TxjjFww+tEttWv8kw==", - "dev": true, - "requires": { - "cosmiconfig": "8.0.0", - "https-proxy-agent": "5.0.1", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "puppeteer-core": "19.6.3" - } - }, - "puppeteer-core": { - "version": "19.6.3", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.6.3.tgz", - "integrity": "sha512-8MbhioSlkDaHkmolpQf9Z7ui7jplFfOFTnN8d5kPsCazRRTNIH6/bVxPskn0v5Gh9oqOBlknw0eHH0/OBQAxpQ==", - "dev": true, - "requires": { - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.1082910", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.11.0" - }, - "dependencies": { - "ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "dev": true, - "requires": {} - } - } - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "react-is": { - "version": "17.0.2", - "dev": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "require-directory": { - "version": "2.1.1", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "resolve": { - "version": "1.20.0", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-dir": { - "version": "0.1.1", - "dev": true, - "requires": { - "expand-tilde": "^1.2.2", - "global-modules": "^0.2.3" - } - }, - "resolve-from": { - "version": "5.0.0", - "dev": true - }, - "resolve.exports": { - "version": "1.1.0", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rxjs": { - "version": "7.4.0", - "dev": true, - "requires": { - "tslib": "~2.1.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "dev": true - }, - "saxes": { - "version": "5.0.1", - "dev": true, - "requires": { - "xmlchars": "^2.2.0" - } - }, - "semver": { - "version": "6.3.0", - "dev": true - }, - "shallow-clone": { - "version": "0.1.2", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^2.0.1", - "lazy-cache": "^0.2.3", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "2.0.1", - "dev": true, - "requires": { - "is-buffer": "^1.0.2" - } - }, - "lazy-cache": { - "version": "0.2.7", - "dev": true - } - } - }, - "shebang-command": { - "version": "2.0.0", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "dev": true - }, - "signal-exit": { - "version": "3.0.5", - "dev": true - }, - "sisteransi": { - "version": "1.0.5", - "dev": true - }, - "slash": { - "version": "3.0.0", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "dev": true - }, - "source-map-support": { - "version": "0.5.20", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spawnd": { - "version": "6.0.0", - "dev": true, - "requires": { - "exit": "^0.1.2", - "signal-exit": "^3.0.3", - "tree-kill": "^1.2.2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "dev": true - }, - "stack-utils": { - "version": "2.0.5", - "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, - "string-length": { - "version": "4.0.2", - "dev": true, - "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - } - }, - "string-width": { - "version": "4.2.3", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "4.0.0", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-hyperlinks": { - "version": "2.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, - "symbol-tree": { - "version": "3.2.4", - "dev": true - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - }, - "terminal-link": { - "version": "2.1.1", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, - "test-exclude": { - "version": "6.0.0", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "throat": { - "version": "6.0.1", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true - }, - "tmpl": { - "version": "1.0.5", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - } - }, - "tr46": { - "version": "2.1.0", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, - "tree-kill": { - "version": "1.2.2", - "dev": true + "engines": { + "node": ">=4" + } }, - "ts-jest": { - "version": "27.0.7", + "node_modules/tslint/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, - "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - }, "dependencies": { - "semver": { - "version": "7.3.5", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" } }, - "ts-node": { - "version": "10.4.0", + "node_modules/tslint/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, - "requires": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "yn": "3.1.1" - }, - "dependencies": { - "acorn-walk": { - "version": "8.2.0", - "dev": true - } + "bin": { + "semver": "bin/semver" } }, - "tslib": { - "version": "2.1.0", - "dev": true - }, - "tslint": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", - "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "node_modules/tslint/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, - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.3", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.13.0", - "tsutils": "^2.29.0" - }, "dependencies": { - "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, - "requires": { - "color-convert": "^1.9.0" - } - }, - "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, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "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, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "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, - "requires": { - "has-flag": "^3.0.0" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "tsutils": { + "node_modules/tsutils": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, - "requires": { + "dependencies": { "tslib": "^1.8.1" }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, - "type-check": { - "version": "0.3.2", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true }, - "type-detect": { + "node_modules/type-detect": { "version": "4.0.8", - "dev": true + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "type-fest": { + "node_modules/type-fest": { "version": "0.21.3", - "dev": true + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "typedarray-to-buffer": { + "node_modules/typedarray-to-buffer": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, - "requires": { + "dependencies": { "is-typedarray": "^1.0.0" } }, - "typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==" + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "unbzip2-stream": { + "node_modules/unbzip2-stream": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, - "requires": { + "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" } }, - "universalify": { + "node_modules/universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } }, - "url-parse": { + "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, - "requires": { + "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" } }, - "util-deprecate": { + "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "v8-to-istanbul": { - "version": "8.1.0", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, - "requires": { + "dependencies": { "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0", "source-map": "^0.7.3" }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "dev": true - } + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" } }, - "w3c-hr-time": { + "node_modules/w3c-hr-time": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", "dev": true, - "requires": { + "dependencies": { "browser-process-hrtime": "^1.0.0" } }, - "w3c-xmlserializer": { + "node_modules/w3c-xmlserializer": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, - "requires": { + "dependencies": { "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" } }, - "wait-on": { - "version": "6.0.0", + "node_modules/wait-on": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz", + "integrity": "sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw==", "dev": true, - "requires": { - "axios": "^0.21.1", - "joi": "^17.4.0", + "dependencies": { + "axios": "^0.25.0", + "joi": "^17.6.0", "lodash": "^4.17.21", "minimist": "^1.2.5", - "rxjs": "^7.1.0" + "rxjs": "^7.5.4" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=10.0.0" } }, - "walker": { + "node_modules/walker": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "requires": { + "dependencies": { "makeerror": "1.0.12" } }, - "webidl-conversions": { + "node_modules/webidl-conversions": { "version": "6.1.0", - "dev": true + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true, + "engines": { + "node": ">=10.4" + } }, - "whatwg-encoding": { + "node_modules/whatwg-encoding": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, - "requires": { + "dependencies": { "iconv-lite": "0.4.24" } }, - "whatwg-mimetype": { + "node_modules/whatwg-mimetype": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", "dev": true }, - "whatwg-url": { + "node_modules/whatwg-url": { "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, - "requires": { + "dependencies": { "lodash": "^4.7.0", "tr46": "^2.1.0", "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=10" } }, - "which": { + "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", - "dev": true + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } }, - "wrap-ansi": { + "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, - "requires": { + "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" } }, - "wrappy": { + "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 }, - "write-file-atomic": { + "node_modules/write-file-atomic": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, - "requires": { + "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", "signal-exit": "^3.0.2", "typedarray-to-buffer": "^3.1.5" } }, - "ws": { - "version": "7.5.5", + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "dev": true, - "requires": {} + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } }, - "xml-name-validator": { + "node_modules/xml-name-validator": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, - "xmlchars": { + "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 }, - "y18n": { + "node_modules/y18n": { "version": "5.0.8", - "dev": true + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } }, - "yallist": { - "version": "4.0.0", + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "requires": { + "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", @@ -9073,25 +7128,38 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "20.2.9", - "dev": true + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } }, - "yauzl": { + "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, - "requires": { + "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, - "yn": { + "node_modules/yn": { "version": "3.1.1", - "dev": true + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } } } } diff --git a/wasm/tests-js/package.json b/wasm/tests-js/package.json index d94cbc50..b4c5770e 100644 --- a/wasm/tests-js/package.json +++ b/wasm/tests-js/package.json @@ -15,6 +15,8 @@ "typescript": "^4.5.2" }, "devDependencies": { + "@hyperledger/aries-askar-nodejs": "^0.1.1", + "@hyperledger/aries-askar-shared": "^0.1.1", "@types/jest": "^27.0.2", "@types/jest-environment-puppeteer": "^4.4.1", "@types/puppeteer": "^5.4.4", diff --git a/wasm/tests-js/src/forward/try-parse-forward.test.ts b/wasm/tests-js/src/forward/try-parse-forward.test.ts index 831cae6d..1602d019 100644 --- a/wasm/tests-js/src/forward/try-parse-forward.test.ts +++ b/wasm/tests-js/src/forward/try-parse-forward.test.ts @@ -1,4 +1,3 @@ -import { Message, ParsedForward } from "didcomm"; import { MESSAGE_SIMPLE, FORWARD_MESSAGE } from "../test-vectors"; // TODO: more tests diff --git a/wasm/tests-js/src/from_prior/pack.test.ts b/wasm/tests-js/src/from_prior/pack.test.ts index 9d6604c4..3da7ab46 100644 --- a/wasm/tests-js/src/from_prior/pack.test.ts +++ b/wasm/tests-js/src/from_prior/pack.test.ts @@ -5,7 +5,7 @@ import { CHARLIE_SECRETS, CHARLIE_SECRET_AUTH_KEY_ED25519, ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, FROM_PRIOR_FULL, FROM_PRIOR_MINIMAL, } from "../test-vectors"; @@ -37,12 +37,12 @@ test.each([ CHARLIE_DID_DOC, ]); - const secretsResolver = new ExampleSecretsResolver(CHARLIE_SECRETS); + const kms = new ExampleKMS(CHARLIE_SECRETS); const [packed, kid] = await fromPrior.pack( issuerKid, didResolver, - secretsResolver + kms ); expect(typeof packed).toStrictEqual("string"); diff --git a/wasm/tests-js/src/message/errors.test.ts b/wasm/tests-js/src/message/errors.test.ts index 02245667..c113521b 100644 --- a/wasm/tests-js/src/message/errors.test.ts +++ b/wasm/tests-js/src/message/errors.test.ts @@ -5,10 +5,10 @@ import { BOB_DID, BOB_DID_DOC, ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, MESSAGE_SIMPLE, MockDIDResolver, - MockSecretsResolver, + MockKMS, } from "../test-vectors"; test.each([ @@ -78,14 +78,14 @@ test.each([ new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]) ); - const secretsResolver = new ExampleSecretsResolver(ALICE_SECRETS); + const kms = new ExampleKMS(ALICE_SECRETS); const res = MESSAGE_SIMPLE.pack_encrypted( BOB_DID, ALICE_DID, null, didResolver, - secretsResolver, + kms, { forward: false, } @@ -103,7 +103,7 @@ test.each([ return e; })(), exp_err: - "Malformed: Unable resolve sender secret: Unable get secret: Some Malformed error", + "Malformed: Unable produce authcrypt envelope: Unable to derive kw: Unable to derive key: Some Malformed error", case: "Malformed", }, { @@ -113,7 +113,7 @@ test.each([ return e; })(), exp_err: - "IO error: Unable resolve sender secret: Unable get secret: Some IoError error", + "IO error: Unable produce authcrypt envelope: Unable to derive kw: Unable to derive key: Some IoError error", case: "IoError", }, { @@ -123,7 +123,7 @@ test.each([ return e; })(), exp_err: - "Invalid state: Unable resolve sender secret: Unable get secret: Some InvalidState error", + "Invalid state: Unable produce authcrypt envelope: Unable to derive kw: Unable to derive key: Some InvalidState error", case: "InvalidState", }, { @@ -131,7 +131,7 @@ test.each([ return Error("Unknown error"); })(), exp_err: - "Invalid state: Unable resolve sender secret: Unable get secret: Unknown error", + "Invalid state: Unable produce authcrypt envelope: Unable to derive kw: Unable to derive key: Unknown error", case: "Error", }, { @@ -139,7 +139,7 @@ test.each([ return "String error"; })(), exp_err: - "Invalid state: Unable resolve sender secret: Unable get secret: String error", + "Invalid state: Unable produce authcrypt envelope: Unable to derive kw: Unable to derive key: String error", case: "String", }, { @@ -147,22 +147,33 @@ test.each([ return 123; })(), exp_err: - "Invalid state: Unable resolve sender secret: Unable get secret: JsValue(123)", + "Invalid state: Unable produce authcrypt envelope: Unable to derive kw: Unable to derive key: JsValue(123)", case: "Unusual", }, ])( - "Secrets.get_secret exception is propogated for $case", + "Secrets.derive exception is propogated for $case", async ({ err, exp_err }) => { const didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - const secretsResolver = new MockSecretsResolver( + const kms = new MockKMS( [ () => { throw err; }, ], [], - new ExampleSecretsResolver(ALICE_SECRETS) + [], + [ + () => { + throw err; + }, + ], + [ + () => { + throw err; + }, + ], + new ExampleKMS(ALICE_SECRETS) ); const res = MESSAGE_SIMPLE.pack_encrypted( @@ -170,7 +181,7 @@ test.each([ ALICE_DID, null, didResolver, - secretsResolver, + kms, { forward: false, } @@ -240,14 +251,17 @@ test.each([ async ({ err, exp_err }) => { const didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - const secretsResolver = new MockSecretsResolver( + const secretsResolver = new MockKMS( [], [ () => { throw err; }, ], - new ExampleSecretsResolver(ALICE_SECRETS) + [], + [], + [], + new ExampleKMS(ALICE_SECRETS) ); const res = MESSAGE_SIMPLE.pack_encrypted( diff --git a/wasm/tests-js/src/message/pack-encrypted.anoncrypt.test.ts b/wasm/tests-js/src/message/pack-encrypted.anoncrypt.test.ts index 1583c654..1a00028a 100644 --- a/wasm/tests-js/src/message/pack-encrypted.anoncrypt.test.ts +++ b/wasm/tests-js/src/message/pack-encrypted.anoncrypt.test.ts @@ -24,7 +24,7 @@ import { BOB_VERIFICATION_METHOD_KEY_AGREEM_X25519_2, BOB_VERIFICATION_METHOD_KEY_AGREEM_X25519_3, ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, MESSAGE_SIMPLE, } from "../test-vectors"; import { Message } from "didcomm"; @@ -90,14 +90,14 @@ test.each([ "Message.pack-encrypted anoncrypt works for $case", async ({ message, signBy, to, expMetadata }) => { const didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encrypted, metadata] = await message.pack_encrypted( to, null, signBy, didResolver, - secretResolver, + kms, { protect_sender: false, forward: false, @@ -110,12 +110,12 @@ test.each([ expect(typeof encrypted).toStrictEqual("string"); expect(metadata).toStrictEqual(expMetadata); - secretResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpacked, _] = await Message.unpack( encrypted, didResolver, - secretResolver, + kms, {} ); diff --git a/wasm/tests-js/src/message/pack-encrypted.authcrypt.test.ts b/wasm/tests-js/src/message/pack-encrypted.authcrypt.test.ts index 9e91f476..9c039c9f 100644 --- a/wasm/tests-js/src/message/pack-encrypted.authcrypt.test.ts +++ b/wasm/tests-js/src/message/pack-encrypted.authcrypt.test.ts @@ -29,10 +29,10 @@ import { CHARLIE_DID, CHARLIE_DID_DOC, ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, MESSAGE_SIMPLE, MockDIDResolver, - MockSecretsResolver, + MockKMS, } from "../test-vectors"; import { Message } from "didcomm"; @@ -69,14 +69,14 @@ test.each([ "Message.pack-encrypted authcrypt works for $case", async ({ message, from, to, expMetadata }) => { const didResolver = new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]); - let secretResolver = new ExampleSecretsResolver(ALICE_SECRETS); + let kms = new ExampleKMS(ALICE_SECRETS); const [encrypted, metadata] = await message.pack_encrypted( to, from, null, didResolver, - secretResolver, + kms, { protect_sender: false, forward: false, @@ -89,12 +89,12 @@ test.each([ expect(typeof encrypted).toStrictEqual("string"); expect(metadata).toStrictEqual(expMetadata); - secretResolver = new ExampleSecretsResolver(BOB_SECRETS); + kms = new ExampleKMS(BOB_SECRETS); const [unpacked, _] = await Message.unpack( encrypted, didResolver, - secretResolver, + kms, {} ); @@ -106,7 +106,7 @@ test.each([ { case: "from is not a did or did url", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: "not-a-did", to: BOB_DID, @@ -116,7 +116,7 @@ test.each([ { case: "Signer DID not a did", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: ALICE_DID, to: "not-a-did", @@ -126,7 +126,7 @@ test.each([ { case: "Signer DID URL not found", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: ALICE_DID, to: BOB_DID, @@ -137,7 +137,7 @@ test.each([ { case: "from differs message from", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: BOB_DID, to: BOB_DID, @@ -148,7 +148,7 @@ test.each([ { case: "to differs message to", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, CHARLIE_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: ALICE_DID, to: CHARLIE_DID, @@ -159,7 +159,7 @@ test.each([ { case: "from unknown did", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: new Message({ id: "1234567890", typ: "application/didcomm-plain+json", @@ -178,7 +178,7 @@ test.each([ { case: "from unknown did url", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: ALICE_DID + "#unknown-key", to: BOB_DID, @@ -188,7 +188,7 @@ test.each([ { case: "from unknown did url", didResolver: new ExampleDIDResolver([ALICE_DID_DOC, BOB_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, from: "did:example:alice#key-x25519-not-in-secrets-1", to: BOB_DID, @@ -199,7 +199,7 @@ test.each([ "Message.pack-encrypted handles $case", async ({ didResolver, - secretsResolver, + kms, message, from, to, @@ -211,7 +211,7 @@ test.each([ from, signBy, didResolver, - secretsResolver, + kms, {} ); await expect(res).rejects.toThrowError(expError); diff --git a/wasm/tests-js/src/message/pack-signed.test.ts b/wasm/tests-js/src/message/pack-signed.test.ts index f219795d..84e1fe7c 100644 --- a/wasm/tests-js/src/message/pack-signed.test.ts +++ b/wasm/tests-js/src/message/pack-signed.test.ts @@ -5,9 +5,9 @@ import { PLAINTEXT_MSG_SIMPLE, MESSAGE_MINIMAL, MockDIDResolver, - MockSecretsResolver, + MockKMS, PLAINTEXT_MSG_MINIMAL, - ExampleSecretsResolver, + ExampleKMS, ALICE_SECRETS, ALICE_DID, ALICE_AUTH_METHOD_25519, @@ -46,12 +46,12 @@ test.each([ "Message.pack-signed works for $case", async ({ message, signBy, expMetadata }) => { const didResolver = new ExampleDIDResolver([ALICE_DID_DOC]); - const secretResolver = new ExampleSecretsResolver(ALICE_SECRETS); + const kms = new ExampleKMS(ALICE_SECRETS); const [signed, metadata] = await message.pack_signed( signBy, didResolver, - secretResolver + kms ); expect(typeof signed).toStrictEqual("string"); @@ -60,7 +60,7 @@ test.each([ const [unpacked, _] = await Message.unpack( signed, didResolver, - secretResolver, + kms, {} ); expect(unpacked.as_value()).toStrictEqual(message.as_value()); @@ -71,7 +71,7 @@ test.each([ { case: "Signer DID not found", didResolver: new ExampleDIDResolver([ALICE_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, sign_by: "did:example:unknown", expError: "DID not resolved: Signer did not found", @@ -79,7 +79,7 @@ test.each([ { case: "Signer DID not a did", didResolver: new ExampleDIDResolver([ALICE_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, sign_by: "not-a-did", expError: @@ -88,7 +88,7 @@ test.each([ { case: "Signer DID URL not found", didResolver: new ExampleDIDResolver([ALICE_DID_DOC]), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, sign_by: `${ALICE_DID}#unknown`, expError: "DID URL not found: Signer key id not found in did doc", @@ -103,7 +103,7 @@ test.each([ ], new ExampleDIDResolver([ALICE_DID_DOC]) ), - secretsResolver: new ExampleSecretsResolver(ALICE_SECRETS), + kms: new ExampleKMS(ALICE_SECRETS), message: MESSAGE_SIMPLE, sign_by: ALICE_DID, expError: @@ -112,31 +112,37 @@ test.each([ { case: "SecretsResolver::get_secrets error", didResolver: new ExampleDIDResolver([ALICE_DID_DOC]), - secretsResolver: new MockSecretsResolver( + kms: new MockKMS( [ () => { throw Error("Unknown error"); }, ], [], - new ExampleSecretsResolver(ALICE_SECRETS) + [], + [], + [], + new ExampleKMS(ALICE_SECRETS) ), message: MESSAGE_SIMPLE, sign_by: ALICE_DID, expError: - "Invalid state: Unable get secret: Unable get secret: Unknown error", + "Invalid state: Signer secret not found: Unable get key alg: Unknown error", }, { case: "SecretsResolver::find_secrets error", didResolver: new ExampleDIDResolver([ALICE_DID_DOC]), - secretsResolver: new MockSecretsResolver( + kms: new MockKMS( [], [ () => { throw Error("Unknown error"); }, ], - new ExampleSecretsResolver(ALICE_SECRETS) + [], + [], + [], + new ExampleKMS(ALICE_SECRETS) ), message: MESSAGE_SIMPLE, sign_by: ALICE_DID, @@ -145,8 +151,8 @@ test.each([ }, ])( "Message.pack-signed handles $case", - async ({ didResolver, secretsResolver, message, sign_by, expError }) => { - const res = message.pack_signed(sign_by, didResolver, secretsResolver); + async ({ didResolver, kms, message, sign_by, expError }) => { + const res = message.pack_signed(sign_by, didResolver, kms); await expect(res).rejects.toThrowError(expError); } ); diff --git a/wasm/tests-js/src/message/unpack.test.ts b/wasm/tests-js/src/message/unpack.test.ts index 99fdc9e7..15c46eb7 100644 --- a/wasm/tests-js/src/message/unpack.test.ts +++ b/wasm/tests-js/src/message/unpack.test.ts @@ -5,7 +5,7 @@ import { BOB_SECRETS, CHARLIE_DID_DOC, ExampleDIDResolver, - ExampleSecretsResolver, + ExampleKMS, IMESSAGE_FROM_PRIOR, IMESSAGE_MINIMAL, IMESSAGE_SIMPLE, @@ -98,12 +98,12 @@ test.each([ CHARLIE_DID_DOC, ]); - const secretsResolver = new ExampleSecretsResolver(BOB_SECRETS); + const kms = new ExampleKMS(BOB_SECRETS); const [unpacked, metadata] = await Message.unpack( msg, didResolver, - secretsResolver, + kms, options ); diff --git a/wasm/tests-js/src/test-vectors/index.ts b/wasm/tests-js/src/test-vectors/index.ts index 128c18ca..bda82aa9 100644 --- a/wasm/tests-js/src/test-vectors/index.ts +++ b/wasm/tests-js/src/test-vectors/index.ts @@ -6,4 +6,4 @@ export * from "./from_prior_jwt"; export * from "./message"; export * from "./plaintext"; export * from "./secrets"; -export * from "./secrets_resolver"; +export * from "./kms"; diff --git a/wasm/tests-js/src/test-vectors/kms.ts b/wasm/tests-js/src/test-vectors/kms.ts new file mode 100644 index 00000000..4543b922 --- /dev/null +++ b/wasm/tests-js/src/test-vectors/kms.ts @@ -0,0 +1,193 @@ +import {KeyManagementService, KnownKeyAlg} from "didcomm"; +import {ariesAskar, Ecdh1PU, Jwk, Key, KeyAlgs, SigAlgs} from "@hyperledger/aries-askar-nodejs" +import { Secret} from "./secret"; + +type KnownSignatureType = + /// Standard signature output for ed25519 + "EdDSA" | + /// Elliptic curve DSA using P-256 and SHA-256 + "ES256" | + /// Elliptic curve DSA using K-256 and SHA-256 + "ES256K" | string + +/* tslint:disable:max-classes-per-file */ +class KidOrJwk { + Kid?: string + X25519Key?: string + P256Key?: string +} + +export class ExampleKMS implements KeyManagementService { + knownSecrets: Secret[]; + + constructor(knownSecrets: Secret[]) { + this.knownSecrets = knownSecrets; + } + + _getKey(keyId: string): Key { + const res = this.knownSecrets.find((secret) => secret.id === keyId); + if (!res) + throw new Error(`Unable to find key with id: ${keyId}`) + return Key.fromJwk({jwk: Jwk.fromJson(res.privateKeyJwk)}) + } + + _resolveKey(x: KidOrJwk): Key { + if (x.Kid) { + return this._getKey(x.Kid) + } else if (x.X25519Key) { + return Key.fromJwk({jwk: Jwk.fromString(x.X25519Key) }) + } else if (x.P256Key) { + return Key.fromJwk({jwk: Jwk.fromString(x.P256Key) }) + } else { + throw new Error(`Invalid KidOrJwk: ${JSON.stringify(x)}`) + } + } + + async get_key_alg(secretId: string): Promise { + const key = this._getKey(secretId); + switch (key.algorithm) { + case "ed25519": + return "Ed25519"; + case "x25519": + return "X25519"; + case "p256": + return "P256"; + case "k256": + return "K256"; + default: + return "Unsupported" + } + } + + async find_secrets(secretIds: string[]): Promise { + return secretIds.filter((id) => + this.knownSecrets.find((secret) => secret.id === id) + ); + } + + async create_signature(secretId: string, message: Uint8Array, sigType: KnownSignatureType | null): Promise { + const key = this._getKey(secretId); + let sigAlg: SigAlgs + switch (sigType) { + case "EdDSA": + sigAlg = SigAlgs.EdDSA; + break; + case "ES256": + sigAlg = SigAlgs.ES256; + break; + case "ES256K": + sigAlg = SigAlgs.ES256K; + break; + default: + throw new Error("Unknown signature type") + } + return key.signMessage({message, sigType: sigAlg}) + } + + async derive_aes_key_using_ecdh_1pu(ephemKey: KidOrJwk, sendKey: KidOrJwk, recipKey: KidOrJwk, algId: Uint8Array, apu: Uint8Array, apv: Uint8Array, ccTag: Uint8Array, receive: boolean): Promise { + const ephemeralKey = this._resolveKey(ephemKey); + const senderKey = this._resolveKey(sendKey); + const recipientKey = this._resolveKey(recipKey); + + return new Key(ariesAskar.keyDeriveEcdh1pu({ + algorithm: KeyAlgs.AesA256Kw, + ephemeralKey, + recipientKey, + senderKey, + algId, + apv, + apu, + ccTag, + receive, + })).secretBytes + } + + async derive_aes_key_using_ecdh_es(ephemKey: KidOrJwk, recipKey: KidOrJwk, algId: Uint8Array, apu: Uint8Array, apv: Uint8Array, receive: boolean): Promise { + const ephemeralKey = this._resolveKey(ephemKey); + const recipientKey = this._resolveKey(recipKey); + + const key = new Key(ariesAskar.keyDeriveEcdhEs({ + algorithm: KeyAlgs.AesA256Kw, + ephemeralKey, + recipientKey, + algId, + apv, + apu, + receive, + })) + + return key.secretBytes + } +} + +type MockGetKeyAlg = (secretId: string) => KnownKeyAlg; +type MockFind = (secretIds: string[]) => string[]; +type MockCreateSignature = (secretId: string, message: Uint8Array, sigType: KnownSignatureType | null) => Uint8Array; +type MockDeriveECDH1PU = (ephemKey: KidOrJwk, sendKey: KidOrJwk, recipKey: KidOrJwk, alg: Uint8Array, apu: Uint8Array, apv: Uint8Array, ccTag: Uint8Array, receive: boolean) => Uint8Array +type MockDeriveECDHES = (ephemKey: KidOrJwk, recipKey: KidOrJwk, alg: Uint8Array, apu: Uint8Array, apv: Uint8Array, receive: boolean) => Uint8Array + +/* tslint:disable:max-classes-per-file */ +export class MockKMS implements KeyManagementService { + getKeyAlgHandlers: MockGetKeyAlg[]; + findHandlers: MockFind[]; + createSignatureHandlers: MockCreateSignature[]; + createDeriveECDH1PUHandlers: MockDeriveECDH1PU[]; + createDeriveECDHESHandlers: MockDeriveECDHES[]; + fallback: KeyManagementService; + + constructor( + getKeyAlgHandlers: MockGetKeyAlg[], + findHandlers: MockFind[], + createSignatureHandlers: MockCreateSignature[], + createDeriveECDH1PUHandlers: MockDeriveECDH1PU[], + createDeriveECDHESHandlers: MockDeriveECDHES[], + fallback: KeyManagementService + ) { + this.getKeyAlgHandlers = getKeyAlgHandlers; + this.findHandlers = findHandlers; + this.createSignatureHandlers = createSignatureHandlers; + this.createDeriveECDH1PUHandlers = createDeriveECDH1PUHandlers; + this.createDeriveECDHESHandlers = createDeriveECDHESHandlers; + this.fallback = fallback; + } + + async get_key_alg(secretId: string): Promise { + const handler = this.getKeyAlgHandlers.pop(); + + return handler + ? handler(secretId) + : await this.fallback.get_key_alg(secretId); + } + + async find_secrets(secretIds: string[]): Promise { + const handler = this.findHandlers.pop(); + + return handler + ? handler(secretIds) + : await this.fallback.find_secrets(secretIds); + } + + async create_signature(secretId: string, message: Uint8Array, sigType: KnownSignatureType | null): Promise { + const handler = this.createSignatureHandlers.pop(); + + return handler + ? handler(secretId, message, sigType) + : await this.fallback.create_signature(secretId, message, sigType); + } + + async derive_aes_key_using_ecdh_1pu(ephemKey: KidOrJwk, sendKey: KidOrJwk, recipKey: KidOrJwk, alg: Uint8Array, apu: Uint8Array, apv: Uint8Array, ccTag: Uint8Array, receive: boolean): Promise { + const handler = this.createDeriveECDH1PUHandlers.pop(); + + return handler + ? handler(ephemKey, sendKey, recipKey, alg, apu, apv, ccTag, receive) + : await this.fallback.derive_aes_key_using_ecdh_1pu(ephemKey, sendKey, recipKey, alg, apu, apv, ccTag, receive); + } + + async derive_aes_key_using_ecdh_es(ephemKey: KidOrJwk, recipKey: KidOrJwk, alg: Uint8Array, apu: Uint8Array, apv: Uint8Array, receive: boolean): Promise { + const handler = this.createDeriveECDHESHandlers.pop(); + + return handler + ? handler(ephemKey, recipKey, alg, apu, apv, receive) + : await this.fallback.derive_aes_key_using_ecdh_es(ephemKey, recipKey, alg, apu, apv, receive); + } +} diff --git a/wasm/tests-js/src/test-vectors/secret.ts b/wasm/tests-js/src/test-vectors/secret.ts new file mode 100644 index 00000000..9f426593 --- /dev/null +++ b/wasm/tests-js/src/test-vectors/secret.ts @@ -0,0 +1,20 @@ +type SecretType = + "JsonWebKey2020" | "X25519KeyAgreementKey2019" + | "Ed25519VerificationKey2018" | "EcdsaSecp256k1VerificationKey2019" | string + +export class Secret { + /** + * A key ID identifying a secret (private key). + */ + id: string; + + /** + * Must have the same semantics as type ('type' field) of the corresponding method in DID Doc containing a public key. + */ + type: SecretType; + + /** + * Possible value of the secret (private key) + */ + privateKeyJwk: any; +} diff --git a/wasm/tests-js/src/test-vectors/secrets/alice.ts b/wasm/tests-js/src/test-vectors/secrets/alice.ts index 214a3d80..43960b78 100644 --- a/wasm/tests-js/src/test-vectors/secrets/alice.ts +++ b/wasm/tests-js/src/test-vectors/secrets/alice.ts @@ -1,4 +1,4 @@ -import { Secret } from "didcomm"; +import { Secret } from "../secret"; export const ALICE_SECRETS: Secret[] = [ { diff --git a/wasm/tests-js/src/test-vectors/secrets/bob.ts b/wasm/tests-js/src/test-vectors/secrets/bob.ts index 4a874289..b12acebb 100644 --- a/wasm/tests-js/src/test-vectors/secrets/bob.ts +++ b/wasm/tests-js/src/test-vectors/secrets/bob.ts @@ -1,4 +1,4 @@ -import { Secret } from "didcomm"; +import { Secret } from "../secret"; export const BOB_SECRET_KEY_AGREEMENT_KEY_X25519_1: Secret = { id: "did:example:bob#key-x25519-1", diff --git a/wasm/tests-js/src/test-vectors/secrets/charlie.ts b/wasm/tests-js/src/test-vectors/secrets/charlie.ts index c60c1a69..56c1be91 100644 --- a/wasm/tests-js/src/test-vectors/secrets/charlie.ts +++ b/wasm/tests-js/src/test-vectors/secrets/charlie.ts @@ -1,4 +1,4 @@ -import { Secret } from "didcomm"; +import { Secret } from "../secret"; export const CHARLIE_SECRET_KEY_AGREEMENT_KEY_X25519: Secret = { id: "did:example:charlie#key-x25519-1", diff --git a/wasm/tests-js/src/test-vectors/secrets/charlie_rotated_to_alice.ts b/wasm/tests-js/src/test-vectors/secrets/charlie_rotated_to_alice.ts index e43c1be1..26c93e86 100644 --- a/wasm/tests-js/src/test-vectors/secrets/charlie_rotated_to_alice.ts +++ b/wasm/tests-js/src/test-vectors/secrets/charlie_rotated_to_alice.ts @@ -1,4 +1,4 @@ -import { Secret } from "didcomm"; +import { Secret } from "../secret"; export const CHARLIE_ROTATED_TO_ALICE_SECRETS: Secret[] = [ { diff --git a/wasm/tests-js/src/test-vectors/secrets_resolver.ts b/wasm/tests-js/src/test-vectors/secrets_resolver.ts deleted file mode 100644 index ee49e645..00000000 --- a/wasm/tests-js/src/test-vectors/secrets_resolver.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Secret, SecretsResolver } from "didcomm"; - -export class ExampleSecretsResolver implements SecretsResolver { - knownSecrets: Secret[]; - - constructor(knownSecrets: Secret[]) { - this.knownSecrets = knownSecrets; - } - - async get_secret(secretId: string): Promise { - const res = this.knownSecrets.find((secret) => secret.id === secretId); - return res ? res : null; - } - - async find_secrets(secretIds: string[]): Promise { - return secretIds.filter((id) => - this.knownSecrets.find((secret) => secret.id === id) - ); - } -} - -type MockGet = (secretId: string) => Secret | null; -type MockFind = (secretIds: string[]) => string[]; - -/* tslint:disable:max-classes-per-file */ -export class MockSecretsResolver implements SecretsResolver { - getHandlers: MockGet[]; - findHandlers: MockFind[]; - fallback: SecretsResolver; - - constructor( - getHandlers: MockGet[], - findHandlers: MockFind[], - fallback: SecretsResolver - ) { - this.getHandlers = getHandlers; - this.findHandlers = findHandlers; - this.fallback = fallback; - } - - async get_secret(secretId: string): Promise { - const handler = this.getHandlers.pop(); - - return handler - ? handler(secretId) - : await this.fallback.get_secret(secretId); - } - - async find_secrets(secretIds: string[]): Promise { - const handler = this.findHandlers.pop(); - - return handler - ? handler(secretIds) - : await this.fallback.find_secrets(secretIds); - } -}