@nx.js/runtime 0.0.61 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +67 -65
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1767,7 +1767,8 @@ interface AesCbcParams {
|
|
|
1767
1767
|
name: "AES-CBC";
|
|
1768
1768
|
iv: BufferSource;
|
|
1769
1769
|
}
|
|
1770
|
-
interface AesCtrParams
|
|
1770
|
+
interface AesCtrParams {
|
|
1771
|
+
name: "AES-CTR";
|
|
1771
1772
|
counter: BufferSource;
|
|
1772
1773
|
length: number;
|
|
1773
1774
|
}
|
|
@@ -1785,18 +1786,12 @@ interface AesGcmParams extends Algorithm {
|
|
|
1785
1786
|
iv: BufferSource;
|
|
1786
1787
|
tagLength?: number;
|
|
1787
1788
|
}
|
|
1788
|
-
interface AesKeyAlgorithm extends KeyAlgorithm {
|
|
1789
|
-
length: number;
|
|
1790
|
-
}
|
|
1791
1789
|
interface AesKeyGenParams extends Algorithm {
|
|
1792
1790
|
length: number;
|
|
1793
1791
|
}
|
|
1794
1792
|
interface Algorithm {
|
|
1795
1793
|
name: string;
|
|
1796
1794
|
}
|
|
1797
|
-
interface EcKeyAlgorithm extends KeyAlgorithm {
|
|
1798
|
-
namedCurve: NamedCurve;
|
|
1799
|
-
}
|
|
1800
1795
|
interface EcKeyGenParams extends Algorithm {
|
|
1801
1796
|
namedCurve: NamedCurve;
|
|
1802
1797
|
}
|
|
@@ -1818,10 +1813,6 @@ interface HmacImportParams extends Algorithm {
|
|
|
1818
1813
|
hash: HashAlgorithmIdentifier;
|
|
1819
1814
|
length?: number;
|
|
1820
1815
|
}
|
|
1821
|
-
interface HmacKeyAlgorithm extends KeyAlgorithm {
|
|
1822
|
-
hash: KeyAlgorithm;
|
|
1823
|
-
length: number;
|
|
1824
|
-
}
|
|
1825
1816
|
interface HmacKeyGenParams extends Algorithm {
|
|
1826
1817
|
hash: HashAlgorithmIdentifier;
|
|
1827
1818
|
length?: number;
|
|
@@ -1846,42 +1837,31 @@ interface JsonWebKey {
|
|
|
1846
1837
|
x?: string;
|
|
1847
1838
|
y?: string;
|
|
1848
1839
|
}
|
|
1849
|
-
interface KeyAlgorithm {
|
|
1850
|
-
name: string;
|
|
1851
|
-
}
|
|
1852
1840
|
type NamedCurve = string;
|
|
1853
1841
|
type AlgorithmIdentifier = Algorithm | string;
|
|
1854
1842
|
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
1855
1843
|
type KeyType = "private" | "public" | "secret";
|
|
1856
1844
|
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
}
|
|
1877
|
-
interface RsaOtherPrimesInfo {
|
|
1878
|
-
d?: string;
|
|
1879
|
-
r?: string;
|
|
1880
|
-
t?: string;
|
|
1881
|
-
}
|
|
1882
|
-
interface RsaPssParams extends Algorithm {
|
|
1883
|
-
saltLength: number;
|
|
1884
|
-
}
|
|
1845
|
+
type KeyAlgorithmIdentifier = (AesCbcParams | AesCtrParams | AesXtsParams)["name"];
|
|
1846
|
+
type EncryptionAlgorithm<Cipher extends KeyAlgorithmIdentifier> = {
|
|
1847
|
+
"AES-CBC": AesCbcParams;
|
|
1848
|
+
"AES-CTR": AesCtrParams;
|
|
1849
|
+
"AES-XTS": AesXtsParams;
|
|
1850
|
+
}[Cipher];
|
|
1851
|
+
type KeyImportParams<Cipher extends KeyAlgorithmIdentifier> = {
|
|
1852
|
+
name: Cipher;
|
|
1853
|
+
} & {
|
|
1854
|
+
"AES-CBC": {};
|
|
1855
|
+
"AES-CTR": {};
|
|
1856
|
+
"AES-XTS": {};
|
|
1857
|
+
}[Cipher];
|
|
1858
|
+
type KeyGenParams<Cipher extends KeyAlgorithmIdentifier> = {
|
|
1859
|
+
name: Cipher;
|
|
1860
|
+
} & {
|
|
1861
|
+
"AES-CBC": AesKeyGenParams;
|
|
1862
|
+
"AES-CTR": AesKeyGenParams;
|
|
1863
|
+
"AES-XTS": AesKeyGenParams;
|
|
1864
|
+
}[Cipher];
|
|
1885
1865
|
type BlobPart = string | Blob | BufferSource;
|
|
1886
1866
|
interface BlobPropertyBag {
|
|
1887
1867
|
endings?: "native" | "transparent";
|
|
@@ -2689,8 +2669,12 @@ declare class Response extends Body {
|
|
|
2689
2669
|
* @see https://developer.mozilla.org/docs/Web/API/fetch
|
|
2690
2670
|
*/
|
|
2691
2671
|
declare function fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
2692
|
-
|
|
2693
|
-
|
|
2672
|
+
interface CryptoKeyPair<Cipher extends KeyAlgorithmIdentifier> {
|
|
2673
|
+
privateKey: CryptoKey<Cipher>;
|
|
2674
|
+
publicKey: CryptoKey<Cipher>;
|
|
2675
|
+
}
|
|
2676
|
+
declare class CryptoKey<Cipher extends KeyAlgorithmIdentifier> {
|
|
2677
|
+
readonly algorithm: KeyGenParams<Cipher>;
|
|
2694
2678
|
readonly extractable: boolean;
|
|
2695
2679
|
readonly type: KeyType;
|
|
2696
2680
|
readonly usages: KeyUsage[];
|
|
@@ -2774,9 +2758,9 @@ declare class SubtleCrypto {
|
|
|
2774
2758
|
* @returns A Promise which will be fulfilled with the decrypted data (also known as "plaintext") as an `ArrayBuffer`.
|
|
2775
2759
|
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt
|
|
2776
2760
|
*/
|
|
2777
|
-
decrypt(algorithm:
|
|
2778
|
-
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey
|
|
2779
|
-
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey
|
|
2761
|
+
decrypt<Cipher extends KeyAlgorithmIdentifier>(algorithm: EncryptionAlgorithm<Cipher>, key: CryptoKey<Cipher>, data: BufferSource): Promise<ArrayBuffer>;
|
|
2762
|
+
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey<never>, length: number): Promise<ArrayBuffer>;
|
|
2763
|
+
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey<never>, derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey<never>>;
|
|
2780
2764
|
/**
|
|
2781
2765
|
* Generates a digest of the given data. A digest is a short fixed-length value
|
|
2782
2766
|
* derived from some variable-length input. Cryptographic digests should exhibit
|
|
@@ -2800,27 +2784,32 @@ declare class SubtleCrypto {
|
|
|
2800
2784
|
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest
|
|
2801
2785
|
*/
|
|
2802
2786
|
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2787
|
+
/**
|
|
2788
|
+
* Encrypts plaintext data.
|
|
2789
|
+
*
|
|
2790
|
+
* It takes as its arguments a key to encrypt with, some algorithm-specific parameters, and the data to encrypt (also known as "plaintext").
|
|
2791
|
+
*
|
|
2792
|
+
* @returns A Promise which will be fulfilled with the encrypted data (also known as "ciphertext") as an `ArrayBuffer`.
|
|
2793
|
+
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt
|
|
2794
|
+
*/
|
|
2795
|
+
encrypt<Cipher extends KeyAlgorithmIdentifier>(algorithm: EncryptionAlgorithm<Cipher>, key: CryptoKey<Cipher>, data: BufferSource): Promise<ArrayBuffer>;
|
|
2796
|
+
exportKey(format: "jwk", key: CryptoKey<never>): Promise<JsonWebKey>;
|
|
2797
|
+
exportKey(format: "pkcs8" | "raw" | "spki", key: CryptoKey<never>): Promise<ArrayBuffer>;
|
|
2798
|
+
generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: readonly ("sign" | "verify")[]): Promise<CryptoKeyPair<never>>;
|
|
2799
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKeyPair<never>>;
|
|
2800
|
+
generateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKey<never>>;
|
|
2801
|
+
/**
|
|
2802
|
+
* Takes as input a key in an external, portable format and returns a
|
|
2803
|
+
* {@link CryptoKey | `CryptoKey`} instance which can be used in the Web Crypto API.
|
|
2815
2804
|
*
|
|
2816
2805
|
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey
|
|
2817
2806
|
*/
|
|
2818
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm:
|
|
2819
|
-
importKey(format: "pkcs8" | "raw" | "spki", keyData: BufferSource, algorithm:
|
|
2820
|
-
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey
|
|
2821
|
-
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey
|
|
2822
|
-
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey
|
|
2823
|
-
wrapKey(format: KeyFormat, key: CryptoKey
|
|
2807
|
+
importKey<Cipher extends KeyAlgorithmIdentifier>(format: "jwk", keyData: JsonWebKey, algorithm: Cipher | KeyImportParams<Cipher>, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey<Cipher>>;
|
|
2808
|
+
importKey<Cipher extends KeyAlgorithmIdentifier>(format: "pkcs8" | "raw" | "spki", keyData: BufferSource, algorithm: Cipher | KeyImportParams<Cipher>, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey<Cipher>>;
|
|
2809
|
+
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey<never>, data: BufferSource): Promise<ArrayBuffer>;
|
|
2810
|
+
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey<never>, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey<never>>;
|
|
2811
|
+
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey<never>, signature: BufferSource, data: BufferSource): Promise<boolean>;
|
|
2812
|
+
wrapKey(format: KeyFormat, key: CryptoKey<never>, wrappingKey: CryptoKey<never>, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
|
|
2824
2813
|
}
|
|
2825
2814
|
interface ConsoleOptions {
|
|
2826
2815
|
print?(s: string): void;
|
|
@@ -3459,6 +3448,19 @@ declare function removeEventListener(type: string, callback: EventListenerOrEven
|
|
|
3459
3448
|
* @see {@link https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent | MDN Reference}
|
|
3460
3449
|
*/
|
|
3461
3450
|
declare function dispatchEvent(event: Event): boolean;
|
|
3451
|
+
/**
|
|
3452
|
+
* Decodes a string of data which has been encoded using Base64 encoding.
|
|
3453
|
+
*
|
|
3454
|
+
* @see https://developer.mozilla.org/docs/Web/API/Window/atob
|
|
3455
|
+
*/
|
|
3456
|
+
declare function atob(s: string): string;
|
|
3457
|
+
/**
|
|
3458
|
+
* Creates a Base64-encoded ASCII string from a binary string (i.e., a string in
|
|
3459
|
+
* which each character in the string is treated as a byte of binary data).
|
|
3460
|
+
*
|
|
3461
|
+
* @see https://developer.mozilla.org/docs/Web/API/Window/btoa
|
|
3462
|
+
*/
|
|
3463
|
+
declare function btoa(s: string): string;
|
|
3462
3464
|
/**
|
|
3463
3465
|
* @see https://developer.mozilla.org/docs/Web/API/Performance_API
|
|
3464
3466
|
*/
|