first commit
This commit is contained in:
21
node_modules/@types/crypto-js/LICENSE
generated
vendored
Normal file
21
node_modules/@types/crypto-js/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/crypto-js/README.md
generated
vendored
Normal file
15
node_modules/@types/crypto-js/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/crypto-js`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for crypto-js (https://github.com/brix/crypto-js).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/crypto-js.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 22 Jan 2024 06:37:11 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Michael Zabka](https://github.com/misak113), [Max Lysenko](https://github.com/maximlysenko), [Brendan Early](https://github.com/mymindstorm), and [Doma](https://github.com/SevenOutman).
|
||||
3
node_modules/@types/crypto-js/aes.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/aes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.AES;
|
||||
3
node_modules/@types/crypto-js/blowfish.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/blowfish.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.Blowfish;
|
||||
3
node_modules/@types/crypto-js/core.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/core.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS;
|
||||
3
node_modules/@types/crypto-js/enc-base64.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/enc-base64.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.enc.Base64;
|
||||
3
node_modules/@types/crypto-js/enc-base64url.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/enc-base64url.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.enc.Base64url;
|
||||
3
node_modules/@types/crypto-js/enc-hex.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/enc-hex.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.enc.Hex;
|
||||
3
node_modules/@types/crypto-js/enc-latin1.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/enc-latin1.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.enc.Latin1;
|
||||
3
node_modules/@types/crypto-js/enc-utf16.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/enc-utf16.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.enc.Utf16;
|
||||
3
node_modules/@types/crypto-js/enc-utf8.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/enc-utf8.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.enc.Utf8;
|
||||
3
node_modules/@types/crypto-js/evpkdf.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/evpkdf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.EvpKDF;
|
||||
3
node_modules/@types/crypto-js/format-hex.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/format-hex.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.format.Hex;
|
||||
3
node_modules/@types/crypto-js/format-openssl.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/format-openssl.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.format.OpenSSL;
|
||||
3
node_modules/@types/crypto-js/hmac-md5.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-md5.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacMD5;
|
||||
3
node_modules/@types/crypto-js/hmac-ripemd160.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-ripemd160.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacRIPEMD160;
|
||||
3
node_modules/@types/crypto-js/hmac-sha1.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-sha1.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacSHA1;
|
||||
3
node_modules/@types/crypto-js/hmac-sha224.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-sha224.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacSHA224;
|
||||
3
node_modules/@types/crypto-js/hmac-sha256.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-sha256.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacSHA256;
|
||||
3
node_modules/@types/crypto-js/hmac-sha3.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-sha3.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacSHA3;
|
||||
3
node_modules/@types/crypto-js/hmac-sha384.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-sha384.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacSHA384;
|
||||
3
node_modules/@types/crypto-js/hmac-sha512.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/hmac-sha512.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.HmacSHA512;
|
||||
1757
node_modules/@types/crypto-js/index.d.ts
generated
vendored
Normal file
1757
node_modules/@types/crypto-js/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,1757 @@
|
||||
export = CryptoJS;
|
||||
|
||||
type WordArray = CryptoJS.lib.WordArray;
|
||||
type CipherParams = CryptoJS.lib.CipherParams;
|
||||
type X64Word = CryptoJS.x64.Word;
|
||||
|
||||
/**
|
||||
* Encoding strategy.
|
||||
*/
|
||||
interface Encoder {
|
||||
/**
|
||||
* Converts a word array to a hex string.
|
||||
*
|
||||
* @param wordArray The word array.
|
||||
*
|
||||
* @return The hex string.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
||||
*/
|
||||
stringify(wordArray: WordArray): string;
|
||||
/**
|
||||
* Converts a hex string to a word array.
|
||||
*
|
||||
* @param hexStr The hex string.
|
||||
*
|
||||
* @return The word array.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
||||
*/
|
||||
parse(str: string): WordArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract buffered block algorithm template.
|
||||
*
|
||||
* The property blockSize must be implemented in a concrete subtype.
|
||||
*/
|
||||
interface BufferedBlockAlgorithm {
|
||||
/**
|
||||
* The number of blocks that should be kept unprocessed in the buffer. Default: 0
|
||||
*/
|
||||
_minBufferSize: number;
|
||||
/**
|
||||
* Resets this block algorithm's data buffer to its initial state.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* bufferedBlockAlgorithm.reset();
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
* Adds new data to this block algorithm's buffer.
|
||||
*
|
||||
* @param data The data to append. Strings are converted to a WordArray using UTF-8.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* bufferedBlockAlgorithm._append('data');
|
||||
* bufferedBlockAlgorithm._append(wordArray);
|
||||
*/
|
||||
_append(data: WordArray | string): void;
|
||||
/**
|
||||
* Processes available data blocks.
|
||||
*
|
||||
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
|
||||
*
|
||||
* @param doFlush Whether all blocks and partial blocks should be processed.
|
||||
*
|
||||
* @return The processed data.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var processedData = bufferedBlockAlgorithm._process();
|
||||
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
||||
*/
|
||||
_process(doFlush?: boolean): WordArray;
|
||||
/**
|
||||
* Creates a copy of this object.
|
||||
*
|
||||
* @return The clone.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var clone = bufferedBlockAlgorithm.clone();
|
||||
*/
|
||||
clone(): BufferedBlockAlgorithm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract hasher template.
|
||||
*/
|
||||
interface Hasher {
|
||||
/**
|
||||
* The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
|
||||
*/
|
||||
blockSize: number;
|
||||
/**
|
||||
* Resets this hasher to its initial state.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* hasher.reset();
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
* Updates this hasher with a message.
|
||||
*
|
||||
* @param messageUpdate The message to append.
|
||||
*
|
||||
* @return This hasher.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* hasher.update('message');
|
||||
* hasher.update(wordArray);
|
||||
*/
|
||||
update(messageUpdate: WordArray | string): this;
|
||||
/**
|
||||
* Finalizes the hash computation.
|
||||
* Note that the finalize operation is effectively a destructive, read-once operation.
|
||||
*
|
||||
* @param messageUpdate (Optional) A final message update.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = hasher.finalize();
|
||||
* var hash = hasher.finalize('message');
|
||||
* var hash = hasher.finalize(wordArray);
|
||||
*/
|
||||
finalize(messageUpdate?: WordArray | string): WordArray;
|
||||
}
|
||||
|
||||
interface HasherStatic {
|
||||
/**
|
||||
* Initializes a newly created hasher.
|
||||
*
|
||||
* @param cfg (Optional) The configuration options to use for this hash computation.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hasher = CryptoJS.algo.SHA256.create();
|
||||
*/
|
||||
create(cfg?: object): Hasher;
|
||||
}
|
||||
|
||||
interface HasherHelper {
|
||||
(message: WordArray | string, cfg?: object): WordArray;
|
||||
}
|
||||
|
||||
interface HmacHasherHelper {
|
||||
(message: WordArray | string, key: WordArray | string): WordArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract base cipher template.
|
||||
*/
|
||||
interface Cipher {
|
||||
/**
|
||||
* This cipher's key size. Default: 4 (128 bits)
|
||||
*/
|
||||
keySize: number;
|
||||
/**
|
||||
* This cipher's IV size. Default: 4 (128 bits)
|
||||
*/
|
||||
ivSize: number;
|
||||
/**
|
||||
* A constant representing encryption mode.
|
||||
*/
|
||||
readonly _ENC_XFORM_MODE: number;
|
||||
/**
|
||||
* A constant representing decryption mode.
|
||||
*/
|
||||
readonly _DEV_XFORM_MODE: number;
|
||||
|
||||
/**
|
||||
* Resets this cipher to its initial state.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* cipher.reset();
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Adds data to be encrypted or decrypted.
|
||||
*
|
||||
* @param dataUpdate The data to encrypt or decrypt.
|
||||
*
|
||||
* @return The data after processing.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var encrypted = cipher.process('data');
|
||||
* var encrypted = cipher.process(wordArray);
|
||||
*/
|
||||
process(dataUpdate: WordArray | string): WordArray;
|
||||
|
||||
/**
|
||||
* Finalizes the encryption or decryption process.
|
||||
* Note that the finalize operation is effectively a destructive, read-once operation.
|
||||
*
|
||||
* @param dataUpdate The final data to encrypt or decrypt.
|
||||
*
|
||||
* @return The data after final processing.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var encrypted = cipher.finalize();
|
||||
* var encrypted = cipher.finalize('data');
|
||||
* var encrypted = cipher.finalize(wordArray);
|
||||
*/
|
||||
finalize(dataUpdate?: WordArray | string): WordArray;
|
||||
}
|
||||
|
||||
interface CipherStatic {
|
||||
/**
|
||||
* Creates this cipher in encryption mode.
|
||||
*
|
||||
* @param key The key.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @return A cipher instance.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
|
||||
*/
|
||||
createEncryptor(key: WordArray, cfg?: CipherOption): Cipher;
|
||||
|
||||
/**
|
||||
* Creates this cipher in decryption mode.
|
||||
*
|
||||
* @param key The key.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @return A cipher instance.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
|
||||
*/
|
||||
createDecryptor(key: WordArray, cfg?: CipherOption): Cipher;
|
||||
|
||||
/**
|
||||
* Initializes a newly created cipher.
|
||||
*
|
||||
* @param xformMode Either the encryption or decryption transormation mode constant.
|
||||
* @param key The key.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
|
||||
*/
|
||||
create(xformMode: number, key: WordArray, cfg?: CipherOption): Cipher;
|
||||
}
|
||||
|
||||
interface CipherHelper {
|
||||
encrypt(message: WordArray | string, key: WordArray | string, cfg?: CipherOption): CipherParams;
|
||||
decrypt(ciphertext: CipherParams | string, key: WordArray | string, cfg?: CipherOption): WordArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options.
|
||||
*/
|
||||
interface CipherOption {
|
||||
/**
|
||||
* The IV to use for this operation.
|
||||
*/
|
||||
iv?: WordArray | undefined;
|
||||
format?: Format | undefined;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface Mode {
|
||||
/**
|
||||
* Processes the data block at offset.
|
||||
*
|
||||
* @param words The data words to operate on.
|
||||
* @param offset The offset where the block starts.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* mode.processBlock(data.words, offset);
|
||||
*/
|
||||
processBlock(words: number[], offset: number): void;
|
||||
}
|
||||
|
||||
interface ModeStatic {
|
||||
/**
|
||||
* Initializes a newly created mode.
|
||||
*
|
||||
* @param cipher A block cipher instance.
|
||||
* @param iv The IV words.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
|
||||
*/
|
||||
create(cipher: Cipher, iv: number[]): Mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract base block cipher mode template.
|
||||
*/
|
||||
interface BlockCipherMode {
|
||||
Encryptor: ModeStatic;
|
||||
Decryptor: ModeStatic;
|
||||
/**
|
||||
* Creates this mode for encryption.
|
||||
*
|
||||
* @param cipher A block cipher instance.
|
||||
* @param iv The IV words.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
|
||||
*/
|
||||
createEncryptor(cipher: Cipher, iv: number[]): Mode;
|
||||
|
||||
/**
|
||||
* Creates this mode for decryption.
|
||||
*
|
||||
* @param cipher A block cipher instance.
|
||||
* @param iv The IV words.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
|
||||
*/
|
||||
createDecryptor(cipher: Cipher, iv: number[]): Mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract base block cipher mode template.
|
||||
*/
|
||||
interface BlockCipherMode {
|
||||
/**
|
||||
* Creates this mode for encryption.
|
||||
*
|
||||
* @param cipher A block cipher instance.
|
||||
* @param iv The IV words.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
|
||||
*/
|
||||
createEncryptor(cipher: Cipher): Mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Padding strategy.
|
||||
*/
|
||||
interface Padding {
|
||||
/**
|
||||
* Pads data using the algorithm defined in PKCS #5/7.
|
||||
*
|
||||
* @param data The data to pad.
|
||||
* @param blockSize The multiple that the data should be padded to.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
||||
*/
|
||||
pad(data: WordArray, blockSize: number): void;
|
||||
|
||||
/**
|
||||
* Unpads data that had been padded using the algorithm defined in PKCS #5/7.
|
||||
*
|
||||
* @param data The data to unpad.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* CryptoJS.pad.Pkcs7.unpad(wordArray);
|
||||
*/
|
||||
unpad(data: WordArray): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract base block cipher template.
|
||||
*/
|
||||
interface BlockCipher {
|
||||
/**
|
||||
* The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
|
||||
*/
|
||||
blockSize: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options.
|
||||
*/
|
||||
interface BlockCipherOption {
|
||||
/**
|
||||
* The block mode to use. Default: CBC
|
||||
*/
|
||||
mode: Mode;
|
||||
/**
|
||||
* The padding strategy to use. Default: Pkcs7
|
||||
*/
|
||||
padding: Padding;
|
||||
}
|
||||
/**
|
||||
* Formatting strategy.
|
||||
*/
|
||||
interface Format {
|
||||
/**
|
||||
* Converts a cipher params object to an OpenSSL-compatible string.
|
||||
*
|
||||
* @param cipherParams The cipher params object.
|
||||
*
|
||||
* @return The OpenSSL-compatible string.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
|
||||
*/
|
||||
stringify(cipherParams: CipherParams): string;
|
||||
|
||||
/**
|
||||
* Converts an OpenSSL-compatible string to a cipher params object.
|
||||
*
|
||||
* @param openSSLStr The OpenSSL-compatible string.
|
||||
*
|
||||
* @return The cipher params object.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
|
||||
*/
|
||||
parse(str: string): CipherParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array of 64-bit words.
|
||||
*/
|
||||
interface X64WordArray {
|
||||
/**
|
||||
* The array of CryptoJS.x64.Word objects.
|
||||
*/
|
||||
words: number[];
|
||||
/**
|
||||
* The number of significant bytes in this word array.
|
||||
*/
|
||||
sigBytes: number;
|
||||
|
||||
/**
|
||||
* Converts this 64-bit word array to a 32-bit word array.
|
||||
*
|
||||
* @return This word array's data as a 32-bit word array.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var x32WordArray = x64WordArray.toX32();
|
||||
*/
|
||||
toX32(): WordArray;
|
||||
|
||||
/**
|
||||
* Creates a copy of this word array.
|
||||
*
|
||||
* @return The clone.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var clone = x64WordArray.clone();
|
||||
*/
|
||||
clone(): X64WordArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base object for prototypal inheritance.
|
||||
*/
|
||||
interface Base {
|
||||
/**
|
||||
* Creates a copy of this object.
|
||||
*
|
||||
* @return The clone.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var clone = instance.clone();
|
||||
*/
|
||||
clone(): this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options.
|
||||
*/
|
||||
interface KDFOption {
|
||||
/**
|
||||
* The key size in words to generate.
|
||||
*/
|
||||
keySize?: number | undefined;
|
||||
/**
|
||||
* The hasher to use.
|
||||
*/
|
||||
hasher?: HasherStatic | undefined;
|
||||
/**
|
||||
* The number of iterations to perform.
|
||||
*/
|
||||
iterations?: number | undefined;
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace CryptoJS {
|
||||
/**
|
||||
* Library namespace.
|
||||
*/
|
||||
export namespace lib {
|
||||
/**
|
||||
* Base object for prototypal inheritance.
|
||||
*/
|
||||
const Base: {
|
||||
/**
|
||||
* Creates a new object that inherits from this object.
|
||||
*
|
||||
* @param overrides Properties to copy into the new object.
|
||||
*
|
||||
* @return The new object.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var MyType = CryptoJS.lib.Base.extend({
|
||||
* field: 'value',
|
||||
*
|
||||
* method: function () {
|
||||
* }
|
||||
* });
|
||||
*/
|
||||
extend(overrides: object): any;
|
||||
|
||||
/**
|
||||
* Extends this object and runs the init method.
|
||||
* Arguments to create() will be passed to init().
|
||||
*
|
||||
* @return The new object.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var instance = MyType.create();
|
||||
*/
|
||||
create(...args: any[]): any;
|
||||
|
||||
/**
|
||||
* Copies properties into this object.
|
||||
*
|
||||
* @param properties The properties to mix in.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* MyType.mixIn({
|
||||
* field: 'value'
|
||||
* });
|
||||
*/
|
||||
mixIn(properties: object): any;
|
||||
};
|
||||
|
||||
/**
|
||||
* An array of 32-bit words.
|
||||
*/
|
||||
interface WordArray {
|
||||
/**
|
||||
* The array of 32-bit words.
|
||||
*/
|
||||
words: number[];
|
||||
/**
|
||||
* The number of significant bytes in this word array.
|
||||
*/
|
||||
sigBytes: number;
|
||||
/**
|
||||
* Converts this word array to a string.
|
||||
*
|
||||
* @param encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
|
||||
*
|
||||
* @return The stringified word array.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var string = wordArray + '';
|
||||
* var string = wordArray.toString();
|
||||
* var string = wordArray.toString(CryptoJS.enc.Utf8);
|
||||
*/
|
||||
toString(encoder?: Encoder): string;
|
||||
|
||||
/**
|
||||
* Concatenates a word array to this word array.
|
||||
*
|
||||
* @param wordArray The word array to append.
|
||||
*
|
||||
* @return This word array.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* wordArray1.concat(wordArray2);
|
||||
*/
|
||||
concat(wordArray: WordArray): this;
|
||||
|
||||
/**
|
||||
* Removes insignificant bits.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* wordArray.clamp();
|
||||
*/
|
||||
clamp(): void;
|
||||
|
||||
/**
|
||||
* Creates a copy of this word array.
|
||||
*
|
||||
* @return The clone.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var clone = wordArray.clone();
|
||||
*/
|
||||
clone(): WordArray;
|
||||
}
|
||||
const WordArray: {
|
||||
/**
|
||||
* Initializes a newly created word array.
|
||||
*
|
||||
* @param words (Optional) An array of 32-bit words.
|
||||
* @param sigBytes (Optional) The number of significant bytes in the words.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var wordArray = CryptoJS.lib.WordArray.create();
|
||||
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
|
||||
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
||||
*/
|
||||
create(
|
||||
words?:
|
||||
| number[]
|
||||
| ArrayBuffer
|
||||
| Uint8Array
|
||||
| Int8Array
|
||||
| Uint8ClampedArray
|
||||
| Int16Array
|
||||
| Uint16Array
|
||||
| Int32Array
|
||||
| Uint32Array
|
||||
| Float32Array
|
||||
| Float64Array,
|
||||
sigBytes?: number,
|
||||
): WordArray;
|
||||
/**
|
||||
* Creates a word array filled with random bytes.
|
||||
*
|
||||
* @param nBytes The number of random bytes to generate.
|
||||
*
|
||||
* @return The random word array.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
||||
*/
|
||||
random(nBytes: number): WordArray;
|
||||
};
|
||||
|
||||
const BufferedBlockAlgorithm: any;
|
||||
|
||||
const Hasher: {
|
||||
/**
|
||||
* Creates a shortcut function to a hasher's object interface.
|
||||
*
|
||||
* @param hasher The hasher to create a helper for.
|
||||
*
|
||||
* @return The shortcut function.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
||||
*/
|
||||
_createHelper(hasher: HasherStatic): HasherHelper;
|
||||
/**
|
||||
* Creates a shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param hasher The hasher to use in this HMAC helper.
|
||||
*
|
||||
* @return The shortcut function.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
||||
*/
|
||||
_createHmacHelper(hasher: HasherStatic): HmacHasherHelper;
|
||||
};
|
||||
|
||||
const Cipher: {
|
||||
/**
|
||||
* Creates shortcut functions to a cipher's object interface.
|
||||
*
|
||||
* @param cipher The cipher to create a helper for.
|
||||
*
|
||||
* @return An object with encrypt and decrypt shortcut functions.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
|
||||
*/
|
||||
_createHelper(cipher: Cipher): CipherHelper;
|
||||
};
|
||||
|
||||
/**
|
||||
* A collection of cipher parameters.
|
||||
*/
|
||||
interface CipherParams {
|
||||
/**
|
||||
* The raw ciphertext.
|
||||
*/
|
||||
ciphertext: WordArray;
|
||||
/**
|
||||
* The key to this ciphertext.
|
||||
*/
|
||||
key: WordArray;
|
||||
/**
|
||||
* The IV used in the ciphering operation.
|
||||
*/
|
||||
iv: WordArray;
|
||||
/**
|
||||
* The salt used with a key derivation function.
|
||||
*/
|
||||
salt: WordArray;
|
||||
/**
|
||||
* The cipher algorithm.
|
||||
*/
|
||||
algorithm: CipherStatic;
|
||||
/**
|
||||
* The block mode used in the ciphering operation.
|
||||
*/
|
||||
mode: Mode;
|
||||
/**
|
||||
* The padding scheme used in the ciphering operation.
|
||||
*/
|
||||
padding: Padding;
|
||||
/**
|
||||
* The block size of the cipher.
|
||||
*/
|
||||
blockSize: number;
|
||||
/**
|
||||
* The default formatting strategy to convert this cipher params object to a string.
|
||||
*/
|
||||
formatter: Format;
|
||||
/**
|
||||
* Converts this cipher params object to a string.
|
||||
*
|
||||
* @param formatter (Optional) The formatting strategy to use.
|
||||
*
|
||||
* @return The stringified cipher params.
|
||||
*
|
||||
* @throws Error If neither the formatter nor the default formatter is set.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var string = cipherParams + '';
|
||||
* var string = cipherParams.toString();
|
||||
* var string = cipherParams.toString(CryptoJS.format.OpenSSL);
|
||||
*/
|
||||
toString(formatter?: Format): string;
|
||||
}
|
||||
const CipherParams: {
|
||||
/**
|
||||
* Initializes a newly created cipher params object.
|
||||
*
|
||||
* @param cipherParams An object with any of the possible cipher parameters.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var cipherParams = CryptoJS.lib.CipherParams.create({
|
||||
* ciphertext: ciphertextWordArray,
|
||||
* key: keyWordArray,
|
||||
* iv: ivWordArray,
|
||||
* salt: saltWordArray,
|
||||
* algorithm: CryptoJS.algo.AES,
|
||||
* mode: CryptoJS.mode.CBC,
|
||||
* padding: CryptoJS.pad.PKCS7,
|
||||
* blockSize: 4,
|
||||
* formatter: CryptoJS.format.OpenSSL
|
||||
* });
|
||||
*/
|
||||
create(cipherParams: Partial<CipherParams>): CipherParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* Abstract base stream cipher template.
|
||||
*/
|
||||
interface StreamCipher extends Cipher {
|
||||
/**
|
||||
* The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
|
||||
*/
|
||||
blockSize: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract base block cipher mode template.
|
||||
*/
|
||||
const BlockCipherMode: any;
|
||||
|
||||
/**
|
||||
* A cipher wrapper that returns ciphertext as a serializable cipher params object.
|
||||
*/
|
||||
const SerializableCipher: {
|
||||
/**
|
||||
* Encrypts a message.
|
||||
*
|
||||
* @param cipher The cipher algorithm to use.
|
||||
* @param message The message to encrypt.
|
||||
* @param key The key.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @return A cipher params object.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
|
||||
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
|
||||
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
||||
*/
|
||||
encrypt(
|
||||
cipher: CipherStatic,
|
||||
message: WordArray | string,
|
||||
key: WordArray,
|
||||
cfg?: CipherOption,
|
||||
): CipherParams;
|
||||
|
||||
/**
|
||||
* Decrypts serialized ciphertext.
|
||||
*
|
||||
* @param cipher The cipher algorithm to use.
|
||||
* @param ciphertext The ciphertext to decrypt.
|
||||
* @param key The key.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @return The plaintext.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
||||
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
||||
*/
|
||||
decrypt(
|
||||
cipher: CipherStatic,
|
||||
ciphertext: WordArray | string,
|
||||
key: WordArray,
|
||||
cfg?: CipherOption,
|
||||
): CipherParams;
|
||||
|
||||
/**
|
||||
* Converts serialized ciphertext to CipherParams,
|
||||
* else assumed CipherParams already and returns ciphertext unchanged.
|
||||
*
|
||||
* @param ciphertext The ciphertext.
|
||||
* @param format The formatting strategy to use to parse serialized ciphertext.
|
||||
*
|
||||
* @return The unserialized ciphertext.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
|
||||
*/
|
||||
_parse(ciphertext: CipherParams | string, format: Format): CipherParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* A serializable cipher wrapper that derives the key from a password,
|
||||
* and returns ciphertext as a serializable cipher params object.
|
||||
*/
|
||||
const PasswordBasedCipher: {
|
||||
/**
|
||||
* Encrypts a message using a password.
|
||||
*
|
||||
* @param cipher The cipher algorithm to use.
|
||||
* @param message The message to encrypt.
|
||||
* @param password The password.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @return A cipher params object.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
|
||||
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
|
||||
*/
|
||||
encrypt(
|
||||
cipher: CipherStatic,
|
||||
message: WordArray | string,
|
||||
password: string,
|
||||
cfg?: CipherOption,
|
||||
): CipherParams;
|
||||
|
||||
/**
|
||||
* Decrypts serialized ciphertext using a password.
|
||||
*
|
||||
* @param cipher The cipher algorithm to use.
|
||||
* @param ciphertext The ciphertext to decrypt.
|
||||
* @param password The password.
|
||||
* @param cfg (Optional) The configuration options to use for this operation.
|
||||
*
|
||||
* @return The plaintext.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
|
||||
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
|
||||
*/
|
||||
decrypt(
|
||||
cipher: CipherStatic,
|
||||
ciphertext: CipherParams | string,
|
||||
password: string,
|
||||
cfg?: CipherOption,
|
||||
): WordArray;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Padding namespace.
|
||||
*/
|
||||
export namespace pad {
|
||||
/**
|
||||
* PKCS #5/7 padding strategy.
|
||||
*/
|
||||
const Pkcs7: Padding;
|
||||
|
||||
/**
|
||||
* ANSI X.923 padding strategy.
|
||||
*/
|
||||
const AnsiX923: Padding;
|
||||
|
||||
/**
|
||||
* ISO 10126 padding strategy.
|
||||
*/
|
||||
const Iso10126: Padding;
|
||||
|
||||
/**
|
||||
* ISO/IEC 9797-1 Padding Method 2.
|
||||
*/
|
||||
const Iso97971: Padding;
|
||||
|
||||
/**
|
||||
* Zero padding strategy.
|
||||
*/
|
||||
const ZeroPadding: Padding;
|
||||
|
||||
/**
|
||||
* A noop padding strategy.
|
||||
*/
|
||||
const NoPadding: Padding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Key derivation function namespace.
|
||||
*/
|
||||
export namespace kdf {
|
||||
/**
|
||||
* OpenSSL key derivation function.
|
||||
*/
|
||||
const OpenSSL: {
|
||||
/**
|
||||
* Derives a key and IV from a password.
|
||||
*
|
||||
* @param password The password to derive from.
|
||||
* @param keySize The size in words of the key to generate.
|
||||
* @param ivSize The size in words of the IV to generate.
|
||||
* @param salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
|
||||
*
|
||||
* @return A cipher params object with the key, IV, and salt.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
||||
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
||||
*/
|
||||
execute(
|
||||
password: string,
|
||||
keySize: number,
|
||||
ivSize: number,
|
||||
salt?: WordArray | string,
|
||||
hasher?: Hasher,
|
||||
): CipherParams;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Mode namespace.
|
||||
*/
|
||||
export namespace mode {
|
||||
/**
|
||||
* Cipher Block Chaining mode.
|
||||
*/
|
||||
const CBC: BlockCipherMode;
|
||||
|
||||
/**
|
||||
* Cipher Feedback block mode.
|
||||
*/
|
||||
const CFB: BlockCipherMode;
|
||||
/**
|
||||
* Counter block mode.
|
||||
*/
|
||||
const CTR: BlockCipherMode;
|
||||
/**
|
||||
* @preserve
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*/
|
||||
const CTRGladman: BlockCipherMode;
|
||||
/**
|
||||
* Output Feedback block mode.
|
||||
*/
|
||||
const OFB: BlockCipherMode;
|
||||
|
||||
/**
|
||||
* Electronic Codebook block mode.
|
||||
*/
|
||||
const ECB: BlockCipherMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format namespace.
|
||||
*/
|
||||
export namespace format {
|
||||
/**
|
||||
* OpenSSL formatting strategy.
|
||||
*/
|
||||
const OpenSSL: Format;
|
||||
const Hex: Format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encoder namespace.
|
||||
*/
|
||||
export namespace enc {
|
||||
/**
|
||||
* Hex encoding strategy.
|
||||
*/
|
||||
const Hex: Encoder;
|
||||
/**
|
||||
* Latin1 encoding strategy.
|
||||
*/
|
||||
const Latin1: Encoder;
|
||||
/**
|
||||
* UTF-8 encoding strategy.
|
||||
*/
|
||||
const Utf8: Encoder;
|
||||
/**
|
||||
* UTF-16 BE encoding strategy.
|
||||
*/
|
||||
const Utf16: Encoder;
|
||||
const Utf16BE: Encoder;
|
||||
|
||||
/**
|
||||
* UTF-16 LE encoding strategy.
|
||||
*/
|
||||
const Utf16LE: Encoder;
|
||||
/**
|
||||
* Base64 encoding strategy.
|
||||
*/
|
||||
const Base64: Encoder;
|
||||
/**
|
||||
* Base64url encoding strategy.
|
||||
*/
|
||||
const Base64url: Encoder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Algorithm namespace.
|
||||
*/
|
||||
export namespace algo {
|
||||
/**
|
||||
* MD5 hash algorithm.
|
||||
*/
|
||||
const MD5: HasherStatic;
|
||||
|
||||
/**
|
||||
* SHA-1 hash algorithm.
|
||||
*/
|
||||
const SHA1: HasherStatic;
|
||||
|
||||
/**
|
||||
* SHA-256 hash algorithm.
|
||||
*/
|
||||
const SHA256: HasherStatic;
|
||||
/**
|
||||
* SHA-224 hash algorithm.
|
||||
*/
|
||||
const SHA224: HasherStatic;
|
||||
/**
|
||||
* SHA-512 hash algorithm.
|
||||
*/
|
||||
const SHA512: HasherStatic;
|
||||
|
||||
/**
|
||||
* SHA-384 hash algorithm.
|
||||
*/
|
||||
const SHA384: HasherStatic;
|
||||
/**
|
||||
* SHA-3 hash algorithm.
|
||||
*/
|
||||
const SHA3: HasherStatic;
|
||||
/**
|
||||
* RIPEMD160 hash algorithm.
|
||||
*/
|
||||
const RIPEMD160: HasherStatic;
|
||||
/**
|
||||
* HMAC algorithm.
|
||||
*/
|
||||
abstract class HMAC {
|
||||
/**
|
||||
* Initializes a newly created HMAC.
|
||||
*
|
||||
* @param hasher The hash algorithm to use.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
||||
*/
|
||||
static create(hasher: HasherStatic, key: WordArray | string): HMAC;
|
||||
/**
|
||||
* Resets this HMAC to its initial state.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* hmacHasher.reset();
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Updates this HMAC with a message.
|
||||
*
|
||||
* @param messageUpdate The message to append.
|
||||
*
|
||||
* @return This HMAC instance.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* hmacHasher.update('message');
|
||||
* hmacHasher.update(wordArray);
|
||||
*/
|
||||
update(messageUpdate: WordArray | string): this;
|
||||
|
||||
/**
|
||||
* Finalizes the HMAC computation.
|
||||
* Note that the finalize operation is effectively a destructive, read-once operation.
|
||||
*
|
||||
* @param messageUpdate (Optional) A final message update.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = hmacHasher.finalize();
|
||||
* var hmac = hmacHasher.finalize('message');
|
||||
* var hmac = hmacHasher.finalize(wordArray);
|
||||
*/
|
||||
finalize(messageUpdate?: WordArray | string): WordArray;
|
||||
}
|
||||
/**
|
||||
* Password-Based Key Derivation Function 2 algorithm.
|
||||
*/
|
||||
abstract class PBKDF2 {
|
||||
/**
|
||||
* Initializes a newly created key derivation function.
|
||||
*
|
||||
* @param cfg (Optional) The configuration options to use for the derivation.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var kdf = CryptoJS.algo.PBKDF2.create();
|
||||
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
|
||||
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
|
||||
*/
|
||||
static create(cfg?: KDFOption): PBKDF2;
|
||||
|
||||
/**
|
||||
* Computes the Password-Based Key Derivation Function 2.
|
||||
*
|
||||
* @param password The password.
|
||||
* @param salt A salt.
|
||||
*
|
||||
* @return The derived key.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var key = kdf.compute(password, salt);
|
||||
*/
|
||||
compute(password: WordArray | string, salt: WordArray): WordArray;
|
||||
}
|
||||
/**
|
||||
* This key derivation function is meant to conform with EVP_BytesToKey.
|
||||
* www.openssl.org/docs/crypto/EVP_BytesToKey.html
|
||||
*/
|
||||
abstract class EvpKDF {
|
||||
/**
|
||||
* Initializes a newly created key derivation function.
|
||||
*
|
||||
* @param cfg (Optional) The configuration options to use for the derivation.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var kdf = CryptoJS.algo.EvpKDF.create();
|
||||
* var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
|
||||
* var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
|
||||
*/
|
||||
static create(cfg?: { keySize: number; hasher?: HasherStatic | undefined; iterations: number }): EvpKDF;
|
||||
|
||||
/**
|
||||
* Derives a key from a password.
|
||||
*
|
||||
* @param password The password.
|
||||
* @param salt A salt.
|
||||
*
|
||||
* @return The derived key.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var key = kdf.compute(password, salt);
|
||||
*/
|
||||
compute(password: WordArray | string, salt: WordArray): WordArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* AES block cipher algorithm.
|
||||
*/
|
||||
const AES: CipherStatic;
|
||||
|
||||
/**
|
||||
* DES block cipher algorithm.
|
||||
*/
|
||||
const DES: CipherStatic;
|
||||
|
||||
/**
|
||||
* Triple-DES block cipher algorithm.
|
||||
*/
|
||||
const TripleDES: CipherStatic;
|
||||
|
||||
/**
|
||||
* RC4 stream cipher algorithm.
|
||||
*/
|
||||
const RC4: CipherStatic;
|
||||
|
||||
/**
|
||||
* Modified RC4 stream cipher algorithm.
|
||||
*/
|
||||
const RC4Drop: CipherStatic;
|
||||
|
||||
/**
|
||||
* Rabbit stream cipher algorithm
|
||||
*/
|
||||
const Rabbit: CipherStatic;
|
||||
|
||||
/**
|
||||
* Rabbit stream cipher algorithm.
|
||||
*
|
||||
* This is a legacy version that neglected to convert the key to little-endian.
|
||||
* This error doesn't affect the cipher's security,
|
||||
* but it does affect its compatibility with other implementations.
|
||||
*/
|
||||
const RabbitLegacy: CipherStatic;
|
||||
}
|
||||
|
||||
/**
|
||||
* x64 namespace.
|
||||
*/
|
||||
export namespace x64 {
|
||||
/**
|
||||
* A 64-bit word.
|
||||
*/
|
||||
interface Word {
|
||||
/**
|
||||
* Bitwise NOTs this word.
|
||||
*
|
||||
* @return A new x64-Word object after negating.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var negated = x64Word.not();
|
||||
*/
|
||||
not(): X64Word;
|
||||
/**
|
||||
* Bitwise ANDs this word with the passed word.
|
||||
*
|
||||
* @param word The x64-Word to AND with this word.
|
||||
*
|
||||
* @return A new x64-Word object after ANDing.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var anded = x64Word.and(anotherX64Word);
|
||||
*/
|
||||
and(word: X64Word): X64Word;
|
||||
|
||||
/**
|
||||
* Bitwise ORs this word with the passed word.
|
||||
*
|
||||
* @param word The x64-Word to OR with this word.
|
||||
*
|
||||
* @return A new x64-Word object after ORing.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ored = x64Word.or(anotherX64Word);
|
||||
*/
|
||||
or(word: X64Word): X64Word;
|
||||
|
||||
/**
|
||||
* Bitwise XORs this word with the passed word.
|
||||
*
|
||||
* @param word The x64-Word to XOR with this word.
|
||||
*
|
||||
* @return A new x64-Word object after XORing.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var xored = x64Word.xor(anotherX64Word);
|
||||
*/
|
||||
xor(word: X64Word): X64Word;
|
||||
/**
|
||||
* Shifts this word n bits to the left.
|
||||
*
|
||||
* @param n The number of bits to shift.
|
||||
*
|
||||
* @return A new x64-Word object after shifting.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var shifted = x64Word.shiftL(25);
|
||||
*/
|
||||
shiftL(n: number): X64Word;
|
||||
/**
|
||||
* Shifts this word n bits to the right.
|
||||
*
|
||||
* @param n The number of bits to shift.
|
||||
*
|
||||
* @return A new x64-Word object after shifting.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var shifted = x64Word.shiftR(7);
|
||||
*/
|
||||
shiftR(n: number): X64Word;
|
||||
/**
|
||||
* Rotates this word n bits to the left.
|
||||
*
|
||||
* @param n The number of bits to rotate.
|
||||
*
|
||||
* @return A new x64-Word object after rotating.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var rotated = x64Word.rotL(25);
|
||||
*/
|
||||
rotL(n: number): X64Word;
|
||||
|
||||
/**
|
||||
* Rotates this word n bits to the right.
|
||||
*
|
||||
* @param n The number of bits to rotate.
|
||||
*
|
||||
* @return A new x64-Word object after rotating.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var rotated = x64Word.rotR(7);
|
||||
*/
|
||||
rotR(n: number): X64Word;
|
||||
/**
|
||||
* Adds this word with the passed word.
|
||||
*
|
||||
* @param word The x64-Word to add with this word.
|
||||
*
|
||||
* @return A new x64-Word object after adding.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var added = x64Word.add(anotherX64Word);
|
||||
*/
|
||||
add(word: X64Word): X64Word;
|
||||
}
|
||||
|
||||
const Word: {
|
||||
/**
|
||||
* Initializes a newly created 64-bit word.
|
||||
*
|
||||
* @param high The high 32 bits.
|
||||
* @param low The low 32 bits.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
|
||||
*/
|
||||
create(high: number, low: number): X64Word;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes a newly created word array.
|
||||
*
|
||||
* @param words (Optional) An array of CryptoJS.x64.Word objects.
|
||||
* @param sigBytes (Optional) The number of significant bytes in the words.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var wordArray = CryptoJS.x64.WordArray.create();
|
||||
*
|
||||
* var wordArray = CryptoJS.x64.WordArray.create([
|
||||
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
|
||||
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
|
||||
* ]);
|
||||
*
|
||||
* var wordArray = CryptoJS.x64.WordArray.create([
|
||||
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
|
||||
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
|
||||
* ], 10);
|
||||
*/
|
||||
const WordArray: {
|
||||
create(words?: X64WordArray[], sigBytes?: number): X64WordArray;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.MD5('message');
|
||||
* var hash = CryptoJS.MD5(wordArray);
|
||||
*/
|
||||
export const MD5: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMA'C.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacMD5(message, key);
|
||||
*/
|
||||
export const HmacMD5: HmacHasherHelper;
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.SHA1('message');
|
||||
* var hash = CryptoJS.SHA1(wordArray);
|
||||
*/
|
||||
export const SHA1: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacSHA1(message, key);
|
||||
*/
|
||||
export const HmacSHA1: HmacHasherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.SHA256('message');
|
||||
* var hash = CryptoJS.SHA256(wordArray);
|
||||
*/
|
||||
export const SHA256: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacSHA256(message, key);
|
||||
*/
|
||||
export const HmacSHA256: HmacHasherHelper;
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.SHA224('message');
|
||||
* var hash = CryptoJS.SHA224(wordArray);
|
||||
*/
|
||||
export const SHA224: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacSHA224(message, key);
|
||||
*/
|
||||
export const HmacSHA224: HmacHasherHelper;
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.SHA512('message');
|
||||
* var hash = CryptoJS.SHA512(wordArray);
|
||||
*/
|
||||
export const SHA512: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacSHA512(message, key);
|
||||
*/
|
||||
export const HmacSHA512: HmacHasherHelper;
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.SHA384('message');
|
||||
* var hash = CryptoJS.SHA384(wordArray);
|
||||
*/
|
||||
export const SHA384: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacSHA384(message, key);
|
||||
*/
|
||||
export const HmacSHA384: HmacHasherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.SHA3('message');
|
||||
* var hash = CryptoJS.SHA3(wordArray);
|
||||
*/
|
||||
export const SHA3: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacSHA3(message, key);
|
||||
*/
|
||||
export const HmacSHA3: HmacHasherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut function to the hasher's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
*
|
||||
* @return The hash.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hash = CryptoJS.RIPEMD160('message');
|
||||
* var hash = CryptoJS.RIPEMD160(wordArray);
|
||||
*/
|
||||
export const RIPEMD160: HasherHelper;
|
||||
/**
|
||||
* Shortcut function to the HMAC's object interface.
|
||||
*
|
||||
* @param message The message to hash.
|
||||
* @param key The secret key.
|
||||
*
|
||||
* @return The HMAC.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var hmac = CryptoJS.HmacRIPEMD160(message, key);
|
||||
*/
|
||||
export const HmacRIPEMD160: HmacHasherHelper;
|
||||
/**
|
||||
* Computes the Password-Based Key Derivation Function 2.
|
||||
*
|
||||
* @param password The password.
|
||||
* @param salt A salt.
|
||||
* @param cfg (Optional) The configuration options to use for this computation.
|
||||
*
|
||||
* @return The derived key.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var key = CryptoJS.PBKDF2(password, salt);
|
||||
* var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
|
||||
* var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
|
||||
*/
|
||||
export function PBKDF2(password: WordArray | string, salt: WordArray | string, cfg?: KDFOption): WordArray;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const AES: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const DES: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const TripleDES: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const RC4: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const RC4Drop: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const Rabbit: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const RabbitLegacy: CipherHelper;
|
||||
|
||||
/**
|
||||
* Shortcut functions to the cipher's object interface.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg);
|
||||
* var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg);
|
||||
*/
|
||||
export const Blowfish: CipherHelper;
|
||||
|
||||
/**
|
||||
* Derives a key from a password.
|
||||
*
|
||||
* @param password The password.
|
||||
* @param salt A salt.
|
||||
* @param cfg (Optional) The configuration options to use for this computation.
|
||||
*
|
||||
* @return The derived key.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* var key = CryptoJS.EvpKDF(password, salt);
|
||||
* var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
|
||||
* var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
|
||||
*/
|
||||
export function EvpKDF(
|
||||
password: WordArray | string,
|
||||
salt: WordArray | string,
|
||||
cfg?: {
|
||||
keySize: number;
|
||||
hasher?: HasherStatic | undefined;
|
||||
iterations: number;
|
||||
},
|
||||
): WordArray;
|
||||
}
|
||||
}
|
||||
3
node_modules/@types/crypto-js/lib-typedarrays.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/lib-typedarrays.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.lib.WordArray;
|
||||
3
node_modules/@types/crypto-js/md5.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/md5.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.MD5;
|
||||
3
node_modules/@types/crypto-js/mode-cfb.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/mode-cfb.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.mode.CFB;
|
||||
3
node_modules/@types/crypto-js/mode-ctr-gladman.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/mode-ctr-gladman.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.mode.CTRGladman;
|
||||
3
node_modules/@types/crypto-js/mode-ctr.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/mode-ctr.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.mode.CTR;
|
||||
3
node_modules/@types/crypto-js/mode-ecb.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/mode-ecb.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.mode.ECB;
|
||||
3
node_modules/@types/crypto-js/mode-ofb.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/mode-ofb.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.mode.OFB;
|
||||
40
node_modules/@types/crypto-js/package.json
generated
vendored
Normal file
40
node_modules/@types/crypto-js/package.json
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "@types/crypto-js",
|
||||
"version": "4.2.2",
|
||||
"description": "TypeScript definitions for crypto-js",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/crypto-js",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Michael Zabka",
|
||||
"githubUsername": "misak113",
|
||||
"url": "https://github.com/misak113"
|
||||
},
|
||||
{
|
||||
"name": "Max Lysenko",
|
||||
"githubUsername": "maximlysenko",
|
||||
"url": "https://github.com/maximlysenko"
|
||||
},
|
||||
{
|
||||
"name": "Brendan Early",
|
||||
"githubUsername": "mymindstorm",
|
||||
"url": "https://github.com/mymindstorm"
|
||||
},
|
||||
{
|
||||
"name": "Doma",
|
||||
"githubUsername": "SevenOutman",
|
||||
"url": "https://github.com/SevenOutman"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/crypto-js"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "3f6bc86fd9a54e71d98b564ebd76c1c858f08d36ab34f8be2560e0f31e55c6a1",
|
||||
"typeScriptVersion": "4.6"
|
||||
}
|
||||
3
node_modules/@types/crypto-js/pad-ansix923.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pad-ansix923.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.pad.AnsiX923;
|
||||
3
node_modules/@types/crypto-js/pad-iso10126.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pad-iso10126.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.pad.Iso10126;
|
||||
3
node_modules/@types/crypto-js/pad-iso97971.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pad-iso97971.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.pad.Iso97971;
|
||||
3
node_modules/@types/crypto-js/pad-nopadding.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pad-nopadding.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.pad.NoPadding;
|
||||
3
node_modules/@types/crypto-js/pad-pkcs7.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pad-pkcs7.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.pad.Pkcs7;
|
||||
3
node_modules/@types/crypto-js/pad-zeropadding.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pad-zeropadding.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.pad.ZeroPadding;
|
||||
3
node_modules/@types/crypto-js/pbkdf2.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/pbkdf2.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.PBKDF2;
|
||||
3
node_modules/@types/crypto-js/rabbit-legacy.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/rabbit-legacy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.RabbitLegacy;
|
||||
3
node_modules/@types/crypto-js/rabbit.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/rabbit.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.Rabbit;
|
||||
3
node_modules/@types/crypto-js/rc4.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/rc4.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.RC4;
|
||||
3
node_modules/@types/crypto-js/ripemd160.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/ripemd160.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.RIPEMD160;
|
||||
3
node_modules/@types/crypto-js/sha1.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/sha1.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.SHA1;
|
||||
3
node_modules/@types/crypto-js/sha224.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/sha224.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.SHA224;
|
||||
3
node_modules/@types/crypto-js/sha256.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/sha256.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.SHA256;
|
||||
3
node_modules/@types/crypto-js/sha3.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/sha3.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.SHA3;
|
||||
3
node_modules/@types/crypto-js/sha384.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/sha384.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.SHA384;
|
||||
3
node_modules/@types/crypto-js/sha512.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/sha512.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.SHA512;
|
||||
3
node_modules/@types/crypto-js/tripledes.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/tripledes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS.TripleDES;
|
||||
3
node_modules/@types/crypto-js/x64-core.d.ts
generated
vendored
Normal file
3
node_modules/@types/crypto-js/x64-core.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import CryptoJS = require("./index");
|
||||
|
||||
export = CryptoJS;
|
||||
21
node_modules/@types/json-schema/LICENSE
generated
vendored
Normal file
21
node_modules/@types/json-schema/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/json-schema/README.md
generated
vendored
Normal file
15
node_modules/@types/json-schema/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/json-schema`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 03:09:37 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK).
|
||||
749
node_modules/@types/json-schema/index.d.ts
generated
vendored
Normal file
749
node_modules/@types/json-schema/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,749 @@
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 04
|
||||
// ==================================================================================================
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
||||
*/
|
||||
export type JSONSchema4TypeName =
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null"
|
||||
| "any";
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
||||
*/
|
||||
export type JSONSchema4Type =
|
||||
| string //
|
||||
| number
|
||||
| boolean
|
||||
| JSONSchema4Object
|
||||
| JSONSchema4Array
|
||||
| null;
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
export interface JSONSchema4Object {
|
||||
[key: string]: JSONSchema4Type;
|
||||
}
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
||||
export interface JSONSchema4Array extends Array<JSONSchema4Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-04/schema#'
|
||||
* - 'http://json-schema.org/draft-04/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-03/schema#'
|
||||
* - 'http://json-schema.org/draft-03/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema4Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema V4
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
|
||||
*/
|
||||
export interface JSONSchema4 {
|
||||
id?: string | undefined;
|
||||
$ref?: string | undefined;
|
||||
$schema?: JSONSchema4Version | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a short description of the
|
||||
* instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
|
||||
*/
|
||||
title?: string | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a full description of the of
|
||||
* purpose the instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
|
||||
*/
|
||||
description?: string | undefined;
|
||||
|
||||
default?: JSONSchema4Type | undefined;
|
||||
multipleOf?: number | undefined;
|
||||
maximum?: number | undefined;
|
||||
exclusiveMaximum?: boolean | undefined;
|
||||
minimum?: number | undefined;
|
||||
exclusiveMinimum?: boolean | undefined;
|
||||
maxLength?: number | undefined;
|
||||
minLength?: number | undefined;
|
||||
pattern?: string | undefined;
|
||||
|
||||
/**
|
||||
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
|
||||
*
|
||||
* This provides a definition for additional items in an array instance
|
||||
* when tuple definitions of the items is provided. This can be false
|
||||
* to indicate additional items in the array are not allowed, or it can
|
||||
* be a schema that defines the schema of the additional items.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
|
||||
*/
|
||||
additionalItems?: boolean | JSONSchema4 | undefined;
|
||||
|
||||
/**
|
||||
* This attribute defines the allowed items in an instance array, and
|
||||
* MUST be a schema or an array of schemas. The default value is an
|
||||
* empty schema which allows any value for items in the instance array.
|
||||
*
|
||||
* When this attribute value is a schema and the instance value is an
|
||||
* array, then all the items in the array MUST be valid according to the
|
||||
* schema.
|
||||
*
|
||||
* When this attribute value is an array of schemas and the instance
|
||||
* value is an array, each position in the instance array MUST conform
|
||||
* to the schema in the corresponding position for this array. This
|
||||
* called tuple typing. When tuple typing is used, additional items are
|
||||
* allowed, disallowed, or constrained by the "additionalItems"
|
||||
* (Section 5.6) attribute using the same rules as
|
||||
* "additionalProperties" (Section 5.4) for objects.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
|
||||
*/
|
||||
items?: JSONSchema4 | JSONSchema4[] | undefined;
|
||||
|
||||
maxItems?: number | undefined;
|
||||
minItems?: number | undefined;
|
||||
uniqueItems?: boolean | undefined;
|
||||
maxProperties?: number | undefined;
|
||||
minProperties?: number | undefined;
|
||||
|
||||
/**
|
||||
* This attribute indicates if the instance must have a value, and not
|
||||
* be undefined. This is false by default, making the instance
|
||||
* optional.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
|
||||
*/
|
||||
required?: boolean | string[] | undefined;
|
||||
|
||||
/**
|
||||
* This attribute defines a schema for all properties that are not
|
||||
* explicitly defined in an object type definition. If specified, the
|
||||
* value MUST be a schema or a boolean. If false is provided, no
|
||||
* additional properties are allowed beyond the properties defined in
|
||||
* the schema. The default value is an empty schema which allows any
|
||||
* value for additional properties.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
|
||||
*/
|
||||
additionalProperties?: boolean | JSONSchema4 | undefined;
|
||||
|
||||
definitions?: {
|
||||
[k: string]: JSONSchema4;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is an object with property definitions that define the
|
||||
* valid values of instance object property values. When the instance
|
||||
* value is an object, the property values of the instance object MUST
|
||||
* conform to the property definitions in this object. In this object,
|
||||
* each property definition's value MUST be a schema, and the property's
|
||||
* name MUST be the name of the instance property that it defines. The
|
||||
* instance property value MUST be valid according to the schema from
|
||||
* the property definition. Properties are considered unordered, the
|
||||
* order of the instance properties MAY be in any order.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
|
||||
*/
|
||||
properties?: {
|
||||
[k: string]: JSONSchema4;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is an object that defines the schema for a set of
|
||||
* property names of an object instance. The name of each property of
|
||||
* this attribute's object is a regular expression pattern in the ECMA
|
||||
* 262/Perl 5 format, while the value is a schema. If the pattern
|
||||
* matches the name of a property on the instance object, the value of
|
||||
* the instance's property MUST be valid against the pattern name's
|
||||
* schema value.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
|
||||
*/
|
||||
patternProperties?: {
|
||||
[k: string]: JSONSchema4;
|
||||
} | undefined;
|
||||
dependencies?: {
|
||||
[k: string]: JSONSchema4 | string[];
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This provides an enumeration of all possible values that are valid
|
||||
* for the instance property. This MUST be an array, and each item in
|
||||
* the array represents a possible value for the instance value. If
|
||||
* this attribute is defined, the instance value MUST be one of the
|
||||
* values in the array in order for the schema to be valid.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
|
||||
*/
|
||||
enum?: JSONSchema4Type[] | undefined;
|
||||
|
||||
/**
|
||||
* A single type, or a union of simple types
|
||||
*/
|
||||
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
|
||||
|
||||
allOf?: JSONSchema4[] | undefined;
|
||||
anyOf?: JSONSchema4[] | undefined;
|
||||
oneOf?: JSONSchema4[] | undefined;
|
||||
not?: JSONSchema4 | undefined;
|
||||
|
||||
/**
|
||||
* The value of this property MUST be another schema which will provide
|
||||
* a base schema which the current schema will inherit from. The
|
||||
* inheritance rules are such that any instance that is valid according
|
||||
* to the current schema MUST be valid according to the referenced
|
||||
* schema. This MAY also be an array, in which case, the instance MUST
|
||||
* be valid for all the schemas in the array. A schema that extends
|
||||
* another schema MAY define additional attributes, constrain existing
|
||||
* attributes, or add other constraints.
|
||||
*
|
||||
* Conceptually, the behavior of extends can be seen as validating an
|
||||
* instance against all constraints in the extending schema as well as
|
||||
* the extended schema(s).
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
|
||||
*/
|
||||
extends?: string | string[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
|
||||
*/
|
||||
[k: string]: any;
|
||||
|
||||
format?: string | undefined;
|
||||
}
|
||||
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 06
|
||||
// ==================================================================================================
|
||||
|
||||
export type JSONSchema6TypeName =
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null"
|
||||
| "any";
|
||||
|
||||
export type JSONSchema6Type =
|
||||
| string //
|
||||
| number
|
||||
| boolean
|
||||
| JSONSchema6Object
|
||||
| JSONSchema6Array
|
||||
| null;
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
export interface JSONSchema6Object {
|
||||
[key: string]: JSONSchema6Type;
|
||||
}
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
||||
export interface JSONSchema6Array extends Array<JSONSchema6Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-06/schema#'
|
||||
* - 'http://json-schema.org/draft-06/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema6Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema V6
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
|
||||
*/
|
||||
export type JSONSchema6Definition = JSONSchema6 | boolean;
|
||||
export interface JSONSchema6 {
|
||||
$id?: string | undefined;
|
||||
$ref?: string | undefined;
|
||||
$schema?: JSONSchema6Version | undefined;
|
||||
|
||||
/**
|
||||
* Must be strictly greater than 0.
|
||||
* A numeric instance is valid only if division by this keyword's value results in an integer.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
|
||||
*/
|
||||
multipleOf?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an inclusive upper limit for a numeric instance.
|
||||
* This keyword validates only if the instance is less than or exactly equal to "maximum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
|
||||
*/
|
||||
maximum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an exclusive upper limit for a numeric instance.
|
||||
* This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
|
||||
*/
|
||||
exclusiveMaximum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an inclusive lower limit for a numeric instance.
|
||||
* This keyword validates only if the instance is greater than or exactly equal to "minimum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
|
||||
*/
|
||||
minimum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Representing an exclusive lower limit for a numeric instance.
|
||||
* This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
|
||||
*/
|
||||
exclusiveMinimum?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
|
||||
*/
|
||||
maxLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
|
||||
* Omitting this keyword has the same behavior as a value of 0.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
|
||||
*/
|
||||
minLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
|
||||
*/
|
||||
pattern?: string | undefined;
|
||||
|
||||
/**
|
||||
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
||||
* Omitting this keyword has the same behavior as an empty schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
|
||||
*/
|
||||
items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
||||
* If "items" is an array of schemas, validation succeeds if every instance element
|
||||
* at a position greater than the size of "items" validates against "additionalItems".
|
||||
* Otherwise, "additionalItems" MUST be ignored, as the "items" schema
|
||||
* (possibly the default value of an empty schema) is applied to all elements.
|
||||
* Omitting this keyword has the same behavior as an empty schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
|
||||
*/
|
||||
additionalItems?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
|
||||
*/
|
||||
maxItems?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
|
||||
* Omitting this keyword has the same behavior as a value of 0.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
|
||||
*/
|
||||
minItems?: number | undefined;
|
||||
|
||||
/**
|
||||
* If this keyword has boolean value false, the instance validates successfully.
|
||||
* If it has boolean value true, the instance validates successfully if all of its elements are unique.
|
||||
* Omitting this keyword has the same behavior as a value of false.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
|
||||
*/
|
||||
uniqueItems?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
|
||||
*/
|
||||
contains?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
|
||||
*/
|
||||
maxProperties?: number | undefined;
|
||||
|
||||
/**
|
||||
* Must be a non-negative integer.
|
||||
* An object instance is valid against "maxProperties" if its number of properties is greater than,
|
||||
* or equal to, the value of this keyword.
|
||||
* Omitting this keyword has the same behavior as a value of 0.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
|
||||
*/
|
||||
minProperties?: number | undefined;
|
||||
|
||||
/**
|
||||
* Elements of this array must be unique.
|
||||
* An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
|
||||
* Omitting this keyword has the same behavior as an empty array.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
|
||||
*/
|
||||
required?: string[] | undefined;
|
||||
|
||||
/**
|
||||
* This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
|
||||
* Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
|
||||
* the child instance for that name successfully validates against the corresponding schema.
|
||||
* Omitting this keyword has the same behavior as an empty object.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
|
||||
*/
|
||||
properties?: {
|
||||
[k: string]: JSONSchema6Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is an object that defines the schema for a set of property names of an object instance.
|
||||
* The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.
|
||||
* If the pattern matches the name of a property on the instance object, the value of the instance's property
|
||||
* MUST be valid against the pattern name's schema value.
|
||||
* Omitting this keyword has the same behavior as an empty object.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
|
||||
*/
|
||||
patternProperties?: {
|
||||
[k: string]: JSONSchema6Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
|
||||
* If specified, the value MUST be a schema or a boolean.
|
||||
* If false is provided, no additional properties are allowed beyond the properties defined in the schema.
|
||||
* The default value is an empty schema which allows any value for additional properties.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
|
||||
*/
|
||||
additionalProperties?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
|
||||
* Each property specifies a dependency.
|
||||
* If the dependency value is an array, each element in the array must be unique.
|
||||
* Omitting this keyword has the same behavior as an empty object.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
|
||||
*/
|
||||
dependencies?: {
|
||||
[k: string]: JSONSchema6Definition | string[];
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* Takes a schema which validates the names of all properties rather than their values.
|
||||
* Note the property name that the schema is testing will always be a string.
|
||||
* Omitting this keyword has the same behavior as an empty schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
|
||||
*/
|
||||
propertyNames?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* This provides an enumeration of all possible values that are valid
|
||||
* for the instance property. This MUST be an array, and each item in
|
||||
* the array represents a possible value for the instance value. If
|
||||
* this attribute is defined, the instance value MUST be one of the
|
||||
* values in the array in order for the schema to be valid.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
|
||||
*/
|
||||
enum?: JSONSchema6Type[] | undefined;
|
||||
|
||||
/**
|
||||
* More readable form of a one-element "enum"
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
|
||||
*/
|
||||
const?: JSONSchema6Type | undefined;
|
||||
|
||||
/**
|
||||
* A single type, or a union of simple types
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
|
||||
*/
|
||||
type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
||||
*/
|
||||
allOf?: JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
||||
*/
|
||||
anyOf?: JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
||||
*/
|
||||
oneOf?: JSONSchema6Definition[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
|
||||
*/
|
||||
not?: JSONSchema6Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
|
||||
*/
|
||||
definitions?: {
|
||||
[k: string]: JSONSchema6Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a short description of the instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
|
||||
*/
|
||||
title?: string | undefined;
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a full description of the of purpose the instance property.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
|
||||
*/
|
||||
description?: string | undefined;
|
||||
|
||||
/**
|
||||
* This keyword can be used to supply a default JSON value associated with a particular schema.
|
||||
* It is RECOMMENDED that a default value be valid against the associated schema.
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
|
||||
*/
|
||||
default?: JSONSchema6Type | undefined;
|
||||
|
||||
/**
|
||||
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
||||
*/
|
||||
examples?: JSONSchema6Type[] | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
|
||||
*/
|
||||
format?: string | undefined;
|
||||
}
|
||||
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 07
|
||||
// ==================================================================================================
|
||||
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Primitive type
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
||||
*/
|
||||
export type JSONSchema7TypeName =
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null";
|
||||
|
||||
/**
|
||||
* Primitive type
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
||||
*/
|
||||
export type JSONSchema7Type =
|
||||
| string //
|
||||
| number
|
||||
| boolean
|
||||
| JSONSchema7Object
|
||||
| JSONSchema7Array
|
||||
| null;
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
export interface JSONSchema7Object {
|
||||
[key: string]: JSONSchema7Type;
|
||||
}
|
||||
|
||||
// Workaround for infinite type recursion
|
||||
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
||||
export interface JSONSchema7Array extends Array<JSONSchema7Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-07/schema#'
|
||||
* - 'http://json-schema.org/draft-07/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema7Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema v7
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
||||
*/
|
||||
export type JSONSchema7Definition = JSONSchema7 | boolean;
|
||||
export interface JSONSchema7 {
|
||||
$id?: string | undefined;
|
||||
$ref?: string | undefined;
|
||||
$schema?: JSONSchema7Version | undefined;
|
||||
$comment?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
|
||||
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
||||
*/
|
||||
$defs?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
||||
*/
|
||||
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
|
||||
enum?: JSONSchema7Type[] | undefined;
|
||||
const?: JSONSchema7Type | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
||||
*/
|
||||
multipleOf?: number | undefined;
|
||||
maximum?: number | undefined;
|
||||
exclusiveMaximum?: number | undefined;
|
||||
minimum?: number | undefined;
|
||||
exclusiveMinimum?: number | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
||||
*/
|
||||
maxLength?: number | undefined;
|
||||
minLength?: number | undefined;
|
||||
pattern?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
||||
*/
|
||||
items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
|
||||
additionalItems?: JSONSchema7Definition | undefined;
|
||||
maxItems?: number | undefined;
|
||||
minItems?: number | undefined;
|
||||
uniqueItems?: boolean | undefined;
|
||||
contains?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
||||
*/
|
||||
maxProperties?: number | undefined;
|
||||
minProperties?: number | undefined;
|
||||
required?: string[] | undefined;
|
||||
properties?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
patternProperties?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
additionalProperties?: JSONSchema7Definition | undefined;
|
||||
dependencies?: {
|
||||
[key: string]: JSONSchema7Definition | string[];
|
||||
} | undefined;
|
||||
propertyNames?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
||||
*/
|
||||
if?: JSONSchema7Definition | undefined;
|
||||
then?: JSONSchema7Definition | undefined;
|
||||
else?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
||||
*/
|
||||
allOf?: JSONSchema7Definition[] | undefined;
|
||||
anyOf?: JSONSchema7Definition[] | undefined;
|
||||
oneOf?: JSONSchema7Definition[] | undefined;
|
||||
not?: JSONSchema7Definition | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
||||
*/
|
||||
format?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
|
||||
*/
|
||||
contentMediaType?: string | undefined;
|
||||
contentEncoding?: string | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
|
||||
*/
|
||||
definitions?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
||||
*/
|
||||
title?: string | undefined;
|
||||
description?: string | undefined;
|
||||
default?: JSONSchema7Type | undefined;
|
||||
readOnly?: boolean | undefined;
|
||||
writeOnly?: boolean | undefined;
|
||||
examples?: JSONSchema7Type | undefined;
|
||||
}
|
||||
|
||||
export interface ValidationResult {
|
||||
valid: boolean;
|
||||
errors: ValidationError[];
|
||||
}
|
||||
|
||||
export interface ValidationError {
|
||||
property: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* To use the validator call JSONSchema.validate with an instance object and an optional schema object.
|
||||
* If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
|
||||
* that schema will be used to validate and the schema parameter is not necessary (if both exist,
|
||||
* both validations will occur).
|
||||
*/
|
||||
export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult;
|
||||
|
||||
/**
|
||||
* The checkPropertyChange method will check to see if an value can legally be in property with the given schema
|
||||
* This is slightly different than the validate method in that it will fail if the schema is readonly and it will
|
||||
* not check for self-validation, it is assumed that the passed in value is already internally valid.
|
||||
*/
|
||||
export function checkPropertyChange(
|
||||
value: any,
|
||||
schema: JSONSchema4 | JSONSchema6 | JSONSchema7,
|
||||
property: string,
|
||||
): ValidationResult;
|
||||
|
||||
/**
|
||||
* This checks to ensure that the result is valid and will throw an appropriate error message if it is not.
|
||||
*/
|
||||
export function mustBeValid(result: ValidationResult): void;
|
||||
40
node_modules/@types/json-schema/package.json
generated
vendored
Normal file
40
node_modules/@types/json-schema/package.json
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "@types/json-schema",
|
||||
"version": "7.0.15",
|
||||
"description": "TypeScript definitions for json-schema",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Boris Cherny",
|
||||
"githubUsername": "bcherny",
|
||||
"url": "https://github.com/bcherny"
|
||||
},
|
||||
{
|
||||
"name": "Lucian Buzzo",
|
||||
"githubUsername": "lucianbuzzo",
|
||||
"url": "https://github.com/lucianbuzzo"
|
||||
},
|
||||
{
|
||||
"name": "Roland Groza",
|
||||
"githubUsername": "rolandjitsu",
|
||||
"url": "https://github.com/rolandjitsu"
|
||||
},
|
||||
{
|
||||
"name": "Jason Kwok",
|
||||
"githubUsername": "JasonHK",
|
||||
"url": "https://github.com/JasonHK"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/json-schema"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "79984fd70cd25c3f7d72b84368778c763c89728ea0073832d745d4691b705257",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/@types/semver/LICENSE
generated
vendored
Normal file
21
node_modules/@types/semver/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/semver/README.md
generated
vendored
Normal file
15
node_modules/@types/semver/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/semver`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for semver (https://github.com/npm/node-semver).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 20 Nov 2023 23:36:24 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [BendingBender](https://github.com/BendingBender), [Lucian Buzzo](https://github.com/LucianBuzzo), [Klaus Meinhardt](https://github.com/ajafff), [ExE Boss](https://github.com/ExE-Boss), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
||||
17
node_modules/@types/semver/classes/comparator.d.ts
generated
vendored
Normal file
17
node_modules/@types/semver/classes/comparator.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("./semver");
|
||||
|
||||
declare class Comparator {
|
||||
constructor(comp: string | Comparator, optionsOrLoose?: boolean | semver.Options);
|
||||
|
||||
semver: SemVer;
|
||||
operator: "" | "=" | "<" | ">" | "<=" | ">=";
|
||||
value: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
parse(comp: string): void;
|
||||
test(version: string | SemVer): boolean;
|
||||
intersects(comp: Comparator, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
}
|
||||
|
||||
export = Comparator;
|
||||
21
node_modules/@types/semver/classes/range.d.ts
generated
vendored
Normal file
21
node_modules/@types/semver/classes/range.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import semver = require("../index");
|
||||
import Comparator = require("./comparator");
|
||||
import SemVer = require("./semver");
|
||||
|
||||
declare class Range {
|
||||
constructor(range: string | Range, optionsOrLoose?: boolean | semver.RangeOptions);
|
||||
|
||||
range: string;
|
||||
raw: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
includePrerelease: boolean;
|
||||
format(): string;
|
||||
inspect(): string;
|
||||
|
||||
set: ReadonlyArray<readonly Comparator[]>;
|
||||
parseRange(range: string): readonly Comparator[];
|
||||
test(version: string | SemVer): boolean;
|
||||
intersects(range: Range, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
}
|
||||
export = Range;
|
||||
62
node_modules/@types/semver/classes/semver.d.ts
generated
vendored
Normal file
62
node_modules/@types/semver/classes/semver.d.ts
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import semver = require("../index");
|
||||
|
||||
declare class SemVer {
|
||||
constructor(version: string | SemVer, optionsOrLoose?: boolean | semver.RangeOptions);
|
||||
|
||||
raw: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
format(): string;
|
||||
inspect(): string;
|
||||
|
||||
major: number;
|
||||
minor: number;
|
||||
patch: number;
|
||||
version: string;
|
||||
build: readonly string[];
|
||||
prerelease: ReadonlyArray<string | number>;
|
||||
|
||||
/**
|
||||
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
compare(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares the release portion of two versions.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
compareMain(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares the prerelease portion of two versions.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
comparePre(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* Compares the build identifier of two versions.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `this` == `other`
|
||||
* - `1` if `this` is greater
|
||||
* - `-1` if `other` is greater.
|
||||
*/
|
||||
compareBuild(other: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
inc(release: semver.ReleaseType, identifier?: string): SemVer;
|
||||
}
|
||||
|
||||
export = SemVer;
|
||||
8
node_modules/@types/semver/functions/clean.d.ts
generated
vendored
Normal file
8
node_modules/@types/semver/functions/clean.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid.
|
||||
*/
|
||||
declare function clean(version: string, optionsOrLoose?: boolean | semver.Options): string | null;
|
||||
|
||||
export = clean;
|
||||
16
node_modules/@types/semver/functions/cmp.d.ts
generated
vendored
Normal file
16
node_modules/@types/semver/functions/cmp.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Pass in a comparison string, and it'll call the corresponding semver comparison function.
|
||||
* "===" and "!==" do simple string comparison, but are included for completeness.
|
||||
* Throws if an invalid comparison string is provided.
|
||||
*/
|
||||
declare function cmp(
|
||||
v1: string | SemVer,
|
||||
operator: semver.Operator,
|
||||
v2: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): boolean;
|
||||
|
||||
export = cmp;
|
||||
12
node_modules/@types/semver/functions/coerce.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/functions/coerce.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Coerces a string to SemVer if possible
|
||||
*/
|
||||
declare function coerce(
|
||||
version: string | number | SemVer | null | undefined,
|
||||
options?: semver.CoerceOptions,
|
||||
): SemVer | null;
|
||||
|
||||
export = coerce;
|
||||
21
node_modules/@types/semver/functions/compare-build.d.ts
generated
vendored
Normal file
21
node_modules/@types/semver/functions/compare-build.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Compares two versions including build identifiers (the bit after `+` in the semantic version string).
|
||||
*
|
||||
* Sorts in ascending order when passed to `Array.sort()`.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `v1` == `v2`
|
||||
* - `1` if `v1` is greater
|
||||
* - `-1` if `v2` is greater.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*/
|
||||
declare function compareBuild(
|
||||
a: string | SemVer,
|
||||
b: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): 1 | 0 | -1;
|
||||
export = compareBuild;
|
||||
5
node_modules/@types/semver/functions/compare-loose.d.ts
generated
vendored
Normal file
5
node_modules/@types/semver/functions/compare-loose.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
declare function compareLoose(v1: string | SemVer, v2: string | SemVer): 1 | 0 | -1;
|
||||
|
||||
export = compareLoose;
|
||||
20
node_modules/@types/semver/functions/compare.d.ts
generated
vendored
Normal file
20
node_modules/@types/semver/functions/compare.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
|
||||
*
|
||||
* Sorts in ascending order when passed to `Array.sort()`.
|
||||
*
|
||||
* @return
|
||||
* - `0` if `v1` == `v2`
|
||||
* - `1` if `v1` is greater
|
||||
* - `-1` if `v2` is greater.
|
||||
*/
|
||||
declare function compare(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): 1 | 0 | -1;
|
||||
|
||||
export = compare;
|
||||
9
node_modules/@types/semver/functions/diff.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/diff.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same.
|
||||
*/
|
||||
declare function diff(v1: string | SemVer, v2: string | SemVer): semver.ReleaseType | null;
|
||||
|
||||
export = diff;
|
||||
9
node_modules/@types/semver/functions/eq.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/eq.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings.
|
||||
*/
|
||||
declare function eq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = eq;
|
||||
9
node_modules/@types/semver/functions/gt.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/gt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 > v2
|
||||
*/
|
||||
declare function gt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = gt;
|
||||
9
node_modules/@types/semver/functions/gte.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/gte.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 >= v2
|
||||
*/
|
||||
declare function gte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = gte;
|
||||
25
node_modules/@types/semver/functions/inc.d.ts
generated
vendored
Normal file
25
node_modules/@types/semver/functions/inc.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
declare namespace inc {
|
||||
/** Base number to be used for the prerelease identifier */
|
||||
type IdentifierBase = "0" | "1";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the version incremented by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if it's not valid.
|
||||
*/
|
||||
declare function inc(
|
||||
version: string | SemVer,
|
||||
release: semver.ReleaseType,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
identifier?: string,
|
||||
): string | null;
|
||||
declare function inc(
|
||||
version: string | SemVer,
|
||||
release: semver.ReleaseType,
|
||||
identifier?: string,
|
||||
identifierBase?: inc.IdentifierBase | false,
|
||||
): string | null;
|
||||
|
||||
export = inc;
|
||||
9
node_modules/@types/semver/functions/lt.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/lt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 < v2
|
||||
*/
|
||||
declare function lt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = lt;
|
||||
8
node_modules/@types/semver/functions/lte.d.ts
generated
vendored
Normal file
8
node_modules/@types/semver/functions/lte.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 <= v2
|
||||
*/
|
||||
declare function lte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
export = lte;
|
||||
9
node_modules/@types/semver/functions/major.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/major.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the major version number.
|
||||
*/
|
||||
declare function major(version: string | SemVer, optionsOrLoose?: boolean | semver.Options): number;
|
||||
|
||||
export = major;
|
||||
9
node_modules/@types/semver/functions/minor.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/minor.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the minor version number.
|
||||
*/
|
||||
declare function minor(version: string | SemVer, optionsOrLoose?: boolean | semver.Options): number;
|
||||
|
||||
export = minor;
|
||||
9
node_modules/@types/semver/functions/neq.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/neq.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* v1 != v2 The opposite of eq.
|
||||
*/
|
||||
declare function neq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | semver.Options): boolean;
|
||||
|
||||
export = neq;
|
||||
12
node_modules/@types/semver/functions/parse.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/functions/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the parsed version as a SemVer object, or null if it's not valid.
|
||||
*/
|
||||
declare function parse(
|
||||
version: string | SemVer | null | undefined,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): SemVer | null;
|
||||
|
||||
export = parse;
|
||||
9
node_modules/@types/semver/functions/patch.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/patch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the patch version number.
|
||||
*/
|
||||
declare function patch(version: string | SemVer, optionsOrLoose?: boolean | semver.Options): number;
|
||||
|
||||
export = patch;
|
||||
12
node_modules/@types/semver/functions/prerelease.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/functions/prerelease.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Returns an array of prerelease components, or null if none exist.
|
||||
*/
|
||||
declare function prerelease(
|
||||
version: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): ReadonlyArray<string | number> | null;
|
||||
|
||||
export = prerelease;
|
||||
15
node_modules/@types/semver/functions/rcompare.d.ts
generated
vendored
Normal file
15
node_modules/@types/semver/functions/rcompare.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* The reverse of compare.
|
||||
*
|
||||
* Sorts in descending order when passed to `Array.sort()`.
|
||||
*/
|
||||
declare function rcompare(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): 1 | 0 | -1;
|
||||
|
||||
export = rcompare;
|
||||
9
node_modules/@types/semver/functions/rsort.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/rsort.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Sorts an array of semver entries in descending order using `compareBuild()`.
|
||||
*/
|
||||
declare function rsort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | semver.Options): T[];
|
||||
|
||||
export = rsort;
|
||||
14
node_modules/@types/semver/functions/satisfies.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/functions/satisfies.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if the version satisfies the range.
|
||||
*/
|
||||
declare function satisfies(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = satisfies;
|
||||
9
node_modules/@types/semver/functions/sort.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/functions/sort.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Sorts an array of semver entries in ascending order using `compareBuild()`.
|
||||
*/
|
||||
declare function sort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | semver.Options): T[];
|
||||
|
||||
export = sort;
|
||||
11
node_modules/@types/semver/functions/valid.d.ts
generated
vendored
Normal file
11
node_modules/@types/semver/functions/valid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
/**
|
||||
* Return the parsed version as a string, or null if it's not valid.
|
||||
*/
|
||||
declare function valid(
|
||||
version: string | SemVer | null | undefined,
|
||||
optionsOrLoose?: boolean | semver.Options,
|
||||
): string | null;
|
||||
|
||||
export = valid;
|
||||
128
node_modules/@types/semver/index.d.ts
generated
vendored
Normal file
128
node_modules/@types/semver/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
// re-exports for index file
|
||||
|
||||
// functions for working with versions
|
||||
import semverParse = require("./functions/parse");
|
||||
import semverValid = require("./functions/valid");
|
||||
import semverClean = require("./functions/clean");
|
||||
import semverInc = require("./functions/inc");
|
||||
import semverDiff = require("./functions/diff");
|
||||
import semverMajor = require("./functions/major");
|
||||
import semverMinor = require("./functions/minor");
|
||||
import semverPatch = require("./functions/patch");
|
||||
import semverPrerelease = require("./functions/prerelease");
|
||||
import semverCompare = require("./functions/compare");
|
||||
import semverRcompare = require("./functions/rcompare");
|
||||
import semverCompareLoose = require("./functions/compare-loose");
|
||||
import semverCompareBuild = require("./functions/compare-build");
|
||||
import semverSort = require("./functions/sort");
|
||||
import semverRsort = require("./functions/rsort");
|
||||
|
||||
export {
|
||||
semverClean as clean,
|
||||
semverCompare as compare,
|
||||
semverCompareBuild as compareBuild,
|
||||
semverCompareLoose as compareLoose,
|
||||
semverDiff as diff,
|
||||
semverInc as inc,
|
||||
semverMajor as major,
|
||||
semverMinor as minor,
|
||||
semverParse as parse,
|
||||
semverPatch as patch,
|
||||
semverPrerelease as prerelease,
|
||||
semverRcompare as rcompare,
|
||||
semverRsort as rsort,
|
||||
semverSort as sort,
|
||||
semverValid as valid,
|
||||
};
|
||||
|
||||
// low-level comparators between versions
|
||||
import semverGt = require("./functions/gt");
|
||||
import semverLt = require("./functions/lt");
|
||||
import semverEq = require("./functions/eq");
|
||||
import semverNeq = require("./functions/neq");
|
||||
import semverGte = require("./functions/gte");
|
||||
import semverLte = require("./functions/lte");
|
||||
import semverCmp = require("./functions/cmp");
|
||||
import semverCoerce = require("./functions/coerce");
|
||||
|
||||
export {
|
||||
semverCmp as cmp,
|
||||
semverCoerce as coerce,
|
||||
semverEq as eq,
|
||||
semverGt as gt,
|
||||
semverGte as gte,
|
||||
semverLt as lt,
|
||||
semverLte as lte,
|
||||
semverNeq as neq,
|
||||
};
|
||||
|
||||
// working with ranges
|
||||
import semverSatisfies = require("./functions/satisfies");
|
||||
import semverMaxSatisfying = require("./ranges/max-satisfying");
|
||||
import semverMinSatisfying = require("./ranges/min-satisfying");
|
||||
import semverToComparators = require("./ranges/to-comparators");
|
||||
import semverMinVersion = require("./ranges/min-version");
|
||||
import semverValidRange = require("./ranges/valid");
|
||||
import semverOutside = require("./ranges/outside");
|
||||
import semverGtr = require("./ranges/gtr");
|
||||
import semverLtr = require("./ranges/ltr");
|
||||
import semverIntersects = require("./ranges/intersects");
|
||||
import simplify = require("./ranges/simplify");
|
||||
import rangeSubset = require("./ranges/subset");
|
||||
|
||||
export {
|
||||
rangeSubset as subset,
|
||||
semverGtr as gtr,
|
||||
semverIntersects as intersects,
|
||||
semverLtr as ltr,
|
||||
semverMaxSatisfying as maxSatisfying,
|
||||
semverMinSatisfying as minSatisfying,
|
||||
semverMinVersion as minVersion,
|
||||
semverOutside as outside,
|
||||
semverSatisfies as satisfies,
|
||||
semverToComparators as toComparators,
|
||||
semverValidRange as validRange,
|
||||
simplify as simplifyRange,
|
||||
};
|
||||
|
||||
// classes
|
||||
import SemVer = require("./classes/semver");
|
||||
import Range = require("./classes/range");
|
||||
import Comparator = require("./classes/comparator");
|
||||
|
||||
export { Comparator, Range, SemVer };
|
||||
|
||||
// internals
|
||||
import identifiers = require("./internals/identifiers");
|
||||
export import compareIdentifiers = identifiers.compareIdentifiers;
|
||||
export import rcompareIdentifiers = identifiers.rcompareIdentifiers;
|
||||
|
||||
export const SEMVER_SPEC_VERSION: "2.0.0";
|
||||
|
||||
export const RELEASE_TYPES: ReleaseType[];
|
||||
|
||||
export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease";
|
||||
|
||||
export interface Options {
|
||||
loose?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface RangeOptions extends Options {
|
||||
includePrerelease?: boolean | undefined;
|
||||
}
|
||||
export interface CoerceOptions extends Options {
|
||||
/**
|
||||
* Used by `coerce()` to coerce from right to left.
|
||||
*
|
||||
* @default false
|
||||
*
|
||||
* @example
|
||||
* coerce('1.2.3.4', { rtl: true });
|
||||
* // => SemVer { version: '2.3.4', ... }
|
||||
*
|
||||
* @since 6.2.0
|
||||
*/
|
||||
rtl?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type Operator = "===" | "!==" | "" | "=" | "==" | "!=" | ">" | ">=" | "<" | "<=";
|
||||
13
node_modules/@types/semver/internals/identifiers.d.ts
generated
vendored
Normal file
13
node_modules/@types/semver/internals/identifiers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Compares two identifiers, must be numeric strings or truthy/falsy values.
|
||||
*
|
||||
* Sorts in ascending order when passed to `Array.sort()`.
|
||||
*/
|
||||
export function compareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||
|
||||
/**
|
||||
* The reverse of compareIdentifiers.
|
||||
*
|
||||
* Sorts in descending order when passed to `Array.sort()`.
|
||||
*/
|
||||
export function rcompareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||
50
node_modules/@types/semver/package.json
generated
vendored
Normal file
50
node_modules/@types/semver/package.json
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "@types/semver",
|
||||
"version": "7.5.6",
|
||||
"description": "TypeScript definitions for semver",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Bart van der Schoor",
|
||||
"githubUsername": "Bartvds",
|
||||
"url": "https://github.com/Bartvds"
|
||||
},
|
||||
{
|
||||
"name": "BendingBender",
|
||||
"githubUsername": "BendingBender",
|
||||
"url": "https://github.com/BendingBender"
|
||||
},
|
||||
{
|
||||
"name": "Lucian Buzzo",
|
||||
"githubUsername": "LucianBuzzo",
|
||||
"url": "https://github.com/LucianBuzzo"
|
||||
},
|
||||
{
|
||||
"name": "Klaus Meinhardt",
|
||||
"githubUsername": "ajafff",
|
||||
"url": "https://github.com/ajafff"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"githubUsername": "ExE-Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
},
|
||||
{
|
||||
"name": "Piotr Błażejewicz",
|
||||
"githubUsername": "peterblazejewicz",
|
||||
"url": "https://github.com/peterblazejewicz"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/semver"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "514fe51677a803481dc4a7c81866abc13c1ba8759d86ef517f2416e25a3d0b64",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
2
node_modules/@types/semver/preload.d.ts
generated
vendored
Normal file
2
node_modules/@types/semver/preload.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import semver = require(".");
|
||||
export = semver;
|
||||
14
node_modules/@types/semver/ranges/gtr.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/gtr.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if version is greater than all the versions possible in the range.
|
||||
*/
|
||||
declare function gtr(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = gtr;
|
||||
13
node_modules/@types/semver/ranges/intersects.d.ts
generated
vendored
Normal file
13
node_modules/@types/semver/ranges/intersects.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if any of the ranges comparators intersect
|
||||
*/
|
||||
declare function intersects(
|
||||
range1: string | Range,
|
||||
range2: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = intersects;
|
||||
14
node_modules/@types/semver/ranges/ltr.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/ltr.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if version is less than all the versions possible in the range.
|
||||
*/
|
||||
declare function ltr(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
|
||||
export = ltr;
|
||||
14
node_modules/@types/semver/ranges/max-satisfying.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/max-satisfying.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the highest version in the list that satisfies the range, or null if none of them do.
|
||||
*/
|
||||
declare function maxSatisfying<T extends string | SemVer>(
|
||||
versions: readonly T[],
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): T | null;
|
||||
|
||||
export = maxSatisfying;
|
||||
14
node_modules/@types/semver/ranges/min-satisfying.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/min-satisfying.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the lowest version in the list that satisfies the range, or null if none of them do.
|
||||
*/
|
||||
declare function minSatisfying<T extends string | SemVer>(
|
||||
versions: readonly T[],
|
||||
range: string | Range,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): T | null;
|
||||
|
||||
export = minSatisfying;
|
||||
10
node_modules/@types/semver/ranges/min-version.d.ts
generated
vendored
Normal file
10
node_modules/@types/semver/ranges/min-version.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the lowest version that can possibly match the given range.
|
||||
*/
|
||||
declare function minVersion(range: string | Range, optionsOrLoose?: boolean | semver.Options): SemVer | null;
|
||||
|
||||
export = minVersion;
|
||||
15
node_modules/@types/semver/ranges/outside.d.ts
generated
vendored
Normal file
15
node_modules/@types/semver/ranges/outside.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import Range = require("../classes/range");
|
||||
import SemVer = require("../classes/semver");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if the version is outside the bounds of the range in either the high or low direction.
|
||||
* The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.)
|
||||
*/
|
||||
declare function outside(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
hilo: ">" | "<",
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): boolean;
|
||||
export = outside;
|
||||
14
node_modules/@types/semver/ranges/simplify.d.ts
generated
vendored
Normal file
14
node_modules/@types/semver/ranges/simplify.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return a "simplified" range that matches the same items in `versions` list as the range specified.
|
||||
* Note that it does *not* guarantee that it would match the same versions in all cases,
|
||||
* only for the set of versions provided.
|
||||
* This is useful when generating ranges by joining together multiple versions with `||` programmatically,
|
||||
* to provide the user with something a bit more ergonomic.
|
||||
* If the provided range is shorter in string-length than the generated range, then that is returned.
|
||||
*/
|
||||
declare function simplify(ranges: string[], range: string | Range, options?: semver.Options): string | Range;
|
||||
|
||||
export = simplify;
|
||||
9
node_modules/@types/semver/ranges/subset.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/ranges/subset.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return true if the subRange range is entirely contained by the superRange range.
|
||||
*/
|
||||
declare function subset(sub: string | Range, dom: string | Range, options?: semver.RangeOptions): boolean;
|
||||
|
||||
export = subset;
|
||||
9
node_modules/@types/semver/ranges/to-comparators.d.ts
generated
vendored
Normal file
9
node_modules/@types/semver/ranges/to-comparators.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Mostly just for testing and legacy API reasons
|
||||
*/
|
||||
declare function toComparators(range: string | Range, optionsOrLoose?: boolean | semver.Options): string[][];
|
||||
|
||||
export = toComparators;
|
||||
12
node_modules/@types/semver/ranges/valid.d.ts
generated
vendored
Normal file
12
node_modules/@types/semver/ranges/valid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import Range = require("../classes/range");
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Return the valid range or null if it's not valid
|
||||
*/
|
||||
declare function validRange(
|
||||
range: string | Range | null | undefined,
|
||||
optionsOrLoose?: boolean | semver.RangeOptions,
|
||||
): string | null;
|
||||
|
||||
export = validRange;
|
||||
Reference in New Issue
Block a user