diff --git a/.eslintrc b/.eslintrc index a3af6b3..919c12e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,13 +1,13 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], + "plugins": ["@typescript-eslint"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended" ], - "rules": {} + "rules": { + "@typescript-eslint/no-explicit-any": "off" + } } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..46b6e88 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +node_modules +.github +dist diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..a261b7c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": true, + "singleQuote": true, + "printWidth": 80, + "trailingComma": "es5" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c56ff..963492e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,39 +4,34 @@ All notable changes to this project will be documented in this file. See [standa ## [3.0.0](https://github.com/windingtree/org.id-sdk/compare/v1.2.0...v3.0.0) (2022-10-27) - ### Features -* Added support for creation of an ORGiD using multisig wallet ([8dd9b11](https://github.com/windingtree/org.id-sdk/commit/8dd9b11cb0dc7befe344e2f96a684978c2e05e78)) +- Added support for creation of an ORGiD using multisig wallet ([8dd9b11](https://github.com/windingtree/org.id-sdk/commit/8dd9b11cb0dc7befe344e2f96a684978c2e05e78)) ## [1.1.0](https://github.com/windingtree/org.id-sdk/compare/v1.0.0...v1.1.0) (2022-10-22) - ### Features -* First version with JWT creation ([35cfa81](https://github.com/windingtree/org.id-sdk/commit/35cfa81677a3804a0dfc4aa7c619408c6619d731)) - +- First version with JWT creation ([35cfa81](https://github.com/windingtree/org.id-sdk/commit/35cfa81677a3804a0dfc4aa7c619408c6619d731)) ### Bug Fixes -* Fixed release action script ([6455370](https://github.com/windingtree/org.id-sdk/commit/645537012b5c0f852b8839814305593a59162af1)) -* Fixed tests action script ([61af659](https://github.com/windingtree/org.id-sdk/commit/61af6593f96036d61bf05ecf2dafedb28575498e)) +- Fixed release action script ([6455370](https://github.com/windingtree/org.id-sdk/commit/645537012b5c0f852b8839814305593a59162af1)) +- Fixed tests action script ([61af659](https://github.com/windingtree/org.id-sdk/commit/61af6593f96036d61bf05ecf2dafedb28575498e)) ## [1.0.0](https://github.com/windingtree/org.id-sdk/compare/v1.0.0-beta.48...v1.0.0) (2022-10-21) - ### Features -* add auth headers to ipfs requests ([2fa1803](https://github.com/windingtree/org.id-sdk/commit/2fa1803f23f5b66c4aa40127f0226f1cc497b7ed)) -* added env IPFS_API_HOST ([eaa7f15](https://github.com/windingtree/org.id-sdk/commit/eaa7f15090641e71969a580a90a082e23694cb4a)) +- add auth headers to ipfs requests ([2fa1803](https://github.com/windingtree/org.id-sdk/commit/2fa1803f23f5b66c4aa40127f0226f1cc497b7ed)) +- added env IPFS_API_HOST ([eaa7f15](https://github.com/windingtree/org.id-sdk/commit/eaa7f15090641e71969a580a90a082e23694cb4a)) ## [1.0.0-beta.48](https://github.com/windingtree/org.id-sdk/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2022-01-21) ## [1.0.0-beta.47](https://github.com/windingtree/org.id-sdk/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2022-01-18) - ### Bug Fixes -* could not detect network CLI issue ([0844997](https://github.com/windingtree/org.id-sdk/commit/084499749d8f833a49b4f4fca7a45ac728667dfe)) +- could not detect network CLI issue ([0844997](https://github.com/windingtree/org.id-sdk/commit/084499749d8f833a49b4f4fca7a45ac728667dfe)) ## 1.0.0-beta.46 (2022-01-14) diff --git a/docs/create.md b/docs/create.md index e5270d8..9b2040d 100644 --- a/docs/create.md +++ b/docs/create.md @@ -70,6 +70,22 @@ orgid --operation keys:import --keyType pem --pubPem ./key.pub --privPem ./pkcs8 > Important! You can import `pkcs8`-formatted private key only +### Import of key pair managed by AWS KMS + +```bash +orgid --operation keys:import --keyType kmsEthereum +``` + +> During the import process you will be prompted enter the following credentials\*: +> +> - `keyId` - unique Key Id that has been created when key has been create on AWS KMS +> - `region` - AWS region in which the key is enabled +> - `accessKeyId` +> - `secretAccessKey` +> +> * all these credentials are mandatory options. +> As usual, you will be prompted for password that will be used for an encryption of key data in the project + ## Bootstrap a new ORGiD ```bash @@ -86,9 +102,12 @@ orgid --operation bootstrap --output ./rawOrgId.json ```bash orgid --operation keys:add --keyType ethereum --delegated true +orgid --operation keys:add --keyType kmsEthereum --delegated true orgid --operation keys:add --keyType pem --delegated true ``` +> If you do not owner of the key you also should add parameter `--controller ` which will point to the owner (its DID) of the key to the verification method record + ## Create ORGiD VC ```bash diff --git a/docs/jwt.md b/docs/jwt.md index d6dccb4..f1ec9a8 100644 --- a/docs/jwt.md +++ b/docs/jwt.md @@ -12,7 +12,7 @@ The issuer ORGiD must be registered before a JWT generation orgid --operation jwt --issuer --audience --expiration --scope ,,,... ``` -- `issuer` - the creator and signer of a JWT, full DID, the verification method Id (mandatory) -- `audience` - an entity which will use JWT for accessing an issuer service, DID only (mandatory) +- `issuer` - the creator and signer of a JWT, full DID with the verification method Id (mandatory option) +- `audience` - an entity which will use JWT for accessing an issuer service, DID only (mandatory option) - `scope` - scope of permissions (comma separated strings, optional) - `expiration` - JWT ttl in milliseconds (optional, if not defined a JWT will not be restricted by time) diff --git a/docs/testcases.md b/docs/testcases.md index ba684fa..a7d395e 100644 --- a/docs/testcases.md +++ b/docs/testcases.md @@ -308,14 +308,9 @@ Here is an example of created ORGiD VC file: ```json { - "@context": [ - "https://www.w3.org/2018/credentials/v1" - ], + "@context": ["https://www.w3.org/2018/credentials/v1"], "id": "a1b0e326-81c4-46c8-9776-ae065ffc7341", - "type": [ - "VerifiableCredential", - "OrgJson" - ], + "type": ["VerifiableCredential", "OrgJson"], "issuer": "did:orgid:4:0xd6a429d09a197ad...870f0ee126ae236481fc2b40895b", "issuanceDate": "2021-12-23T01:34:21.401+02:00", "name": "Test entity", @@ -386,57 +381,57 @@ Here is an example of an ORGiD DID resolution: ```json { - "@context": "https://w3id.org/did-resolution/v1", - "did": "did:orgid:4:0xd6a429d09a197adafbe...1fe870f0ee126ae236481fc2b40895b", - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://raw.githubusercontent.com/windingtree/org.json-schema/feat/new-orgid/src/context.json" - ], - "id": "did:orgid:4:0xd6a429d09a19ada...711fe870f0ee126ae236481fc2b40895b", - "created": "2021-12-21T23:32:51.818+02:00", - "verificationMethod": [ - { - "id": "did:orgid:4:0xd6a429d09a...126ae236481f2b40895b#testCliKey1", - "controller": "did:orgid:4:0xd6a429d09a1...0ee26ae236481fc2b40895b", - "type": "EcdsaSecp256k1RecoveryMethod2020", - "blockchainAccountId": "0xeE75487409991A8F...5B0B5E6e99d7A@eip155:4" - } - ], - "legalEntity": { - "legalName": "Test entity", - "registryCode": "123456789", - "legalType": "Lsd", - "registeredAddress": { - "country": "ua", - "locality": "Odesa", - "postalCode": "65000", - "streetAddress": "Deribasovskaya, str 0" - }, - "media": { - "logo": "ipfs://QmSTgJiMGsaRbuieVttWDki3uMHwgqnGMpM9yJ3TXHBnBf" - } + "@context": "https://w3id.org/did-resolution/v1", + "did": "did:orgid:4:0xd6a429d09a197adafbe...1fe870f0ee126ae236481fc2b40895b", + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://raw.githubusercontent.com/windingtree/org.json-schema/feat/new-orgid/src/context.json" + ], + "id": "did:orgid:4:0xd6a429d09a19ada...711fe870f0ee126ae236481fc2b40895b", + "created": "2021-12-21T23:32:51.818+02:00", + "verificationMethod": [ + { + "id": "did:orgid:4:0xd6a429d09a...126ae236481f2b40895b#testCliKey1", + "controller": "did:orgid:4:0xd6a429d09a1...0ee26ae236481fc2b40895b", + "type": "EcdsaSecp256k1RecoveryMethod2020", + "blockchainAccountId": "0xeE75487409991A8F...5B0B5E6e99d7A@eip155:4" + } + ], + "legalEntity": { + "legalName": "Test entity", + "registryCode": "123456789", + "legalType": "Lsd", + "registeredAddress": { + "country": "ua", + "locality": "Odesa", + "postalCode": "65000", + "streetAddress": "Deribasovskaya, str 0" }, - "updated": "2021-12-23T01:34:21.386+02:00" - }, - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2021-12-31T00:05:05.104+02:00", - "duration": 5101, - "resolverVersion": "3.0.0-beta.12" - }, - "didDocumentMetadata": { - "created": "2021-12-21T23:32:51.818+02:00", - "updated": "2021-12-23T01:34:21.386+02:00", - "data":{ - "tokenId": "1", - "orgId": "0xd6a429d09a197adafbe8c0d...70f0ee126ae236481fc2b40895b", - "owner": "0xeE75487409991A8...AdA852B0B5E6e99d7A", - "orgJsonUri": "ipfs://QmVQnh7HJu4FeJZM945PifkCH8CFskYZgUDMSQqgQzDMQ4", - "delegates": [], - "created": "2021-12-22T15:50:49.000Z" + "media": { + "logo": "ipfs://QmSTgJiMGsaRbuieVttWDki3uMHwgqnGMpM9yJ3TXHBnBf" } - } + }, + "updated": "2021-12-23T01:34:21.386+02:00" + }, + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2021-12-31T00:05:05.104+02:00", + "duration": 5101, + "resolverVersion": "3.0.0-beta.12" + }, + "didDocumentMetadata": { + "created": "2021-12-21T23:32:51.818+02:00", + "updated": "2021-12-23T01:34:21.386+02:00", + "data": { + "tokenId": "1", + "orgId": "0xd6a429d09a197adafbe8c0d...70f0ee126ae236481fc2b40895b", + "owner": "0xeE75487409991A8...AdA852B0B5E6e99d7A", + "orgJsonUri": "ipfs://QmVQnh7HJu4FeJZM945PifkCH8CFskYZgUDMSQqgQzDMQ4", + "delegates": [], + "created": "2021-12-22T15:50:49.000Z" + } + } } ``` diff --git a/jest.config.js b/jest.config.js index 356f5bf..eca34f3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,5 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', verbose: true, - testMatch: [ - '**/test/*.spec.ts' - ] + testMatch: ['**/test/*.spec.ts'], }; diff --git a/package.json b/package.json index 66478d0..fb9507c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@windingtree/org.id-cli", - "version": "3.1.2", + "version": "3.2.0", "description": "The ORGiD command-line utility", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -15,6 +15,7 @@ ], "scripts": { "lint": "npx eslint . --ext .ts", + "lint:fix": "npx eslint . --ext .ts --fix && npx prettier --write .", "test": "npx jest", "test:coverage": "npx jest --coverage", "build": "rm -rf dist && npx webpack --config webpack.config.js && chmod +x ./dist/index.js", @@ -51,6 +52,8 @@ "@types/luxon": "^3.0.2", "@types/node": "^18.11.3", "@types/prompts": "^2.4.1", + "@types/bn.js": "^5.1.1", + "@types/asn1": "^0.2.0", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", "eslint": "^8.25.0", @@ -63,6 +66,7 @@ "webpack": "^5.74.0", "webpack-cli": "^4.10.0", "standard-version": "^9.5.0", + "prettier": "^2.7.1", "@windingtree/org.id-auth": "^1.2.4", "@windingtree/org.id-core": "^1.2.4", "@windingtree/org.id-resolver": "^3.2.1", @@ -78,6 +82,9 @@ "luxon": "^3.0.4", "prompts": "^2.4.2", "web3.storage": "^4.4.0", - "axios": "^1.1.3" + "axios": "^1.1.3", + "@aws-sdk/client-kms": "^3.202.0", + "asn1.js": "^5.4.1", + "aws-crt": "^1.14.5" } } diff --git a/src/api/awsKms.ts b/src/api/awsKms.ts new file mode 100644 index 0000000..7963683 --- /dev/null +++ b/src/api/awsKms.ts @@ -0,0 +1,181 @@ +import { + GetPublicKeyCommand, + KMSClient, + KMSClientConfig, + SignCommand, +} from '@aws-sdk/client-kms'; +import { Provider, TransactionRequest } from '@ethersproject/abstract-provider'; +import asn1 from 'asn1.js'; +import BN from 'bn.js'; +import { Bytes, Signer, TypedDataDomain, TypedDataField, utils } from 'ethers'; +import { Deferrable, UnsignedTransaction } from 'ethers/lib/utils'; +import packageJson from '../../package.json'; + +export type EcdsaParser = { + decode: (asnStringBuffer: Buffer, format: 'der') => { r: BN; s: BN }; +}; + +// Public key decoder +const EcdsaPubKey = asn1.define('EcdsaPubKey', function (this: any) { + // https://tools.ietf.org/html/rfc5480#section-2 + this.seq().obj( + this.key('algo') + .seq() + .obj(this.key('algorithm').objid(), this.key('parameters').objid()), + this.key('pubKey').bitstr() // <-- this is what we want + ); +}); + +// Signature decoder +const EcdsaSigAsnParse: EcdsaParser = asn1.define( + 'EcdsaSig', + function (this: any) { + // parsing this according to https://tools.ietf.org/html/rfc3279#section-2.2.3 + this.seq().obj(this.key('r').int(), this.key('s').int()); + } +); + +// Ethers.js compatible AWS KMS Signer +export class AwsKmsSigner extends Signer { + private readonly config: KMSClientConfig; + private readonly client: KMSClient; + private readonly keyId: string; + private readonly logger: utils.Logger; + private rawPublicKey: ArrayBuffer; + public address?: string; + + constructor(keyId: string, config?: KMSClientConfig, provider?: Provider) { + super(); + this.keyId = keyId; + this.config = config ?? {}; + this.client = new KMSClient(this.config); + this.logger = new utils.Logger(packageJson.version); + utils.defineReadOnly(this, 'provider', provider); + } + + async getPublicKey(): Promise { + if (this.rawPublicKey !== undefined) { + return this.rawPublicKey; + } + + const command = new GetPublicKeyCommand({ KeyId: this.keyId }); + const response = await this.client.send(command); + + if (!response.PublicKey) { + throw new Error('AwsKmsSigner: PublicKey is undefined.'); + } + + this.rawPublicKey = Buffer.from(response.PublicKey); + + return this.rawPublicKey; + } + + async getAddress(): Promise { + if (this.address !== undefined) { + return this.address; + } + + const key = await this.getPublicKey(); + const res = EcdsaPubKey.decode(key, 'der'); + let pubKeyBuffer = res.pubKey.data; + pubKeyBuffer = pubKeyBuffer.slice(1, pubKeyBuffer.length); + this.address = utils.getAddress(utils.keccak256(pubKeyBuffer).slice(-40)); + + return this.address; + } + + private async signDigest(digest: string) { + const command = new SignCommand({ + KeyId: this.keyId, + Message: Buffer.from(utils.arrayify(digest)), + MessageType: 'DIGEST', + SigningAlgorithm: 'ECDSA_SHA_256', + }); + const response = await this.client.send(command); + + if (!response.Signature) { + throw new Error('AwsKmsSigner: Signature is undefined.'); + } + + const { r, s } = EcdsaSigAsnParse.decode( + Buffer.from(response.Signature), + 'der' + ); + const secp256k1N = new BN( + 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', + 16 + ); + const secp256k1halfN = secp256k1N.div(new BN(2)); + + const signature = { + r, + s: s.gt(secp256k1halfN) ? secp256k1N.sub(s) : s, + v: 27, + }; + + const address = await this.getAddress(); + const tryAddress = utils.recoverAddress(digest, { + r: `0x${signature.r.toString('hex')}`, + s: `0x${signature.s.toString('hex')}`, + v: signature.v, + }); + + if (address !== tryAddress) { + signature.v = 28; + } + + return utils.joinSignature({ + ...signature, + r: `0x${signature.r.toString('hex')}`, + s: `0x${signature.s.toString('hex')}`, + recoveryParam: 1 - (signature.v % 2), + }); + } + + async signMessage(message: string | Bytes): Promise { + return this.signDigest(utils.hashMessage(message)); + } + + async _signTypedData( + domain: TypedDataDomain, + types: Record>, + value: Record + ): Promise { + const hash = utils._TypedDataEncoder.hash(domain, types, value); + return this.signDigest(hash); + } + + async signTransaction( + transaction: Deferrable + ): Promise { + const unsignedTx = await utils.resolveProperties(transaction); + const address = await this.getAddress(); + + if (unsignedTx.from != null) { + if (utils.getAddress(unsignedTx.from) !== address) { + this.logger.throwArgumentError( + 'transaction from address mismatch', + 'transaction.from', + transaction.from + ); + } + delete unsignedTx.from; + } + + const serializedTx = utils.serializeTransaction( + unsignedTx + ); + const transactionSignature = await this.signDigest( + utils.keccak256(serializedTx) + ); + + return utils.serializeTransaction( + unsignedTx, + transactionSignature + ); + } + + connect(provider: Provider): AwsKmsSigner { + return new AwsKmsSigner(this.keyId, this.config, provider); + } +} diff --git a/src/api/bootstrap.ts b/src/api/bootstrap.ts index 8727ee0..e9c7dff 100644 --- a/src/api/bootstrap.ts +++ b/src/api/bootstrap.ts @@ -1,27 +1,26 @@ -import type { ParsedArgv } from '../utils/env'; -import type { - ProjectOrgIdsReference -} from '../schema/types/project'; +/* eslint-disable no-case-declarations */ import type { AnySchema } from '@windingtree/org.id-utils/dist/object'; +import type { ProjectOrgIdsReference } from '../schema/types/project'; +import type { ParsedArgv } from '../utils/env'; // @todo Move `AnySchema` type declaration to the top level -import type { ORGJSON } from '@windingtree/org.json-schema/types/org.json'; +import { common, object } from '@windingtree/org.id-utils'; import { org as orgJsonSchema } from '@windingtree/org.json-schema'; +import type { ORGJSON } from '@windingtree/org.json-schema/types/org.json'; import { createVerificationMethodWithBlockchainAccountId } from '@windingtree/org.json-utils'; -import { object, common } from '@windingtree/org.id-utils'; -import { printInfo, printWarn, printObject } from '../utils/console'; -import { DateTime } from 'luxon'; -import prompts from 'prompts'; import { utils as ethersUtils } from 'ethers'; -import { - addOrgIdToProject -} from './project'; +import { DateTime } from 'luxon'; +import prompts from 'prompts'; +import { printInfo, printObject, printWarn } from '../utils/console'; +import { AwsKmsSigner } from './awsKms'; import { blockchainNetworks, promptKeyPair } from './common'; import { write } from './fs'; +import { AwsKmsKeyConfig } from './keysImport'; import { parseSafeAddress } from './multisig'; +import { addOrgIdToProject } from './project'; const entityTypeSchemaPath = { legalEntity: 'definitions.LegalEntityReference', - organizationalUnit: 'definitions.OrganizationalUnitReference' + organizationalUnit: 'definitions.OrganizationalUnitReference', }; // Convert JSON schema to a prompt config @@ -34,17 +33,12 @@ export const promptSchema = async ( let properties = schema.properties; if (requiredOnly && schema?.required.length > 0) { - properties = Object - .entries(properties) - .reduce( - (a, v) => { - if (schema.required.includes(v[0])) { - a[v[0]] = v[1]; - } - return a; - }, - {} - ); + properties = Object.entries(properties).reduce((a, v) => { + if (schema.required.includes(v[0])) { + a[v[0]] = v[1]; + } + return a; + }, {}); } for (const prop of Object.entries(properties)) { @@ -67,47 +61,37 @@ export const promptSchema = async ( out[name] = promptsResult; break; case 'string': - if (propSchema.enum) { - promptsResult = await prompts( - { - type: 'select', - name, - message: `"${name}": ${propSchema.description}. Please choose an option`, - choices: propSchema.enum.map(e => ({ - title: e, - value: e - })) - } - ); + promptsResult = await prompts({ + type: 'select', + name, + message: `"${name}": ${propSchema.description}. Please choose an option`, + choices: propSchema.enum.map((e) => ({ + title: e, + value: e, + })), + }); } else { - promptsResult = await prompts( - { - type: 'text', - name, - message: `"${name}": ${propSchema.description}`, - } - ); + promptsResult = await prompts({ + type: 'text', + name, + message: `"${name}": ${propSchema.description}`, + }); } out[name] = promptsResult[name]; break; case 'array': - if (propSchema.items?.allOf[0]?.type === 'string') { - - promptsResult = await prompts( - { - type: 'list', - name, - message: `"${name}": ${propSchema.description}`, - initial: '', - separator: ',' - } - ); + promptsResult = await prompts({ + type: 'list', + name, + message: `"${name}": ${propSchema.description}`, + initial: '', + separator: ',', + }); out[name] = promptsResult[name]; } else { - printWarn( `The property "${name}" of the profile has a type that not supported by CLI yet. Please edit this property in the ORG.JSON file manually` ); @@ -122,14 +106,11 @@ export const promptSchema = async ( return out; }; - - // Operation that helps to bootstrap a new organization profile export const bootstrapOrgJson = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--output']) { throw new Error( 'Path to the output file must be provided using "--output" option' @@ -137,26 +118,23 @@ export const bootstrapOrgJson = async ( } // Prompt for values required for an ORGiD generation - const { networkId } = await prompts( - [ - { - type: 'select', - name: 'networkId', - message: 'Please choose a blockchain network where the ORGiD should be issued', - choices: blockchainNetworks.map(b => ({ - title: b.name, - value: b.id - })), - initial: 0 - } - ] - ); + const { networkId } = await prompts([ + { + type: 'select', + name: 'networkId', + message: + 'Please choose a blockchain network where the ORGiD should be issued', + choices: blockchainNetworks.map((b) => ({ + title: b.name, + value: b.id, + })), + initial: 0, + }, + ]); let accountAddress: string; - const keyPairRecord = await promptKeyPair( - basePath - ); + const keyPairRecord = await promptKeyPair(basePath); if (!keyPairRecord) { throw new Error('Key pair not selected'); @@ -166,14 +144,29 @@ export const bootstrapOrgJson = async ( case 'ethereum': accountAddress = ethersUtils.getAddress(keyPairRecord.publicKey); break; + case 'kmsEthereum': + const config = keyPairRecord.privateKey as unknown as AwsKmsKeyConfig; + const signer = new AwsKmsSigner(config.keyId, { + region: config.region, + credentials: { + accessKeyId: config.accessKeyId, + secretAccessKey: config.secretAccessKey, + }, + }); + accountAddress = await signer.getAddress(); + break; case 'multisig': if (!keyPairRecord.multisig) { throw new Error('Invalid multisig key'); } - accountAddress = ethersUtils.getAddress(parseSafeAddress(keyPairRecord.multisig).address); + accountAddress = ethersUtils.getAddress( + parseSafeAddress(keyPairRecord.multisig).address + ); break; default: - throw new Error(`Key pair of type "${keyPairRecord.type}" cannot be used for issuing an ORGiD`) + throw new Error( + `Key pair of type "${keyPairRecord.type}" cannot be used for issuing an ORGiD` + ); } const salt = common.generateSalt(); @@ -189,46 +182,44 @@ ORGiD DID: ${did}\n` const orgJsonTemplate: ORGJSON = { '@context': [ 'https://www.w3.org/ns/did/v1', - 'https://raw.githubusercontent.com/windingtree/org.json-schema/feat/new-orgid/src/context.json' + 'https://raw.githubusercontent.com/windingtree/org.json-schema/feat/new-orgid/src/context.json', ], id: did, created: DateTime.now().toISO(), verificationMethod: [ ...(keyPairRecord.type === 'ethereum' ? [ - createVerificationMethodWithBlockchainAccountId( - `${did}#${keyPairRecord.tag}`, - did, - 'eip155', - networkId, - accountAddress, - 'Default verification method' - ) - ] - : []) - ] + createVerificationMethodWithBlockchainAccountId( + `${did}#${keyPairRecord.tag}`, + did, + 'eip155', + networkId, + accountAddress, + 'Default verification method' + ), + ] + : []), + ], }; // Selecting of an entity type - const { entityType } = await prompts( - { - type: 'select', - name: 'entityType', - message: 'Please choose a type of entity and press `Enter`', - choices: [ - { - title: 'Legal Entity', - value: 'legalEntity' - }, - { - title: 'Organizational Unit', - value: 'organizationalUnit' - }, - // @todo Add `Person` option - ], - initial: 0 - } - ); + const { entityType } = await prompts({ + type: 'select', + name: 'entityType', + message: 'Please choose a type of entity and press `Enter`', + choices: [ + { + title: 'Legal Entity', + value: 'legalEntity', + }, + { + title: 'Organizational Unit', + value: 'organizationalUnit', + }, + // @todo Add `Person` option + ], + initial: 0, + }); const selectedSchema = object.getDeepValue( orgJsonSchema, @@ -240,27 +231,27 @@ ORGiD DID: ${did}\n` } // Selecting of an entity type - const { requiredOnly } = await prompts( - { - type: 'select', - name: 'requiredOnly', - message: 'Do you want to fill all the properties or required only?', - choices: [ - { - title: 'Required only', - value: true - }, - { - title: 'All the properties', - value: false - } - ], - initial: 0 - } - ); + const { requiredOnly } = await prompts({ + type: 'select', + name: 'requiredOnly', + message: 'Do you want to fill all the properties or required only?', + choices: [ + { + title: 'Required only', + value: true, + }, + { + title: 'All the properties', + value: false, + }, + ], + initial: 0, + }); printInfo( - `\nCreating a profile for "${entityType}" (${requiredOnly ? 'mandatory properties only' : 'all properties'})\n` + `\nCreating a profile for "${entityType}" (${ + requiredOnly ? 'mandatory properties only' : 'all properties' + })\n` ); const entityProfile = await promptSchema( @@ -276,9 +267,7 @@ ORGiD DID: ${did}\n` JSON.stringify(orgJsonTemplate, null, 2) ); - printInfo( - `The ORG.JSON for the DID ${did}:` - ); + printInfo(`The ORG.JSON for the DID ${did}:`); printObject(orgJsonTemplate); @@ -287,7 +276,7 @@ ORGiD DID: ${did}\n` salt, owner: accountAddress, orgJson: outputFile, - date: DateTime.now().toISO() + date: DateTime.now().toISO(), }; await addOrgIdToProject(basePath, orgIdRecord); diff --git a/src/api/changeOrgJson.ts b/src/api/changeOrgJson.ts index d41ecbf..8865ff2 100644 --- a/src/api/changeOrgJson.ts +++ b/src/api/changeOrgJson.ts @@ -1,37 +1,42 @@ -import type { ParsedArgv } from '../utils/env'; +import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; +import { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; import { - promptOrgId, - prepareOrgIdApi, + ProjectKeysReference, + ProjectOrgIdsReference, +} from '../schema/types/project'; +import { + printError, + printInfo, + printMessage, + printObject, +} from '../utils/console'; +import { + createOrgIdInstance, downloadOrgIdVc, + prepareOrgIdApi, promptKeyPair, - createOrgIdInstance + promptOrgId, } from './common'; -import prompts from 'prompts'; -import { printError, printInfo, printMessage, printObject, printWarn } from '../utils/console'; -import { createOrgId } from './createOrgId'; -import { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; -import { parsers, http } from '@windingtree/org.id-utils'; -import { getFromIpfs } from './ipfs'; -import { ProjectKeysReference, ProjectOrgIdsReference } from '../schema/types/project'; -import { updateOrgIdRecord } from './project'; import { proposeTx } from './multisig'; -import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; +import { updateOrgIdRecord } from './project'; export const changeWithEthereum = async ( basePath: string, orgId: ProjectOrgIdsReference, orgVcObj: ORGJSONVCNFT, - keyPair: ProjectKeysReference + keyPair: ProjectKeysReference, + useAwsKmsSigner = false ): Promise => { if (!orgId.orgIdVc) { throw new Error(`ORGiD VC not created for this ORGiD (${orgId.did}) yet`); } - const { - orgIdContract, - signer, - gasPrice - } = await prepareOrgIdApi(basePath, orgId, keyPair); + const { orgIdContract, signer, gasPrice } = await prepareOrgIdApi( + basePath, + orgId, + keyPair, + useAwsKmsSigner + ); const { orgId: id } = parseDid(orgId.did); printMessage( @@ -41,21 +46,17 @@ export const changeWithEthereum = async ( const orgIdData = await orgIdContract.setOrgJsonWithDelegates( id, orgId.orgIdVc, - orgVcObj?.credentialSubject?.capabilityDelegation?.map( - c => typeof c === 'string' ? c : c.id + orgVcObj?.credentialSubject?.capabilityDelegation?.map((c) => + typeof c === 'string' ? c : c.id ) ?? [], signer, gasPrice ? { gasPrice } : undefined, - async txHash => { + async (txHash) => { printInfo(`\nTransaction hash: ${txHash}`); try { - await updateOrgIdRecord( - basePath, - orgId.did, - { - txHash - } - ); + await updateOrgIdRecord(basePath, orgId.did, { + txHash, + }); } catch { printError('Unable to update project file'); } @@ -66,13 +67,11 @@ export const changeWithEthereum = async ( throw new Error('Unable to fetch ORGiD data'); } - printInfo( - `ORGiD with DID: "${orgId.did}" has been successfully updated` - ); + printInfo(`ORGiD with DID: "${orgId.did}" has been successfully updated`); printObject({ ...orgIdData, - tokenId: orgIdData.tokenId.toString() + tokenId: orgIdData.tokenId.toString(), }); }; @@ -92,38 +91,33 @@ export const changeWithMultisig = async ( const { orgId: id } = parseDid(orgId.did); - printInfo('Proposing "setOrgJson(bytes32,string,string[])" tx to multisig...'); + printInfo( + 'Proposing "setOrgJson(bytes32,string,string[])" tx to multisig...' + ); // Create OrgId Tx const orgIdInstance = await createOrgIdInstance(basePath, orgId); - const registerTxRaw = await orgIdInstance.contract.populateTransaction['setOrgJson(bytes32,string,string[])']( + const registerTxRaw = await orgIdInstance.contract.populateTransaction[ + 'setOrgJson(bytes32,string,string[])' + ]( id, orgId.orgIdVc, - orgVcObj?.credentialSubject?.capabilityDelegation?.map( - c => typeof c === 'string' ? c : c.id + orgVcObj?.credentialSubject?.capabilityDelegation?.map((c) => + typeof c === 'string' ? c : c.id ) ?? [] ); - await proposeTx( - keyPair.multisig, - registerTxRaw - ); + await proposeTx(keyPair.multisig, registerTxRaw); }; -export const changeOrgJson = async ( - basePath: string -): Promise => { - +export const changeOrgJson = async (basePath: string): Promise => { const orgId = await promptOrgId(basePath, true); if (!orgId) { throw new Error('No registered ORGiDs found in the project'); } - const { - did, - orgIdVc - } = orgId; + const { did, orgIdVc } = orgId; if (!orgIdVc) { throw new Error(`ORGiD VC not created for this ORGiD (${did}) yet`); @@ -131,9 +125,7 @@ export const changeOrgJson = async ( const orgIdVcObj = await downloadOrgIdVc(basePath, orgIdVc); - const keyPair = await promptKeyPair( - basePath - ); + const keyPair = await promptKeyPair(basePath); if (!keyPair) { throw new Error('Key pair not selected'); @@ -143,8 +135,10 @@ export const changeOrgJson = async ( case 'ethereum': await changeWithEthereum(basePath, orgId, orgIdVcObj, keyPair); break; + case 'kmsEthereum': + await changeWithEthereum(basePath, orgId, orgIdVcObj, keyPair, true); + break; case 'multisig': - printInfo('Proposing "setOrgJson" tx to multisig...'); await changeWithMultisig(basePath, orgId, orgIdVcObj, keyPair); break; default: diff --git a/src/api/common.ts b/src/api/common.ts index 9b6bc61..ea79b3e 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -1,23 +1,30 @@ -import { BigNumber } from 'ethers'; -import type { ORGJSON } from '@windingtree/org.json-schema/types/org.json'; -import type { - ProjectKeysReference, - ProjectOrgIdsReference -} from '../schema/types/project'; import { KnownProvider, OrgIdContract } from '@windingtree/org.id-core'; -import { AES, enc } from 'crypto-js'; -import { Wallet, utils as etherUtils, Signer, providers } from 'ethers'; import { http, parsers, regexp } from '@windingtree/org.id-utils'; +import { ORGJSON } from '@windingtree/org.json-schema/types/org.json'; +import { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; +import { AES, enc } from 'crypto-js'; +import { + BigNumber, + providers, + Signer, + utils as etherUtils, + Wallet, +} from 'ethers'; import prompts from 'prompts'; import { + ProjectKeysReference, + ProjectOrgIdsReference, +} from '../schema/types/project'; +import { AwsKmsSigner } from './awsKms'; +import { read } from './fs'; +import { getFromIpfs } from './ipfs'; +import { AwsKmsKeyConfig } from './keysImport'; +import { + getApiKeyById, getKeyPairsFromProject, - getOrgIdsFromProject, getNetworkProviderById, - getApiKeyById + getOrgIdsFromProject, } from './project'; -import { read } from './fs'; -import { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; -import { getFromIpfs } from './ipfs'; export interface ParsedDid { did: string; @@ -36,7 +43,7 @@ export interface DidGroupedCheckResult extends RegExpExecArray { id: string; query?: string; fragment?: string; - } + }; } export interface BlockchainNetworkConfig { @@ -57,47 +64,47 @@ export const blockchainNetworks: BlockchainNetworkConfig[] = [ { name: 'Sokol xDAI Testnet', id: '77', - address: '0xDd1231c0FD9083DA42eDd2BD4f041d0a54EF7BeE' + address: '0xDd1231c0FD9083DA42eDd2BD4f041d0a54EF7BeE', }, { name: 'Columbus', id: '502', - address: '0xd8b75be9a47ffab0b5c27a143b911af7a7bf4076' + address: '0xd8b75be9a47ffab0b5c27a143b911af7a7bf4076', }, { name: 'Goerli', id: '5', - address: '0xe02dF24d8dFdd37B21690DB30F4813cf6c4D9D93' + address: '0xe02dF24d8dFdd37B21690DB30F4813cf6c4D9D93', }, { name: 'Polygon', id: '137', - address: '0x8a093Cb94663994d19a778c7EA9161352a434c64' + address: '0x8a093Cb94663994d19a778c7EA9161352a434c64', }, { name: 'Gnosis Chain', id: '100', - address: '0xb63d48e9d1e51305a17F4d95aCa3637BBC181b44' - } + address: '0xb63d48e9d1e51305a17F4d95aCa3637BBC181b44', + }, ]; // Extract ORGiD smart contract address from networks list -export const getSupportedNetworkConfig = (id: string): BlockchainNetworkConfig => { - const networkConfig = blockchainNetworks.filter(b => b.id === id)[0]; +export const getSupportedNetworkConfig = ( + id: string +): BlockchainNetworkConfig => { + const networkConfig = blockchainNetworks.filter((b) => b.id === id)[0]; if (!networkConfig) { throw new Error(`Network #${id} not supported by ORGiD protocol yet`); } return networkConfig; -} +}; // Encrypts the data export const encrypt = (data: string, password: string | unknown): string => { try { - return AES - .encrypt(data, password as string) - .toString(); + return AES.encrypt(data, password as string).toString(); } catch (error) { throw Error('Unable to encrypt'); } @@ -107,9 +114,7 @@ export const encrypt = (data: string, password: string | unknown): string => { export const decrypt = (encData: string, password: string): string => { let decrypted: string; try { - decrypted = AES - .decrypt(encData, password) - .toString(enc.Utf8); + decrypted = AES.decrypt(encData, password).toString(enc.Utf8); if (decrypted === '') { throw Error('Decrypted data is empty'); } @@ -130,13 +135,11 @@ export const promptKeyPair = async ( type: 'select', name: 'keyPair', message: 'Choose a key', - choices: keyPairRecords.map( - k => ({ - title: k.tag, - value: k - }) - ), - initial: 0 + choices: keyPairRecords.map((k) => ({ + title: k.tag, + value: k, + })), + initial: 0, }); if (!keyPair) { @@ -149,7 +152,7 @@ export const promptKeyPair = async ( const { password } = await prompts({ type: 'password', name: 'password', - message: `Enter the password for the key pair "${keys.tag}"` + message: `Enter the password for the key pair "${keys.tag}"`, }); if (keys.type === 'pem') { @@ -159,11 +162,10 @@ export const promptKeyPair = async ( } catch (err) { throw new Error(`Unable to decode key pair with tag: ${keys.tag}`); } + } else if (keys.type === 'kmsEthereum') { + keys.privateKey = JSON.parse(decrypt(keys.privateKey, password)); } else { - keys.privateKey = decrypt( - keys.privateKey, - password - ); + keys.privateKey = decrypt(keys.privateKey, password); } } @@ -175,37 +177,29 @@ export const promptOrgId = async ( basePath: string, created?: boolean ): Promise => { - const orgIdsRecords = await getOrgIdsFromProject(basePath); if (orgIdsRecords.length === 0) { - - throw new Error( - `Registered ORGIDs are found` - ); + throw new Error(`Registered ORGIDs are found`); } - const { orgId } = await prompts({ + const { orgId } = (await prompts({ type: 'select', name: 'orgId', message: 'Choose a registered ORGiD DID', choices: orgIdsRecords - .filter( - o => { - if (created !== undefined) { - return !!o.created === created; - } - return true; + .filter((o) => { + if (created !== undefined) { + return !!o.created === created; } - ) - .map( - (o: ProjectOrgIdsReference) => ({ - title: o.did, - value: o - }) - ), - initial: 0 - }) as { orgId: ProjectOrgIdsReference }; + return true; + }) + .map((o: ProjectOrgIdsReference) => ({ + title: o.did, + value: o, + })), + initial: 0, + })) as { orgId: ProjectOrgIdsReference }; return orgId; }; @@ -218,13 +212,7 @@ export const parseDid = (did: string): ParsedDid => { throw new Error(`Invalid DID format: ${did}`); } - const { - method, - network, - id, - query, - fragment - } = groupedCheck.groups; + const { method, network, id, query, fragment } = groupedCheck.groups; return { did, @@ -232,7 +220,7 @@ export const parseDid = (did: string): ParsedDid => { network: network || '1', // Mainnet is default value orgId: id, query, - fragment + fragment, }; }; @@ -255,7 +243,7 @@ export const getEthersProvider = async ( const { password } = await prompts({ type: 'password', name: 'password', - message: `Enter the password for the encrypted network provided URI` + message: `Enter the password for the encrypted network provided URI`, }); providerUri = decrypt(uri, password); @@ -285,7 +273,7 @@ export const getApiKey = async ( const { password } = await prompts({ type: 'password', name: 'password', - message: `Enter the password for the encrypted API key` + message: `Enter the password for the encrypted API key`, }); apiKey = decrypt(key, password); @@ -305,43 +293,29 @@ export const createOrgIdInstance = async ( throw new Error('Chosen ORGiD does not have registered ORG.JSON yet.'); } - const orgJsonSource = await read( - basePath, - orgId.orgJson, - true - ) as ORGJSON; + const orgJsonSource = (await read(basePath, orgId.orgJson, true)) as ORGJSON; const { network } = parseDid(orgJsonSource.id); const networkConfig = getSupportedNetworkConfig(network); const provider = await getEthersProvider(basePath, network); - return new OrgIdContract( - networkConfig.address, - provider - ); + return new OrgIdContract(networkConfig.address, provider); }; // Prepare an ORGiD API for transactions on the ORG.JSON basis export const prepareOrgIdApi = async ( basePath: string, orgId: ProjectOrgIdsReference, - keyPair: ProjectKeysReference + keyPair: ProjectKeysReference, + useAwsKmsSigner = false ): Promise => { - - const { - orgJson, - owner - } = orgId; + const { orgJson, owner } = orgId; if (!orgJson) { throw new Error('Chosen ORGiD does not have registered ORG.JSON yet.'); } - const orgJsonSource = await read( - basePath, - orgJson, - true - ) as ORGJSON; + const orgJsonSource = (await read(basePath, orgJson, true)) as ORGJSON; const { network, orgId: id } = parseDid(orgJsonSource.id); const networkConfig = getSupportedNetworkConfig(network); @@ -351,7 +325,25 @@ export const prepareOrgIdApi = async ( throw new Error('Unable to get registered key pair'); } - const signer = new Wallet(keyPair.privateKey, provider); + let signer: Signer; + + if (useAwsKmsSigner) { + const config = keyPair.privateKey as unknown as AwsKmsKeyConfig; + signer = new AwsKmsSigner( + config.keyId, + { + region: config.region, + credentials: { + accessKeyId: config.accessKeyId, + secretAccessKey: config.secretAccessKey, + }, + }, + provider + ); + } else { + signer = new Wallet(keyPair.privateKey, provider); + } + const signerAddress = await signer.getAddress(); if (signerAddress !== etherUtils.getAddress(owner)) { @@ -360,10 +352,7 @@ export const prepareOrgIdApi = async ( ); } - const orgIdContract = new OrgIdContract( - networkConfig.address, - provider - ); + const orgIdContract = new OrgIdContract(networkConfig.address, provider); const { gasPrice } = await prompts([ { @@ -373,29 +362,29 @@ export const prepareOrgIdApi = async ( choices: [ { title: 'Yes', - value: true + value: true, }, { title: 'No', - value: false - } + value: false, + }, ], - initial: 0 + initial: 0, }, { - type: prevChoice => prevChoice ? 'text' : null, + type: (prevChoice) => (prevChoice ? 'text' : null), name: 'gasPrice', - message: 'Set gas price (GWEI)' - } - ]) + message: 'Set gas price (GWEI)', + }, + ]); return { provider, orgIdContract, signer, id, - gasPrice: gasPrice ? etherUtils.parseUnits(gasPrice, 'gwei') : undefined - } + gasPrice: gasPrice ? etherUtils.parseUnits(gasPrice, 'gwei') : undefined, + }; }; export const downloadOrgIdVc = async ( @@ -406,9 +395,9 @@ export const downloadOrgIdVc = async ( switch (type) { case 'ipfs': - return await getFromIpfs(basePath, uri) as ORGJSONVCNFT; + return (await getFromIpfs(basePath, uri)) as ORGJSONVCNFT; case 'http': - return await http.request(uri, 'GET') as ORGJSONVCNFT; + return (await http.request(uri, 'GET')) as ORGJSONVCNFT; default: throw new Error(`Unknown ORGiD VC URI type ${type}`); } diff --git a/src/api/createOrgId.ts b/src/api/createOrgId.ts index f70c20c..60ab0bc 100644 --- a/src/api/createOrgId.ts +++ b/src/api/createOrgId.ts @@ -1,18 +1,24 @@ -import type { OrgIdData } from '@windingtree/org.id-core/'; +import { OrgIdData } from '@windingtree/org.id-core/'; +import { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; import { - promptOrgId, - prepareOrgIdApi, + ProjectKeysReference, + ProjectOrgIdsReference, +} from '../schema/types/project'; +import { + printError, + printInfo, + printMessage, + printObject, +} from '../utils/console'; +import { + createOrgIdInstance, downloadOrgIdVc, + prepareOrgIdApi, promptKeyPair, - createOrgIdInstance + promptOrgId, } from './common'; -import { - updateOrgIdRecord -} from './project'; -import { printError, printInfo, printMessage, printObject } from '../utils/console'; -import { ProjectKeysReference, ProjectOrgIdsReference } from 'src/schema/types/project'; import { proposeTx } from './multisig'; -import { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; +import { updateOrgIdRecord } from './project'; export interface OrgIdCreationResult extends Omit { tokenId: string; @@ -22,17 +28,19 @@ export const createWithEthereum = async ( basePath: string, orgId: ProjectOrgIdsReference, orgVcObj: ORGJSONVCNFT, - keyPair: ProjectKeysReference + keyPair: ProjectKeysReference, + useAwsKmsSigner = false ): Promise => { if (!orgId.orgIdVc) { throw new Error(`ORGiD VC not created for this ORGiD (${orgId.did}) yet`); } - const { - orgIdContract, - signer, - gasPrice - } = await prepareOrgIdApi(basePath, orgId, keyPair); + const { orgIdContract, signer, gasPrice } = await prepareOrgIdApi( + basePath, + orgId, + keyPair, + useAwsKmsSigner + ); printMessage( '\nSending transaction "createOrgId(bytes32,string,string[])"...' @@ -41,21 +49,17 @@ export const createWithEthereum = async ( const orgIdData = await orgIdContract.createOrgIdWithDelegates( orgId.salt, orgId.orgIdVc, - orgVcObj?.credentialSubject?.capabilityDelegation?.map( - c => typeof c === 'string' ? c : c.id + orgVcObj?.credentialSubject?.capabilityDelegation?.map((c) => + typeof c === 'string' ? c : c.id ) ?? [], signer, gasPrice ? { gasPrice } : undefined, - async txHash => { + async (txHash) => { printInfo(`\nTransaction hash: ${txHash}`); try { - await updateOrgIdRecord( - basePath, - orgId.did, - { - txHash - } - ); + await updateOrgIdRecord(basePath, orgId.did, { + txHash, + }); } catch { printError('Unable to update project file'); } @@ -66,13 +70,11 @@ export const createWithEthereum = async ( throw new Error('Unable to fetch ORGiD data'); } - printInfo( - `ORGiD with DID: "${orgId.did}" has been successfully created` - ); + printInfo(`ORGiD with DID: "${orgId.did}" has been successfully created`); printObject({ ...orgIdData, - tokenId: orgIdData.tokenId.toString() + tokenId: orgIdData.tokenId.toString(), }); }; @@ -91,40 +93,34 @@ export const createWithMultisig = async ( throw new Error('Invalid multisig keys config'); } - printInfo('Proposing "createOrgId(bytes32,string,string[])" tx to multisig...'); + printInfo( + 'Proposing "createOrgId(bytes32,string,string[])" tx to multisig...' + ); // Create OrgId Tx const orgIdInstance = await createOrgIdInstance(basePath, orgId); - const registerTxRaw = await orgIdInstance.contract.populateTransaction['createOrgId(bytes32,string,string[])']( + const registerTxRaw = await orgIdInstance.contract.populateTransaction[ + 'createOrgId(bytes32,string,string[])' + ]( orgId.salt, orgId.orgIdVc, - orgVcObj?.credentialSubject?.capabilityDelegation?.map( - c => typeof c === 'string' ? c : c.id + orgVcObj?.credentialSubject?.capabilityDelegation?.map((c) => + typeof c === 'string' ? c : c.id ) ?? [] ); - await proposeTx( - keyPair.multisig, - registerTxRaw - ); + await proposeTx(keyPair.multisig, registerTxRaw); }; // Create new ORGiD -export const createOrgId = async ( - basePath: string -): Promise => { - +export const createOrgId = async (basePath: string): Promise => { const orgId = await promptOrgId(basePath, false); if (!orgId) { throw new Error('The ORGiD not been selected'); } - const { - created, - did, - orgIdVc - } = orgId; + const { created, did, orgIdVc } = orgId; if (created) { throw new Error(`This ORGiD ${did} already has been created`); @@ -136,9 +132,7 @@ export const createOrgId = async ( const orgIdVcObj = await downloadOrgIdVc(basePath, orgIdVc); - const keyPair = await promptKeyPair( - basePath - ); + const keyPair = await promptKeyPair(basePath); if (!keyPair) { throw new Error('Key pair not selected'); @@ -148,6 +142,9 @@ export const createOrgId = async ( case 'ethereum': await createWithEthereum(basePath, orgId, orgIdVcObj, keyPair); break; + case 'kmsEthereum': + await createWithEthereum(basePath, orgId, orgIdVcObj, keyPair, true); + break; case 'multisig': await createWithMultisig(basePath, orgId, orgIdVcObj, keyPair); break; @@ -157,11 +154,7 @@ export const createOrgId = async ( ); } - await updateOrgIdRecord( - basePath, - did, - { - created: true - } - ); + await updateOrgIdRecord(basePath, did, { + created: true, + }); }; diff --git a/src/api/deployment.ts b/src/api/deployment.ts index 0e92a63..53f5d42 100644 --- a/src/api/deployment.ts +++ b/src/api/deployment.ts @@ -1,33 +1,30 @@ +import { object } from '@windingtree/org.id-utils'; import type { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; -import type { ParsedArgv } from '../utils/env'; -import type { ProjectDeploymentReference } from '../schema/types/project'; +import { DateTime } from 'luxon'; import path from 'path'; -import { DateTime } from 'luxon'; -import { object } from '@windingtree/org.id-utils'; -import { addDeploymentToProject } from './project'; -import { addToIpfs, removeFromIpfs } from './ipfs'; +import type { ProjectDeploymentReference } from '../schema/types/project'; import { printInfo } from '../utils/console'; +import type { ParsedArgv } from '../utils/env'; import { read } from './fs'; +import { addToIpfs, removeFromIpfs } from './ipfs'; +import { addDeploymentToProject } from './project'; export const deployFileIpfs = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--path']) { - throw new Error( - `Path to the file must be provided using "--path" option` - ); + throw new Error(`Path to the file must be provided using "--path" option`); } let orgIdDid: string | undefined; if (args['--filetype'] === 'orgIdVc') { - const orgIdVc = await read( + const orgIdVc = (await read( basePath, args['--path'], true - ) as ORGJSONVCNFT; + )) as ORGJSONVCNFT; orgIdDid = object.getDeepValue(orgIdVc, 'credentialSubject.id') as string; } @@ -40,7 +37,7 @@ export const deployFileIpfs = async ( type: 'ipfs', path: fileToDeploy, uri: `ipfs://${cid}`, - date: DateTime.now().toISO() + date: DateTime.now().toISO(), }; const { remove } = await addDeploymentToProject( @@ -56,9 +53,7 @@ export const deployFileIpfs = async ( if (remove) { await removeFromIpfs(basePath, remove.uri.split('//')[1]); - printInfo( - `Old deployment ${remove.uri} has been successfully unpinned` - ); + printInfo(`Old deployment ${remove.uri} has been successfully unpinned`); } return deploymentRecord; diff --git a/src/api/fs.ts b/src/api/fs.ts index 68a1a2e..e18c049 100644 --- a/src/api/fs.ts +++ b/src/api/fs.ts @@ -2,32 +2,24 @@ import fs from 'fs'; import path from 'path'; // Check is file exists -export const isFileExists = ( - filePath: string -): Promise => new Promise( - (resolve) => { - - fs.access( - filePath, - fs.constants.F_OK, - error => { - if (error) { - return resolve(false); - } - resolve(true); +export const isFileExists = (filePath: string): Promise => + new Promise((resolve) => { + fs.access(filePath, fs.constants.F_OK, (error) => { + if (error) { + return resolve(false); } - ) - } -); + resolve(true); + }); + }); // Reads file export const read = ( basePath: string, filePath: string, isJson = false -): Promise => new Promise( - (resolve, reject) => { - const savedFilePath = path.resolve(basePath, filePath) +): Promise => + new Promise((resolve, reject) => { + const savedFilePath = path.resolve(basePath, filePath); if (!isFileExists(savedFilePath)) { throw new Error(`File ${savedFilePath} not found or not readable`); @@ -37,7 +29,7 @@ export const read = ( savedFilePath, { encoding: 'utf8', - flag: 'r' + flag: 'r', }, (error, data) => { if (error) { @@ -60,17 +52,15 @@ export const read = ( resolve(data as T); } ); - } -); + }); // Writes file export const write = ( basePath: string, filePath: string, fileContent: string -): Promise => new Promise( - (resolve, reject) => { - +): Promise => + new Promise((resolve, reject) => { const savedFilePath = path.resolve(basePath, filePath); fs.writeFile( @@ -78,39 +68,32 @@ export const write = ( fileContent, { encoding: 'utf8', - flag: 'w' + flag: 'w', }, - error => { + (error) => { if (error) { return reject(error); } resolve(savedFilePath); } ); - } -); + }); // Create a directory is not exists -export const createDir = ( - basePath: string, - dir: string -): Promise => new Promise( - (resolve, reject) => { - +export const createDir = (basePath: string, dir: string): Promise => + new Promise((resolve, reject) => { const dirPath = path.resolve(basePath, dir); fs.mkdir( dirPath, { - recursive: true + recursive: true, }, - error => { + (error) => { if (error) { return reject(error); } resolve(); } - ) - } -); - + ); + }); diff --git a/src/api/ipfs.ts b/src/api/ipfs.ts index a32f5e3..7c9ee5a 100644 --- a/src/api/ipfs.ts +++ b/src/api/ipfs.ts @@ -13,7 +13,9 @@ export interface IpfsApiAddResponse { Size: string; } -const createWeb3StorageClient = async (basePath: string): Promise => { +const createWeb3StorageClient = async ( + basePath: string +): Promise => { return new Web3Storage({ token: await getApiKey(basePath, 'w3s') }); }; @@ -22,18 +24,31 @@ const getFiles = async (path: string): Promise => { return files; }; -export const addToIpfs = async (basePath: string, filePath: string): Promise => { +export const addToIpfs = async ( + basePath: string, + filePath: string +): Promise => { const client = await createWeb3StorageClient(basePath); const files = await getFiles(filePath); - const cid = await client.put(files as Iterable, { wrapWithDirectory: false }); + const cid = await client.put(files as Iterable, { + wrapWithDirectory: false, + }); return cid; }; -export const removeFromIpfs = async (basePath: string, cid: string): Promise => { +export const removeFromIpfs = async ( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + basePath: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + cid: string +): Promise => { // will be implemented later }; -export const getFromIpfs = async (basePath: string, cid: string): Promise => { +export const getFromIpfs = async ( + basePath: string, + cid: string +): Promise => { return http.request( `https://w3s.link/ipfs/${cid}`, 'GET', diff --git a/src/api/jwt.ts b/src/api/jwt.ts index d0f5b42..e5fbcfc 100644 --- a/src/api/jwt.ts +++ b/src/api/jwt.ts @@ -1,24 +1,45 @@ -import type { ParsedArgv } from '../utils/env'; -import { ethers, utils } from 'ethers'; -import { parsers } from '@windingtree/org.id-utils'; -import { createAuthJWTWithEthers, createAuthJWT } from '@windingtree/org.id-auth/dist/tokens'; -import { initOrgIdResolver } from './resolveOrgId'; -import { printInfo, printWarn } from '../utils/console'; -import { getKeyPairsFromProject } from './project'; +import { JWK } from '@windingtree/org.id-auth/dist/keys'; +import { + createAuthJWT, + createAuthJWTWithEthers, +} from '@windingtree/org.id-auth/dist/tokens'; +import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; +import { Signer, utils, Wallet } from 'ethers'; import prompts from 'prompts'; +import { ProjectKeysReference } from '../schema/types/project'; +import { printInfo, printWarn } from '../utils/console'; +import { ParsedArgv } from '../utils/env'; +import { AwsKmsSigner } from './awsKms'; import { decrypt } from './common'; -import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; -import { JWK } from '@windingtree/org.id-auth/dist/keys'; +import { AwsKmsKeyConfig } from './keysImport'; +import { getKeyPairsFromProject } from './project'; +import { initOrgIdResolver } from './resolveOrgId'; const createJwtWithEthereum = async ( issuer: string, audience: string, scope: string[] | undefined, expiration: number | undefined, - accountAddress: string, - signerKey: string + keyPair: ProjectKeysReference, + useAwsKmsSigner = false ): Promise => { - const signer = new ethers.Wallet(signerKey); + let signer: Signer; + let accountAddress: string; + + if (useAwsKmsSigner) { + const config = keyPair.privateKey as unknown as AwsKmsKeyConfig; + signer = new AwsKmsSigner(config.keyId, { + region: config.region, + credentials: { + accessKeyId: config.accessKeyId, + secretAccessKey: config.secretAccessKey, + }, + }); + accountAddress = await signer.getAddress(); + } else { + signer = new Wallet(keyPair.privateKey); + accountAddress = keyPair.publicKey; + } const signerAddress = await signer.getAddress(); @@ -29,7 +50,7 @@ const createJwtWithEthereum = async ( } return await createAuthJWTWithEthers( - signer, + signer as Wallet, issuer, audience, scope, @@ -44,20 +65,13 @@ const createJwtWithPem = async ( expiration: number | undefined, signerKey: JWK ): Promise => { - return await createAuthJWT( - signerKey, - issuer, - audience, - scope, - expiration - ); + return await createAuthJWT(signerKey, issuer, audience, scope, expiration); }; export const createJwt = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--issuer']) { throw new Error( 'A token issuer did must be provided using "--issuer" option' @@ -111,7 +125,7 @@ export const createJwt = async ( } const verificationMethod = didDocument?.verificationMethod?.find( - v => v.id === args['--issuer'] + (v) => v.id === args['--issuer'] ); if (!verificationMethod) { @@ -123,12 +137,12 @@ export const createJwt = async ( const { fragment } = parseDid(args['--issuer']); if (!fragment) { - throw new Error(`Unable to extract verification method key Id from ${args['--issuer']}`); + throw new Error( + `Unable to extract verification method key Id from ${args['--issuer']}` + ); } - const keyPair = keyPairRecords.find( - k => k.tag === fragment - ); + const keyPair = keyPairRecords.find((k) => k.tag === fragment); if (!keyPair) { throw new Error(`Key pair ${fragment} not found in the project`); @@ -137,10 +151,10 @@ export const createJwt = async ( const { password } = await prompts({ type: 'password', name: 'password', - message: `Enter the password for the key pair "${keyPair.tag}"` + message: `Enter the password for the key pair "${keyPair.tag}"`, }); - let signerKey = decrypt(keyPair.privateKey, password); + keyPair.privateKey = decrypt(keyPair.privateKey, password); let token: string; switch (keyPair.type) { @@ -150,18 +164,27 @@ export const createJwt = async ( args['--audience'], scope, expiration, - keyPair.publicKey, - signerKey + keyPair + ); + break; + case 'kmsEthereum': + keyPair.privateKey = JSON.parse(keyPair.privateKey); + token = await createJwtWithEthereum( + args['--issuer'], + args['--audience'], + scope, + expiration, + keyPair, + true ); break; case 'pem': - signerKey = JSON.parse(signerKey); token = await createJwtWithPem( args['--issuer'], args['--audience'], scope, expiration, - signerKey as unknown as JWK + keyPair.privateKey as unknown as JWK ); break; default: diff --git a/src/api/keysImport.ts b/src/api/keysImport.ts index b1ea14b..1fe8150 100644 --- a/src/api/keysImport.ts +++ b/src/api/keysImport.ts @@ -1,87 +1,99 @@ -import type { ParsedArgv } from '../utils/env'; -import type { - ProjectKeysReference, ProjectOrgIdsReference -} from '../schema/types/project'; -import prompts from 'prompts'; -import { regexp } from '@windingtree/org.id-utils'; -import { DateTime } from 'luxon'; -import { utils as ethersUtils } from 'ethers'; -import { - addKeyPairToProject, addOrgIdToProject -} from './project'; -import { printInfo } from '../utils/console'; -import { encrypt, promptKeyPair, promptOrgId } from './common'; import { createJWK, importKeyPrivatePem, importKeyPublicPem, - JWK + JWK, } from '@windingtree/org.id-auth/dist/keys'; -import { read, write } from './fs'; -import { createVerificationMethodWithBlockchainAccountId, createVerificationMethodWithKey } from '@windingtree/org.json-utils'; +import { regexp } from '@windingtree/org.id-utils'; import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; -import { ORGJSON, VerificationMethodReference } from '@windingtree/org.json-schema/types/org.json'; +import { + ORGJSON, + VerificationMethodReference, +} from '@windingtree/org.json-schema/types/org.json'; +import { + createVerificationMethodWithBlockchainAccountId, + createVerificationMethodWithKey, +} from '@windingtree/org.json-utils'; +import { utils as ethersUtils } from 'ethers'; +import { DateTime } from 'luxon'; +import prompts from 'prompts'; +import { + ProjectKeysReference, + ProjectOrgIdsReference, +} from '../schema/types/project'; +import { printInfo } from '../utils/console'; +import { ParsedArgv } from '../utils/env'; +import { AwsKmsSigner } from './awsKms'; +import { encrypt, promptKeyPair, promptOrgId } from './common'; +import { read, write } from './fs'; +import { addKeyPairToProject, addOrgIdToProject } from './project'; import { manageApisKeysStorage } from './projectConfig'; export interface ProjectKeysReferenceWithJwk extends ProjectKeysReference { - publicJwk: JWK, - privateJwk: JWK + publicJwk: JWK; + privateJwk: JWK; } -export type ProjectKeys = T extends ProjectKeysReferenceWithJwk ? ProjectKeysReferenceWithJwk : ProjectKeysReference; +export type ProjectKeys = T extends ProjectKeysReferenceWithJwk + ? ProjectKeysReferenceWithJwk + : ProjectKeysReference; + +export interface AwsKmsKeyConfig { + keyId: string; + region: string; + accessKeyId: string; + secretAccessKey: string; +} // Import of Ethereum keys -export const importEthereum = async (basePath: string): Promise => { +export const importEthereum = async ( + basePath: string +): Promise => { const { tag, accountAddress, privateKey } = await prompts([ { type: 'text', name: 'tag', - message: 'Please enter an unique key tag' + message: 'Please enter an unique key tag', }, { type: 'text', name: 'accountAddress', message: 'Please enter an Ethereum account address', - validate: value => - regexp.ethereumAddress.exec(value) !== null - ? true - : 'Value must be a valid Ethereum address' + validate: (value) => + regexp.ethereumAddress.exec(value) !== null + ? true + : 'Value must be a valid Ethereum address', }, { type: 'password', name: 'privateKey', message: 'Please enter a private key for the Ethereum account', - } + }, ]); - if (!accountAddress || ! privateKey) { + if (!accountAddress || !privateKey) { throw new Error( 'Both the account address and its private key must be provided' ); } - const { password } = await prompts( - { - type: 'password', - name: 'password', - message: 'Please provide an encryption password for keys storage', - validate: value => - /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])/.exec(value) - ? true - : 'Password must consist of a minimum of eight characters, at least one letter and one number' - } - ); - - const keyPairRecord = await addKeyPairToProject( - basePath, - { - type: 'ethereum', - tag, - publicKey: ethersUtils.getAddress(accountAddress), - privateKey: encrypt(privateKey, password), - date: DateTime.now().toISO() - } - ); + const { password } = await prompts({ + type: 'password', + name: 'password', + message: 'Please provide an encryption password for keys storage', + validate: (value) => + /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])/.exec(value) + ? true + : 'Password must consist of a minimum of eight characters, at least one letter and one number', + }); + + const keyPairRecord = await addKeyPairToProject(basePath, { + type: 'ethereum', + tag, + publicKey: ethersUtils.getAddress(accountAddress), + privateKey: encrypt(privateKey, password), + date: DateTime.now().toISO(), + }); printInfo( `Key pair of type "ethereum" with tag "${tag}" has been successfully imported\n` @@ -90,6 +102,30 @@ export const importEthereum = async (basePath: string): Promise => { + const signer = new AwsKmsSigner(keyConfig.keyId, { + region: keyConfig.region, + credentials: { + accessKeyId: keyConfig.accessKeyId, + secretAccessKey: keyConfig.secretAccessKey, + }, + }); + const address = await signer.getAddress(); + + return createVerificationMethodWithBlockchainAccountId( + verificationMethodId, + controller, + 'eip155', + network, + address + ); +}; + export const addToOrgJson = async ( basePath: string, args: ParsedArgv @@ -97,9 +133,7 @@ export const addToOrgJson = async ( printInfo('Adding of verification method to an ORG.JSON...\n'); if (!args['--keyType']) { - throw new Error( - 'Key pair type must be provided using "--keyType" option' - ); + throw new Error('Key pair type must be provided using "--keyType" option'); } const orgId = await promptOrgId(basePath); @@ -108,13 +142,7 @@ export const addToOrgJson = async ( throw new Error('No registered ORGiDs found in the project'); } - const { - did, - orgJson, - salt, - owner, - created - } = orgId; + const { did, orgJson, salt, owner, created } = orgId; if (!orgJson) { throw new Error( @@ -132,10 +160,7 @@ export const addToOrgJson = async ( throw new Error(`Invalid controller did: ${controller}`); } - const projectKey = await promptKeyPair( - basePath, - args['--keyType'] - ); + const projectKey = await promptKeyPair(basePath, args['--keyType']); if (!projectKey) { throw new Error('Key pair not been selected'); @@ -161,6 +186,14 @@ export const addToOrgJson = async ( projectKey.publicKey as unknown as JWK ); break; + case 'kmsEthereum': + verificationMethod = await createVerificationMethodWithAwsKms( + verificationMethodId, + controller, + projectKey.privateKey as unknown as AwsKmsKeyConfig, + parsedController.network + ); + break; default: throw new Error( `It is not possible to create verification method using "${args['--keyType']}" type of key` @@ -172,18 +205,16 @@ export const addToOrgJson = async ( } const isMethodExists = orgJsonObj.verificationMethod.find( - v => v.id === verificationMethodId + (v) => v.id === verificationMethodId ); if (isMethodExists) { - orgJsonObj.verificationMethod = orgJsonObj.verificationMethod.map( - v => { - if (v.id ) { - return verificationMethod; - } - return v; + orgJsonObj.verificationMethod = orgJsonObj.verificationMethod.map((v) => { + if (v.id) { + return verificationMethod; } - ); + return v; + }); } else { orgJsonObj.verificationMethod.push(verificationMethod); } @@ -206,14 +237,14 @@ export const addToOrgJson = async ( owner, orgJson: outputOrgJsonFile, created, - date: DateTime.now().toISO() + date: DateTime.now().toISO(), }; await addOrgIdToProject(basePath, orgIdRecord); printInfo( - `"verificationMethod" with Id ${verificationMethod.id} has been added.\n`+ - `ORG.JSON file for ${did} has been successfully updated in the project.` + `"verificationMethod" with Id ${verificationMethod.id} has been added.\n` + + `ORG.JSON file for ${did} has been successfully updated in the project.` ); }; @@ -222,7 +253,6 @@ export const importPem = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--pubPem'] || !args['--privPem']) { throw new Error( 'Both paths to pem-formatted keys must be provided using "--pubPem" and "--privPem" options' @@ -233,8 +263,8 @@ export const importPem = async ( { type: 'text', name: 'tag', - message: 'Please enter an unique key tag' - } + message: 'Please enter an unique key tag', + }, ]); const pemPublicKeyRaw = await read(basePath, args['--pubPem']); @@ -247,28 +277,23 @@ export const importPem = async ( const publicJwk = await createJWK(pemPublicKey); const privateJwk = await createJWK(pemPrivateKey); - const { password } = await prompts( - { - type: 'password', - name: 'password', - message: 'Please provide an encryption password for keys storage', - validate: value => - /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])/.exec(value) - ? true - : 'Password must consist of a minimum of eight characters, at least one letter and one number' - } - ); - - const keyPairRecord = await addKeyPairToProject( - basePath, - { - type: 'pem', - tag, - publicKey: encrypt(JSON.stringify(publicJwk), password), - privateKey: encrypt(JSON.stringify(privateJwk), password), - date: DateTime.now().toISO() - } - ); + const { password } = await prompts({ + type: 'password', + name: 'password', + message: 'Please provide an encryption password for keys storage', + validate: (value) => + /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])/.exec(value) + ? true + : 'Password must consist of a minimum of eight characters, at least one letter and one number', + }); + + const keyPairRecord = await addKeyPairToProject(basePath, { + type: 'pem', + tag, + publicKey: encrypt(JSON.stringify(publicJwk), password), + privateKey: encrypt(JSON.stringify(privateJwk), password), + date: DateTime.now().toISO(), + }); printInfo( `Key pair of type "secp256k1" (converted from PEM format) with tag "${tag}" has been successful imported\n` @@ -277,7 +302,7 @@ export const importPem = async ( return { ...keyPairRecord, publicJwk, - privateJwk + privateJwk, }; }; @@ -288,32 +313,113 @@ export const importMultisig = async ( { type: 'text', name: 'tag', - message: 'Please enter an unique key tag' + message: 'Please enter an unique key tag', }, { type: 'text', name: 'multisig', - message: 'Please enter Safe wallet address (with net prefix)' - } + message: 'Please enter Safe wallet address (with net prefix)', + }, ]); - const keyPairRecord = await addKeyPairToProject( - basePath, + const keyPairRecord = await addKeyPairToProject(basePath, { + type: 'multisig', + tag, + publicKey: '', + privateKey: '', + multisig, + date: DateTime.now().toISO(), + }); + + printInfo(`Multisig "key" with tag "${tag}" has been successful imported\n`); + + return keyPairRecord; +}; + +export const importKmsEthereum = async (basePath: string): Promise => { + const { tag, keyId, region, accessKeyId, secretAccessKey } = await prompts([ { - type: 'multisig', - tag, - publicKey: '', - privateKey: '', - multisig, - date: DateTime.now().toISO() - } - ); + type: 'text', + name: 'tag', + message: 'Please enter an unique key tag', + validate: (value) => + typeof value === 'string' && value !== '' + ? true + : 'This field cannot be empty', + }, + { + type: 'password', + name: 'keyId', + message: 'Please enter an AWS KMS Key Id', + validate: (value) => + typeof value === 'string' && value !== '' + ? true + : 'This field cannot be empty', + }, + { + type: 'password', + name: 'region', + message: 'Please enter an AWS region', + validate: (value) => + typeof value === 'string' && value !== '' + ? true + : 'This field cannot be empty', + }, + { + type: 'password', + name: 'accessKeyId', + message: 'Please enter an AWS KMS access key Id', + validate: (value) => + typeof value === 'string' && value !== '' + ? true + : 'This field cannot be empty', + }, + { + type: 'password', + name: 'secretAccessKey', + message: 'Please enter an AWS KMS secret access key', + validate: (value) => + typeof value === 'string' && value !== '' + ? true + : 'This field cannot be empty', + }, + ]); + + if (!keyId || !region || !accessKeyId || !secretAccessKey) { + throw new Error( + 'All of "keyId", "region", "accessKeyId" and "secretAccessKey" must be provided' + ); + } + + const { password } = await prompts({ + type: 'password', + name: 'password', + message: 'Please provide an encryption password for keys storage', + validate: (value) => + /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])/.exec(value) + ? true + : 'Password must consist of a minimum of eight characters, at least one letter and one number', + }); + + await addKeyPairToProject(basePath, { + type: 'kmsEthereum', + tag, + publicKey: '', + privateKey: encrypt( + JSON.stringify({ + keyId, + region, + accessKeyId, + secretAccessKey, + }), + password + ), + date: DateTime.now().toISO(), + }); printInfo( - `Multisig "key" with tag "${tag}" has been successful imported\n` + `Key pair of type "kmsEthereum" with tag "${tag}" has been successfully imported\n` ); - - return keyPairRecord; }; // Import key @@ -321,11 +427,8 @@ export const keysImport = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--keyType']) { - throw new Error( - 'Key pair type must be provided using "--keyType" option' - ); + throw new Error('Key pair type must be provided using "--keyType" option'); } switch (args['--keyType']) { @@ -338,10 +441,13 @@ export const keysImport = async ( case 'multisig': await importMultisig(basePath); break; + case 'kmsEthereum': + await importKmsEthereum(basePath); + break; case 'api': - await manageApisKeysStorage(basePath) + await manageApisKeysStorage(basePath); break; default: - throw new Error(`Unknown key pair type: "${args['--keyType']}"`) + throw new Error(`Unknown key pair type: "${args['--keyType']}"`); } }; diff --git a/src/api/multisig.ts b/src/api/multisig.ts index 5277a5f..03412a9 100644 --- a/src/api/multisig.ts +++ b/src/api/multisig.ts @@ -1,6 +1,13 @@ -import axios from 'axios'; -import { utils, constants, Wallet, PopulatedTransaction, BigNumber, TypedDataField } from 'ethers'; import { _TypedDataEncoder } from '@ethersproject/hash'; +import axios from 'axios'; +import { + BigNumber, + constants, + PopulatedTransaction, + TypedDataField, + utils, + Wallet, +} from 'ethers'; import prompts from 'prompts'; export interface SafeNonceResponse { @@ -33,11 +40,11 @@ export interface SafeAddress { name: string; } -const chains: Record = { +const chains: Record = { gor: { chainId: 5, - name: 'goerli' - } + name: 'goerli', + }, }; export const parseSafeAddress = (rawAddress: string): SafeAddress => { @@ -52,7 +59,7 @@ export const parseSafeAddress = (rawAddress: string): SafeAddress => { return { address: utils.getAddress(address), chainId, - name + name, }; }; @@ -62,14 +69,12 @@ export const getNonce = async ( ): Promise => { try { const uri = `https://safe-transaction-${chainPrefix}.safe.global/api/v1/safes/${safeAddress}`; - const response = await axios.get( - uri - ); + const response = await axios.get(uri); return response.data; } catch (error) { throw new Error(JSON.stringify(error.response.data)); } -} +}; export const estimateTx = async ( safeAddress: string, @@ -78,16 +83,13 @@ export const estimateTx = async ( ): Promise => { try { const uri = `https://safe-transaction-${chainPrefix}.safe.global/api/v1/safes/${safeAddress}/multisig-transactions/estimations/`; - const response = await axios.post( - uri, - baseTx - ); + const response = await axios.post(uri, baseTx); return response.data; } catch (error) { console.log(error); throw new Error(JSON.stringify(error.response.data)); } -} +}; export const proposeTx = async ( safeAddress: string, @@ -98,7 +100,7 @@ export const proposeTx = async ( const { address: walletAccount, name: chainPrefix, - chainId + chainId, } = parseSafeAddress(safeAddress); const normalizedTx: BaseTx = { @@ -108,7 +110,7 @@ export const proposeTx = async ( ? baseTx.value.toString() : baseTx.value : '0', - operation: 0 + operation: 0, }; if (nonce === undefined) { @@ -129,13 +131,13 @@ export const proposeTx = async ( baseGas: '0', gasPrice: '0', gasToken: constants.AddressZero, - refundReceiver: constants.AddressZero + refundReceiver: constants.AddressZero, }; const safeTxTypes: Record = { EIP712Domain: [ { type: 'uint256', name: 'chainId' }, - { type: 'address', name: 'verifyingContract' } + { type: 'address', name: 'verifyingContract' }, ], SafeTx: [ { type: 'address', name: 'to' }, @@ -147,14 +149,14 @@ export const proposeTx = async ( { type: 'uint256', name: 'gasPrice' }, { type: 'address', name: 'gasToken' }, { type: 'address', name: 'refundReceiver' }, - { type: 'uint256', name: 'nonce' } - ] + { type: 'uint256', name: 'nonce' }, + ], }; const { privateKey } = await prompts({ type: 'password', name: 'privateKey', - message: `Please enter a private key of one of the owners of the ${safeAddress} multisig` + message: `Please enter a private key of one of the owners of the ${safeAddress} multisig`, }); if (!privateKey || privateKey === '') { @@ -166,7 +168,7 @@ export const proposeTx = async ( const safeTypedDataDomain = { chainId, - verifyingContract: walletAccount + verifyingContract: walletAccount, }; const contractTransactionHash = _TypedDataEncoder.hash( @@ -184,15 +186,12 @@ export const proposeTx = async ( const uri = `https://safe-transaction-${chainPrefix}.safe.global/api/v1/safes/${walletAccount}/multisig-transactions/`; try { - await axios.post( - uri, - { - ...txn, - sender, - contractTransactionHash, - signature - } - ); + await axios.post(uri, { + ...txn, + sender, + contractTransactionHash, + signature, + }); return nonce; } catch (error) { diff --git a/src/api/orgJson.ts b/src/api/orgJson.ts index 3ea1b23..2725bfc 100644 --- a/src/api/orgJson.ts +++ b/src/api/orgJson.ts @@ -1,30 +1,34 @@ -import type { ORGJSON, VerificationMethodReference } from '@windingtree/org.json-schema/types/org.json'; +import { vc } from '@windingtree/org.id-auth'; +import { JWK } from '@windingtree/org.id-auth/dist/keys'; +import { object as objectUtil } from '@windingtree/org.id-utils'; +import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; import type { NFTMetadata } from '@windingtree/org.json-schema/types/nft'; +import type { + ORGJSON, + VerificationMethodReference, +} from '@windingtree/org.json-schema/types/org.json'; import type { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; -import type { ParsedArgv } from '../utils/env'; +import { ethers, Signer, Wallet } from 'ethers'; +import { DateTime } from 'luxon'; +import prompts from 'prompts'; import type { ProjectDeploymentReference, - ProjectVcReference + ProjectVcReference, } from '../schema/types/project'; -import prompts from 'prompts'; -import { ethers } from 'ethers'; -import { DateTime } from 'luxon'; -import { vc } from '@windingtree/org.id-auth'; -import { object as objectUtil } from '@windingtree/org.id-utils'; -import { read, write } from './fs'; +import { printInfo, printMessage } from '../utils/console'; +import type { ParsedArgv } from '../utils/env'; +import { AwsKmsSigner } from './awsKms'; +import { decrypt, promptOrgId } from './common'; import { deployFileIpfs } from './deployment'; +import { read, write } from './fs'; +import { AwsKmsKeyConfig } from './keysImport'; import { addVcToProject, getKeyPairsFromProjectByTag } from './project'; -import { decrypt, promptKeyPair, promptOrgId } from './common'; -import { printInfo, printMessage } from '../utils/console'; -import { parseDid } from '@windingtree/org.id-utils/dist/parsers'; -import { JWK } from '@windingtree/org.id-auth/dist/keys'; // Extract verification method from the orgJson export const fetchVerificationMethod = ( orgJson: ORGJSON, verificationMethodId: string | undefined ): VerificationMethodReference => { - if (!verificationMethodId) { throw new Error( 'Verification method Id must be provided using "--method" option' @@ -41,7 +45,7 @@ export const fetchVerificationMethod = ( } const orgJsonVerificationMethod = orgJsonVerificationMethods.filter( - m => m.id === verificationMethodId + (m) => m.id === verificationMethodId )[0]; if (!orgJsonVerificationMethod) { @@ -81,30 +85,20 @@ export const buildNftMetadata = ( let nftImage: string; if (!isPerson) { - nftName = objectUtil.getDeepValue( - orgJson, - nftNamePath - ) as string; + nftName = objectUtil.getDeepValue(orgJson, nftNamePath) as string; if (!nftName) { throw new Error(`"${nftNamePath}" must be defined`); } - nftAlterName = objectUtil.getDeepValue( - orgJson, - nftAlterNamePath - ) as string; + nftAlterName = objectUtil.getDeepValue(orgJson, nftAlterNamePath) as string; - nftImage = objectUtil.getDeepValue( - orgJson, - nftImagePath - ) as string; + nftImage = objectUtil.getDeepValue(orgJson, nftImagePath) as string; if (!nftImage) { throw new Error(`"${nftImagePath}" must be defined`); } } else { - if (!args['--nftName']) { throw new Error( 'In case of "person" profile NFT name must be provided using "--nftName" option' @@ -133,7 +127,7 @@ export const buildNftMetadata = ( return { name: nftAlterName || nftName, description: nftName, - image: nftImage + image: nftImage, }; }; @@ -147,13 +141,14 @@ export const signOrgJsonWithBlockchainAccount = async ( const issuerBlockchainAccountId = verificationMethod.blockchainAccountId; if (!issuerBlockchainAccountId) { - throw new Error('blockchainAccountId not defined in the verificationMethod'); + throw new Error( + 'blockchainAccountId not defined in the verificationMethod' + ); } - const { - accountAddress, - blockchainType - } = vc.parseBlockchainAccountId(issuerBlockchainAccountId); + const { accountAddress, blockchainType } = vc.parseBlockchainAccountId( + issuerBlockchainAccountId + ); if (blockchainType !== 'eip155') { throw new Error( @@ -161,26 +156,48 @@ export const signOrgJsonWithBlockchainAccount = async ( ); } - let privateKeyRaw: string; - - const keyPairRecord = await promptKeyPair( - basePath, - 'ethereum' - ); + const { fragment } = parseDid(verificationMethod.id); - if (keyPairRecord) { - privateKeyRaw = keyPairRecord.privateKey; - } else { - privateKeyRaw = process.env.ACCOUNT_KEY as string; + if (!fragment) { + throw new Error( + `Key tag not found in the verification method Id: ${verificationMethod.id}` + ); } - if (!privateKeyRaw) { + const keyPairRecord = await getKeyPairsFromProjectByTag(basePath, fragment); + + if (!keyPairRecord) { throw new Error( - 'Verifiable credential signer private key must be provided using "ACCOUNT_KEY" environment variable' + `Key with tag ${fragment} not found in the project. Register it first using "--operation keys:import" command` ); } - const signer = new ethers.Wallet(privateKeyRaw); + const { password } = await prompts({ + type: 'password', + name: 'password', + message: `Enter the password for the key pair "${keyPairRecord.tag}"`, + }); + + keyPairRecord.privateKey = decrypt(keyPairRecord.privateKey, password); + + let signer: Signer; + + if (keyPairRecord.type === 'ethereum') { + signer = new ethers.Wallet(keyPairRecord.privateKey); + } else if (keyPairRecord.type === 'kmsEthereum') { + const config = JSON.parse(keyPairRecord.privateKey) as AwsKmsKeyConfig; + signer = new AwsKmsSigner(config.keyId, { + region: config.region, + credentials: { + accessKeyId: config.accessKeyId, + secretAccessKey: config.secretAccessKey, + }, + }); + } else { + throw new Error( + `Key of type ${keyPairRecord.type} cannot be used for an ORGiD VC signing` + ); + } const signerAddress = await signer.getAddress(); @@ -192,15 +209,13 @@ export const signOrgJsonWithBlockchainAccount = async ( orgJson.updated = DateTime.now().toISO(); - return vc.createVC( - verificationMethod.id, - [ 'OrgJson' ] - ) + return vc + .createVC(verificationMethod.id, ['OrgJson']) .setCredentialSubject(orgJson) .setNftMetaData(nftMetadata) .signWithBlockchainAccount( issuerBlockchainAccountId, - signer + signer as Wallet ) as Promise; }; @@ -220,7 +235,7 @@ export const signWithEcKey = async ( } const isDelegate = !!capabilityDelegation.find( - id => id === verificationMethod.id + (id) => id === verificationMethod.id ); if (!isDelegate) { @@ -241,25 +256,21 @@ export const signWithEcKey = async ( if (!keyPair) { throw new Error( - `Keys pair with tag "${fragment}" not registered yet.`+ - 'Please register it fist using "--operation keys:import" command' + `Keys pair with tag "${fragment}" not registered yet.` + + 'Please register it fist using "--operation keys:import" command' ); } - const { password } = await prompts( - { - type: 'password', - name: 'password', - message: 'Please provide an decryption password for keys storage' - } - ); + const { password } = await prompts({ + type: 'password', + name: 'password', + message: 'Please provide an decryption password for keys storage', + }); const privateKeyRaw = decrypt(keyPair.privateKey, password); - return vc.createVC( - verificationMethod.id, - [ 'OrgJson' ] - ) + return vc + .createVC(verificationMethod.id, ['OrgJson']) .setCredentialSubject(orgJson) .setNftMetaData(nftMetadata) .sign(JSON.parse(privateKeyRaw) as JWK) as Promise; @@ -270,7 +281,6 @@ export const createSignedOrgJson = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--output']) { throw new Error( 'Path to the output file must be provided using "--output" option' @@ -278,7 +288,6 @@ export const createSignedOrgJson = async ( } if (!args['--payload']) { - const orgId = await promptOrgId(basePath); if (!orgId.orgJson) { @@ -289,16 +298,11 @@ export const createSignedOrgJson = async ( } // Read the payload by path - const subject = await read( - basePath, - args['--payload'], - true - ) as ORGJSON; + const subject = (await read(basePath, args['--payload'], true)) as ORGJSON; let verificationMethod: VerificationMethodReference | undefined; if (!args['--method']) { - if (!subject.verificationMethod) { throw new Error( '"orgJson.verificationMethods" not found in the ORG.JSON file' @@ -309,22 +313,16 @@ export const createSignedOrgJson = async ( type: 'select', name: 'verificationMethod', message: 'Choose a key that should be used as verification method', - choices: subject.verificationMethod.map( - o => ({ - title: o.id, - value: o - }) - ), - initial: 0 + choices: subject.verificationMethod.map((o) => ({ + title: o.id, + value: o, + })), + initial: 0, }); verificationMethod = verificationMethodResult.verificationMethod; } else { - - verificationMethod = fetchVerificationMethod( - subject, - args['--method'] - ); + verificationMethod = fetchVerificationMethod(subject, args['--method']); } if (!verificationMethod) { @@ -373,16 +371,12 @@ export const createSignedOrgJson = async ( let deploymentRecord: ProjectDeploymentReference | undefined; if (args['--deploy']) { - switch (args['--deploy']) { case 'ipfs': printMessage('\nDeploying the file to IPFS...\n'); args['--path'] = args['--output']; args['--filetype'] = 'orgIdVc'; - deploymentRecord = await deployFileIpfs( - basePath, - args - ); + deploymentRecord = await deployFileIpfs(basePath, args); break; default: throw new Error(`Unknown deployment type: ${args['--deploy']}`); @@ -397,13 +391,11 @@ export const createSignedOrgJson = async ( payload: args['--payload'], path: args['--output'], date: DateTime.now().toISO(), - ...( - deploymentRecord - ? { - uri: deploymentRecord.uri + ...(deploymentRecord + ? { + uri: deploymentRecord.uri, } - : {} - ) + : {}), }; return addVcToProject(basePath, vcRecord); diff --git a/src/api/project.ts b/src/api/project.ts index d8aa354..398e3c7 100644 --- a/src/api/project.ts +++ b/src/api/project.ts @@ -1,24 +1,19 @@ +import { object } from '@windingtree/org.id-utils'; +import { DateTime } from 'luxon'; +import path from 'path'; +import orgIdCliProjectSchema from '../schema/project.json'; import type { + ApiKeyConfigReference, + NetworkProviderConfigReference, OrgIdCliProjectReference, + ProjectConfigReference, ProjectDeploymentReference, - ProjectVcReference, - ProjectOrgIdsReference, ProjectKeysReference, - NetworkProviderConfigReference, - ApiKeyConfigReference, - ProjectConfigReference + ProjectOrgIdsReference, + ProjectVcReference, } from '../schema/types/project'; -import path from 'path'; -import { DateTime } from 'luxon'; -import { object } from '@windingtree/org.id-utils'; -import { - createDir, - isFileExists, - read, - write -} from './fs'; -import orgIdCliProjectSchema from '../schema/project.json'; import { printMessage, printObject, printWarn } from '../utils/console'; +import { createDir, isFileExists, read, write } from './fs'; export interface AddDeploymentResult { add: ProjectDeploymentReference; @@ -32,14 +27,13 @@ export type KnownProjectConfigRecords = export type ProjectConfigRecordsTypes = keyof ProjectConfigReference; export const projectFileTemplate: OrgIdCliProjectReference = { - note: 'This file is created automatically. Do not edit it manually' + note: 'This file is created automatically. Do not edit it manually', }; // Validate a project file and save it export const saveProjectFile = async ( project: OrgIdCliProjectReference ): Promise => { - const validationResult = object.validateWithSchemaOrRef( orgIdCliProjectSchema, '', @@ -82,24 +76,26 @@ export const addDeploymentToProject = async ( orgIdDid?: string ): Promise => { const project = await getProjectFile(basePath); - const deployments = ((object.getDeepValue(project, 'deployments') || []) as ProjectDeploymentReference[]); - const remove = deployments.filter(r => r.path === deployment.path)[0]; - const records = deployments.filter(r => r.path !== deployment.path); + const deployments = (object.getDeepValue(project, 'deployments') || + []) as ProjectDeploymentReference[]; + const remove = deployments.filter((r) => r.path === deployment.path)[0]; + const records = deployments.filter((r) => r.path !== deployment.path); records.push(deployment); let orgIdsRecords: ProjectOrgIdsReference[]; let updatedOrgIdRecord: ProjectOrgIdsReference | undefined; if (orgIdDid) { - orgIdsRecords = ((object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[]) - .map(o => { - if (o.did === orgIdDid) { - o.orgIdVc = deployment.uri; - o.date = DateTime.now().toISO(); - updatedOrgIdRecord = o; - } - return o; - }); + orgIdsRecords = ( + (object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[] + ).map((o) => { + if (o.did === orgIdDid) { + o.orgIdVc = deployment.uri; + o.date = DateTime.now().toISO(); + updatedOrgIdRecord = o; + } + return o; + }); project.orgIds = orgIdsRecords; } @@ -121,7 +117,7 @@ export const addDeploymentToProject = async ( return { add: deployment, - remove + remove, }; }; @@ -131,14 +127,13 @@ export const addVcToProject = async ( vc: ProjectVcReference ): Promise => { const project = await getProjectFile(basePath); - const records = ((object.getDeepValue(project, 'vcs') || []) as ProjectVcReference[]) - .filter( - r => r.path !== vc.path && - ( - vc.type !== 'OrgJson' || - (vc.type === 'OrgJson' && r.did !== vc.did) - ) - ); + const records = ( + (object.getDeepValue(project, 'vcs') || []) as ProjectVcReference[] + ).filter( + (r) => + r.path !== vc.path && + (vc.type !== 'OrgJson' || (vc.type === 'OrgJson' && r.did !== vc.did)) + ); records.push(vc); project.vcs = records; @@ -158,8 +153,9 @@ export const addOrgIdToProject = async ( orgId: ProjectOrgIdsReference ): Promise => { const project = await getProjectFile(basePath); - const records = ((object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[]) - .filter(o => o.did !== orgId.did && o.orgJson !== orgId.orgJson); + const records = ( + (object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[] + ).filter((o) => o.did !== orgId.did && o.orgJson !== orgId.orgJson); records.push(orgId); project.orgIds = records; @@ -182,18 +178,19 @@ export const updateOrgIdRecord = async ( ): Promise => { const project = await getProjectFile(basePath); let updatedRecord: ProjectOrgIdsReference | undefined; - const records = ((object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[]) - .map(o => { - if (o.did === did) { - o = { - ...o, - ...partialRecord, - date: DateTime.now().toISO() - }; - updatedRecord = o; - } - return o; - }); + const records = ( + (object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[] + ).map((o) => { + if (o.did === did) { + o = { + ...o, + ...partialRecord, + date: DateTime.now().toISO(), + }; + updatedRecord = o; + } + return o; + }); if (updatedRecord) { project.orgIds = records; @@ -205,7 +202,6 @@ export const updateOrgIdRecord = async ( ); printObject(updatedRecord); } else { - printWarn( `Something goes wrong. ORGiD record by DID: "${did}" has not been updated` ); @@ -218,8 +214,9 @@ export const addKeyPairToProject = async ( keyPair: ProjectKeysReference ): Promise => { const project = await getProjectFile(basePath); - const records = ((object.getDeepValue(project, 'keys') || []) as ProjectKeysReference[]) - .filter(o => o.tag !== keyPair.tag); + const records = ( + (object.getDeepValue(project, 'keys') || []) as ProjectKeysReference[] + ).filter((o) => o.tag !== keyPair.tag); records.push(keyPair); project.keys = records; @@ -241,8 +238,10 @@ export const addConfigRecordToProject = async ( configRecord: KnownProjectConfigRecords ): Promise => { const project = await getProjectFile(basePath); - const records = ((object.getDeepValue(project, `config.${recordKey}`) || []) as KnownProjectConfigRecords[]) - .filter(o => o.id !== configRecord.id); + const records = ( + (object.getDeepValue(project, `config.${recordKey}`) || + []) as KnownProjectConfigRecords[] + ).filter((o) => o.id !== configRecord.id); records.push(configRecord); project.config = project.config ? project.config : {}; @@ -263,7 +262,8 @@ export const getOrgIdsFromProject = async ( basePath: string ): Promise => { const project = await getProjectFile(basePath); - return ((object.getDeepValue(project, 'orgIds') || []) as ProjectOrgIdsReference[]); + return (object.getDeepValue(project, 'orgIds') || + []) as ProjectOrgIdsReference[]; }; // Get key pair by its type from the project file @@ -272,8 +272,9 @@ export const getKeyPairsFromProject = async ( type?: string ): Promise => { const project = await getProjectFile(basePath); - return ((object.getDeepValue(project, 'keys') || []) as ProjectKeysReference[]) - .filter(o => type ? o.type === type : true); + return ( + (object.getDeepValue(project, 'keys') || []) as ProjectKeysReference[] + ).filter((o) => (type ? o.type === type : true)); }; // Get key pair by its tag from the project file @@ -282,8 +283,9 @@ export const getKeyPairsFromProjectByTag = async ( tag: string ): Promise => { const project = await getProjectFile(basePath); - return ((object.getDeepValue(project, 'keys') || []) as ProjectKeysReference[]) - .find(o => o.tag === tag); + return ( + (object.getDeepValue(project, 'keys') || []) as ProjectKeysReference[] + ).find((o) => o.tag === tag); }; // Get list of available network providers @@ -291,7 +293,8 @@ export const getNetworkProvidersFromProject = async ( basePath: string ): Promise => { const project = await getProjectFile(basePath); - return ((object.getDeepValue(project, 'config.networkProviders') || []) as NetworkProviderConfigReference[]); + return (object.getDeepValue(project, 'config.networkProviders') || + []) as NetworkProviderConfigReference[]; }; // Get network provider record by network Id @@ -300,8 +303,10 @@ export const getNetworkProviderById = async ( networkId: string ): Promise => { const project = await getProjectFile(basePath); - return ((object.getDeepValue(project, 'config.networkProviders') || []) as NetworkProviderConfigReference[]) - .filter(p => p.id === networkId)[0]; + return ( + (object.getDeepValue(project, 'config.networkProviders') || + []) as NetworkProviderConfigReference[] + ).filter((p) => p.id === networkId)[0]; }; // Get API key by Id @@ -310,6 +315,8 @@ export const getApiKeyById = async ( id: string ): Promise => { const project = await getProjectFile(basePath); - return ((object.getDeepValue(project, 'config.apisKeys') || []) as ApiKeyConfigReference[]) - .filter(p => p.id === id)[0]; + return ( + (object.getDeepValue(project, 'config.apisKeys') || + []) as ApiKeyConfigReference[] + ).filter((p) => p.id === id)[0]; }; diff --git a/src/api/projectConfig.ts b/src/api/projectConfig.ts index 6164d23..7ba3edc 100644 --- a/src/api/projectConfig.ts +++ b/src/api/projectConfig.ts @@ -1,13 +1,14 @@ -import type { ParsedArgv } from '../utils/env'; -import type { KnownProjectConfigRecords } from '../api/project'; -import type { NetworkProviderConfigReference, ApiKeyConfigReference } from '../schema/types/project'; +import { DateTime } from 'luxon'; import prompts from 'prompts'; -import { DateTime } from 'luxon'; +import type { KnownProjectConfigRecords } from '../api/project'; +import type { + ApiKeyConfigReference, + NetworkProviderConfigReference, +} from '../schema/types/project'; import { printInfo } from '../utils/console'; +import type { ParsedArgv } from '../utils/env'; import { encrypt } from './common'; -import { - addConfigRecordToProject -} from './project'; +import { addConfigRecordToProject } from './project'; // Manage provider config export const manageProvider = async ( @@ -17,7 +18,7 @@ export const manageProvider = async ( { type: 'text', name: 'id', - message: 'Please enter a network Id' + message: 'Please enter a network Id', }, { type: 'select', @@ -26,36 +27,36 @@ export const manageProvider = async ( choices: [ { title: 'Yes', - value: true + value: true, }, { title: 'No', - value: false - } + value: false, + }, ], - initial: 0 + initial: 0, }, { - type: prevChoice => prevChoice ? 'password' : 'text', + type: (prevChoice) => (prevChoice ? 'password' : 'text'), name: 'uri', message: 'Please enter the provider URI', }, { - type: (_, v) => v.requireEncryption ? 'password' : null, + type: (_, v) => (v.requireEncryption ? 'password' : null), name: 'password', message: 'Please provide a password', - validate: value => + validate: (value) => /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.exec(value) ? true - : 'Password must consist of a minimum of eight characters, at least one letter and one number' - } + : 'Password must consist of a minimum of eight characters, at least one letter and one number', + }, ]); const configRecordTemplate: NetworkProviderConfigReference = { id, uri: password ? encrypt(uri, password) : uri, encrypted: !!password, - date: DateTime.now().toISO() + date: DateTime.now().toISO(), }; const configRecord = await addConfigRecordToProject( @@ -79,7 +80,7 @@ export const manageApisKeysStorage = async ( { type: 'text', name: 'id', - message: 'Please enter API key Id' + message: 'Please enter API key Id', }, { type: 'select', @@ -88,36 +89,36 @@ export const manageApisKeysStorage = async ( choices: [ { title: 'Yes', - value: true + value: true, }, { title: 'No', - value: false - } + value: false, + }, ], - initial: 0 + initial: 0, }, { - type: prevChoice => prevChoice ? 'password' : 'text', + type: (prevChoice) => (prevChoice ? 'password' : 'text'), name: 'key', message: 'Please enter the API key', }, { - type: (_, v) => v.requireEncryption ? 'password' : null, + type: (_, v) => (v.requireEncryption ? 'password' : null), name: 'password', message: 'Please provide a password', - validate: value => + validate: (value) => /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.exec(value) ? true - : 'Password must consist of a minimum of eight characters, at least one letter and one number' - } + : 'Password must consist of a minimum of eight characters, at least one letter and one number', + }, ]); const configRecordTemplate: ApiKeyConfigReference = { id, key: password ? encrypt(key, password) : key, encrypted: !!password, - date: DateTime.now().toISO() + date: DateTime.now().toISO(), }; const configRecord = await addConfigRecordToProject( @@ -138,7 +139,6 @@ export const manageConfigRecords = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--record']) { throw new Error( 'Project config record type must be provided using "--record" option' @@ -154,6 +154,6 @@ export const manageConfigRecords = async ( break; // @todo Add more record types default: - throw new Error(`Unknown config record type: "${args['--record']}"`) + throw new Error(`Unknown config record type: "${args['--record']}"`); } }; diff --git a/src/api/resolveOrgId.ts b/src/api/resolveOrgId.ts index 14b786d..5fd62dd 100644 --- a/src/api/resolveOrgId.ts +++ b/src/api/resolveOrgId.ts @@ -1,59 +1,48 @@ -import type { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; import type { - ResolverOptions, - FetcherResolver, FetcherConfig, - OrgIdResolverAPI + FetcherResolver, + OrgIdResolverAPI, + ResolverOptions, } from '@windingtree/org.id-resolver'; -import type { ParsedArgv } from '../utils/env'; import { buildEvmChainConfig, buildHttpFetcherConfig, - OrgIdResolver + OrgIdResolver, } from '@windingtree/org.id-resolver'; +import type { ORGJSONVCNFT } from '@windingtree/org.json-schema/types/orgVc'; +import { printInfo, printObject, printWarn } from '../utils/console'; +import type { ParsedArgv } from '../utils/env'; import { - parseDid, getEthersProvider, - getSupportedNetworkConfig + getSupportedNetworkConfig, + parseDid, } from './common'; import { getFromIpfs } from './ipfs'; -import { printInfo, printWarn, printObject } from '../utils/console'; export const initOrgIdResolver = async ( basePath: string, did: string ): Promise => { - const { network } = parseDid(did); const provider = await getEthersProvider(basePath, network); const { address } = getSupportedNetworkConfig(network); - const chainConfig = buildEvmChainConfig( - network, - 'eip155', - address, - provider - ); + const chainConfig = buildEvmChainConfig(network, 'eip155', address, provider); const ipfsFetcherInitializer = (): FetcherResolver => ({ getOrgJson: async (uri: string): Promise => - getFromIpfs(basePath, uri) as Promise + getFromIpfs(basePath, uri) as Promise, }); const buildIpfsFetcherConfig = (): FetcherConfig => ({ id: 'ipfs', name: 'ORG.JSON IPFS fetcher', - init: ipfsFetcherInitializer + init: ipfsFetcherInitializer, }); const resolverOptions: ResolverOptions = { - chains: [ - chainConfig - ], - fetchers: [ - buildHttpFetcherConfig(), - buildIpfsFetcherConfig() - ] + chains: [chainConfig], + fetchers: [buildHttpFetcherConfig(), buildIpfsFetcherConfig()], }; return OrgIdResolver(resolverOptions); @@ -63,11 +52,8 @@ export const resolveOrgId = async ( basePath: string, args: ParsedArgv ): Promise => { - if (!args['--did']) { - throw new Error( - 'ORGiD DID must be provided using "--did" option' - ); + throw new Error('ORGiD DID must be provided using "--did" option'); } const resolver = await initOrgIdResolver(basePath, args['--did']); diff --git a/src/api/transferOwnership.ts b/src/api/transferOwnership.ts index 77d4429..92ed3ad 100644 --- a/src/api/transferOwnership.ts +++ b/src/api/transferOwnership.ts @@ -1,40 +1,31 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import type { ParsedArgv } from '../utils/env'; -import { - promptOrgId, - prepareOrgIdApi -} from './common'; -import { printInfo, printObject, printWarn } from '../utils/console'; -import { - updateOrgIdRecord -} from './project'; +// import { promptOrgId, prepareOrgIdApi } from './common'; +// import { printInfo, printObject, printWarn } from '../utils/console'; +// import { updateOrgIdRecord } from './project'; export const transferOwnership = async ( basePath: string, args: ParsedArgv ): Promise => { - // if (!args['--newOwner']) { // throw new Error( // 'A new owner address must be provided using "--newOwner" option' // ); // } - // const orgId = await promptOrgId(basePath, true); // const { // created, // did // } = orgId; - // if (!created) { // throw new Error(`The ORGiD: "${did}" is not created yet`); // } - // const { // orgIdContract, // signer, // id // } = await prepareOrgIdApi(basePath, orgId); - // const orgIdData = await orgIdContract.transferOrgIdOwnership( // id, // args['--newOwner'], @@ -44,24 +35,19 @@ export const transferOwnership = async ( // printInfo(`\nTransaction hash: ${txHash}`); // } // ); - // if (!orgIdData) { // throw new Error('Unable to fetch ORGiD data'); // } - // printInfo( // `ORGiD with DID: "${did}" has been successfully transferred to the new owner: "${args['--newOwner']}"` // ); - // printObject({ // ...orgIdData, // tokenId: orgIdData.tokenId.toString() // }); - // printWarn( // `The owner of the ORGiD has been changed. Please check that the ORGiD VC is signed with a proper key` // ); - // await updateOrgIdRecord( // basePath, // did, diff --git a/src/fixRandomSource.ts b/src/fixRandomSource.ts index 1c78d0f..8ff0042 100644 --- a/src/fixRandomSource.ts +++ b/src/fixRandomSource.ts @@ -16,8 +16,11 @@ function getRandomValues(buffer: T): T { if (buffer.length > 65536) { const e = new Error() as ErrorWithCode; e.code = 22; - e.message = 'Failed to execute \'getRandomValues\' on \'Crypto\': The ' + - 'ArrayBufferView\'s byte length (' + buffer.length + ') exceeds the ' + + e.message = + "Failed to execute 'getRandomValues' on 'Crypto': The " + + "ArrayBufferView's byte length (" + + buffer.length + + ') exceeds the ' + 'number of bytes of entropy available via this API (65536).'; e.name = 'QuotaExceededError'; throw e; diff --git a/src/index.ts b/src/index.ts index 1027d68..b20b924 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,10 +15,7 @@ import { resolveOrgId } from './api/resolveOrgId'; import { createJwt } from './api/jwt'; // Main CLI handler -export const cli = async ( - basePath: string, - argv: string[] -): Promise => { +export const cli = async (basePath: string, argv: string[]): Promise => { const args = parseArguments( { '--operation': String, @@ -79,14 +76,16 @@ export const cli = async ( case 'resolve': await resolveOrgId(basePath, args); break; - // case 'transfer': - // await transferOwnership(basePath, args); + // case 'transfer': + // await transferOwnership(basePath, args); break; case 'jwt': await createJwt(basePath, args); break; case undefined: - throw new Error('Operation type must be provided using "--operation" parameter'); + throw new Error( + 'Operation type must be provided using "--operation" parameter' + ); default: throw new Error(`Unknown operation type "${args['--operation']}"`); } @@ -94,7 +93,7 @@ export const cli = async ( cli(process.cwd(), process.argv) .then(() => process.exit(0)) - .catch(error => { + .catch((error) => { printError(error.message); process.exit(1); }); diff --git a/src/schema/project.json b/src/schema/project.json index c35dc9e..3fe2ba0 100644 --- a/src/schema/project.json +++ b/src/schema/project.json @@ -4,7 +4,7 @@ "description": "An ORGiD project configuration", "allOf": [ { - "$ref": "#/definitions/OrgIdCliProjectReference" + "$ref": "#/definitions/OrgIdCliProjectReference" } ], "definitions": { @@ -92,11 +92,7 @@ "description": "Is URI is encrypted" } }, - "required": [ - "id", - "uri", - "encrypted" - ] + "required": ["id", "uri", "encrypted"] }, "ApiKeyConfigReference": { "description": "API key config record", @@ -115,11 +111,7 @@ "description": "Is key is encrypted" } }, - "required": [ - "id", - "key", - "encrypted" - ] + "required": ["id", "key", "encrypted"] }, "ProjectDeploymentReference": { "description": "Deployment configuration project record", @@ -128,11 +120,7 @@ "type": { "description": "A type of deployment", "type": "string", - "enum": [ - "ipfs", - "ipns", - "rest" - ] + "enum": ["ipfs", "ipns", "rest"] }, "path": { "description": "Path to the local file", @@ -148,12 +136,7 @@ "format": "date-time" } }, - "required": [ - "type", - "path", - "uri", - "date" - ] + "required": ["type", "path", "uri", "date"] }, "ProjectVcReference": { "description": "Verifiable credential project record", @@ -162,10 +145,7 @@ "type": { "description": "A type of VC", "type": "string", - "enum": [ - "VerifiableCredential", - "OrgJson" - ] + "enum": ["VerifiableCredential", "OrgJson"] }, "did": { "description": "ORGiD DID of the ORG.JSON", @@ -193,13 +173,7 @@ "format": "date-time" } }, - "required": [ - "type", - "method", - "payload", - "path", - "date" - ] + "required": ["type", "method", "payload", "path", "date"] }, "ProjectOrgIdsReference": { "description": "ORGiD configuration project record", @@ -235,11 +209,7 @@ "format": "date-time" } }, - "required": [ - "did", - "salt", - "owner" - ] + "required": ["did", "salt", "owner"] }, "ProjectKeysReference": { "description": "Registered key pair project record", @@ -247,11 +217,7 @@ "type": { "type": "string", "description": "Type of key pair", - "enum": [ - "ethereum", - "pem", - "multisig" - ] + "enum": ["ethereum", "pem", "multisig", "kmsEthereum"] }, "tag": { "type": "string", @@ -275,12 +241,7 @@ "format": "date-time" } }, - "required": [ - "type", - "tag", - "publicKey", - "privateKey" - ] + "required": ["type", "tag", "publicKey", "privateKey"] } } } diff --git a/src/schema/types/project.d.ts b/src/schema/types/project.d.ts index ad12d7d..b41d778 100644 --- a/src/schema/types/project.d.ts +++ b/src/schema/types/project.d.ts @@ -97,7 +97,7 @@ export interface ProjectDeploymentReference { /** * A type of deployment */ - type: "ipfs" | "ipns" | "rest"; + type: 'ipfs' | 'ipns' | 'rest'; /** * Path to the local file */ @@ -119,7 +119,7 @@ export interface ProjectVcReference { /** * A type of VC */ - type: "VerifiableCredential" | "OrgJson"; + type: 'VerifiableCredential' | 'OrgJson'; /** * ORGiD DID of the ORG.JSON */ @@ -187,7 +187,7 @@ export interface ProjectKeysReference { /** * Type of key pair */ - type: "ethereum" | "pem" | "multisig"; + type: 'ethereum' | 'pem' | 'multisig' | 'kmsEthereum'; /** * A unique key pair tag */ diff --git a/src/utils/console.ts b/src/utils/console.ts index 6e26887..679ac2a 100644 --- a/src/utils/console.ts +++ b/src/utils/console.ts @@ -11,7 +11,7 @@ export const printObject = (obj: object): void => { console.log('\n'); jsome(obj); console.log('\n'); -} +}; export const printWarn = (message: string): void => console.log(chalk.yellow(message)); diff --git a/src/utils/env.ts b/src/utils/env.ts index 62f3ced..72aba7f 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -3,7 +3,7 @@ import arg from 'arg'; import * as regex from './regex'; export interface ParsedEnv { - [k: string]: string + [k: string]: string; } export interface CliSpec extends Spec { @@ -37,13 +37,7 @@ export type ParsedArgv = Result; export const parseQuotedValue = (value: string): string => { const result = regex.stripQuotes.exec(value); const parsedValue: string = result !== null ? result[1] : value; - return parsedValue - .toString() - .replace( - regex.reNewLines, - regex.newLine - ) - .trim(); + return parsedValue.toString().replace(regex.reNewLines, regex.newLine).trim(); }; // Parses raw env file into an object @@ -51,30 +45,23 @@ export const parseEnv = (envRaw: string): ParsedEnv => envRaw .toString() .split(regex.allNewLines) - .map(line => regex.keyVal.exec(line)) + .map((line) => regex.keyVal.exec(line)) .reduce( (a, v) => ({ ...a, - ...( - v + ...(v ? { - [v[1]]: parseQuotedValue(v[2]) - } - : {} - ) + [v[1]]: parseQuotedValue(v[2]), + } + : {}), }), { - PATH: process.env.PATH as string + PATH: process.env.PATH as string, } ); // Argv parser -export const parseArguments = ( - config: CliSpec, - argv: string[] -): ParsedArgv => arg( - config, - { - argv - } -); +export const parseArguments = (config: CliSpec, argv: string[]): ParsedArgv => + arg(config, { + argv, + }); diff --git a/test/mocks/pemKeys.ts b/test/mocks/pemKeys.ts index e06bd9c..62e43b0 100644 --- a/test/mocks/pemKeys.ts +++ b/test/mocks/pemKeys.ts @@ -1,27 +1,25 @@ -export const privatePem = -`-----BEGIN PRIVATE KEY----- +export const privatePem = `-----BEGIN PRIVATE KEY----- MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgV6PloCFsJsoZmZ5K3Uj2 6YQwAwOQuyHrFne/p8mXheWhRANCAARtXfQSK+p6pJzFNAVL2lDbdLBjYKHAnkVh iI05R8Idksukb/eOuZQc2QhdDtilJlhid8qzHetlkkmycRJv1Ygc -----END PRIVATE KEY-----`; export const privatePemJwk = { - "kty": "EC", - "crv": "secp256k1", - "x": "bV30EivqeqScxTQFS9pQ23SwY2ChwJ5FYYiNOUfCHZI", - "y": "y6Rv9465lBzZCF0O2KUmWGJ3yrMd62WSSbJxEm_ViBw", - "d": "V6PloCFsJsoZmZ5K3Uj26YQwAwOQuyHrFne_p8mXheU" + kty: 'EC', + crv: 'secp256k1', + x: 'bV30EivqeqScxTQFS9pQ23SwY2ChwJ5FYYiNOUfCHZI', + y: 'y6Rv9465lBzZCF0O2KUmWGJ3yrMd62WSSbJxEm_ViBw', + d: 'V6PloCFsJsoZmZ5K3Uj26YQwAwOQuyHrFne_p8mXheU', }; -export const publicPem = -`-----BEGIN PUBLIC KEY----- +export const publicPem = `-----BEGIN PUBLIC KEY----- MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbV30EivqeqScxTQFS9pQ23SwY2ChwJ5F YYiNOUfCHZLLpG/3jrmUHNkIXQ7YpSZYYnfKsx3rZZJJsnESb9WIHA== -----END PUBLIC KEY-----`; export const publicKeyJwk = { - "kty": "EC", - "crv": "secp256k1", - "x": "bV30EivqeqScxTQFS9pQ23SwY2ChwJ5FYYiNOUfCHZI", - "y": "y6Rv9465lBzZCF0O2KUmWGJ3yrMd62WSSbJxEm_ViBw" + kty: 'EC', + crv: 'secp256k1', + x: 'bV30EivqeqScxTQFS9pQ23SwY2ChwJ5FYYiNOUfCHZI', + y: 'y6Rv9465lBzZCF0O2KUmWGJ3yrMd62WSSbJxEm_ViBw', }; diff --git a/test/utils.spec.ts b/test/utils.spec.ts index c1fe59f..6206491 100644 --- a/test/utils.spec.ts +++ b/test/utils.spec.ts @@ -1,20 +1,18 @@ import { parseArguments, parseQuotedValue, parseEnv } from '../src/utils/env'; describe('Utils tests', () => { - describe('ENV utils', () => { const env = { KEY1: 'key1', KEY2: 'key2', KEY3: 'key3' }; - const rawEnv = -`KEY1=key1 + const rawEnv = `KEY1=key1 KEY2="key2" KEY3='key3' `; describe('#parseQuotedValue', () => { const unQuoted = 'value'; - const singleQuoted = '\'value\''; - const singleStartQuoted = '\'value'; - const singleEndQuoted = 'value\''; + const singleQuoted = "'value'"; + const singleStartQuoted = "'value"; + const singleEndQuoted = "value'"; const doubleQuoted = '"value"'; const doubleStartQuoted = '"value'; const doubleEndQuoted = 'value"'; @@ -31,7 +29,6 @@ KEY3='key3' }); describe('#parseEnv', () => { - it('should par raw ENV file source', async () => { const { KEY1, KEY2, KEY3 } = parseEnv(rawEnv); expect(KEY1).toBe(env.KEY1); @@ -50,19 +47,19 @@ KEY3='key3' '/home/host/.nvm/versions/node/v12.20.2/bin/node', '/home/host/dev/secure-env-cli/bin/index.js', './test.senv', - 'node --version' + 'node --version', ]; const argvEncrypt = [ '/home/host/.nvm/versions/node/v12.20.2/bin/node', '/home/host/dev/secure-env-cli/bin/index.js', '--type', - './test.env' + './test.env', ]; const argvDecrypt = [ '/home/host/.nvm/versions/node/v12.20.2/bin/node', '/home/host/dev/secure-env-cli/bin/index.js', '--payload', - './test.senv' + './test.senv', ]; const argvEncryptDecrypt = [ @@ -71,44 +68,31 @@ KEY3='key3' '--type', './test.env', '--payload', - './test.senv' + './test.senv', ]; describe('#parseArguments', () => { - it('should parse argvExec', async () => { - const result = parseArguments( - config, - argvExec - ); + const result = parseArguments(config, argvExec); expect(result).toHaveProperty('_'); expect(result['_'][2]).toBe(argvExec[2]); expect(result['_'][3]).toBe(argvExec[3]); }); it('should parse argvEncrypt', async () => { - const result = parseArguments( - config, - argvEncrypt - ); + const result = parseArguments(config, argvEncrypt); expect(result).toHaveProperty('--type'); expect(result['--type']).toBe(argvEncrypt[3]); }); it('should parse argvDecrypt', async () => { - const result = parseArguments( - config, - argvDecrypt - ); + const result = parseArguments(config, argvDecrypt); expect(result).toHaveProperty('--payload'); expect(result['--payload']).toBe(argvDecrypt[3]); }); it('should parse argvEncryptDecrypt', async () => { - const result = parseArguments( - config, - argvEncryptDecrypt - ); + const result = parseArguments(config, argvEncryptDecrypt); expect(result).toHaveProperty('--type'); expect(result).toHaveProperty('--payload'); expect(result['--type']).toBe(argvEncryptDecrypt[3]); diff --git a/tsconfig-build.json b/tsconfig-build.json index ff69b63..2772261 100644 --- a/tsconfig-build.json +++ b/tsconfig-build.json @@ -1,6 +1,4 @@ { "extends": "./tsconfig.json", - "exclude": [ - "test" - ] + "exclude": ["test"] } diff --git a/tsconfig.json b/tsconfig.json index 4143038..4abfa96 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "target": "es6", "moduleResolution": "node", "esModuleInterop": true, "experimentalDecorators": true, @@ -13,14 +13,8 @@ "skipLibCheck": true, "declaration": true, "outDir": "dist", - "baseUrl": ".", + "baseUrl": "." }, - "include": [ - "src", - "test", - "src/schema/project.json" - ], - "exclude": [ - "bin/index.js" - ] + "include": ["src", "test", "src/schema/project.json"], + "exclude": ["bin/index.js"] } diff --git a/webpack.config.js b/webpack.config.js index c9fbaf4..e542b1e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,11 +16,11 @@ module.exports = { { loader: 'ts-loader', options: { - configFile: 'tsconfig-build.json' - } - } + configFile: 'tsconfig-build.json', + }, + }, ], - exclude: /node_modules/ + exclude: /node_modules/, }, ], }, @@ -31,13 +31,13 @@ module.exports = { filename: 'index.js', path: path.resolve(__dirname, 'dist'), library: { - type: 'commonjs' - } + type: 'commonjs', + }, }, plugins: [ new webpack.BannerPlugin({ banner: '#!/usr/bin/env -S node --no-deprecation', - raw: true + raw: true, }), new webpack.ProvidePlugin({ fetch: ['node-fetch', 'default'], diff --git a/yarn.lock b/yarn.lock index 165862b..db74125 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,6 +15,665 @@ resolved "https://registry.yarnpkg.com/@assemblyscript/loader/-/loader-0.9.4.tgz#a483c54c1253656bb33babd464e3154a173e1577" integrity sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA== +"@aws-crypto/ie11-detection@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-2.0.2.tgz#9c39f4a5558196636031a933ec1b4792de959d6a" + integrity sha512-5XDMQY98gMAf/WRTic5G++jfmS/VLM0rwpiOpaainKi4L0nqWMSB1SzsrEG5rjFZGYN6ZAefO+/Yta2dFM0kMw== + dependencies: + tslib "^1.11.1" + +"@aws-crypto/sha256-browser@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-2.0.0.tgz#741c9024df55ec59b51e5b1f5d806a4852699fb5" + integrity sha512-rYXOQ8BFOaqMEHJrLHul/25ckWH6GTJtdLSajhlqGMx0PmSueAuvboCuZCTqEKlxR8CQOwRarxYMZZSYlhRA1A== + dependencies: + "@aws-crypto/ie11-detection" "^2.0.0" + "@aws-crypto/sha256-js" "^2.0.0" + "@aws-crypto/supports-web-crypto" "^2.0.0" + "@aws-crypto/util" "^2.0.0" + "@aws-sdk/types" "^3.1.0" + "@aws-sdk/util-locate-window" "^3.0.0" + "@aws-sdk/util-utf8-browser" "^3.0.0" + tslib "^1.11.1" + +"@aws-crypto/sha256-js@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-2.0.0.tgz#f1f936039bdebd0b9e2dd834d65afdc2aac4efcb" + integrity sha512-VZY+mCY4Nmrs5WGfitmNqXzaE873fcIZDu54cbaDaaamsaTOP1DBImV9F4pICc3EHjQXujyE8jig+PFCaew9ig== + dependencies: + "@aws-crypto/util" "^2.0.0" + "@aws-sdk/types" "^3.1.0" + tslib "^1.11.1" + +"@aws-crypto/sha256-js@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-2.0.2.tgz#c81e5d378b8a74ff1671b58632779986e50f4c99" + integrity sha512-iXLdKH19qPmIC73fVCrHWCSYjN/sxaAvZ3jNNyw6FclmHyjLKg0f69WlC9KTnyElxCR5MO9SKaG00VwlJwyAkQ== + dependencies: + "@aws-crypto/util" "^2.0.2" + "@aws-sdk/types" "^3.110.0" + tslib "^1.11.1" + +"@aws-crypto/supports-web-crypto@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-2.0.2.tgz#9f02aafad8789cac9c0ab5faaebb1ab8aa841338" + integrity sha512-6mbSsLHwZ99CTOOswvCRP3C+VCWnzBf+1SnbWxzzJ9lR0mA0JnY2JEAhp8rqmTE0GPFy88rrM27ffgp62oErMQ== + dependencies: + tslib "^1.11.1" + +"@aws-crypto/util@^2.0.0", "@aws-crypto/util@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-2.0.2.tgz#adf5ff5dfbc7713082f897f1d01e551ce0edb9c0" + integrity sha512-Lgu5v/0e/BcrZ5m/IWqzPUf3UYFTy/PpeED+uc9SWUR1iZQL8XXbGQg10UfllwwBryO3hFF5dizK+78aoXC1eA== + dependencies: + "@aws-sdk/types" "^3.110.0" + "@aws-sdk/util-utf8-browser" "^3.0.0" + tslib "^1.11.1" + +"@aws-sdk/abort-controller@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/abort-controller/-/abort-controller-3.201.0.tgz#032b48715449cbe497f4b66c6181c74d40be659d" + integrity sha512-xJ984k+CKlGjBmvNarzM8Y+b6X4L1Zt0TycQmVBJq7fAr/ju9l13pQIoXR5WlDIW1FkGeVczF5Nu6fN46SCORQ== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/client-kms@^3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-kms/-/client-kms-3.202.0.tgz#32027fad7e31074a8bad79c5e29d7cf5144bfe43" + integrity sha512-CqYQ2ZNmLTq2lQS4CCWNRkbht2dphce3BtbZkFT9KSLn7j+D1XyOMrgrYxs7ytZd7j90IhS7FpKtmpK6gNHZ9A== + dependencies: + "@aws-crypto/sha256-browser" "2.0.0" + "@aws-crypto/sha256-js" "2.0.0" + "@aws-sdk/client-sts" "3.202.0" + "@aws-sdk/config-resolver" "3.201.0" + "@aws-sdk/credential-provider-node" "3.202.0" + "@aws-sdk/fetch-http-handler" "3.201.0" + "@aws-sdk/hash-node" "3.201.0" + "@aws-sdk/invalid-dependency" "3.201.0" + "@aws-sdk/middleware-content-length" "3.201.0" + "@aws-sdk/middleware-endpoint" "3.201.0" + "@aws-sdk/middleware-host-header" "3.201.0" + "@aws-sdk/middleware-logger" "3.201.0" + "@aws-sdk/middleware-recursion-detection" "3.201.0" + "@aws-sdk/middleware-retry" "3.201.0" + "@aws-sdk/middleware-serde" "3.201.0" + "@aws-sdk/middleware-signing" "3.201.0" + "@aws-sdk/middleware-stack" "3.201.0" + "@aws-sdk/middleware-user-agent" "3.201.0" + "@aws-sdk/node-config-provider" "3.201.0" + "@aws-sdk/node-http-handler" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/smithy-client" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/url-parser" "3.201.0" + "@aws-sdk/util-base64-browser" "3.188.0" + "@aws-sdk/util-base64-node" "3.201.0" + "@aws-sdk/util-body-length-browser" "3.188.0" + "@aws-sdk/util-body-length-node" "3.201.0" + "@aws-sdk/util-defaults-mode-browser" "3.201.0" + "@aws-sdk/util-defaults-mode-node" "3.201.0" + "@aws-sdk/util-endpoints" "3.202.0" + "@aws-sdk/util-user-agent-browser" "3.201.0" + "@aws-sdk/util-user-agent-node" "3.201.0" + "@aws-sdk/util-utf8-browser" "3.188.0" + "@aws-sdk/util-utf8-node" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/client-sso@3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.202.0.tgz#3051e258a9229894ee939567ba4e0c00272df96c" + integrity sha512-c0impiZUbJeB5AdyZyER81tsqF9bxxaEz6p2LYkTn62NWVXPWEUo/1CHQRj36MUzorz1xiWKIN0NPgK6GBJkPQ== + dependencies: + "@aws-crypto/sha256-browser" "2.0.0" + "@aws-crypto/sha256-js" "2.0.0" + "@aws-sdk/config-resolver" "3.201.0" + "@aws-sdk/fetch-http-handler" "3.201.0" + "@aws-sdk/hash-node" "3.201.0" + "@aws-sdk/invalid-dependency" "3.201.0" + "@aws-sdk/middleware-content-length" "3.201.0" + "@aws-sdk/middleware-endpoint" "3.201.0" + "@aws-sdk/middleware-host-header" "3.201.0" + "@aws-sdk/middleware-logger" "3.201.0" + "@aws-sdk/middleware-recursion-detection" "3.201.0" + "@aws-sdk/middleware-retry" "3.201.0" + "@aws-sdk/middleware-serde" "3.201.0" + "@aws-sdk/middleware-stack" "3.201.0" + "@aws-sdk/middleware-user-agent" "3.201.0" + "@aws-sdk/node-config-provider" "3.201.0" + "@aws-sdk/node-http-handler" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/smithy-client" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/url-parser" "3.201.0" + "@aws-sdk/util-base64-browser" "3.188.0" + "@aws-sdk/util-base64-node" "3.201.0" + "@aws-sdk/util-body-length-browser" "3.188.0" + "@aws-sdk/util-body-length-node" "3.201.0" + "@aws-sdk/util-defaults-mode-browser" "3.201.0" + "@aws-sdk/util-defaults-mode-node" "3.201.0" + "@aws-sdk/util-endpoints" "3.202.0" + "@aws-sdk/util-user-agent-browser" "3.201.0" + "@aws-sdk/util-user-agent-node" "3.201.0" + "@aws-sdk/util-utf8-browser" "3.188.0" + "@aws-sdk/util-utf8-node" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/client-sts@3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.202.0.tgz#ecbfe5388e81af29a50cc889a346ea032fe2781b" + integrity sha512-WGRFzODig8+cZR903q3fa7OAzGigSuzD9AoK+ybefQa7bxSuhT2ous4GNPOJz9WYWvugEPyrJu8vbG35IoF1ZQ== + dependencies: + "@aws-crypto/sha256-browser" "2.0.0" + "@aws-crypto/sha256-js" "2.0.0" + "@aws-sdk/config-resolver" "3.201.0" + "@aws-sdk/credential-provider-node" "3.202.0" + "@aws-sdk/fetch-http-handler" "3.201.0" + "@aws-sdk/hash-node" "3.201.0" + "@aws-sdk/invalid-dependency" "3.201.0" + "@aws-sdk/middleware-content-length" "3.201.0" + "@aws-sdk/middleware-endpoint" "3.201.0" + "@aws-sdk/middleware-host-header" "3.201.0" + "@aws-sdk/middleware-logger" "3.201.0" + "@aws-sdk/middleware-recursion-detection" "3.201.0" + "@aws-sdk/middleware-retry" "3.201.0" + "@aws-sdk/middleware-sdk-sts" "3.201.0" + "@aws-sdk/middleware-serde" "3.201.0" + "@aws-sdk/middleware-signing" "3.201.0" + "@aws-sdk/middleware-stack" "3.201.0" + "@aws-sdk/middleware-user-agent" "3.201.0" + "@aws-sdk/node-config-provider" "3.201.0" + "@aws-sdk/node-http-handler" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/smithy-client" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/url-parser" "3.201.0" + "@aws-sdk/util-base64-browser" "3.188.0" + "@aws-sdk/util-base64-node" "3.201.0" + "@aws-sdk/util-body-length-browser" "3.188.0" + "@aws-sdk/util-body-length-node" "3.201.0" + "@aws-sdk/util-defaults-mode-browser" "3.201.0" + "@aws-sdk/util-defaults-mode-node" "3.201.0" + "@aws-sdk/util-endpoints" "3.202.0" + "@aws-sdk/util-user-agent-browser" "3.201.0" + "@aws-sdk/util-user-agent-node" "3.201.0" + "@aws-sdk/util-utf8-browser" "3.188.0" + "@aws-sdk/util-utf8-node" "3.201.0" + fast-xml-parser "4.0.11" + tslib "^2.3.1" + +"@aws-sdk/config-resolver@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/config-resolver/-/config-resolver-3.201.0.tgz#b2a8eb85c64a75249be817c4b39a00a408266ac5" + integrity sha512-6YLIel7OGMGi+r8XC1A54cQJRIpx/NJ4fBALy44zFpQ+fdJUEmw4daUf1LECmAQiPA2Pr/hD0nBtX+wiiTf5/g== + dependencies: + "@aws-sdk/signature-v4" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-config-provider" "3.201.0" + "@aws-sdk/util-middleware" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-env@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.201.0.tgz#c5b296ea8d2d3299e1e90e87cff21d292e23921f" + integrity sha512-g2MJsowzFhSsIOITUjYp7EzWFeHINjEP526Uf+5z2/p2kxQVwYYWZQK7j+tPE2Bk3MEjGOCmVHbbE7IFj0rNHw== + dependencies: + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-imds@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.201.0.tgz#d2dd04de218459b3aab4cf6f077b4eff42b7fda3" + integrity sha512-i8U2k3/L3iUWJJ1GSlwVBMfLQ2OTUT97E8yJi/xz5GavYuPOsUQWQe4fp7WGQivxh+AqybXAGFUCYub6zfUqag== + dependencies: + "@aws-sdk/node-config-provider" "3.201.0" + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/url-parser" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-ini@3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.202.0.tgz#6a507bda6abce4871fa11a42c8e25ee195bf1807" + integrity sha512-d0kiYMpGzAq3EBXgEJ1SdeoMXVf3lk6NKHDi/Gy8LB03sZqgc5cY4XFCnY3cqE3DNWWZNR26M4j/KiA0LIjAVA== + dependencies: + "@aws-sdk/credential-provider-env" "3.201.0" + "@aws-sdk/credential-provider-imds" "3.201.0" + "@aws-sdk/credential-provider-sso" "3.202.0" + "@aws-sdk/credential-provider-web-identity" "3.201.0" + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/shared-ini-file-loader" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-node@3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.202.0.tgz#82b30bb0480e3981838c20e2c955cfa7fd5330b0" + integrity sha512-/uHNs3c1O3oFpH7z9nnpjyg8NKNyRbNxUDIHkuHkNSUUKXpfBisDX6TMbD4VcflGuNdkbT+8spkw5vsE8ox3ig== + dependencies: + "@aws-sdk/credential-provider-env" "3.201.0" + "@aws-sdk/credential-provider-imds" "3.201.0" + "@aws-sdk/credential-provider-ini" "3.202.0" + "@aws-sdk/credential-provider-process" "3.201.0" + "@aws-sdk/credential-provider-sso" "3.202.0" + "@aws-sdk/credential-provider-web-identity" "3.201.0" + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/shared-ini-file-loader" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-process@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.201.0.tgz#d457fd916ae316895295523fb56f16f9c0e27179" + integrity sha512-jTK3HSZgNj/hVrWb0wuF/cPUWSJYoRI/80fnN55o6QLS8WWIgOI8o2PNeVTAT5OrKioSoN4fgKTeUm3DZy3npQ== + dependencies: + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/shared-ini-file-loader" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-sso@3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.202.0.tgz#6622452d17c0eb0a0f936689f948927686aef709" + integrity sha512-EBUY/qKboJwy3qxPHiD/LAnhzga4xR1p++QMoxg2BKgkgwlvGb23lYGr5DSCNhdtJj5o165YZDbGYH+PKn2NVw== + dependencies: + "@aws-sdk/client-sso" "3.202.0" + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/shared-ini-file-loader" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/credential-provider-web-identity@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.201.0.tgz#7f97a4933e119a25426bee376e8642ea5dc181a5" + integrity sha512-U54bqhYaClPVZfswgknhlICp3BAtKXpOgHQCUF8cko5xUgbL4lVgd1rC3lWviGFMQAaTIF3QOXyEouemxr3VXw== + dependencies: + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/fetch-http-handler@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.201.0.tgz#7b82e3b8bbfdfd08674de830681b4082deb84026" + integrity sha512-uiEoH79j6WOpbp4THcpvD9XmD+vPgy+00oyYXjtZqJnv2PM/9b6tGWKTdI+TJW4P/oPv7HP7JmRlkGaTnkIdXw== + dependencies: + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/querystring-builder" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-base64-browser" "3.188.0" + tslib "^2.3.1" + +"@aws-sdk/hash-node@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/hash-node/-/hash-node-3.201.0.tgz#341733ab90c6486ae76e3a0decf290f02dcea4bd" + integrity sha512-WJsMZg5/TMoWnLM+0NuwLwFzHsi89Bi9J1Dt7JdJHXFLoEZV54FEz1PK/Sq5NOldhVljpXQwWOB2dHA2wxFztg== + dependencies: + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-buffer-from" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/invalid-dependency@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/invalid-dependency/-/invalid-dependency-3.201.0.tgz#3ea1953b63d8ed3afe1bf9012a7c944fb9ac5fc3" + integrity sha512-f/zgntOfIozNyKSaG9dvHjjBaR3y20kYNswMYkSuCM2NIT5LpyHiiq5I11TwaocatUFcDztWpcsv7vHpIgI5Ig== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/is-array-buffer@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/is-array-buffer/-/is-array-buffer-3.201.0.tgz#06e557adc284fac2f26071c2944ae01f61b95854" + integrity sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/middleware-content-length@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-content-length/-/middleware-content-length-3.201.0.tgz#88eb45545b48058ed3dea00a67921f2f95dd2b23" + integrity sha512-p4G9AtdrKO8A3Z4RyZiy0isEYwuge7bQRBS7UzcGkcIOhJONq2pcM+gRZYz+NWvfYYNWUg5uODsFQfU8342yKg== + dependencies: + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-endpoint@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-endpoint/-/middleware-endpoint-3.201.0.tgz#7625354429235fe4ad99d6df85116c257b1d9254" + integrity sha512-F3JlXo5GusbeZR956hA9VxmDxUeg77Xh6o8fveAE2+G4Bjcb1iq9jPNlw6A14vDj3oTKenv2LLnjL2OIfl6hRA== + dependencies: + "@aws-sdk/middleware-serde" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/signature-v4" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/url-parser" "3.201.0" + "@aws-sdk/util-config-provider" "3.201.0" + "@aws-sdk/util-middleware" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-host-header@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.201.0.tgz#f1781eec66069533793228efaacb75fbe26d9a0d" + integrity sha512-7KNzdV7nFcKAoahvgGAlzsOq9FFDsU5h3w2iPtVdJhz6ZRDH/2v6WFeUCji+UNZip36gFfMPivoO8Y5smb5r/A== + dependencies: + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-logger@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.201.0.tgz#04c145358e843d5b892abcff1b998650e49034c8" + integrity sha512-kYLsa9x3oUJxYU7V5KOO50Kl7b0kk+I4ltkrdarLvvXcVI7ZXmWHzHLT2dkUhj8S0ceVdi0FYHVPJ3GoE8re4A== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-recursion-detection@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.201.0.tgz#9052dd1c239e0f82dc7aa4dc49b8168aab3be76b" + integrity sha512-NGOr+n559ZcJLdFoJR8LNGdrOJFIp2BTuWEDYeicNdNb0bETTXrkzcfT1BRhV9CWqCDmjFvjdrzbhS0cw/UUGA== + dependencies: + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-retry@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-retry/-/middleware-retry-3.201.0.tgz#a2ad4725c43ac0bf5bb804057c5e1c0a354972e5" + integrity sha512-4jQjSKCpSc4oB1X9nNq4FbIAwQrr+mvmUSmg/oe2Llf42Ak1G9gg3rNTtQdfzA/wNMlL4ZFfF5Br+uz06e1hnQ== + dependencies: + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/service-error-classification" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-middleware" "3.201.0" + tslib "^2.3.1" + uuid "^8.3.2" + +"@aws-sdk/middleware-sdk-sts@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.201.0.tgz#81ccd76f77148b93b4bbfe0ad3c4e89ac00af284" + integrity sha512-clZuXcoN0mAP4JH5C6pW5+0tdF25+fpFJqE7GNRjjH/NYNk6ImVI0Kq2espEWwVBuaS0/chTDK3b+pK8YOWdhw== + dependencies: + "@aws-sdk/middleware-signing" "3.201.0" + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/signature-v4" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-serde@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-serde/-/middleware-serde-3.201.0.tgz#bde19d8bd012651181b6654c4eadf75a24fc36cd" + integrity sha512-Z7AzIuqEDvsZmp80zeT1oYxsoB8uQZby20Z8kF6/vNoq3sIzaGf/wHeNn0p+Vgo2auGSbZcVUZKoDptQLSLwIQ== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-signing@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.201.0.tgz#6ad4b08b9434600d6d28b1c76476ac40bd7c2b57" + integrity sha512-08ri5+mB28tva9RjVIXFcUP5lRTx+Pj8C2HYqF2GL5H3uAo+h3RQ++fEG1uwUMLf7tCEFivcw6SHA1KmCnB7+w== + dependencies: + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/signature-v4" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-middleware" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/middleware-stack@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-stack/-/middleware-stack-3.201.0.tgz#a21e088e691210e91e1c0d40ab9906d57390efa1" + integrity sha512-lqHYSBP5FBxzA5w5XiYYYpfXabFzleXonqRkqZts1tapNJ4sOd+itiKG8JoNP7LDOwJ8qxNW/a33/gQeh3wkwQ== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/middleware-user-agent@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.201.0.tgz#3f851622f4f371c93124e65c8ba7ffdc9d31783f" + integrity sha512-/rYZ93WN1gDJudXis/0382CEoTqRa4qZJA608u2EPWs5aiMocUrm7pjH5XvKm2OYX8K/lyaMSBvL2OTIMzXGaQ== + dependencies: + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/node-config-provider@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/node-config-provider/-/node-config-provider-3.201.0.tgz#29ae7f0f6f8741a8deca253eac5e1c6a365e6df9" + integrity sha512-JO0K2qPTYn+pPC7g8rWr1oueg9CqGCkYbINuAuz79vjToOLUQnZT9GiFm7QADe6J6RT1oGEKRQabNaJnp8cFpQ== + dependencies: + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/shared-ini-file-loader" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/node-http-handler@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/node-http-handler/-/node-http-handler-3.201.0.tgz#0abdf647adf8a9747114782ed42cf01781cd624f" + integrity sha512-bWjXBd4WCiQcV4PwY+eFnlz9tZ4UiqfiJteav4MDt8YWkVlsVnR8RutmVSm3KZZjO2tJNSrla0ZWBebkNnI/Xg== + dependencies: + "@aws-sdk/abort-controller" "3.201.0" + "@aws-sdk/protocol-http" "3.201.0" + "@aws-sdk/querystring-builder" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/property-provider@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/property-provider/-/property-provider-3.201.0.tgz#a5db3f842dd7101bcc59374b7573af84df883676" + integrity sha512-lVMP75VsYHIW04uYbkjA0I8Bb7b+aEj6PBBLdFoA22S0uCeJOD42OSr2Gtg2fToDGO7LQJw/K2D+LMCYKfZ3vQ== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/protocol-http@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/protocol-http/-/protocol-http-3.201.0.tgz#7a207e79a4d46d74266c076a9f4e04d757fe3784" + integrity sha512-RdOc1elWFpj8MogxG87nkhtylw0a+OD7W8WFM+Gw4yJMkl7cwW42VIBFfb0+KCGZfIQltIeSLRvfe3WvVPyo7Q== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/querystring-builder@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-builder/-/querystring-builder-3.201.0.tgz#95f45db5e62e1a154147273c149fa332bd140936" + integrity sha512-FgQnVHpYR19w/HmHEgWpykCn9tdogW0n45Ins6LBCo2aImDf9kBATD4xgN/F2rtogGuLGgu5LIIMHIOj1Tzs/w== + dependencies: + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-uri-escape" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/querystring-parser@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-parser/-/querystring-parser-3.201.0.tgz#aefb94cded312b42cc074d9d4dab5df21e613dfa" + integrity sha512-vS9Ljbqrwi0sIKYxgyZYJUN1AcE291hvuqwty9etgD2w/26SbWiMhjIW/fXJUOZjUvGKkYCpbivJYSzAGAuWfQ== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/service-error-classification@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/service-error-classification/-/service-error-classification-3.201.0.tgz#871dbc590cbc1a3e995e4d593172ad44618c155a" + integrity sha512-Pfcfmurgq8UpM0rXco6FVblcruqN4Mo3TW8/yaXrbctWpmdNT/8v19fffQIIgk94TU8Vf/nPJ7E5DXL7MZr4Fw== + +"@aws-sdk/shared-ini-file-loader@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/shared-ini-file-loader/-/shared-ini-file-loader-3.201.0.tgz#d21cc8c16c036cb45dbda600debb5ea3ecc71cc2" + integrity sha512-Pbxk0TXep0yI8MnK7Prly6JuBm5Me9AITav8/zPEgTZ3fMhXhQhhiuQcuTCI9GeosSzoiu8VvK53oPtBZZFnXQ== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/signature-v4@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4/-/signature-v4-3.201.0.tgz#95e6232ccab0cdde7f9ec10b2fcb709c66440585" + integrity sha512-zEHoG1/hzJq169slggkPy1SN9YPWI78Bbe/MvHGYmCmQDspblu60JSBIbAatNqAxAmcWKc2HqpyGKjCkMG94ZA== + dependencies: + "@aws-sdk/is-array-buffer" "3.201.0" + "@aws-sdk/types" "3.201.0" + "@aws-sdk/util-hex-encoding" "3.201.0" + "@aws-sdk/util-middleware" "3.201.0" + "@aws-sdk/util-uri-escape" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/smithy-client@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/smithy-client/-/smithy-client-3.201.0.tgz#f52fac3b1462a3c85898cf4d0ae9c7453eb0a46e" + integrity sha512-cL87Jgxczee8YFkWGWKQ2Ze0vjn4+eCa1kDvEYMCOQvNujTuFgatXLgije5a7nVkSnL9WLoIP7Y7fsBGrKfMnQ== + dependencies: + "@aws-sdk/middleware-stack" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/types@3.201.0", "@aws-sdk/types@^3.1.0", "@aws-sdk/types@^3.110.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.201.0.tgz#c248106b7a780360d6bca876036e65ca2a4e240d" + integrity sha512-RCQj2pQyHD330Jd4c5CHJ87k2ZqC3Mmtl6nhwH1dy3vbnGUpc3q+3yinOKoTAY934kIa7ia32Y/2EjuyHxaj1A== + +"@aws-sdk/url-parser@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/url-parser/-/url-parser-3.201.0.tgz#a0278778bf1a506c0f03c1eca4af4b3586a737ec" + integrity sha512-V15aqj0tj4Y79VpuIdHUvX4Nvn4hYPB0RAn/qg5CCComIl0doLOirAQtW1MOBOyctdRlD9Uv7d1QdPLzJZMHjQ== + dependencies: + "@aws-sdk/querystring-parser" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/util-base64-browser@3.188.0": + version "3.188.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64-browser/-/util-base64-browser-3.188.0.tgz#581c85dc157aff88ca81e42d9c79d87c95db8d03" + integrity sha512-qlH+5NZBLiyKziL335BEPedYxX6j+p7KFRWXvDQox9S+s+gLCayednpK+fteOhBenCcR9fUZOVuAPScy1I8qCg== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-base64-node@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64-node/-/util-base64-node-3.201.0.tgz#4b5a2c12d3b88f12b0e8ab4c368c4158cd6de0b5" + integrity sha512-ydZqNpB3l5kiicInpPDExPb5xHI7uyVIa1vMupnuIrJ412iNb0F2+K8LlFynzw6fSJShVKnqFcWOYRA96z1iIw== + dependencies: + "@aws-sdk/util-buffer-from" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/util-body-length-browser@3.188.0": + version "3.188.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-browser/-/util-body-length-browser-3.188.0.tgz#e1d949318c10a621b38575a9ef01e39f9857ddb0" + integrity sha512-8VpnwFWXhnZ/iRSl9mTf+VKOX9wDE8QtN4bj9pBfxwf90H1X7E8T6NkiZD3k+HubYf2J94e7DbeHs7fuCPW5Qg== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-body-length-node@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-node/-/util-body-length-node-3.201.0.tgz#e2e4c8c3a8a9b8c0f82212a439e634cbfb3a42cf" + integrity sha512-q+gwQoLn/DOwirb2hgZJeEwo1D3vLhoD6FfSV42Ecfvtb4jHnWReWMHguujfCubuDgZCrMEvYQzuocS75HHsbA== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-buffer-from@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-buffer-from/-/util-buffer-from-3.201.0.tgz#2759ed785da5a81424b757d964c241e3e95c8d2a" + integrity sha512-s6Wjltd9vU+vR3n0pqSPmNDcrrkrVTdV4t7x2zz3nDsFKTI77iVNafDmuaUlOA/bIlpjCJqaWecoVrZmEKeR7A== + dependencies: + "@aws-sdk/is-array-buffer" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/util-config-provider@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-config-provider/-/util-config-provider-3.201.0.tgz#db6e0c8fa9a41278c927bdc7795b985f26c99d5c" + integrity sha512-cCRJlnRRP8vrLJomzJRBIyiyohsjJKmnIaQ9t0tAhGCywZbyjx6TlpYRZYfVWo+MwdF1Pi8ZScTrFPW0JuBOIQ== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-defaults-mode-browser@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-browser/-/util-defaults-mode-browser-3.201.0.tgz#6a07b1be0387af2af5d319d12030fcd8ea13713e" + integrity sha512-skRMAM+xrV/sDvvtHC81ExEKQEiZFaRrRdUT39fBX1SpGnFTo2wpv7XK+rAW2XopGgnLPytXLQD97Kub79o4zA== + dependencies: + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/types" "3.201.0" + bowser "^2.11.0" + tslib "^2.3.1" + +"@aws-sdk/util-defaults-mode-node@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-node/-/util-defaults-mode-node-3.201.0.tgz#dd7002819c45dbb36a97df0470119b537d511fcb" + integrity sha512-9N5LXRhxigbkbEcjQ4nNXHuQxp0VFlbc2/5wbcuPjIKX/OROiQI4mYQ6nuSKk7eku5sNFb9FtEHeD/RZo8od6Q== + dependencies: + "@aws-sdk/config-resolver" "3.201.0" + "@aws-sdk/credential-provider-imds" "3.201.0" + "@aws-sdk/node-config-provider" "3.201.0" + "@aws-sdk/property-provider" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/util-endpoints@3.202.0": + version "3.202.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.202.0.tgz#7eaf3da0ba1f824cf3c031d193a83ab5bdbeabe2" + integrity sha512-sNees5uDp7nfEbvzaA1DAHqoEvEb9ZOkdNH5gcj/FMBETbr00YtsuXsTZogTHQsX/otRTiudZBE3iH7R4SLSAQ== + dependencies: + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/util-hex-encoding@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.201.0.tgz#21d7ec319240ee68c33d938e71cb79830bea315d" + integrity sha512-7t1vR1pVxKx0motd3X9rI3m/xNp78p3sHtP5yo4NP4ARpxyJ0fokBomY8ScaH2D/B+U5o9ARxldJUdMqyBlJcA== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-locate-window@^3.0.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.201.0.tgz#39eb8b7e09a1ff64f635e2f39f69ddce2c828d96" + integrity sha512-hPJgifWh/rADabLAk1C9xXA2B3O4NUmbU58KgBRgC1HksiiHGFVZObB5fkBH8US/XV2jwORkpSf4OhretXQuKg== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-middleware@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-middleware/-/util-middleware-3.201.0.tgz#750bc325abd1a1b5984bda1c7314cfc024ee1b30" + integrity sha512-iAitcEZo17IyKn4ku1IBgtomr25esu5OuSRjw5Or4bNOeqXB0w50cItf/9qft8LIhbvBEAUtNAYXvqNzvhTZdQ== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-uri-escape@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-uri-escape/-/util-uri-escape-3.201.0.tgz#5e708d4cde001a4558ee616f889ceacfadd2ab03" + integrity sha512-TeTWbGx4LU2c5rx0obHeDFeO9HvwYwQtMh1yniBz00pQb6Qt6YVOETVQikRZ+XRQwEyCg/dA375UplIpiy54mA== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-user-agent-browser@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.201.0.tgz#96d7fd8a2343e52513a6c3aee65fb3ffbb41986d" + integrity sha512-iL2gyz7GuUVtZcMZpqvfxdFrl9hc28qpagymmJ/w2yhN86YNPHdK8Sx1Yo6VxNGVDCCWGb7tHXf7VP+U4Yv/Lg== + dependencies: + "@aws-sdk/types" "3.201.0" + bowser "^2.11.0" + tslib "^2.3.1" + +"@aws-sdk/util-user-agent-node@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.201.0.tgz#129c8f284ba7ec31691b441ea0f8a056f9f4b06d" + integrity sha512-6lhhvwB3AZSISnYQpDGdlyTrzfYK2P9QYjy7vZEBRd9TSOaggiFICXe03ZvZfVOSeg0EInlMKn1fIHzPUHRuHQ== + dependencies: + "@aws-sdk/node-config-provider" "3.201.0" + "@aws-sdk/types" "3.201.0" + tslib "^2.3.1" + +"@aws-sdk/util-utf8-browser@3.188.0", "@aws-sdk/util-utf8-browser@^3.0.0", "@aws-sdk/util-utf8-browser@^3.109.0": + version "3.188.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.188.0.tgz#484762bd600401350e148277731d6744a4a92225" + integrity sha512-jt627x0+jE+Ydr9NwkFstg3cUvgWh56qdaqAMDsqgRlKD21md/6G226z/Qxl7lb1VEW2LlmCx43ai/37Qwcj2Q== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/util-utf8-node@3.201.0": + version "3.201.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-node/-/util-utf8-node-3.201.0.tgz#e4167ceb5a8edb8eeb0950a64bf9c2104bb7a5db" + integrity sha512-A+bJFR/1rHYOJg137E69L1sX0I+LH+xf9ZjMXG9BVO0hSo7yDPoJVpHrzTJyOc3tuRITjIGBv9Qi4TKcoOSi1A== + dependencies: + "@aws-sdk/util-buffer-from" "3.201.0" + tslib "^2.3.1" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -729,6 +1388,20 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@httptoolkit/websocket-stream@^6.0.0": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@httptoolkit/websocket-stream/-/websocket-stream-6.0.1.tgz#8d732f1509860236276f6b0759db4cc9859bbb62" + integrity sha512-A0NOZI+Glp3Xgcz6Na7i7o09+/+xm2m0UCU8gdtM2nIv6/cjLmhMZMqehSpTlgbx9omtLmV8LVqOskPEyWnmZQ== + dependencies: + "@types/ws" "*" + duplexify "^3.5.1" + inherits "^2.0.1" + isomorphic-ws "^4.0.1" + readable-stream "^2.3.3" + safe-buffer "^5.1.2" + ws "*" + xtend "^4.0.0" + "@humanwhocodes/config-array@^0.10.5": version "0.10.7" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.7.tgz#6d53769fd0c222767e6452e8ebda825c22e9f0dc" @@ -1204,6 +1877,13 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== +"@types/asn1@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@types/asn1/-/asn1-0.2.0.tgz#23b568688b321740bd4eafef49e6b13ffc101b31" + integrity sha512-5TMxIpYbIA9c1J0hYQjQDX3wr+rTgQEAXaW2BI8ECM8FO53wSW4HFZplTalrKSHuZUc76NtXcePRhwuOHqGD5g== + dependencies: + "@types/node" "*" + "@types/babel__core@^7.1.14": version "7.1.19" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" @@ -1237,6 +1917,13 @@ dependencies: "@babel/types" "^7.3.0" +"@types/bn.js@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + "@types/clear@^0.1.2": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/clear/-/clear-0.1.2.tgz#131050f8a7b429ae0e4ca390339ea9977ca977bd" @@ -1392,6 +2079,13 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/ws@*": + version "8.5.3" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" + integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" @@ -2006,6 +2700,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi@^0.3.0, ansi@~0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" + integrity sha512-iFY7JCgHbepc0b82yLaw4IMortylNb6wG4kL+4R0C3iv6i+RHGHux/yUX5BTiRvSX/shMnngjR1YyNMnXEFh5A== + any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -2032,6 +2731,14 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +are-we-there-yet@~1.0.0: + version "1.0.6" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz#a2d28c93102aa6cc96245a26cb954de06ec53f0c" + integrity sha512-Zfw6bteqM9gQXZ1BIWOgM8xEwMrUGoyL8nW13+O+OOgNX3YhuDN1GDgg1NzdTlmm3j+9sHy7uBZ12r+z9lXnZQ== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -2100,6 +2807,16 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== +asn1.js@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -2115,6 +2832,19 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +aws-crt@^1.14.5: + version "1.14.5" + resolved "https://registry.yarnpkg.com/aws-crt/-/aws-crt-1.14.5.tgz#332aa2f6c2f96a91fb44b0d3de1202eb35829abd" + integrity sha512-fxjTfNzFaG+cqpPSUDOKWtkufsQV7nq1COHIFcaomgSidbEg129kA+Ses0bJyoe6fKI7aMNIfzT9kDt7+KRn2g== + dependencies: + "@aws-sdk/util-utf8-browser" "^3.109.0" + "@httptoolkit/websocket-stream" "^6.0.0" + axios "^0.24.0" + cmake-js "^6.3.2" + crypto-js "^4.0.0" + mqtt "^4.3.7" + tar "^6.1.11" + axios@1.1.3, axios@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/axios/-/axios-1.1.3.tgz#8274250dada2edf53814ed7db644b9c2866c1e35" @@ -2124,6 +2854,20 @@ axios@1.1.3, axios@^1.1.3: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +axios@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" + integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== + dependencies: + follow-redirects "^1.14.4" + babel-jest@^29.2.1: version "29.2.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.2.1.tgz#213c47e28072de11bdb98c9d29b89f2ab99664f1" @@ -2199,6 +2943,28 @@ bech32@1.1.4: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== +big-integer@^1.6.17: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== + +binary@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79" + integrity sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg== + dependencies: + buffers "~0.1.1" + chainsaw "~0.1.0" + +bl@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + bl@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" @@ -2229,7 +2995,17 @@ blockstore-core@^1.0.2: it-take "^1.0.1" multiformats "^9.4.7" -bn.js@^4.11.9: +bluebird@^3: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bluebird@~3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" + integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== + +bn.js@^4.0.0, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== @@ -2239,6 +3015,11 @@ bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +bowser@^2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" + integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2293,6 +3074,24 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer-indexof-polyfill@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz#d2732135c5999c64b277fcf9b1abe3498254729c" + integrity sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A== + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + integrity sha512-Zy8ZXMyxIT6RMTeY7OP/bDndfj6bwCan7SS98CEndS6deHwWPpseeHlwarNcBim+etXnF9HBc1non5JgDaJU1g== + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + buffer@^6.0.1, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -2301,6 +3100,11 @@ buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +buffers@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" + integrity sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ== + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -2328,6 +3132,11 @@ camelcase-keys@^6.2.2: map-obj "^4.0.0" quick-lru "^4.0.1" +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw== + camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -2363,6 +3172,13 @@ cborg@^1.3.3, cborg@^1.5.4, cborg@^1.6.0, cborg@^1.8.0, cborg@^1.9.4: resolved "https://registry.yarnpkg.com/cborg/-/cborg-1.9.5.tgz#1e3b8a8407b3665566001f8841c9d72d7a80b2d5" integrity sha512-fLBv8wmqtlXqy1Yu+pHzevAIkW6k2K0ZtMujNzWphLsA34vzzg9BHn+5GmZqOJkSA9V7EMKsWrf6K976c1QMjQ== +chainsaw@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98" + integrity sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ== + dependencies: + traverse ">=0.3.0 <0.4" + chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2390,6 +3206,16 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chrome-trace-event@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" @@ -2421,6 +3247,15 @@ cli-color@^2.0.2: memoizee "^0.4.15" timers-ext "^0.1.7" +cliui@^3.0.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -2457,6 +3292,28 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" +cmake-js@^6.3.2: + version "6.3.2" + resolved "https://registry.yarnpkg.com/cmake-js/-/cmake-js-6.3.2.tgz#4ee827bea99205e1bfda86f5883994873af357b6" + integrity sha512-7MfiQ/ijzeE2kO+WFB9bv4QP5Dn2yVaAP2acFJr4NIFy2hT4w6O4EpOTLNcohR5IPX7M4wNf/5taIqMj7UA9ug== + dependencies: + axios "^0.21.1" + bluebird "^3" + debug "^4" + fs-extra "^5.0.0" + is-iojs "^1.0.1" + lodash "^4" + memory-stream "0" + npmlog "^1.2.0" + rc "^1.2.7" + semver "^5.0.3" + splitargs "0" + tar "^4" + unzipper "^0.8.13" + url-join "0" + which "^1.0.9" + yargs "^3.6.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -2518,6 +3375,14 @@ commander@^7.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commist@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/commist/-/commist-1.1.0.tgz#17811ec6978f6c15ee4de80c45c9beb77cee35d5" + integrity sha512-rraC8NXWOEjhADbZe9QBNzLAN5Q3fsTPQtBV+fEVj6xKIgDgNiEVE6ZNfHpZOqfQ21YUzfVNUXLOEZquYvQPPg== + dependencies: + leven "^2.1.0" + minimist "^1.1.0" + compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -2739,7 +3604,7 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-js@^4.1.1: +crypto-js@^4.0.0, crypto-js@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== @@ -2781,7 +3646,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2806,6 +3671,11 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -2829,6 +3699,11 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== + detect-indent@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" @@ -2894,6 +3769,33 @@ dotgitignore@^2.1.0: find-up "^3.0.0" minimatch "^3.0.4" +duplexer2@~0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + integrity sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA== + dependencies: + readable-stream "^2.0.2" + +duplexify@^3.5.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +duplexify@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" + integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.0" + electron-fetch@^1.7.2: version "1.9.1" resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.9.1.tgz#e28bfe78d467de3f2dec884b1d72b8b05322f30f" @@ -2936,7 +3838,7 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.1.0: +end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -3538,6 +4440,13 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-xml-parser@4.0.11: + version "4.0.11" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.0.11.tgz#42332a9aca544520631c8919e6ea871c0185a985" + integrity sha512-4aUg3aNRR/WjQAcpceODG1C3x3lFANXRo8+1biqfieHmg9pyMt7qB4lQV/Ta6sJCTbA5vfD8fnA8S54JATiFUA== + dependencies: + strnum "^1.0.5" + fastest-levenshtein@^1.0.12: version "1.0.16" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" @@ -3631,7 +4540,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -follow-redirects@^1.15.0: +follow-redirects@^1.14.0, follow-redirects@^1.14.4, follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -3652,6 +4561,29 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +fs-extra@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" + integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3662,6 +4594,16 @@ fsevents@^2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== +fstream@~1.0.10: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" + integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3687,6 +4629,17 @@ functions-have-names@^1.2.2: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +gauge@~1.2.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93" + integrity sha512-fVbU2wRE91yDvKUnrIaQlHKAWKY5e08PmztCrwuH5YVQ+Z/p3d0ny2T48o6uvAAXHIUnfaQdHkmxYbQft1eHVA== + dependencies: + ansi "^0.3.0" + has-unicode "^2.0.0" + lodash.pad "^4.1.0" + lodash.padend "^4.1.0" + lodash.padstart "^4.1.0" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -3852,7 +4805,7 @@ globby@^11.0.3, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -3921,6 +4874,11 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -3936,6 +4894,14 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +help-me@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/help-me/-/help-me-3.0.0.tgz#9803c81b5f346ad2bce2c6a0ba01b82257d319e8" + integrity sha512-hx73jClhyk910sidBB7ERlnhMlFsJJIBqSVMFDwPN8o2v9nmp5KgLq1Xz1Bf1fCMMZ6mPrX159iG0VLy/fPMtQ== + dependencies: + glob "^7.1.6" + readable-stream "^3.6.0" + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3981,7 +4947,7 @@ idb-keyval@^6.0.3: dependencies: safari-14-idb-fix "^3.0.0" -ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4030,12 +4996,12 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2: +ini@^1.3.2, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -4076,6 +5042,11 @@ interpret@^2.2.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== + invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -4323,6 +5294,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-iojs@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-iojs/-/is-iojs-1.1.0.tgz#4c11033b5d5d94d6eab3775dedc9be7d008325f1" + integrity sha512-tLn1j3wYSL6DkvEI+V/j0pKohpa5jk+ER74v6S4SgCXnjS0WA+DoZbwZBrrhgwksMvtuwndyGeG5F8YMsoBzSA== + is-ip@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8" @@ -4438,6 +5414,11 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4466,6 +5447,11 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" @@ -4968,6 +5954,11 @@ jose@4.10.0: resolved "https://registry.yarnpkg.com/jose/-/jose-4.10.0.tgz#2e0b7bcc80dd0775f8a4588e55beb9460c37d60a" integrity sha512-KEhB/eLGLomWGPTb+/RNbYsTjIyx03JmbqAyIyiXBuNSa7CmNrJd5ysFhblayzs/e/vbOPMUaLnjHUMhGp4yLw== +js-sdsl@4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.4.tgz#78793c90f80e8430b7d8dc94515b6c77d98a26a6" + integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== + js-sdsl@^4.1.4: version "4.1.5" resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.5.tgz#1ff1645e6b4d1b028cd3f862db88c9d887f26e2a" @@ -5074,6 +6065,13 @@ json5@^2.2.1: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -5097,6 +6095,13 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== + dependencies: + invert-kv "^1.0.0" + lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -5104,6 +6109,11 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA== + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -5136,6 +6146,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +listenercount@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" + integrity sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ== + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -5207,12 +6222,27 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.pad@^4.1.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70" + integrity sha512-mvUHifnLqM+03YNzeTBS1/Gr6JRFjd3rRx88FHWUvamVaT9k2O/kXha3yBSOwB9/DTQrSTLJNHvLBBt2FdX7Mg== + +lodash.padend@^4.1.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e" + integrity sha512-sOQs2aqGpbl27tmCS1QNZA09Uqp01ZzWfDUoD+xzTii0E7dSQfRKcRetFwa+uXaxaqL+TKm7CgD2JdKP7aZBSw== + +lodash.padstart@^4.1.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" + integrity sha512-sW73O6S8+Tg66eY56DBk85aQzzUJDtpoXFBgELMd5P/SotAguo+1kYO6RuYgXxA4HJH3LFTFPASX6ET6bjfriw== + lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.15, lodash@^4.17.21: +lodash@^4, lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5307,6 +6337,13 @@ memoizee@^0.4.15: next-tick "^1.1.0" timers-ext "^0.1.7" +memory-stream@0: + version "0.0.3" + resolved "https://registry.yarnpkg.com/memory-stream/-/memory-stream-0.0.3.tgz#ebe8dd1c3b8bc38c0e7941e9ddd5aebe6b4de83f" + integrity sha512-q0D3m846qY6ZkIt+19ZemU5vH56lpOZZwoJc3AICARKh/menBuayQUjAGPrqtHQQMUYERSdOrej92J9kz7LgYA== + dependencies: + readable-stream "~1.0.26-2" + meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -5415,12 +6452,49 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== -mkdirp@^1.0.4: +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minipass@^3.0.0: + version "3.3.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" + integrity sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw== + dependencies: + yallist "^4.0.0" + +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +"mkdirp@>=0.5 0", mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -5437,6 +6511,38 @@ move-file@^2.1.0: dependencies: path-exists "^4.0.0" +mqtt-packet@^6.8.0: + version "6.10.0" + resolved "https://registry.yarnpkg.com/mqtt-packet/-/mqtt-packet-6.10.0.tgz#c8b507832c4152e3e511c0efa104ae4a64cd418f" + integrity sha512-ja8+mFKIHdB1Tpl6vac+sktqy3gA8t9Mduom1BA75cI+R9AHnZOiaBQwpGiWnaVJLDGRdNhQmFaAqd7tkKSMGA== + dependencies: + bl "^4.0.2" + debug "^4.1.1" + process-nextick-args "^2.0.1" + +mqtt@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/mqtt/-/mqtt-4.3.7.tgz#42985ca490ea25d2c12c119d83c632db6dc9d589" + integrity sha512-ew3qwG/TJRorTz47eW46vZ5oBw5MEYbQZVaEji44j5lAUSQSqIEoul7Kua/BatBW0H0kKQcC9kwUHa1qzaWHSw== + dependencies: + commist "^1.0.0" + concat-stream "^2.0.0" + debug "^4.1.1" + duplexify "^4.1.1" + help-me "^3.0.0" + inherits "^2.0.3" + lru-cache "^6.0.0" + minimist "^1.2.5" + mqtt-packet "^6.8.0" + number-allocator "^1.0.9" + pump "^3.0.0" + readable-stream "^3.6.0" + reinterval "^1.1.0" + rfdc "^1.3.0" + split2 "^3.1.0" + ws "^7.5.5" + xtend "^4.0.2" + mrmime@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" @@ -5588,6 +6694,23 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npmlog@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-1.2.1.tgz#28e7be619609b53f7ad1dd300a10d64d716268b6" + integrity sha512-1J5KqSRvESP6XbjPaXt2H6qDzgizLTM7x0y1cXIjP2PpvdCqyNC7TO3cPRKsuYlElbi/DwkzRRdG2zpmE0IktQ== + dependencies: + ansi "~0.3.0" + are-we-there-yet "~1.0.0" + gauge "~1.2.0" + +number-allocator@^1.0.9: + version "1.0.12" + resolved "https://registry.yarnpkg.com/number-allocator/-/number-allocator-1.0.12.tgz#f2c94501df7bcb32aff03e95bd34cffa96af9685" + integrity sha512-sGB0qoQGmKimery9JubBQ9pQUr1V/LixJAk3Ygp7obZf6mpSXime8d7XHEobbIimkdZpgjkNlLt6G7LPEWFYWg== + dependencies: + debug "^4.3.1" + js-sdsl "4.1.4" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -5679,6 +6802,13 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== + dependencies: + lcid "^1.0.0" + os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -5916,7 +7046,7 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^2.6.2: +prettier@^2.6.2, prettier@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -5930,11 +7060,16 @@ pretty-format@^29.0.0, pretty-format@^29.2.1: ansi-styles "^5.0.0" react-is "^18.0.0" -process-nextick-args@~2.0.0: +process-nextick-args@^2.0.1, process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + integrity sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw== + progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -6028,6 +7163,16 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-is@^16.13.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -6081,7 +7226,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -6090,7 +7235,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@~2.3.6: +readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.3.3, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -6103,6 +7248,29 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@~1.0.26-2: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + integrity sha512-NkXT2AER7VKXeXtJNSaWLpWIhmtSE3K2PguaLEeWr4JILghcIKqoLt1A3wHrnpDC5+ekf8gfk1GKWkFXe4odMw== + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + receptacle@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/receptacle/-/receptacle-1.3.2.tgz#a7994c7efafc7a01d0e2041839dab6c4951360d2" @@ -6139,6 +7307,11 @@ regexpp@^3.0.0, regexpp@^3.1.0, regexpp@^3.2.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +reinterval@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reinterval/-/reinterval-1.1.0.tgz#3361ecfa3ca6c18283380dd0bb9546f390f5ece7" + integrity sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ== + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -6209,6 +7382,18 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + +rimraf@2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -6228,7 +7413,7 @@ safari-14-idb-fix@^3.0.0: resolved "https://registry.yarnpkg.com/safari-14-idb-fix/-/safari-14-idb-fix-3.0.0.tgz#450fc049b996ec7f3fd9ca2f89d32e0761583440" integrity sha512-eBNFLob4PMq8JA1dGyFn6G97q3/WzNtFK4RnzT1fnLq+9RyrGknzYiM/9B12MnKAxuj1IXr7UKYtTNtjyKMBog== -safe-buffer@^5.1.0, safe-buffer@~5.2.0: +safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.1, 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== @@ -6247,7 +7432,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3.0.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== @@ -6266,7 +7451,7 @@ scrypt-js@3.0.1: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== -"semver@2 || 3 || 4 || 5", semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -6295,6 +7480,11 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +setimmediate@~1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -6411,7 +7601,7 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== -split2@^3.0.0: +split2@^3.0.0, split2@^3.1.0: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== @@ -6425,6 +7615,11 @@ split@^1.0.0: dependencies: through "2" +splitargs@0: + version "0.0.7" + resolved "https://registry.yarnpkg.com/splitargs/-/splitargs-0.0.7.tgz#fe9f7ae657371b33b10cb80da143cf8249cf6b3b" + integrity sha512-UUFYD2oWbNwULH6WoVtLUOw8ch586B+HUqcsAjjjeoBQAM1bD4wZRXu01koaxyd8UeYpybWqW4h+lO1Okv40Tg== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -6467,6 +7662,11 @@ standard-version@^9.5.0: stringify-package "^1.0.1" yargs "^16.0.0" +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + stream-to-it@^0.2.2, stream-to-it@^0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-0.2.4.tgz#d2fd7bfbd4a899b4c0d6a7e6a533723af5749bd0" @@ -6552,6 +7752,11 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -6617,6 +7822,16 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +strnum@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" + integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -6659,6 +7874,31 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== +tar@^4: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +tar@^6.1.11: + version "6.1.12" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.12.tgz#3b742fb05669b55671fb769ab67a7791ea1a62e6" + integrity sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + terser-webpack-plugin@^5.1.3: version "5.3.6" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz#5590aec31aa3c6f771ce1b1acca60639eab3195c" @@ -6776,6 +8016,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +"traverse@>=0.3.0 <0.4": + version "0.3.9" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" + integrity sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -6853,11 +8098,16 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: +tslib@^1.11.1, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.3.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -6949,6 +8199,26 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unzipper@^0.8.13: + version "0.8.14" + resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.8.14.tgz#ade0524cd2fc14d11b8de258be22f9d247d3f79b" + integrity sha512-8rFtE7EP5ssOwGpN2dt1Q4njl0N1hUXJ7sSPz0leU2hRdq6+pra57z4YPBlVqm40vcgv6ooKZEAx48fMTv9x4w== + dependencies: + big-integer "^1.6.17" + binary "~0.3.0" + bluebird "~3.4.1" + buffer-indexof-polyfill "~1.0.0" + duplexer2 "~0.1.4" + fstream "~1.0.10" + listenercount "~1.0.1" + readable-stream "~2.1.5" + setimmediate "~1.0.4" + update-browserslist-db@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" @@ -6964,6 +8234,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +url-join@0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-0.0.1.tgz#1db48ad422d3402469a87f7d97bdebfe4fb1e3c8" + integrity sha512-H6dnQ/yPAAVzMQRvEvyz01hhfQL5qRWSEt7BX8t9DqnPw9BjMb64fjIRq76Uvf1hkHp+mTZvEVJ5guXOT0Xqaw== + util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -6980,6 +8255,11 @@ util@^0.12.3: is-typed-array "^1.1.3" which-typed-array "^1.1.2" +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" @@ -7165,7 +8445,7 @@ which-typed-array@^1.1.2: has-tostringtag "^1.0.0" is-typed-array "^1.1.9" -which@^1.2.9: +which@^1.0.9, which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -7184,6 +8464,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + integrity sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw== + word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -7224,22 +8509,32 @@ write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" +ws@*: + version "8.10.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.10.0.tgz#00a28c09dfb76eae4eb45c3b565f771d6951aa51" + integrity sha512-+s49uSmZpvtAsd2h37vIPy1RBusaLawVe8of+GyEPsaJTCMpj/2v8NpeK1SHXjBlQ95lQTmQofOJnFiLoaN3yw== + ws@7.4.6: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== +ws@^7.5.5: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== -xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^3.2.1: +y18n@^3.2.0, y18n@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== @@ -7249,6 +8544,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^3.0.0, yallist@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" @@ -7315,6 +8615,19 @@ yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.0.0" +yargs@^3.6.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + integrity sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg== + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"