From 4dfb41e473c1aa436e69bf605fe659c9182175f2 Mon Sep 17 00:00:00 2001 From: prathamesh0 <42446521+prathamesh0@users.noreply.github.com> Date: Thu, 20 Jul 2023 17:12:04 +0530 Subject: [PATCH] Integrate MetaMask wallet usage (#91) * Implement use of signer from MetaMask wallet in browser (#87) * Refactor chain service to use metamask signer * Update signer before contract eth_call * Add method to setup chain service with provider * Remove old methods not required * Export utilities required in mobymask app (#90) * Export signEthereumMessage in nitro-client * Wait on voucher after nitro pay * Upgrade package versions --------- Co-authored-by: Nabarun Gogoi --- lerna.json | 2 +- packages/example-web-app/package.json | 8 +- packages/nitro-client/package.json | 4 +- packages/nitro-client/src/browser.ts | 4 + .../engine/chainservice/eth-chainservice.ts | 29 +++++++- .../client/engine/chainservice/utils/utils.ts | 13 ++++ .../p2p-message-service/service.ts | 2 - packages/nitro-client/src/node.ts | 4 +- packages/nitro-client/src/utils/helpers.ts | 22 +----- packages/nitro-client/src/utils/nitro.ts | 73 +++++++++++++++---- packages/nitro-util/package.json | 2 +- packages/nitro-util/src/eth-client.ts | 15 +--- packages/server/package.json | 6 +- packages/server/src/index.ts | 16 ++-- yarn.lock | 66 ++++++++++++++--- 15 files changed, 188 insertions(+), 78 deletions(-) create mode 100644 packages/nitro-client/src/client/engine/chainservice/utils/utils.ts diff --git a/lerna.json b/lerna.json index c684ba51..314af629 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useWorkspaces": true, - "version": "0.1.2" + "version": "0.1.3" } diff --git a/packages/example-web-app/package.json b/packages/example-web-app/package.json index f32ce322..278f6589 100644 --- a/packages/example-web-app/package.json +++ b/packages/example-web-app/package.json @@ -1,9 +1,9 @@ { "name": "@cerc-io/example-web-app", - "version": "0.1.2", + "version": "0.1.3", "private": true, "dependencies": { - "@cerc-io/nitro-client": "^0.1.2", + "@cerc-io/nitro-client": "^0.1.3", "@libp2p/crypto": "^1.0.4", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", @@ -20,6 +20,7 @@ "web-vitals": "^2.1.4" }, "scripts": { + "analyze": "source-map-explorer 'build/static/js/*.js'", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --watchAll=false", @@ -47,6 +48,7 @@ "devDependencies": { "eslint-config-react-app": "^7.0.1", "eslint-config-semistandard": "^17.0.0", - "eslint-config-standard": "^17.0.0" + "eslint-config-standard": "^17.0.0", + "source-map-explorer": "^2.5.3" } } diff --git a/packages/nitro-client/package.json b/packages/nitro-client/package.json index 2ee833c9..49323758 100644 --- a/packages/nitro-client/package.json +++ b/packages/nitro-client/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/nitro-client", - "version": "0.1.2", + "version": "0.1.3", "main": "dist/index.js", "license": "MIT", "scripts": { @@ -48,7 +48,7 @@ }, "dependencies": { "@cerc-io/libp2p": "0.42.2-laconic-0.1.3", - "@cerc-io/nitro-util": "^0.1.2", + "@cerc-io/nitro-util": "^0.1.3", "@cerc-io/peer": "^0.2.46", "@cerc-io/ts-channel": "1.0.3-ts-nitro-0.1.1", "@libp2p/crypto": "^1.0.4", diff --git a/packages/nitro-client/src/browser.ts b/packages/nitro-client/src/browser.ts index 1ba3a504..bf571f60 100644 --- a/packages/nitro-client/src/browser.ts +++ b/packages/nitro-client/src/browser.ts @@ -10,6 +10,10 @@ export { Allocation, AllocationType, Allocations } from './channel/state/outcome export { Destination } from './types/destination'; export { Metrics, GetMetrics } from './client/engine/metrics'; export { LedgerChannelInfo, PaymentChannelInfo } from './client/query/types'; +export { Voucher } from './payments/vouchers'; +export { + Signature, recoverEthereumMessageSigner, getSignatureFromEthersSignature, signEthereumMessage, +} from './crypto/signatures'; export * as utils from './utils'; diff --git a/packages/nitro-client/src/client/engine/chainservice/eth-chainservice.ts b/packages/nitro-client/src/client/engine/chainservice/eth-chainservice.ts index f6fbfadb..c72bf0fb 100644 --- a/packages/nitro-client/src/client/engine/chainservice/eth-chainservice.ts +++ b/packages/nitro-client/src/client/engine/chainservice/eth-chainservice.ts @@ -1,11 +1,11 @@ import assert from 'assert'; -import { ethers } from 'ethers'; +import { ethers, providers } from 'ethers'; import debug from 'debug'; import type { ReadChannel, ReadWriteChannel } from '@cerc-io/ts-channel'; import type { Log } from '@ethersproject/abstract-provider'; import Channel from '@cerc-io/ts-channel'; -import { connectToChain, go, hex2Bytes } from '@cerc-io/nitro-util'; +import { EthClient, go, hex2Bytes } from '@cerc-io/nitro-util'; import { ChainService, ChainEvent, DepositedEvent, ConcludedEvent, AllocationUpdatedEvent, @@ -20,6 +20,7 @@ import { import * as NitroAdjudicatorConversions from './adjudicator/typeconversions'; import { getChainHolding } from './eth-chain-helpers'; +import { connectToChain } from './utils/utils'; const log = debug('ts-nitro:eth-chain-service'); @@ -44,7 +45,7 @@ interface EthChain { // Following Interfaces in Go have been implemented using EthClient.provider (ethers Provider) // bind.ContractBackend (github.com/ethereum/go-ethereum/accounts/abi/bind) // ethereum.TransactionReader (github.com/ethereum/go-ethereum) - provider: ethers.providers.JsonRpcProvider + provider: ethers.providers.BaseProvider chainID (): Promise; } @@ -119,6 +120,25 @@ export class EthChainService implements ChainService { return EthChainService._newEthChainService(ethClient, na, naAddress, caAddress, vpaAddress, txSigner, logDestination); } + static async newEthChainServiceWithProvider( + provider: providers.JsonRpcProvider, + naAddress: Address, + caAddress: Address, + vpaAddress: Address, + logDestination?: WritableStream, + ): Promise { + if (vpaAddress === caAddress) { + throw new Error(`virtual payment app address and consensus app address cannot be the same: ${vpaAddress}`); + } + + const ethClient = new EthClient(provider); + const txSigner = provider.getSigner(); + + const na = NitroAdjudicator__factory.connect(naAddress, txSigner); + + return EthChainService._newEthChainService(ethClient, na, naAddress, caAddress, vpaAddress, txSigner, logDestination); + } + // _newEthChainService constructs a chain service that submits transactions to a NitroAdjudicator // and listens to events from an eventSource private static _newEthChainService( @@ -160,6 +180,9 @@ export class EthChainService implements ChainService { // sendTransaction sends the transaction and blocks until it has been submitted. async sendTransaction(tx: ChainTransaction): Promise { + assert(this.txSigner, 'txSigner not assigned in chainservice'); + this.na = this.na.connect(this.txSigner); + switch (tx.constructor) { case DepositTransaction: { const depositTx = tx as DepositTransaction; diff --git a/packages/nitro-client/src/client/engine/chainservice/utils/utils.ts b/packages/nitro-client/src/client/engine/chainservice/utils/utils.ts new file mode 100644 index 00000000..dcf220ea --- /dev/null +++ b/packages/nitro-client/src/client/engine/chainservice/utils/utils.ts @@ -0,0 +1,13 @@ +import { ethers } from 'ethers'; +import { Buffer } from 'buffer'; + +import { EthClient } from '@cerc-io/nitro-util'; + +// connectToChain connects to the chain at the given url and returns a client and a transactor. +export async function connectToChain(chainUrl: string, chainPK: Buffer): Promise<[EthClient, ethers.Signer]> { + const client = await EthClient.dial(chainUrl); + + const txSigner = new ethers.Wallet(chainPK, client.provider); + + return [client, txSigner]; +} diff --git a/packages/nitro-client/src/client/engine/messageservice/p2p-message-service/service.ts b/packages/nitro-client/src/client/engine/messageservice/p2p-message-service/service.ts index 3b910d7c..5cbcd67e 100644 --- a/packages/nitro-client/src/client/engine/messageservice/p2p-message-service/service.ts +++ b/packages/nitro-client/src/client/engine/messageservice/p2p-message-service/service.ts @@ -7,8 +7,6 @@ import type { ReadChannel, ReadWriteChannel } from '@cerc-io/ts-channel'; // @ts-expect-error import type { Libp2p } from '@cerc-io/libp2p'; // @ts-expect-error -import { PeerInitConfig } from '@cerc-io/peer'; -// @ts-expect-error import type { PrivateKey } from '@libp2p/interface-keys'; // @ts-expect-error import type { Stream, Connection } from '@libp2p/interface-connection'; diff --git a/packages/nitro-client/src/node.ts b/packages/nitro-client/src/node.ts index b0644f91..81f3f730 100644 --- a/packages/nitro-client/src/node.ts +++ b/packages/nitro-client/src/node.ts @@ -11,6 +11,8 @@ export { Destination } from './types/destination'; export { Metrics, GetMetrics } from './client/engine/metrics'; export { LedgerChannelInfo, PaymentChannelInfo } from './client/query/types'; export { Voucher } from './payments/vouchers'; -export { Signature, recoverEthereumMessageSigner, getSignatureFromEthersSignature } from './crypto/signatures'; +export { + Signature, recoverEthereumMessageSigner, getSignatureFromEthersSignature, signEthereumMessage, +} from './crypto/signatures'; export * as utils from './utils'; diff --git a/packages/nitro-client/src/utils/helpers.ts b/packages/nitro-client/src/utils/helpers.ts index 36b73cef..67faf078 100644 --- a/packages/nitro-client/src/utils/helpers.ts +++ b/packages/nitro-client/src/utils/helpers.ts @@ -6,13 +6,13 @@ import { JSONbigNative, bytes2Hex } from '@cerc-io/nitro-util'; import { P2PMessageService } from '../client/engine/messageservice/p2p-message-service/service'; import { Client } from '../client/client'; import { Store } from '../client/engine/store/store'; -import { EthChainService } from '../client/engine/chainservice/eth-chainservice'; import { PermissivePolicy } from '../client/engine/policy-maker'; import { Metrics } from '../client/engine/metrics'; import { SingleAssetExit, Exit } from '../channel/state/outcome/exit'; import { Allocation, AllocationType, Allocations } from '../channel/state/outcome/allocation'; import { Destination } from '../types/destination'; import { Signature } from '../crypto/signatures'; +import { ChainService } from '../client/engine/chainservice/chainservice'; const log = debug('ts-nitro:util:helpers'); @@ -26,27 +26,9 @@ const log = debug('ts-nitro:util:helpers'); export async function setupClient( messageService: P2PMessageService, store: Store, - options: { - chainPk: string, - chainURL: string, - contractAddresses: { [key: string]: string }, - }, + chainService: ChainService, metricsApi?: Metrics, ): Promise { - const { - chainPk, - chainURL, - contractAddresses, - } = options; - - const chainService = await EthChainService.newEthChainService( - chainURL, - chainPk, - contractAddresses.nitroAdjudicatorAddress, - contractAddresses.consensusAppAddress, - contractAddresses.virtualPaymentAppAddress, - ); - const client = await Client.new( messageService, chainService, diff --git a/packages/nitro-client/src/utils/nitro.ts b/packages/nitro-client/src/utils/nitro.ts index 624be190..acba5d76 100644 --- a/packages/nitro-client/src/utils/nitro.ts +++ b/packages/nitro-client/src/utils/nitro.ts @@ -1,4 +1,5 @@ import debug from 'debug'; +import { providers } from 'ethers'; import { hex2Bytes } from '@cerc-io/nitro-util'; // @ts-expect-error @@ -11,8 +12,11 @@ import { MemStore } from '../client/engine/store/memstore'; import { DurableStore } from '../client/engine/store/durablestore'; import { Destination } from '../types/destination'; import { LedgerChannelInfo, PaymentChannelInfo } from '../client/query/types'; +import { EthChainService } from '../client/engine/chainservice/eth-chainservice'; import { createOutcome, setupClient, subscribeVoucherLogs } from './helpers'; +import { ChainService } from '../client/engine/chainservice/chainservice'; +import { Voucher } from '../payments/vouchers'; const log = debug('ts-nitro:util:nitro'); @@ -24,12 +28,16 @@ export class Nitro { msgService: P2PMessageService; + chainService: ChainService; + constructor( client: Client, msgService: P2PMessageService, + chainService: ChainService, ) { this.client = client; this.msgService = msgService; + this.chainService = chainService; } static async setupClient( @@ -40,27 +48,59 @@ export class Nitro { peer: Peer, location?: string, ): Promise { - let store: Store; - if (location) { - store = DurableStore.newDurableStore(hex2Bytes(pk), location); - } else { - store = new MemStore(hex2Bytes(pk)); - } + const store = this.getStore(pk, location); + const msgService = await P2PMessageService.newMessageService(store.getAddress(), peer); + + const chainService = await EthChainService.newEthChainService( + chainURL, + chainPk, + contractAddresses.nitroAdjudicatorAddress, + contractAddresses.consensusAppAddress, + contractAddresses.virtualPaymentAppAddress, + ); + + const client = await setupClient( + msgService, + store, + chainService, + ); + + subscribeVoucherLogs(client); + return new Nitro(client, msgService, chainService); + } + static async setupClientWithProvider( + pk: string, + provider: providers.JsonRpcProvider, + contractAddresses: { [key: string]: string }, + peer: Peer, + location?: string, + ): Promise { + const store = this.getStore(pk, location); const msgService = await P2PMessageService.newMessageService(store.getAddress(), peer); + const chainService = await EthChainService.newEthChainServiceWithProvider( + provider, + contractAddresses.nitroAdjudicatorAddress, + contractAddresses.consensusAppAddress, + contractAddresses.virtualPaymentAppAddress, + ); + const client = await setupClient( msgService, store, - { - chainPk, - chainURL, - contractAddresses, - }, + chainService, ); subscribeVoucherLogs(client); - return new Nitro(client, msgService); + return new Nitro(client, msgService, chainService); + } + + private static getStore(pk: string, location?: string): Store { + if (location) { + return DurableStore.newDurableStore(hex2Bytes(pk), location); + } + return new MemStore(hex2Bytes(pk)); } static async clearClientStorage(): Promise { @@ -84,7 +124,7 @@ export class Nitro { return [true, `Peer with address ${address} is dialable`]; } - async directFund(counterParty: string, amount: number): Promise { + async directFund(counterParty: string, amount: number): Promise { const outcome = createOutcome( ASSET, this.client.address, @@ -100,6 +140,8 @@ export class Nitro { await this.client.objectiveCompleteChan(response.id).shift(); log(`Ledger channel created with id ${response.channelId.string()}\n`); + + return response.channelId.string(); } async virtualFund(counterParty: string, amount: number): Promise { @@ -122,9 +164,12 @@ export class Nitro { log(`Virtual payment channel created with id ${response.channelId.string()}\n`); } - async pay(virtualPaymentChannel: string, amount: number): Promise { + async pay(virtualPaymentChannel: string, amount: number): Promise { const virtualPaymentChannelId = new Destination(virtualPaymentChannel); await this.client.pay(virtualPaymentChannelId, BigInt(amount)); + const sentVoucher = await this.client.sentVouchers().shift(); + + return sentVoucher; } async virtualDefund(virtualPaymentChannel: string): Promise { diff --git a/packages/nitro-util/package.json b/packages/nitro-util/package.json index 571024fb..e8b1564b 100644 --- a/packages/nitro-util/package.json +++ b/packages/nitro-util/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/nitro-util", - "version": "0.1.2", + "version": "0.1.3", "main": "dist/index.js", "license": "MIT", "scripts": { diff --git a/packages/nitro-util/src/eth-client.ts b/packages/nitro-util/src/eth-client.ts index 4af881d0..88210208 100644 --- a/packages/nitro-util/src/eth-client.ts +++ b/packages/nitro-util/src/eth-client.ts @@ -1,15 +1,14 @@ import assert from 'assert'; import { ethers, providers, EventFilter } from 'ethers'; -import { Buffer } from 'buffer'; export class EthClient { - provider: providers.JsonRpcProvider; + provider: providers.BaseProvider; - constructor(provider: providers.JsonRpcProvider) { + constructor(provider: providers.BaseProvider) { this.provider = provider; } - static async dial(chainUrl: string): Promise { + static dial(chainUrl: string): EthClient { // Connect to the Ethereum provider const provider = new ethers.providers.JsonRpcProvider(chainUrl); return new EthClient(provider); @@ -44,11 +43,3 @@ export class EthClient { return listener; } } - -// connectToChain connects to the chain at the given url and returns a client and a transactor. -export async function connectToChain(chainUrl: string, chainPK: Buffer): Promise<[EthClient, ethers.Signer]> { - const client = await EthClient.dial(chainUrl); - const txSigner = new ethers.Wallet(chainPK, client.provider); - - return [client, txSigner]; -} diff --git a/packages/server/package.json b/packages/server/package.json index 6b3e208f..16a1a337 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/server", - "version": "0.1.2", + "version": "0.1.3", "main": "index.js", "license": "MIT", "private": true, @@ -33,8 +33,8 @@ "chain": "hardhat node" }, "dependencies": { - "@cerc-io/nitro-client": "^0.1.2", - "@cerc-io/nitro-util": "^0.1.2", + "@cerc-io/nitro-client": "^0.1.3", + "@cerc-io/nitro-util": "^0.1.3", "assert": "^2.0.0", "debug": "^4.3.4", "dotenv": "^16.0.3", diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 4d70c1f3..25f9880f 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -7,7 +7,7 @@ import 'dotenv/config'; import { utils, - Destination, DurableStore, MemStore, P2PMessageService, Store, + Destination, DurableStore, MemStore, P2PMessageService, Store, EthChainService, } from '@cerc-io/nitro-client'; import { JSONbigNative, hex2Bytes, DEFAULT_CHAIN_URL } from '@cerc-io/nitro-util'; @@ -144,14 +144,18 @@ const main = async () => { const peer = await createPeerAndInit(process.env.RELAY_MULTIADDR, {}, peerIdObj); const msgService = await P2PMessageService.newMessageService(store.getAddress(), peer); + const chainService = await EthChainService.newEthChainService( + argv.chainurl, + argv.chainpk, + contractAddresses.nitroAdjudicatorAddress, + contractAddresses.consensusAppAddress, + contractAddresses.virtualPaymentAppAddress, + ); + const client = await setupClient( msgService, store, - { - chainURL: argv.chainurl, - chainPk: argv.chainpk, - contractAddresses, - }, + chainService, ); log('Started P2PMessageService'); diff --git a/yarn.lock b/yarn.lock index b139ed9d..ac85a470 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5713,6 +5713,11 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +btoa@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" + integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" @@ -7183,7 +7188,7 @@ ee-first@1.1.1: resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -ejs@^3.1.6, ejs@^3.1.7: +ejs@^3.1.5, ejs@^3.1.6, ejs@^3.1.7: version "3.1.9" resolved "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz" integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ== @@ -7406,7 +7411,7 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-html@~1.0.3: +escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== @@ -9721,7 +9726,7 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -11496,18 +11501,18 @@ mkdirp-infer-owner@^2.0.0: infer-owner "^1.0.4" mkdirp "^1.0.3" -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mkdirp@~0.5.1: +mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.6" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" 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.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + mnemonist@^0.38.0: version "0.38.5" resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" @@ -12191,6 +12196,14 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^7.3.1: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.npmjs.org/open/-/open-8.4.2.tgz" @@ -14040,6 +14053,13 @@ rimraf@^4.4.1: dependencies: glob "^9.2.0" +rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -14498,6 +14518,24 @@ source-list-map@^2.0.0, source-list-map@^2.0.1: resolved "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== +source-map-explorer@^2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/source-map-explorer/-/source-map-explorer-2.5.3.tgz#33551b51e33b70f56d15e79083cdd4c43e583b69" + integrity sha512-qfUGs7UHsOBE5p/lGfQdaAj/5U/GWYBw2imEpD6UQNkqElYonkow8t+HBL1qqIl3CuGZx7n8/CQo4x1HwSHhsg== + dependencies: + btoa "^1.2.1" + chalk "^4.1.0" + convert-source-map "^1.7.0" + ejs "^3.1.5" + escape-html "^1.0.3" + glob "^7.1.6" + gzip-size "^6.0.0" + lodash "^4.17.20" + open "^7.3.1" + source-map "^0.7.4" + temp "^0.9.4" + yargs "^16.2.0" + source-map-js@^1.0.1, source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" @@ -14525,7 +14563,7 @@ source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, sourc resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: +source-map@^0.7.3, source-map@^0.7.4: version "0.7.4" resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== @@ -15063,6 +15101,14 @@ temp-dir@^2.0.0: resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz" integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== +temp@^0.9.4: + version "0.9.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.4.tgz#cd20a8580cb63635d0e4e9d4bd989d44286e7620" + integrity sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA== + dependencies: + mkdirp "^0.5.1" + rimraf "~2.6.2" + tempy@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/tempy/-/tempy-1.0.0.tgz"