diff --git a/.eslintrc.js b/.eslintrc.js index 4de07388058..4b23abdf553 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,6 +27,9 @@ module.exports = { "@typescript-eslint/ban-types": 0, "template-tag-spacing": 0, "no-magic-numbers": 0, - "camelcase": 0 + "camelcase": 0, + "no-shadow": "off", // eslint compains about TS enums hence disable here and enable @typescript-eslint/no-shadow + "@typescript-eslint/no-shadow": ["error"], + "import/no-unresolved": 0 } } \ No newline at end of file diff --git a/README.md b/README.md index 26685fac9b0..41f5b5a72df 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ _In another terminal_ ```console yarn test ``` +or + +```console +yarn test:debug +``` + ### Lint ```console yarn lint diff --git a/package.json b/package.json index 49c9e1fe320..67cf6b20617 100644 --- a/package.json +++ b/package.json @@ -15,17 +15,20 @@ "docs": "typedoc --packages .", "cleanup": "yarn workspaces run cleanup && shx rm -rf node_modules", "lint": "yarn workspaces run lint", + "tsc": "yarn workspaces run tsc", "prepare": "husky install", "pre-commit": "lint-staged", "mainnet:up": "DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -p sdk-mainnet up", "mainnet:down": "docker-compose -p sdk-mainnet down", "test": "yarn workspaces run test", + "test:debug": "DEBUG=true yarn workspaces run test", "testnet:up": "DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 OGMIOS_PORT=1338 NETWORK=testnet docker-compose -p sdk-testnet up", "testnet:down": "docker-compose -p sdk-testnet down" }, "lint-staged": { "*(apps/**/*.{js,ts}|packages/!(*golden-test-generator)/**/*.{js,ts})": [ - "yarn lint" + "yarn lint", + "yarn tsc" ] }, "repository": { @@ -55,7 +58,7 @@ "eslint": "^7.32.0", "eslint-import-resolver-typescript": "^2.4.0", "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-import": "^2.23.4", + "eslint-plugin-import": "^2.24.2", "eslint-plugin-jest": "^24.4.0", "eslint-plugin-jsdoc": "^36.0.7", "eslint-plugin-prettier": "^3.4.0", diff --git a/packages/blockfrost/package.json b/packages/blockfrost/package.json index d2e07710260..8b89fe09c4a 100644 --- a/packages/blockfrost/package.json +++ b/packages/blockfrost/package.json @@ -12,6 +12,7 @@ "license": "MPL-2.0", "scripts": { "build": "tsc --build ./src", + "tsc": "shx echo typescript --noEmit command not implemented yet", "cleanup": "shx rm -rf dist node_modules", "lint": "eslint --ignore-path ../../.eslintignore \"**/*.ts\"", "test": "jest -c ./test/jest.config.js" @@ -21,6 +22,7 @@ }, "dependencies": { "@blockfrost/blockfrost-js": "^0.9.4", - "@cardano-ogmios/client": "^4.0.0-beta.6" + "@cardano-ogmios/client": "^4.0.0-beta.6", + "@cardano-sdk/core": "0.1.0" } } diff --git a/packages/blockfrost/test/tsconfig.json b/packages/blockfrost/test/tsconfig.json index 7f1ed33a344..e137c531169 100644 --- a/packages/blockfrost/test/tsconfig.json +++ b/packages/blockfrost/test/tsconfig.json @@ -6,5 +6,8 @@ "@src/*": ["../src/*"] } }, - "references": [{ "path": "../src" }] + "references": [ + { "path": "../../core/src" }, + { "path": "../src" } + ] } diff --git a/packages/cardano-graphql-db-sync/package.json b/packages/cardano-graphql-db-sync/package.json index 1d1c5d95dc7..4f50c9eb953 100644 --- a/packages/cardano-graphql-db-sync/package.json +++ b/packages/cardano-graphql-db-sync/package.json @@ -12,6 +12,7 @@ "license": "MPL-2.0", "scripts": { "build": "tsc --build ./src", + "tsc": "shx echo typescript --noEmit command not implemented yet", "cleanup": "shx rm -rf dist node_modules", "lint": "eslint --ignore-path ../../.eslintignore \"**/*.ts\"", "test": "jest -c ./test/jest.config.js" diff --git a/packages/cip30/.gitignore b/packages/cip30/.gitignore new file mode 100644 index 00000000000..09f6463dd87 --- /dev/null +++ b/packages/cip30/.gitignore @@ -0,0 +1,3 @@ +node_modules +dist +secrets \ No newline at end of file diff --git a/packages/cip30/README.md b/packages/cip30/README.md new file mode 100644 index 00000000000..4eb0c20e67a --- /dev/null +++ b/packages/cip30/README.md @@ -0,0 +1 @@ +# Cardano JS SDK | CIP30 diff --git a/packages/cip30/package.json b/packages/cip30/package.json new file mode 100644 index 00000000000..03706343092 --- /dev/null +++ b/packages/cip30/package.json @@ -0,0 +1,29 @@ +{ + "name": "@cardano-sdk/cip30", + "version": "0.1.0", + "description": "TypeScript definitions for the dApp Connector standard CIP30", + "engines": { + "node": "^14" + }, + "main": "dist/index.js", + "repository": "https://github.com/input-output-hk/cardano-js-sdk/packages/cip30", + "author": "James Sweetland", + "license": "MPL-2.0", + "scripts": { + "build": "tsc --build ./src", + "tsc": "shx echo typescript --noEmit command not implemented yet", + "cleanup": "shx rm -rf dist node_modules", + "lint": "eslint --ignore-path ../../.eslintignore \"**/*.ts\"", + "test": "jest -c ./test/jest.config.js", + "test:debug": "DEBUG=true yarn test" + }, + "devDependencies": { + "mock-browser": "^0.92.14", + "shx": "^0.3.3" + }, + "dependencies": { + "@cardano-ogmios/client": "^4.0.0-beta.6", + "ts-custom-error": "^3.2.0", + "ts-log": "^2.2.3" + } +} diff --git a/packages/cip30/src/.eslintrc.js b/packages/cip30/src/.eslintrc.js new file mode 100644 index 00000000000..5605db3e076 --- /dev/null +++ b/packages/cip30/src/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + "extends": ["../../../.eslintrc.js"], + "parserOptions": { + "project": "./tsconfig.json", + "tsconfigRootDir": __dirname + } +} \ No newline at end of file diff --git a/packages/cip30/src/Wallet/Wallet.ts b/packages/cip30/src/Wallet/Wallet.ts new file mode 100644 index 00000000000..9172a29a6ac --- /dev/null +++ b/packages/cip30/src/Wallet/Wallet.ts @@ -0,0 +1,176 @@ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ + +import { WalletApi } from './WalletApi'; +import { ApiError, APIErrorCode } from '../errors'; +import { dummyLogger, Logger } from 'ts-log'; +import { WalletPublic } from './WalletPublic'; + +/** + * CIP30 Specification version + */ +export type SpecificationVersion = string; + +/** + * Unique identifier, used to inject into the cardano namespace + */ +export type WalletName = string; + +/** + * This is the entrypoint to start communication with the user's wallet. + * + * The wallet should request the user's permission to connect the web page to the user's wallet, + * and if permission has been granted, the full API will be returned to the dApp to use. + * + * The wallet can choose to maintain a whitelist to not necessarily ask the user's permission + * every time access is requested, but this behavior is up to the wallet and should be transparent + * to web pages using this API. + * + * If a wallet is already connected this function should not request access a second time, + * and instead just return the API object. + * + * Errors: `ApiError` + */ +export type Enable = () => Promise; + +/** + * Returns true if the dApp is already connected to the user's wallet, or if requesting access + * would return true without user confirmation (e.g. the dApp is whitelisted), and false otherwise. + * + * If this function returns true, then any subsequent calls to wallet.enable() + * during the current session should succeed and return the API object. + * + * Errors: `ApiError` + */ +export type IsEnabled = () => Promise; + +export type WalletProperties = { name: WalletName; version: SpecificationVersion }; + +/** + * Resolve true to authorise access to the WalletAPI, or resolve false to deny. + * + * Errors: `ApiError` + */ +export type RequestAccess = () => Promise; + +export type WalletOptions = { + logger?: Logger; + persistAllowList?: boolean; + storage?: Storage; +}; + +export class Wallet { + readonly version: SpecificationVersion; + readonly name: WalletName; + + private allowList: string[]; + private logger: Logger; + + constructor( + properties: WalletProperties, + private api: WalletApi, + private window: Window & { cardano?: Record }, + private requestAccess: RequestAccess, + private options?: WalletOptions + ) { + this.logger = options.logger ?? dummyLogger; + this.name = properties.name; + this.version = properties.version; + + if (typeof options.persistAllowList === 'undefined') { + options.persistAllowList = false; + } + + this.allowList = this.options.persistAllowList ? this.getAllowList() : []; + + if (!this.window.cardano) { + this.logger.debug( + { + module: 'Wallet', + walletName: this.name + }, + 'Creating cardano global scope' + ); + this.window.cardano = {}; + } else { + this.logger.debug( + { + module: 'Wallet', + walletName: this.name + }, + 'Cardano global scope exists' + ); + } + + const walletPublic: WalletPublic = { + name: this.name, + version: this.version, + enable: this.enable, + isEnabled: this.isEnabled + }; + this.window.cardano[properties.name] = this.window.cardano[properties.name] || walletPublic; + + this.logger.debug( + { + module: 'Wallet', + walletName: this.name, + globalCardanoScope: this.window.cardano, + allowList: this.allowList + }, + 'Constructed' + ); + } + + private getAllowList(): string[] { + return JSON.parse(this.options.storage?.getItem(window.location.hostname)) || []; + } + + private allowApplication(appName: string) { + this.allowList.push(appName); + + if (this.options.persistAllowList) { + const currentList = this.getAllowList(); + // Todo: Encrypt + this.options.storage?.setItem(window.location.hostname, JSON.stringify([...currentList, appName])); + this.logger.debug( + { + module: 'Wallet', + walletName: this.name, + allowList: this.getAllowList() + }, + 'Allow list persisted' + ); + } + } + + async isEnabled() { + const appName = this.window.location.hostname; + + return this.allowList.includes(appName); + } + + async enable() { + const appName = this.window.location.hostname; + + if (this.options.persistAllowList && this.allowList.includes(appName)) { + this.logger.debug( + { + module: 'Wallet', + walletName: this.name + }, + `${appName} has previously been allowed` + ); + return this.api; + } + + // gain authorization from wallet owner + const isAuthed = await this.requestAccess(); + + if (!isAuthed) { + throw new ApiError(APIErrorCode.Refused, 'wallet not authorized.'); + } + + this.allowApplication(appName); + + return this.api; + } +} diff --git a/packages/cip30/src/Wallet/WalletApi.ts b/packages/cip30/src/Wallet/WalletApi.ts new file mode 100644 index 00000000000..54237eaec0b --- /dev/null +++ b/packages/cip30/src/Wallet/WalletApi.ts @@ -0,0 +1,125 @@ +import Schema from '@cardano-ogmios/schema'; +import { Bytes, Cbor, Paginate } from '../dataTypes'; + +/** + * If `amount` is `undefined`, this shall return a list of all UTxOs (unspent transaction outputs) + * controlled by the wallet. + * + * If `amount` is not `undefined`, this request shall be limited to just the UTxOs that are required + * to reach the combined ADA/multi-asset value target specified in `amount`, + * and if this cannot be attained, `undefined` shall be returned. + * + * The results can be further paginated by `paginate` if it is not `undefined`. + * + * Errors: `ApiError` | `PaginateError` + */ +export type GetUtxos = (amount?: Cbor, paginate?: Paginate) => Promise; + +/** + * Returns the total balance available of the wallet. + * + * This is the same as summing the results of `api.getUtxos()`, but it is both useful to dApps + * and likely already maintained by the implementing wallet in a more efficient manner + * so it has been included in the API as well. + * + * Errors: `ApiError` + */ +export type GetBalance = () => Promise; + +/** + * Returns a list of all used (included in some on-chain transaction) addresses controlled by the wallet. + * + * The results can be further paginated by `paginate` if it is not `undefined`. + * + * Errors: `ApiError` | `PaginateError` + */ +export type GetUsedAddresses = (paginate?: Paginate) => Promise; + +/** + * Returns a list of unused addresses controlled by the wallet. + * + * Errors: `ApiError` + */ +export type GetUnusedAddresses = () => Promise; + +/** + * Returns an address owned by the wallet that should be used as a change address to return + * leftover assets during transaction creation back to the connected wallet. + * + * This can be used as a generic receive address as well. + * + * Errors: `ApiError` + */ +export type GetChangeAddress = () => Promise; + +/** + * Returns the reward addresses owned by the wallet. This can return multiple addresses e.g. CIP-0018. + * + * Errors: `ApiError` + */ +export type GetRewardAddresses = () => Promise; + +/** + * Requests that a user sign the unsigned portions of the supplied transaction. + * + * The wallet should ask the user for permission, and if given, + * try to sign the supplied body and return a signed transaction. + * + * If `partialSign` is `true`, the wallet only tries to sign what it can. + * + * If `partialSign` is `false` and the wallet could not sign the entire transaction, + * `TxSignError` shall be returned with the `ProofGeneration` code. + * + * Likewise if the user declined in either case it shall return the `UserDeclined` code. + * + * Only the portions of the witness set that were signed as a result of this call are + * returned to encourage dApps to verify the contents returned by this endpoint while building the final transaction. + * + * Errors: `ApiError` | `TxSignError` + */ +export type SignTx = (tx: Cbor, partialSign?: Boolean) => Promise; + +/** + * This endpoint utilizes the CIP-0008 signing spec for standardization/safety reasons. + * + * It allows the dApp to request the user to sign data conforming to said spec. + * + * The user's consent should be requested and the details of `sig_structure` shown to them in an informative way. + * + * Please refer to the CIP-0008 spec for details on how to construct the sig structure. + * + * Errors: `ApiError` | `DataSignError` + */ +export type SignData = (addr: Cbor, sigStructure: Cbor) => Promise; + +/** + * As wallets should already have this ability, we allow dApps to request that a transaction be sent through it. + * + * If the wallet accepts the transaction and tries to send it, it shall return the transaction id for the dApp to track. + * + * The wallet is free to return the `TxSendError` with code `Refused` if they do not wish to send it, + * or `Failure` if there was an error in sending it (e.g. preliminary checks failed on signatures). + * + * Errors: `ApiError` | `TxSendError` + */ +export type SubmitTx = (tx: Cbor) => Promise; + +export interface WalletApi { + getUtxos: GetUtxos; + + getBalance: GetBalance; + + getUsedAddresses: GetUsedAddresses; + + getUnusedAddresses: GetUnusedAddresses; + + getChangeAddress: GetChangeAddress; + + getRewardAddresses: GetRewardAddresses; + + signTx: SignTx; + + signData: SignData; + + submitTx: SubmitTx; +} diff --git a/packages/cip30/src/Wallet/WalletPublic.ts b/packages/cip30/src/Wallet/WalletPublic.ts new file mode 100644 index 00000000000..6f3bca0d28b --- /dev/null +++ b/packages/cip30/src/Wallet/WalletPublic.ts @@ -0,0 +1,7 @@ +import { Enable, IsEnabled, WalletProperties } from './Wallet'; + +export interface WalletPublic extends WalletProperties { + enable: Enable; + + isEnabled: IsEnabled; +} diff --git a/packages/cip30/src/Wallet/index.ts b/packages/cip30/src/Wallet/index.ts new file mode 100644 index 00000000000..32239f52f49 --- /dev/null +++ b/packages/cip30/src/Wallet/index.ts @@ -0,0 +1,3 @@ +export * from './Wallet'; +export * from './WalletApi'; +export * from './WalletPublic'; diff --git a/packages/cip30/src/dataTypes.ts b/packages/cip30/src/dataTypes.ts new file mode 100644 index 00000000000..14f4491041c --- /dev/null +++ b/packages/cip30/src/dataTypes.ts @@ -0,0 +1,18 @@ +/** + * A hex-encoded string of the corresponding bytes. + */ +export type Bytes = string; + +/** + * A hex-encoded string representing CBOR either inside + * of the Shelley Multi-asset binary spec or, if not present there, + * from the CIP-0008 signing spec. + */ +export type Cbor = string; + +/** + * Used to specify optional pagination for some API calls. +Limits results to {limit} each page, and uses a 0-indexing {page} +to refer to which of those pages of {limit} items each. + */ +export type Paginate = { page: number; limit: number }; diff --git a/packages/cip30/src/errors/ApiError.ts b/packages/cip30/src/errors/ApiError.ts new file mode 100644 index 00000000000..f41e923af43 --- /dev/null +++ b/packages/cip30/src/errors/ApiError.ts @@ -0,0 +1,22 @@ +import { CustomError } from 'ts-custom-error'; + +/** + * - InvalidRequest - Inputs do not conform to this spec or are otherwise invalid. + * - InternalError - An error occurred during execution of this API call. + * - Refused - The request was refused due to lack of access - e.g. wallet disconnects. + */ +export enum APIErrorCode { + InvalidRequest = -1, + InternalError = -2, + Refused = -3 +} +export class ApiError extends CustomError { + code: APIErrorCode; + info: string; + + public constructor(code: APIErrorCode, info: string) { + super(); + this.code = code; + this.info = info; + } +} diff --git a/packages/cip30/src/errors/DataSignError.ts b/packages/cip30/src/errors/DataSignError.ts new file mode 100644 index 00000000000..6174cf9d4c2 --- /dev/null +++ b/packages/cip30/src/errors/DataSignError.ts @@ -0,0 +1,25 @@ +import { CustomError } from 'ts-custom-error'; + +/** + * - ProofGeneration - Wallet could not sign the data (e.g. does not have the secret key associated with the address) + * - AddressNotPK - Address was not a P2PK address and thus had no SK associated with it. + * - UserDeclined - User declined to sign the data + * - InvalidFormat - If a wallet enforces data format requirements, this error signifies that + * the data did not conform to valid formats. + */ +export enum DataSignErrorCode { + ProofGeneration = 1, + AddressNotPK = 2, + UserDeclined = 3, + InvalidFormat = 4 +} +export class DataSignError extends CustomError { + code: DataSignErrorCode; + info: string; + + public constructor(code: DataSignErrorCode, info: string) { + super(); + this.code = code; + this.info = info; + } +} diff --git a/packages/cip30/src/errors/PaginateError.ts b/packages/cip30/src/errors/PaginateError.ts new file mode 100644 index 00000000000..39931015a7c --- /dev/null +++ b/packages/cip30/src/errors/PaginateError.ts @@ -0,0 +1,15 @@ +import { CustomError } from 'ts-custom-error'; + +/** + * {maxSize} is the maximum size for pagination and if the dApp tries to + * request pages outside of this boundary this error is thrown. + */ +export class PaginateError extends CustomError { + maxSize: number; + + public constructor(maxSize: number, message: string) { + super(); + this.maxSize = maxSize; + this.message = message; + } +} diff --git a/packages/cip30/src/errors/TxSendError.ts b/packages/cip30/src/errors/TxSendError.ts new file mode 100644 index 00000000000..dd1dfb0725c --- /dev/null +++ b/packages/cip30/src/errors/TxSendError.ts @@ -0,0 +1,20 @@ +import { CustomError } from 'ts-custom-error'; + +/** + * - Refused - Wallet refuses to send the tx (could be rate limiting) + * - Failure - Wallet could not send the tx + */ +export enum TxSendErrorCode { + Refused = 1, + Failure = 2 +} +export class TxSendError extends CustomError { + code: TxSendErrorCode; + info: string; + + public constructor(code: TxSendErrorCode, info: string) { + super(); + this.code = code; + this.info = info; + } +} diff --git a/packages/cip30/src/errors/TxSignError.ts b/packages/cip30/src/errors/TxSignError.ts new file mode 100644 index 00000000000..2522df5f94b --- /dev/null +++ b/packages/cip30/src/errors/TxSignError.ts @@ -0,0 +1,21 @@ +import { CustomError } from 'ts-custom-error'; + +/** + * ProofGeneration - User has accepted the transaction sign, but the wallet was + * unable to sign the transaction (e.g. not having some of the private keys) + * - UserDeclined - User declined to sign the transaction + */ +enum TxSignErrorCode { + ProofGeneration = 1, + UserDeclined = 2 +} +export class TxSignError extends CustomError { + code: TxSignErrorCode; + info: string; + + public constructor(code: TxSignErrorCode, info: string) { + super(); + this.code = code; + this.info = info; + } +} diff --git a/packages/cip30/src/errors/index.ts b/packages/cip30/src/errors/index.ts new file mode 100644 index 00000000000..6e2ba5d9dae --- /dev/null +++ b/packages/cip30/src/errors/index.ts @@ -0,0 +1,5 @@ +export * from './ApiError'; +export * from './DataSignError'; +export * from './PaginateError'; +export * from './TxSendError'; +export * from './TxSignError'; diff --git a/packages/cip30/src/index.ts b/packages/cip30/src/index.ts new file mode 100644 index 00000000000..c674b85faa6 --- /dev/null +++ b/packages/cip30/src/index.ts @@ -0,0 +1,3 @@ +export * from './errors'; +export * from './Wallet'; +export * from './dataTypes'; diff --git a/packages/cip30/src/tsconfig.json b/packages/cip30/src/tsconfig.json new file mode 100644 index 00000000000..7894adceb0e --- /dev/null +++ b/packages/cip30/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "outDir": "../dist/", + "rootDir": "." + } +} diff --git a/packages/cip30/test/.eslintrc.js b/packages/cip30/test/.eslintrc.js new file mode 100644 index 00000000000..57d007c190f --- /dev/null +++ b/packages/cip30/test/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + "extends": ["../../../test/.eslintrc.js"], + "parserOptions": { + "project": "./tsconfig.json", + "tsconfigRootDir": __dirname + } +} diff --git a/packages/cip30/test/Wallet.test.ts b/packages/cip30/test/Wallet.test.ts new file mode 100644 index 00000000000..ddb5673bbf9 --- /dev/null +++ b/packages/cip30/test/Wallet.test.ts @@ -0,0 +1,179 @@ +/* eslint-disable sonarjs/no-duplicate-string */ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { RequestAccess, Wallet, WalletApi, WalletOptions } from '@src/Wallet'; +import { mocks } from 'mock-browser'; + +const window = mocks.MockBrowser.createWindow(); + +const props = { name: 'test-wallet', version: '0.1.0' }; +const _api = { + getUtxos: async (_amount) => [ + [ + { txId: '123456', index: 0 }, + { address: 'asdf', value: { coins: 100, assets: {} } } + ] + ], + getBalance: async () => '100', + getUsedAddresses: async () => ['used-address-1', 'used-address-2', 'used-address-3'], + getUnusedAddresses: async () => ['unused-address-1', 'unused-address-2', 'unused-address-3'], + getChangeAddress: async () => 'change-address', + getRewardAddresses: async () => ['reward-address-1', 'reward-address-2'], + signTx: async (_tx) => 'signedTransaction', + signData: async (_addr, _sig) => 'signedData', + submitTx: async (_tx) => 'transactionId' +}; +const requestAccess: RequestAccess = async () => true; +// todo test persistAllowList: true when design is finalised +const options: WalletOptions = { persistAllowList: false }; + +if (process.env.DEBUG) { + options.logger = console; +} +const wallet = new Wallet(props, _api, window, requestAccess, options); + +describe('Wallet', () => { + const apiMethods = [ + 'getUtxos', + 'getBalance', + 'getUsedAddresses', + 'getUnusedAddresses', + 'getChangeAddress', + 'getRewardAddresses', + 'signTx', + 'signData', + 'submitTx' + ]; + + test('wallet version', () => { + expect(wallet.version).toBeDefined(); + expect(typeof wallet.version).toBe('string'); + expect(wallet.version).toBe('0.1.0'); + }); + + test('wallet name', () => { + expect(wallet.name).toBeDefined(); + expect(typeof wallet.name).toBe('string'); + expect(wallet.name).toBe('test-wallet'); + }); + + test('isEnabled should be false', async () => { + expect(wallet.isEnabled).toBeDefined(); + expect(typeof wallet.isEnabled).toBe('function'); + + const isEnabled = await wallet.isEnabled(); + expect(typeof isEnabled).toBe('boolean'); + expect(isEnabled).toBe(false); + }); + + test('enable', async () => { + expect(wallet.enable).toBeDefined(); + expect(typeof wallet.enable).toBe('function'); + + const api = await wallet.enable(); + expect(api).toBeTruthy(); + expect(typeof api).toBe('object'); + + const methods = Object.keys(api); + expect(methods).toEqual(apiMethods); + }); + + test('isEnabled should be true', async () => { + const isEnabled = await wallet.isEnabled(); + expect(isEnabled).toBe(true); + }); + + test('cardano object exists in global scope', async () => { + expect(window.cardano).toBeDefined(); + }); + + test('cardano.walletName is type CardanoWalletPublic', async () => { + expect(window.cardano['test-wallet']).toBeDefined(); + expect(Object.keys(window.cardano['test-wallet'])).toEqual(['name', 'version', 'enable', 'isEnabled']); + }); + + describe('api', () => { + let api: WalletApi | null; + + beforeAll(async () => { + api = await wallet.enable(); + }); + + test('getUtxos', async () => { + expect(api.getUtxos).toBeDefined(); + expect(typeof api.getUtxos).toBe('function'); + + const uxtos = await api.getUtxos(); + expect(uxtos).toEqual([ + [ + { txId: '123456', index: 0 }, + { address: 'asdf', value: { coins: 100, assets: {} } } + ] + ]); + }); + + test('getBalance', async () => { + expect(api.getBalance).toBeDefined(); + expect(typeof api.getBalance).toBe('function'); + + const balance = await api.getBalance(); + expect(balance).toEqual('100'); + }); + + test('getUsedAddresses', async () => { + expect(api.getUsedAddresses).toBeDefined(); + expect(typeof api.getUsedAddresses).toBe('function'); + + const usedAddresses = await api.getUsedAddresses(); + expect(usedAddresses).toEqual(['used-address-1', 'used-address-2', 'used-address-3']); + }); + + test('getUnusedAddresses', async () => { + expect(api.getUnusedAddresses).toBeDefined(); + expect(typeof api.getUnusedAddresses).toBe('function'); + + const unusedAddresses = await api.getUnusedAddresses(); + expect(unusedAddresses).toEqual(['unused-address-1', 'unused-address-2', 'unused-address-3']); + }); + + test('getChangeAddress', async () => { + expect(api.getChangeAddress).toBeDefined(); + expect(typeof api.getChangeAddress).toBe('function'); + + const changeAddress = await api.getChangeAddress(); + expect(changeAddress).toEqual('change-address'); + }); + + test('getRewardAddresses', async () => { + expect(api.getRewardAddresses).toBeDefined(); + expect(typeof api.getRewardAddresses).toBe('function'); + + const rewardAddresses = await api.getRewardAddresses(); + expect(rewardAddresses).toEqual(['reward-address-1', 'reward-address-2']); + }); + + test('signTx', async () => { + expect(api.signTx).toBeDefined(); + expect(typeof api.signTx).toBe('function'); + + const signedTx = await api.signTx('tx'); + expect(signedTx).toEqual('signedTransaction'); + }); + + test('signData', async () => { + expect(api.signData).toBeDefined(); + expect(typeof api.signData).toBe('function'); + + const signedData = await api.signData('addr', 'sig'); + expect(signedData).toEqual('signedData'); + }); + + test('submitTx', async () => { + expect(api.submitTx).toBeDefined(); + expect(typeof api.submitTx).toBe('function'); + + const txId = await api.submitTx('tx'); + expect(txId).toEqual('transactionId'); + }); + }); +}); diff --git a/packages/cip30/test/index.d.ts b/packages/cip30/test/index.d.ts new file mode 100644 index 00000000000..4b82bed8454 --- /dev/null +++ b/packages/cip30/test/index.d.ts @@ -0,0 +1 @@ +declare module 'mock-browser'; diff --git a/packages/cip30/test/jest.config.js b/packages/cip30/test/jest.config.js new file mode 100644 index 00000000000..044de67cd91 --- /dev/null +++ b/packages/cip30/test/jest.config.js @@ -0,0 +1,11 @@ +const { pathsToModuleNameMapper } = require('ts-jest/utils') +const { compilerOptions } = require('./tsconfig') + +module.exports = { + moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths), + preset: 'ts-jest', + transform: { + "^.+\\.test.ts?$": "ts-jest" + }, + testTimeout: 120000 +} diff --git a/packages/cip30/test/tsconfig.json b/packages/cip30/test/tsconfig.json new file mode 100644 index 00000000000..7f1ed33a344 --- /dev/null +++ b/packages/cip30/test/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@src/*": ["../src/*"] + } + }, + "references": [{ "path": "../src" }] +} diff --git a/packages/core/package.json b/packages/core/package.json index 693f615d979..c1c646ad153 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -11,6 +11,7 @@ "license": "MPL-2.0", "scripts": { "build": "tsc --build ./src", + "tsc": "shx echo typescript --noEmit command not implemented yet", "cleanup": "shx rm -rf dist node_modules", "lint": "eslint --ignore-path ../../.eslintignore \"**/*.ts\"", "test": "shx echo No tests in this package" diff --git a/packages/golden-test-generator/package.json b/packages/golden-test-generator/package.json index 936deaee2f4..1c34a7c4acf 100644 --- a/packages/golden-test-generator/package.json +++ b/packages/golden-test-generator/package.json @@ -12,6 +12,7 @@ "license": "MPL-2.0", "scripts": { "build": "tsc --build ./src", + "tsc": "shx echo typescript --noEmit command not implemented yet", "cleanup": "shx rm -rf dist node_modules", "dev": "API_PORT=3000 OGMIOS_HOST=localhost OGMIOS_PORT=1337 ts-node-dev ./src/index.ts", "lint": "shx echo linting disabled in this package temporarily", diff --git a/yarn.lock b/yarn.lock index 2f145bcc2b0..869f635a6f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1426,6 +1426,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/keyv@*": version "3.1.2" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.2.tgz#5d97bb65526c20b6e0845f6b0d2ade4f28604ee5" @@ -1763,6 +1768,11 @@ JSONStream@^1.0.4: jsonparse "^1.2.0" through ">=2.2.7 <3" +abab@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= + abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" @@ -1773,6 +1783,13 @@ abbrev@^1.1.1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + integrity sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8= + dependencies: + acorn "^4.0.4" + acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -1791,6 +1808,11 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= + acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" @@ -1816,7 +1838,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1950,6 +1972,11 @@ array-differ@^3.0.0: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -1995,13 +2022,18 @@ asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -asn1@~0.2.0: +asn1@~0.2.0, asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== dependencies: safer-buffer "~2.1.0" +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -2022,6 +2054,16 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + axios@^0.21.1: version "0.21.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" @@ -2112,7 +2154,7 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bcrypt-pbkdf@^1.0.2: +bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= @@ -2296,6 +2338,11 @@ caniuse-lite@^1.0.30001219: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz#45b941bbd833cb0fa53861ff2bae746b3c6ca5d4" integrity sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA== +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + chalk@4.1.1, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" @@ -2516,7 +2563,7 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.8: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -2568,6 +2615,11 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= +content-type-parser@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" + integrity sha512-lM4l4CnMEwOLHAHr/P6MEZwZFPJFtAAKgL6pogbXmVZggIqXhdB6RbBtPOTsw2FcXwYhehRGERJmRrjOiIB8pQ== + conventional-changelog-angular@^5.0.11: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" @@ -2615,7 +2667,7 @@ core-js@^3.6.5: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.2.tgz#3f485822889c7fc48ef463e35be5cc2a4a01a1f4" integrity sha512-P0KPukO6OjMpjBtHSceAZEWlDD1M2Cpzpg6dBbrjFqFhBHe/BwhxaP820xKOjRn/lZRQirrCusIpLS/n2sgXLQ== -core-util-is@~1.0.0: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= @@ -2668,15 +2720,22 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0", cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= + dependencies: + cssom "0.3.x" cssstyle@^2.3.0: version "2.3.0" @@ -2690,6 +2749,13 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -2933,6 +2999,14 @@ dynamic-dedupe@^0.3.0: dependencies: xtend "^4.0.0" +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + electron-to-chromium@^1.3.723: version "1.3.778" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.778.tgz#bf01048736c95b78f2988e88005e0ebb385942a4" @@ -3054,6 +3128,18 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +escodegen@^1.6.1: + version "1.14.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -3071,13 +3157,13 @@ eslint-config-formidable@4.0.0: resolved "https://registry.yarnpkg.com/eslint-config-formidable/-/eslint-config-formidable-4.0.0.tgz#b3a472780e42ae46c288af537e808e45f8b7c6dd" integrity sha512-q23C58Kf24Ob4dlwZQE5/JwvmrQ1UyxsW1j8+jNJgDKh+KhEySj3DRGkzy3lJ0556AEApGYoU7IC4gvmJ7iiKA== -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== dependencies: - debug "^2.6.9" - resolve "^1.13.1" + debug "^3.2.7" + resolve "^1.20.0" eslint-import-resolver-typescript@^2.4.0: version "2.4.0" @@ -3090,10 +3176,10 @@ eslint-import-resolver-typescript@^2.4.0: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-module-utils@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" - integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== +eslint-module-utils@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" + integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== dependencies: debug "^3.2.7" pkg-dir "^2.0.0" @@ -3108,26 +3194,26 @@ eslint-plugin-filenames@^1.3.2: lodash.snakecase "4.1.1" lodash.upperfirst "4.3.1" -eslint-plugin-import@^2.23.4: - version "2.23.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" - integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== +eslint-plugin-import@^2.24.2: + version "2.24.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz#2c8cd2e341f3885918ee27d18479910ade7bb4da" + integrity sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q== dependencies: array-includes "^3.1.3" array.prototype.flat "^1.2.4" debug "^2.6.9" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.1" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.6.2" find-up "^2.0.0" has "^1.0.3" - is-core-module "^2.4.0" + is-core-module "^2.6.0" minimatch "^3.0.4" - object.values "^1.1.3" + object.values "^1.1.4" pkg-up "^2.0.0" read-pkg-up "^3.0.0" resolve "^1.20.0" - tsconfig-paths "^3.9.0" + tsconfig-paths "^3.11.0" eslint-plugin-jest@^24.4.0: version "24.4.0" @@ -3321,7 +3407,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: +estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -3408,6 +3494,11 @@ expect@^27.0.6: jest-message-util "^27.0.6" jest-regex-util "^27.0.6" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -3422,6 +3513,16 @@ extract-files@^9.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -3540,6 +3641,11 @@ follow-redirects@^1.10.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.2.tgz#cecb825047c00f5e66b142f90fed4f515dec789b" integrity sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA== +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -3558,6 +3664,15 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + from2@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -3684,6 +3799,13 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + git-last-commit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/git-last-commit/-/git-last-commit-1.0.0.tgz#49acbad49b0ec4dae33d3a3ac7ab0a1bacf4928e" @@ -3840,6 +3962,19 @@ handlebars@^4.7.7: optionalDependencies: uglify-js "^3.1.4" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -3896,6 +4031,13 @@ hosted-git-info@^4.0.1, hosted-git-info@^4.0.2: dependencies: lru-cache "^6.0.0" +html-encoding-sniffer@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== + dependencies: + whatwg-encoding "^1.0.1" + html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -3922,6 +4064,15 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" @@ -4104,14 +4255,14 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" -is-core-module@^2.2.0, is-core-module@^2.4.0: +is-core-module@^2.2.0: version "2.4.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== dependencies: has "^1.0.3" -is-core-module@^2.5.0: +is-core-module@^2.5.0, is-core-module@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== @@ -4264,7 +4415,7 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typedarray@^1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -4301,6 +4452,11 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + istanbul-lib-coverage@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" @@ -4786,6 +4942,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + jsdoc-type-pratt-parser@1.1.1, jsdoc-type-pratt-parser@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.1.1.tgz#10fe5e409ba38de22a48b555598955a26ff0160f" @@ -4824,6 +4985,31 @@ jsdom@^16.6.0: ws "^7.4.5" xml-name-validator "^3.0.0" +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + integrity sha1-6MVG//ywbADUgzyoRBD+1/igl9Q= + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4872,12 +5058,17 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stringify-safe@^5.0.1: +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= @@ -4889,6 +5080,13 @@ json5@2.x, json5@^2.1.2, json5@^2.2.0: dependencies: minimist "^1.2.5" +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -4903,6 +5101,16 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + jszip@3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.0.tgz#9b8b995a4e7c9024653ce743e902076a82fdf4e6" @@ -5303,7 +5511,7 @@ lodash.values@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347" integrity sha1-o6bCsOvsxcLLocF+bmIP6BtT00c= -lodash@4.x, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: +lodash@4.x, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.5, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5459,6 +5667,11 @@ mime-db@1.48.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== + mime-types@^2.1.12: version "2.1.31" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" @@ -5466,6 +5679,13 @@ mime-types@^2.1.12: dependencies: mime-db "1.48.0" +mime-types@~2.1.19: + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== + dependencies: + mime-db "1.49.0" + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -5544,6 +5764,14 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.5" +mock-browser@^0.92.14: + version "0.92.14" + resolved "https://registry.yarnpkg.com/mock-browser/-/mock-browser-0.92.14.tgz#53a87200edfc5dddbe2b460023b2a88125b745e2" + integrity sha1-U6hyAO38Xd2+K0YAI7KogSW3ReI= + dependencies: + jsdom "^9.12.0" + lodash "^4.5" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -5730,11 +5958,21 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" + integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== + nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5765,7 +6003,7 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.values@^1.1.3: +object.values@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== @@ -6012,6 +6250,11 @@ parse5@6.0.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -6068,6 +6311,11 @@ pegjs@^0.10.0: resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd" integrity sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0= +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -6296,7 +6544,7 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.33: +psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== @@ -6336,6 +6584,11 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6473,6 +6726,32 @@ repeating@^3.0.0: resolved "https://registry.yarnpkg.com/repeating/-/repeating-3.0.0.tgz#f4c376fdd2015761f6f96f4303b1224d581e802f" integrity sha1-9MN2/dIBV2H2+W9DA7EiTVgegC8= +request@^2.79.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -6512,7 +6791,7 @@ resolve-global@1.0.0, resolve-global@^1.0.0: dependencies: global-dirs "^0.1.1" -resolve@^1.0.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0: +resolve@^1.0.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.17.0, resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -6590,7 +6869,7 @@ rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7: dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -6607,12 +6886,12 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@>=0.6.0, sax@^1.2.4: +sax@>=0.6.0, sax@^1.2.1, sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -7202,6 +7481,21 @@ ssh2@^0.8.7: dependencies: ssh2-streams "~0.4.10" +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + stack-utils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" @@ -7428,7 +7722,7 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" -symbol-tree@^3.2.4: +symbol-tree@^3.2.1, symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== @@ -7604,6 +7898,14 @@ toml@3.0.0, toml@^3.0.0: resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== +tough-cookie@^2.3.2, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + tough-cookie@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" @@ -7620,6 +7922,11 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" @@ -7661,6 +7968,11 @@ ts-jest@^27.0.3: semver "7.x" yargs-parser "20.x" +ts-log@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.3.tgz#4da5640fe25a9fb52642cd32391c886721318efb" + integrity sha512-XvB+OdKSJ708Dmf9ore4Uf/q62AYDTzFcAdxc8KNML1mmAWywRFVt/dn1KYJH8Agt5UJNujfM3znU5PxgAzA2w== + ts-node-dev@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/ts-node-dev/-/ts-node-dev-1.1.8.tgz#95520d8ab9d45fffa854d6668e2f8f9286241066" @@ -7705,6 +8017,16 @@ ts-node@^9.0.0: source-map-support "^0.5.17" yn "3.1.1" +tsconfig-paths@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" + integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tsconfig-paths@^3.9.0: version "3.10.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7" @@ -7763,7 +8085,7 @@ tunnel@^0.0.6: resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== -tweetnacl@^0.14.3: +tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= @@ -7912,6 +8234,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + uuid@^8.2.0, uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -7939,6 +8266,15 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + vscode-languageserver-types@^3.16.0: version "3.16.0" resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" @@ -7977,6 +8313,16 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + webidl-conversions@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" @@ -7987,7 +8333,7 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -whatwg-encoding@^1.0.5: +whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== @@ -7999,6 +8345,14 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + integrity sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whatwg-url@^8.0.0, whatwg-url@^8.5.0: version "8.7.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" @@ -8126,6 +8480,11 @@ xml-js@^1.6.11: dependencies: sax "^1.2.4" +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= + xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"