From d3c1b4519f736b8881d06f3d5edca00451fec2c0 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 22 Nov 2021 10:07:00 +0200 Subject: [PATCH 1/6] first commit provider class --- src/interfaces/FileMetadata.ts | 14 ++ src/provider/Provider.ts | 236 +++++++++++++++++++++++++++++++++ src/provider/index.ts | 0 3 files changed, 250 insertions(+) create mode 100644 src/interfaces/FileMetadata.ts create mode 100644 src/provider/Provider.ts create mode 100644 src/provider/index.ts diff --git a/src/interfaces/FileMetadata.ts b/src/interfaces/FileMetadata.ts new file mode 100644 index 00000000..964dd47a --- /dev/null +++ b/src/interfaces/FileMetadata.ts @@ -0,0 +1,14 @@ +export interface FileMetadata { + /** + * File format, if applicable. + * @type {string} + * @example "text/csv" + */ + contentType: string + + /** + * File content length. + * @type {[type]} + */ + contentLength?: string +} diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts new file mode 100644 index 00000000..f52646dc --- /dev/null +++ b/src/provider/Provider.ts @@ -0,0 +1,236 @@ +import { Config } from '../models' +import { LoggerInstance } from '../utils' +import { DDO } from '../ddo' +import { FileMetadata } from '../interfaces/FileMetadata' + +export interface ServiceEndpoint { + serviceName: string + method: string + urlPath: string +} +export interface UserCustomParameters { + [key: string]: any +} + +export class Provider { + /** + * Returns the provider endpoints + * @param {any} fetchMethod + * @return {Promise} + */ + async getEndpoints(providerUri: string, fetchMethod: any): Promise { + try { + const endpoints = await await fetchMethod.get(providerUri).json() + return endpoints + } catch (e) { + LoggerInstance.error('Finding the service endpoints failed:', e) + return null + } + } + + getEndpointURL( + servicesEndpoints: ServiceEndpoint[], + serviceName: string + ): ServiceEndpoint { + if (!servicesEndpoints) return null + return servicesEndpoints.find((s) => s.serviceName === serviceName) as ServiceEndpoint + } + + /** + * Returns the service endpoints that exist in provider. + * @param {any} endpoints + * @return {Promise} + */ + public async getServiceEndpoints(providerEndpoint: string, endpoints: any) { + const serviceEndpoints: ServiceEndpoint[] = [] + for (const i in endpoints.serviceEndpoints) { + const endpoint: ServiceEndpoint = { + serviceName: i, + method: endpoints.serviceEndpoints[i][0], + urlPath: providerEndpoint + endpoints.serviceEndpoints[i][1] + } + serviceEndpoints.push(endpoint) + } + return serviceEndpoints + } + + /** Encrypt DDO using the Provider's own symmetric key + * @param {string} providerUri provider uri address + * @param {string} consumerAddress Publisher address + * @param {string} fetchMethod fetch client instance + * @param {string} providerEndpoints Identifier of the asset to be registered in ocean + * @param {string} serviceEndpoints document description object (DDO)= + * @return {Promise} urlDetails + */ + public async getNonce( + providerUri: string, + consumerAddress: string, + fetchMethod: any, + providerEndpoints?: any, + serviceEndpoints?: ServiceEndpoint[] + ): Promise { + if (!providerEndpoints) { + providerEndpoints = await this.getEndpoints(providerUri, fetchMethod) + } + if (!serviceEndpoints) { + serviceEndpoints = await this.getServiceEndpoints(providerUri, providerEndpoints) + } + const path = this.getEndpointURL(serviceEndpoints, 'nonce') + ? this.getEndpointURL(serviceEndpoints, 'nonce').urlPath + : null + if (!path) return null + try { + const response = await fetchMethod.get(path + `?userAddress=${consumerAddress}`) + return String((await response.json()).nonce) + } catch (e) { + LoggerInstance.error(e) + throw new Error('HTTP request failed') + } + } + + /** Encrypt DDO using the Provider's own symmetric key + * @param {string} did Identifier of the asset to be registered in ocean + * @param {string} accountId Publisher address + * @param {string} document document description object (DDO) + * @param {string} providerUri provider uri address + * @param {string} fetchMethod fetch client instance + * @return {Promise} urlDetails + */ + public async encrypt( + did: string, + accountId: string, + document: any, + providerUri: string, + fetchMethod: any + ): Promise { + const providerEndpoints = await this.getEndpoints(providerUri, fetchMethod) + const serviceEndpoints = await this.getServiceEndpoints( + providerUri, + providerEndpoints + ) + // await this.getNonce( + // providerUri, + // accountId, + // fetchMethod, + // providerEndpoints, + // serviceEndpoints + // ) + const args = { + documentId: did, + document: JSON.stringify(document), + publisherAddress: accountId + } + const path = this.getEndpointURL(serviceEndpoints, 'encrypt') + ? this.getEndpointURL(serviceEndpoints, 'encrypt').urlPath + : null + if (!path) return null + try { + const response = await fetchMethod.post(path, decodeURI(JSON.stringify(args))) + return (await response.json()).encryptedDocument + } catch (e) { + LoggerInstance.error(e) + throw new Error('HTTP request failed') + } + } + + /** Get URL details (if possible) + * @param {string | DID} url or did + * @param {string} providerUri Identifier of the asset to be registered in ocean + * @param {string} fetchMethod fetch client instance + * @return {Promise} urlDetails + */ + public async fileinfo( + url: string, + providerUri: string, + fetchMethod: any + ): Promise { + const providerEndpoints = await this.getEndpoints(providerUri, fetchMethod) + const serviceEndpoints = await this.getServiceEndpoints( + providerUri, + providerEndpoints + ) + const args = { url } + const files: FileMetadata[] = [] + const path = this.getEndpointURL(serviceEndpoints, 'fileinfo') + ? this.getEndpointURL(serviceEndpoints, 'fileinfo').urlPath + : null + if (!path) return null + try { + const response = await fetchMethod.post(path, JSON.stringify(args)) + const results: FileMetadata[] = await response.json() + for (const result of results) { + files.push(result) + } + return files + } catch (e) { + return null + } + } + + /** Initialize a service request. + * @param {DDO | string} asset + * @param {number} serviceIndex + * @param {string} serviceType + * @param {string} consumerAddress + * @param {UserCustomParameters} userCustomParameters + * @param {string} providerUri Identifier of the asset to be registered in ocean + * @param {string} fetchMethod fetch client instance + * @return {Promise} urlDetails + */ + public async initialize( + asset: DDO | string, + serviceIndex: number, + serviceType: string, + consumerAddress: string, + userCustomParameters?: UserCustomParameters, + providerUri: string, + fetchMethod: any + ): Promise { + const providerEndpoints = await this.getEndpoints(providerUri, fetchMethod) + const serviceEndpoints = await this.getServiceEndpoints( + providerUri, + providerEndpoints + ) + let initializeUrl = this.getEndpointURL(serviceEndpoints, 'initialize') + ? this.getEndpointURL(serviceEndpoints, 'initialize').urlPath + : null + + if (!initializeUrl) return null + initializeUrl += `?documentId=${asset.did}` + initializeUrl += `&serviceId=${serviceIndex}` + initializeUrl += `&serviceType=${serviceType}` + initializeUrl += `&dataToken=${asset.dataToken}` + initializeUrl += `&consumerAddress=${consumerAddress}` + if (userCustomParameters) + initializeUrl += '&userdata=' + encodeURI(JSON.stringify(userCustomParameters)) + try { + const response = await fetchMethod.get(initializeUrl) + return await response.text() + } catch (e) { + LoggerInstance.error(e) + throw new Error('Asset URL not found or not available.') + } + } + + /** Check for a valid provider at URL + * @param {String} url provider uri address + * @param {String} fetchMethod fetch client instance + * @return {Promise} string + */ + public async isValidProvider(url: string, fetchMethod: any): Promise { + try { + const response = await fetchMethod.get(url) + if (response?.ok) { + const params = await response.json() + if (params && params.providerAddress) return true + } + return false + } catch (error) { + LoggerInstance.error(`Error validating provider: ${error.message}`) + return false + } + } +} + +export const ProviderInstance = new Provider() +export default ProviderInstance diff --git a/src/provider/index.ts b/src/provider/index.ts new file mode 100644 index 00000000..e69de29b From 51f3816949a179798a621b5317b9440e4378286c Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 22 Nov 2021 12:17:08 +0200 Subject: [PATCH 2/6] fixed lint issues --- src/provider/Provider.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index f52646dc..22981325 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -1,6 +1,6 @@ import { Config } from '../models' import { LoggerInstance } from '../utils' -import { DDO } from '../ddo' +import { Asset } from '../ddo/Asset' import { FileMetadata } from '../interfaces/FileMetadata' export interface ServiceEndpoint { @@ -178,13 +178,13 @@ export class Provider { * @return {Promise} urlDetails */ public async initialize( - asset: DDO | string, + asset: Asset, serviceIndex: number, serviceType: string, consumerAddress: string, - userCustomParameters?: UserCustomParameters, providerUri: string, - fetchMethod: any + fetchMethod: any, + userCustomParameters?: UserCustomParameters ): Promise { const providerEndpoints = await this.getEndpoints(providerUri, fetchMethod) const serviceEndpoints = await this.getServiceEndpoints( @@ -196,10 +196,10 @@ export class Provider { : null if (!initializeUrl) return null - initializeUrl += `?documentId=${asset.did}` + initializeUrl += `?documentId=${asset.id}` initializeUrl += `&serviceId=${serviceIndex}` initializeUrl += `&serviceType=${serviceType}` - initializeUrl += `&dataToken=${asset.dataToken}` + initializeUrl += `&dataToken=${asset.datatokens[0]}` // to check later initializeUrl += `&consumerAddress=${consumerAddress}` if (userCustomParameters) initializeUrl += '&userdata=' + encodeURI(JSON.stringify(userCustomParameters)) From bb828b954cf1c691b412eefb03d4f937105af8e6 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 26 Nov 2021 16:40:29 +0200 Subject: [PATCH 3/6] updated fetch decouple strategy and added some tests --- src/provider/Provider.ts | 19 +++++--------- src/provider/index.ts | 1 + src/utils/FetchHelper.ts | 12 +++++++++ src/utils/index.ts | 1 + test/integration/.mocharc.json | 6 +++++ test/integration/Provider.test.ts | 25 +++++++++++++++++++ test/integration/config.ts | 3 --- test/unit/Lib.test.ts | 0 test/unit/{ => datatoken}/Datatoken.test.ts | 10 ++++---- .../unit/{ => datatoken}/NFTDatatoken.test.ts | 8 +++--- 10 files changed, 60 insertions(+), 25 deletions(-) create mode 100644 src/utils/FetchHelper.ts create mode 100644 test/integration/.mocharc.json create mode 100644 test/integration/Provider.test.ts delete mode 100644 test/unit/Lib.test.ts rename test/unit/{ => datatoken}/Datatoken.test.ts (97%) rename test/unit/{ => datatoken}/NFTDatatoken.test.ts (97%) diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index 22981325..284ede3a 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -20,7 +20,7 @@ export class Provider { */ async getEndpoints(providerUri: string, fetchMethod: any): Promise { try { - const endpoints = await await fetchMethod.get(providerUri).json() + const endpoints = await await fetchMethod(providerUri).json() return endpoints } catch (e) { LoggerInstance.error('Finding the service endpoints failed:', e) @@ -80,7 +80,7 @@ export class Provider { : null if (!path) return null try { - const response = await fetchMethod.get(path + `?userAddress=${consumerAddress}`) + const response = await fetchMethod(path + `?userAddress=${consumerAddress}`) return String((await response.json()).nonce) } catch (e) { LoggerInstance.error(e) @@ -108,13 +108,6 @@ export class Provider { providerUri, providerEndpoints ) - // await this.getNonce( - // providerUri, - // accountId, - // fetchMethod, - // providerEndpoints, - // serviceEndpoints - // ) const args = { documentId: did, document: JSON.stringify(document), @@ -125,7 +118,7 @@ export class Provider { : null if (!path) return null try { - const response = await fetchMethod.post(path, decodeURI(JSON.stringify(args))) + const response = await fetchMethod(path, decodeURI(JSON.stringify(args))) return (await response.json()).encryptedDocument } catch (e) { LoggerInstance.error(e) @@ -156,7 +149,7 @@ export class Provider { : null if (!path) return null try { - const response = await fetchMethod.post(path, JSON.stringify(args)) + const response = await fetchMethod(path, JSON.stringify(args)) const results: FileMetadata[] = await response.json() for (const result of results) { files.push(result) @@ -204,7 +197,7 @@ export class Provider { if (userCustomParameters) initializeUrl += '&userdata=' + encodeURI(JSON.stringify(userCustomParameters)) try { - const response = await fetchMethod.get(initializeUrl) + const response = await fetchMethod(initializeUrl) return await response.text() } catch (e) { LoggerInstance.error(e) @@ -219,7 +212,7 @@ export class Provider { */ public async isValidProvider(url: string, fetchMethod: any): Promise { try { - const response = await fetchMethod.get(url) + const response = await fetchMethod(url) if (response?.ok) { const params = await response.json() if (params && params.providerAddress) return true diff --git a/src/provider/index.ts b/src/provider/index.ts index e69de29b..0ce7b023 100644 --- a/src/provider/index.ts +++ b/src/provider/index.ts @@ -0,0 +1 @@ +export * from './Provider' diff --git a/src/utils/FetchHelper.ts b/src/utils/FetchHelper.ts new file mode 100644 index 00000000..8a9c75d7 --- /dev/null +++ b/src/utils/FetchHelper.ts @@ -0,0 +1,12 @@ +import fetch from 'cross-fetch' +import LoggerInstance from './Logger' + +export async function fetchData(url: string, opts: RequestInit): Promise { + const result = await fetch(url, opts) + if (!result.ok) { + LoggerInstance.error(`Error requesting [${opts.method}] ${url}`) + LoggerInstance.error(`Response message: \n${await result.text()}`) + throw result + } + return result +} diff --git a/src/utils/index.ts b/src/utils/index.ts index 186a9af7..4d6a964a 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -3,3 +3,4 @@ export * from './GasUtils' export * from './Logger' export * from './DatatokenName' export * from './ContractParams' +export * from './FetchHelper' diff --git a/test/integration/.mocharc.json b/test/integration/.mocharc.json new file mode 100644 index 00000000..860f598d --- /dev/null +++ b/test/integration/.mocharc.json @@ -0,0 +1,6 @@ +{ + "require": ["ts-node/register", "source-map-support/register", "mock-local-storage"], + "full-trace": true, + "exit": true, + "timeout": "300000" +} diff --git a/test/integration/Provider.test.ts b/test/integration/Provider.test.ts new file mode 100644 index 00000000..973d4856 --- /dev/null +++ b/test/integration/Provider.test.ts @@ -0,0 +1,25 @@ +import config from './config' +import { Provider } from '../../src/provider/Provider' +import { assert } from 'chai' +import { fetchData } from '../../src/utils' + +describe('Provider tests', () => { + let providerInstance: Provider + + it('Initialize Ocean', async () => { + providerInstance = new Provider() + }) + + it('Alice tests invalid provider', async () => { + const valid = await providerInstance.isValidProvider('http://example.net', fetchData) + assert(valid === false) + }) + + it('Alice tests valid provider', async () => { + const valid = await providerInstance.isValidProvider( + 'http://127.0.0.1:8030', + fetchData + ) + assert(valid === true) + }) +}) diff --git a/test/integration/config.ts b/test/integration/config.ts index 95ce2e6e..7b140e71 100644 --- a/test/integration/config.ts +++ b/test/integration/config.ts @@ -1,15 +1,12 @@ import { Config } from '../../src/models/Config' -import { LoggerInstance, LogLevel } from '../../src/utils' import Web3 from 'web3' -LoggerInstance.setLevel(LogLevel.Error) const web3 = new Web3('http://127.0.0.1:8545') export default { metadataCacheUri: 'http://aquarius:5000', providerUri: 'http://localhost:8030', nodeUri: `http://localhost:${process.env.ETH_PORT || 8545}`, - verbose: LogLevel.Error, web3Provider: web3 } as Config diff --git a/test/unit/Lib.test.ts b/test/unit/Lib.test.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/test/unit/Datatoken.test.ts b/test/unit/datatoken/Datatoken.test.ts similarity index 97% rename from test/unit/Datatoken.test.ts rename to test/unit/datatoken/Datatoken.test.ts index ac52e4e5..55666437 100644 --- a/test/unit/Datatoken.test.ts +++ b/test/unit/datatoken/Datatoken.test.ts @@ -12,17 +12,17 @@ import FixedRate from '@oceanprotocol/contracts/artifacts/contracts/pools/fixedR import OPFCollector from '@oceanprotocol/contracts/artifacts/contracts/communityFee/OPFCommunityFeeCollector.sol/OPFCommunityFeeCollector.json' import MockERC20 from '@oceanprotocol/contracts/artifacts/contracts/utils/mock/MockERC20Decimals.sol/MockERC20Decimals.json' -import { TestContractHandler } from '../TestContractHandler' -import { NFTFactory, NFTCreateData } from '../../src/factories/NFTFactory' +import { TestContractHandler } from '../../TestContractHandler' +import { NFTFactory, NFTCreateData } from '../../../src/factories/NFTFactory' import { Datatoken, NFTDatatoken, OrderParams, DispenserParams -} from '../../src/datatokens' +} from '../../../src/datatokens' import { AbiItem } from 'web3-utils' -import { LoggerInstance } from '../../src/utils' -import { FreCreationParams, FreOrderParams } from '../../src/interfaces' +import { LoggerInstance } from '../../../src/utils' +import { FreCreationParams, FreOrderParams } from '../../../src/interfaces' const web3 = new Web3('http://127.0.0.1:8545') diff --git a/test/unit/NFTDatatoken.test.ts b/test/unit/datatoken/NFTDatatoken.test.ts similarity index 97% rename from test/unit/NFTDatatoken.test.ts rename to test/unit/datatoken/NFTDatatoken.test.ts index 734c9926..68854bf8 100644 --- a/test/unit/NFTDatatoken.test.ts +++ b/test/unit/datatoken/NFTDatatoken.test.ts @@ -12,11 +12,11 @@ import FixedRate from '@oceanprotocol/contracts/artifacts/contracts/pools/fixedR import OPFCollector from '@oceanprotocol/contracts/artifacts/contracts/communityFee/OPFCommunityFeeCollector.sol/OPFCommunityFeeCollector.json' import MockERC20 from '@oceanprotocol/contracts/artifacts/contracts/utils/mock/MockERC20Decimals.sol/MockERC20Decimals.json' -import { TestContractHandler } from '../TestContractHandler' -import { NFTFactory, NFTCreateData } from '../../src/factories/NFTFactory' -import { NFTDatatoken } from '../../src/datatokens/NFTDatatoken' +import { TestContractHandler } from '../../TestContractHandler' +import { NFTFactory, NFTCreateData } from '../../../src/factories/NFTFactory' +import { NFTDatatoken } from '../../../src/datatokens/NFTDatatoken' import { AbiItem } from 'web3-utils' -import { LoggerInstance } from '../../src/utils' +import { LoggerInstance } from '../../../src/utils' const web3 = new Web3('http://127.0.0.1:8545') From e9a0dd5a1c96d36591fca372e46ed79e62f4081d Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Mon, 6 Dec 2021 10:19:19 +0200 Subject: [PATCH 4/6] add download method and utils --- src/interfaces/FileMetadata.ts | 12 ++++++ src/provider/Provider.ts | 70 ++++++++++++++++++++++++++++++- src/utils/ConversionTypeHelper.ts | 27 ++++++++++++ src/utils/SignatureUtils.ts | 28 +++++++++++++ 4 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 src/utils/ConversionTypeHelper.ts create mode 100644 src/utils/SignatureUtils.ts diff --git a/src/interfaces/FileMetadata.ts b/src/interfaces/FileMetadata.ts index 964dd47a..8f234600 100644 --- a/src/interfaces/FileMetadata.ts +++ b/src/interfaces/FileMetadata.ts @@ -11,4 +11,16 @@ export interface FileMetadata { * @type {[type]} */ contentLength?: string + + /** + * File index. + * @type {number} + */ + index?: number + + /** + * File URL. + * @type {string} + */ + url?: string } diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index 284ede3a..0176a61c 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -1,7 +1,10 @@ +import Web3 from 'web3' import { Config } from '../models' import { LoggerInstance } from '../utils' import { Asset } from '../ddo/Asset' import { FileMetadata } from '../interfaces/FileMetadata' +import { noZeroX } from '../utils/ConversionTypeHelper' +import { signText } from '../utils/SignatureUtils' export interface ServiceEndpoint { serviceName: string @@ -130,7 +133,7 @@ export class Provider { * @param {string | DID} url or did * @param {string} providerUri Identifier of the asset to be registered in ocean * @param {string} fetchMethod fetch client instance - * @return {Promise} urlDetails + * @return {Promise} urlDetails */ public async fileinfo( url: string, @@ -168,7 +171,7 @@ export class Provider { * @param {UserCustomParameters} userCustomParameters * @param {string} providerUri Identifier of the asset to be registered in ocean * @param {string} fetchMethod fetch client instance - * @return {Promise} urlDetails + * @return {Promise} urlDetails */ public async initialize( asset: Asset, @@ -205,6 +208,69 @@ export class Provider { } } + public async download( + did: string, + destination: string, + accountId: string, + files: FileMetadata[], + index = -1, + providerUri: string, + web3: Web3, + fetchMethod: any, + userCustomParameters?: UserCustomParameters + ): Promise { + const providerEndpoints = await this.getEndpoints(providerUri, fetchMethod) + const serviceEndpoints = await this.getServiceEndpoints( + providerUri, + providerEndpoints + ) + let downloadUrl = this.getEndpointURL(serviceEndpoints, 'download') + ? this.getEndpointURL(serviceEndpoints, 'download').urlPath + : null + + const nonce = await this.getNonce( + providerUri, + accountId, + fetchMethod, + providerEndpoints, + serviceEndpoints + ) + const signature = await this.createSignature(web3, accountId, did + nonce) + + if (!downloadUrl) return null + const filesPromises = files + .filter((_, i) => index === -1 || i === index) + .map(async ({ index: i, url: fileUrl }) => { + let consumeUrl = downloadUrl + consumeUrl += `?index=${i}` + consumeUrl += `&documentId=${did}` + consumeUrl += `&consumerAddress=${accountId}` + consumeUrl += `&url=${fileUrl}` + consumeUrl += `&signature=${signature}` + if (userCustomParameters) + consumeUrl += '&userdata=' + encodeURI(JSON.stringify(userCustomParameters)) + try { + !destination + ? await fetchMethod.downloadFileBrowser(consumeUrl) + : await fetchMethod.downloadFile(consumeUrl, destination, i) + } catch (e) { + LoggerInstance.error('Error consuming assets', e) + throw e + } + }) + await Promise.all(filesPromises) + return destination + } + + public async createSignature( + web3: Web3, + accountId: string, + agreementId: string + ): Promise { + const signature = await signText(web3, noZeroX(agreementId), accountId) + return signature + } + /** Check for a valid provider at URL * @param {String} url provider uri address * @param {String} fetchMethod fetch client instance diff --git a/src/utils/ConversionTypeHelper.ts b/src/utils/ConversionTypeHelper.ts new file mode 100644 index 00000000..503256bc --- /dev/null +++ b/src/utils/ConversionTypeHelper.ts @@ -0,0 +1,27 @@ +import { LoggerInstance } from './Logger' + +export const zeroX = (input: string): string => zeroXTransformer(input, true) +export const noZeroX = (input: string): string => zeroXTransformer(input, false) +export function zeroXTransformer(input = '', zeroOutput: boolean): string { + const { valid, output } = inputMatch(input, /^(?:0x)*([a-f0-9]+)$/i, 'zeroXTransformer') + return (zeroOutput && valid ? '0x' : '') + output +} + +// Shared functions +function inputMatch( + input: string, + regexp: RegExp, + conversorName: string +): { valid: boolean; output: string } { + if (typeof input !== 'string') { + LoggerInstance.debug('Not input string:') + LoggerInstance.debug(input) + throw new Error(`[${conversorName}] Expected string, input type: ${typeof input}`) + } + const match = input.match(regexp) + if (!match) { + LoggerInstance.warn(`[${conversorName}] Input transformation failed.`) + return { valid: false, output: input } + } + return { valid: true, output: match[1] } +} diff --git a/src/utils/SignatureUtils.ts b/src/utils/SignatureUtils.ts new file mode 100644 index 00000000..719dbe7d --- /dev/null +++ b/src/utils/SignatureUtils.ts @@ -0,0 +1,28 @@ +import Web3 from 'web3' +import { LoggerInstance } from './Logger' + +export async function signText( + web3: Web3, + text: string, + publicKey: string, + password?: string +): Promise { + const isMetaMask = + web3 && web3.currentProvider && (web3.currentProvider as any).isMetaMask + try { + return await web3.eth.personal.sign(text, publicKey, password) + } catch (e) { + if (isMetaMask) { + throw e + } + LoggerInstance.warn('Error on personal sign.') + LoggerInstance.warn(e) + try { + return await web3.eth.sign(text, publicKey) + } catch (e2) { + LoggerInstance.error('Error on sign.') + LoggerInstance.error(e2) + throw new Error('Error executing personal sign') + } + } +} From babaa970eb3c7e79fb4efc5e15e1514dee562253 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 7 Dec 2021 20:51:34 +0200 Subject: [PATCH 5/6] fixed lint --- src/provider/Provider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index 0176a61c..e977bbea 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -224,7 +224,7 @@ export class Provider { providerUri, providerEndpoints ) - let downloadUrl = this.getEndpointURL(serviceEndpoints, 'download') + const downloadUrl = this.getEndpointURL(serviceEndpoints, 'download') ? this.getEndpointURL(serviceEndpoints, 'download').urlPath : null From a5ff837d5de9e8356d67ab9802a501bedfea9e33 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 7 Dec 2021 20:55:31 +0200 Subject: [PATCH 6/6] updated package.lock file --- package-lock.json | 429 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 375 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index f3551dc4..d961fa6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3019,7 +3019,7 @@ "node_modules/@oceanprotocol/contracts": { "name": "hardhat-project", "version": "v1.0.0-alpha.1", - "resolved": "git+ssh://git@github.com/oceanprotocol/contracts.git#0129022423d8b0b6a7506b96bb45b9bf4f125ca5", + "resolved": "git+ssh://git@github.com/oceanprotocol/contracts.git#9c6034f13f5c6951c22a360a1987f6067b8aa631", "dependencies": { "@openzeppelin/contracts": "^4.3.3", "@openzeppelin/test-helpers": "^0.5.15", @@ -7142,6 +7142,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -7152,6 +7153,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -7160,6 +7162,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -11248,7 +11251,104 @@ "bundleDependencies": [ "source-map-support", "yargs", - "ethereumjs-util" + "ethereumjs-util", + "@types/bn.js", + "@types/node", + "@types/pbkdf2", + "@types/secp256k1", + "ansi-regex", + "ansi-styles", + "base-x", + "blakejs", + "bn.js", + "brorand", + "browserify-aes", + "bs58", + "bs58check", + "buffer-from", + "buffer-xor", + "camelcase", + "cipher-base", + "cliui", + "color-convert", + "color-name", + "create-hash", + "create-hmac", + "cross-spawn", + "decamelize", + "elliptic", + "emoji-regex", + "end-of-stream", + "ethereum-cryptography", + "ethjs-util", + "evp_bytestokey", + "execa", + "find-up", + "get-caller-file", + "get-stream", + "hash-base", + "hash.js", + "hmac-drbg", + "inherits", + "invert-kv", + "is-fullwidth-code-point", + "is-hex-prefixed", + "is-stream", + "isexe", + "keccak", + "lcid", + "locate-path", + "map-age-cleaner", + "md5.js", + "mem", + "mimic-fn", + "minimalistic-assert", + "minimalistic-crypto-utils", + "nice-try", + "node-addon-api", + "node-gyp-build", + "npm-run-path", + "once", + "os-locale", + "p-defer", + "p-finally", + "p-is-promise", + "p-limit", + "p-locate", + "p-try", + "path-exists", + "path-key", + "pbkdf2", + "pump", + "randombytes", + "readable-stream", + "require-directory", + "require-main-filename", + "ripemd160", + "rlp", + "safe-buffer", + "scrypt-js", + "secp256k1", + "semver", + "set-blocking", + "setimmediate", + "sha.js", + "shebang-command", + "shebang-regex", + "signal-exit", + "source-map", + "string_decoder", + "string-width", + "strip-ansi", + "strip-eof", + "strip-hex-prefix", + "util-deprecate", + "which", + "which-module", + "wrap-ansi", + "wrappy", + "y18n", + "yargs-parser" ], "dependencies": { "ethereumjs-util": "6.2.1", @@ -11261,6 +11361,7 @@ }, "node_modules/ganache-cli/node_modules/@types/bn.js": { "version": "4.11.6", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11269,11 +11370,13 @@ }, "node_modules/ganache-cli/node_modules/@types/node": { "version": "14.11.2", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/@types/pbkdf2": { "version": "3.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11282,6 +11385,7 @@ }, "node_modules/ganache-cli/node_modules/@types/secp256k1": { "version": "4.0.1", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11290,6 +11394,7 @@ }, "node_modules/ganache-cli/node_modules/ansi-regex": { "version": "4.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11298,6 +11403,7 @@ }, "node_modules/ganache-cli/node_modules/ansi-styles": { "version": "3.2.1", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11309,6 +11415,7 @@ }, "node_modules/ganache-cli/node_modules/base-x": { "version": "3.0.8", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11317,21 +11424,25 @@ }, "node_modules/ganache-cli/node_modules/blakejs": { "version": "1.1.0", + "extraneous": true, "inBundle": true, "license": "CC0-1.0" }, "node_modules/ganache-cli/node_modules/bn.js": { "version": "4.11.9", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/brorand": { "version": "1.1.0", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/browserify-aes": { "version": "1.2.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11345,6 +11456,7 @@ }, "node_modules/ganache-cli/node_modules/bs58": { "version": "4.0.1", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11353,6 +11465,7 @@ }, "node_modules/ganache-cli/node_modules/bs58check": { "version": "2.1.2", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11363,16 +11476,19 @@ }, "node_modules/ganache-cli/node_modules/buffer-from": { "version": "1.1.1", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/buffer-xor": { "version": "1.0.3", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/camelcase": { "version": "5.3.1", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11381,6 +11497,7 @@ }, "node_modules/ganache-cli/node_modules/cipher-base": { "version": "1.0.4", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11390,6 +11507,7 @@ }, "node_modules/ganache-cli/node_modules/cliui": { "version": "5.0.0", + "extraneous": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11400,6 +11518,7 @@ }, "node_modules/ganache-cli/node_modules/color-convert": { "version": "1.9.3", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11408,11 +11527,13 @@ }, "node_modules/ganache-cli/node_modules/color-name": { "version": "1.1.3", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/create-hash": { "version": "1.2.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11425,6 +11546,7 @@ }, "node_modules/ganache-cli/node_modules/create-hmac": { "version": "1.1.7", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11438,6 +11560,7 @@ }, "node_modules/ganache-cli/node_modules/cross-spawn": { "version": "6.0.5", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11453,6 +11576,7 @@ }, "node_modules/ganache-cli/node_modules/decamelize": { "version": "1.2.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11461,6 +11585,7 @@ }, "node_modules/ganache-cli/node_modules/elliptic": { "version": "6.5.3", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11475,11 +11600,13 @@ }, "node_modules/ganache-cli/node_modules/emoji-regex": { "version": "7.0.3", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/end-of-stream": { "version": "1.4.4", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11488,6 +11615,7 @@ }, "node_modules/ganache-cli/node_modules/ethereum-cryptography": { "version": "0.1.3", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11510,6 +11638,7 @@ }, "node_modules/ganache-cli/node_modules/ethereumjs-util": { "version": "6.2.1", + "extraneous": true, "inBundle": true, "license": "MPL-2.0", "dependencies": { @@ -11524,6 +11653,7 @@ }, "node_modules/ganache-cli/node_modules/ethjs-util": { "version": "0.1.6", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11537,6 +11667,7 @@ }, "node_modules/ganache-cli/node_modules/evp_bytestokey": { "version": "1.0.3", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11546,6 +11677,7 @@ }, "node_modules/ganache-cli/node_modules/execa": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11563,6 +11695,7 @@ }, "node_modules/ganache-cli/node_modules/find-up": { "version": "3.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11574,6 +11707,7 @@ }, "node_modules/ganache-cli/node_modules/get-caller-file": { "version": "2.0.5", + "extraneous": true, "inBundle": true, "license": "ISC", "engines": { @@ -11582,6 +11716,7 @@ }, "node_modules/ganache-cli/node_modules/get-stream": { "version": "4.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11593,6 +11728,7 @@ }, "node_modules/ganache-cli/node_modules/hash-base": { "version": "3.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11606,6 +11742,7 @@ }, "node_modules/ganache-cli/node_modules/hash.js": { "version": "1.1.7", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11615,6 +11752,7 @@ }, "node_modules/ganache-cli/node_modules/hmac-drbg": { "version": "1.0.1", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11625,11 +11763,13 @@ }, "node_modules/ganache-cli/node_modules/inherits": { "version": "2.0.4", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/invert-kv": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11638,6 +11778,7 @@ }, "node_modules/ganache-cli/node_modules/is-fullwidth-code-point": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11646,6 +11787,7 @@ }, "node_modules/ganache-cli/node_modules/is-hex-prefixed": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11655,6 +11797,7 @@ }, "node_modules/ganache-cli/node_modules/is-stream": { "version": "1.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11663,11 +11806,13 @@ }, "node_modules/ganache-cli/node_modules/isexe": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/keccak": { "version": "3.0.1", + "extraneous": true, "hasInstallScript": true, "inBundle": true, "license": "MIT", @@ -11681,6 +11826,7 @@ }, "node_modules/ganache-cli/node_modules/lcid": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11692,6 +11838,7 @@ }, "node_modules/ganache-cli/node_modules/locate-path": { "version": "3.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11704,6 +11851,7 @@ }, "node_modules/ganache-cli/node_modules/map-age-cleaner": { "version": "0.1.3", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11715,6 +11863,7 @@ }, "node_modules/ganache-cli/node_modules/md5.js": { "version": "1.3.5", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11725,6 +11874,7 @@ }, "node_modules/ganache-cli/node_modules/mem": { "version": "4.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11738,6 +11888,7 @@ }, "node_modules/ganache-cli/node_modules/mimic-fn": { "version": "2.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11746,26 +11897,31 @@ }, "node_modules/ganache-cli/node_modules/minimalistic-assert": { "version": "1.0.1", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/minimalistic-crypto-utils": { "version": "1.0.1", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/nice-try": { "version": "1.0.5", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/node-addon-api": { "version": "2.0.2", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/node-gyp-build": { "version": "4.2.3", + "extraneous": true, "inBundle": true, "license": "MIT", "bin": { @@ -11776,6 +11932,7 @@ }, "node_modules/ganache-cli/node_modules/npm-run-path": { "version": "2.0.2", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11787,6 +11944,7 @@ }, "node_modules/ganache-cli/node_modules/once": { "version": "1.4.0", + "extraneous": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -11795,6 +11953,7 @@ }, "node_modules/ganache-cli/node_modules/os-locale": { "version": "3.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11808,6 +11967,7 @@ }, "node_modules/ganache-cli/node_modules/p-defer": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11816,6 +11976,7 @@ }, "node_modules/ganache-cli/node_modules/p-finally": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11824,6 +11985,7 @@ }, "node_modules/ganache-cli/node_modules/p-is-promise": { "version": "2.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11832,6 +11994,7 @@ }, "node_modules/ganache-cli/node_modules/p-limit": { "version": "2.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11846,6 +12009,7 @@ }, "node_modules/ganache-cli/node_modules/p-locate": { "version": "3.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11857,6 +12021,7 @@ }, "node_modules/ganache-cli/node_modules/p-try": { "version": "2.2.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11865,6 +12030,7 @@ }, "node_modules/ganache-cli/node_modules/path-exists": { "version": "3.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11873,6 +12039,7 @@ }, "node_modules/ganache-cli/node_modules/path-key": { "version": "2.0.1", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11881,6 +12048,7 @@ }, "node_modules/ganache-cli/node_modules/pbkdf2": { "version": "3.1.1", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11896,6 +12064,7 @@ }, "node_modules/ganache-cli/node_modules/pump": { "version": "3.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11905,6 +12074,7 @@ }, "node_modules/ganache-cli/node_modules/randombytes": { "version": "2.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11913,6 +12083,7 @@ }, "node_modules/ganache-cli/node_modules/readable-stream": { "version": "3.6.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11926,6 +12097,7 @@ }, "node_modules/ganache-cli/node_modules/require-directory": { "version": "2.1.1", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -11934,11 +12106,13 @@ }, "node_modules/ganache-cli/node_modules/require-main-filename": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/ripemd160": { "version": "2.0.2", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -11948,6 +12122,7 @@ }, "node_modules/ganache-cli/node_modules/rlp": { "version": "2.2.6", + "extraneous": true, "inBundle": true, "license": "MPL-2.0", "dependencies": { @@ -11959,6 +12134,7 @@ }, "node_modules/ganache-cli/node_modules/safe-buffer": { "version": "5.2.1", + "extraneous": true, "funding": [ { "type": "github", @@ -11978,11 +12154,13 @@ }, "node_modules/ganache-cli/node_modules/scrypt-js": { "version": "3.0.1", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/secp256k1": { "version": "4.0.2", + "extraneous": true, "hasInstallScript": true, "inBundle": true, "license": "MIT", @@ -11997,6 +12175,7 @@ }, "node_modules/ganache-cli/node_modules/semver": { "version": "5.7.1", + "extraneous": true, "inBundle": true, "license": "ISC", "bin": { @@ -12005,16 +12184,19 @@ }, "node_modules/ganache-cli/node_modules/set-blocking": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/setimmediate": { "version": "1.0.5", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/sha.js": { "version": "2.4.11", + "extraneous": true, "inBundle": true, "license": "(MIT AND BSD-3-Clause)", "dependencies": { @@ -12027,6 +12209,7 @@ }, "node_modules/ganache-cli/node_modules/shebang-command": { "version": "1.2.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12038,6 +12221,7 @@ }, "node_modules/ganache-cli/node_modules/shebang-regex": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -12046,11 +12230,13 @@ }, "node_modules/ganache-cli/node_modules/signal-exit": { "version": "3.0.3", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/source-map": { "version": "0.6.1", + "extraneous": true, "inBundle": true, "license": "BSD-3-Clause", "engines": { @@ -12059,6 +12245,7 @@ }, "node_modules/ganache-cli/node_modules/source-map-support": { "version": "0.5.12", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12068,6 +12255,7 @@ }, "node_modules/ganache-cli/node_modules/string_decoder": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12076,6 +12264,7 @@ }, "node_modules/ganache-cli/node_modules/string-width": { "version": "3.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12089,6 +12278,7 @@ }, "node_modules/ganache-cli/node_modules/strip-ansi": { "version": "5.2.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12100,6 +12290,7 @@ }, "node_modules/ganache-cli/node_modules/strip-eof": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -12108,6 +12299,7 @@ }, "node_modules/ganache-cli/node_modules/strip-hex-prefix": { "version": "1.0.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12120,11 +12312,13 @@ }, "node_modules/ganache-cli/node_modules/util-deprecate": { "version": "1.0.2", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/ganache-cli/node_modules/which": { "version": "1.3.1", + "extraneous": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -12136,11 +12330,13 @@ }, "node_modules/ganache-cli/node_modules/which-module": { "version": "2.0.0", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/wrap-ansi": { "version": "5.1.0", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12154,16 +12350,19 @@ }, "node_modules/ganache-cli/node_modules/wrappy": { "version": "1.0.2", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/y18n": { "version": "4.0.0", + "extraneous": true, "inBundle": true, "license": "ISC" }, "node_modules/ganache-cli/node_modules/yargs": { "version": "13.2.4", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -12182,6 +12381,7 @@ }, "node_modules/ganache-cli/node_modules/yargs-parser": { "version": "13.1.2", + "extraneous": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -25347,6 +25547,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -25363,6 +25564,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -25371,6 +25573,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -25385,6 +25588,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -25395,12 +25599,14 @@ "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -25546,6 +25752,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "engines": { "node": ">=10" } @@ -25576,6 +25783,7 @@ "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -25593,6 +25801,7 @@ "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, "engines": { "node": ">=10" } @@ -27712,7 +27921,7 @@ } }, "@oceanprotocol/contracts": { - "version": "git+ssh://git@github.com/oceanprotocol/contracts.git#0129022423d8b0b6a7506b96bb45b9bf4f125ca5", + "version": "git+ssh://git@github.com/oceanprotocol/contracts.git#9c6034f13f5c6951c22a360a1987f6067b8aa631", "from": "@oceanprotocol/contracts@github:oceanprotocol/contracts#v4main_postaudit", "requires": { "@openzeppelin/contracts": "^4.3.3", @@ -31104,6 +31313,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -31113,12 +31323,14 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -34419,17 +34631,20 @@ "@types/bn.js": { "version": "4.11.6", "bundled": true, + "extraneous": true, "requires": { "@types/node": "*" } }, "@types/node": { "version": "14.11.2", - "bundled": true + "bundled": true, + "extraneous": true }, "@types/pbkdf2": { "version": "3.1.0", "bundled": true, + "extraneous": true, "requires": { "@types/node": "*" } @@ -34437,17 +34652,20 @@ "@types/secp256k1": { "version": "4.0.1", "bundled": true, + "extraneous": true, "requires": { "@types/node": "*" } }, "ansi-regex": { "version": "4.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "ansi-styles": { "version": "3.2.1", "bundled": true, + "extraneous": true, "requires": { "color-convert": "^1.9.0" } @@ -34455,25 +34673,30 @@ "base-x": { "version": "3.0.8", "bundled": true, + "extraneous": true, "requires": { "safe-buffer": "^5.0.1" } }, "blakejs": { "version": "1.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "bn.js": { "version": "4.11.9", - "bundled": true + "bundled": true, + "extraneous": true }, "brorand": { "version": "1.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "browserify-aes": { "version": "1.2.0", "bundled": true, + "extraneous": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -34486,6 +34709,7 @@ "bs58": { "version": "4.0.1", "bundled": true, + "extraneous": true, "requires": { "base-x": "^3.0.2" } @@ -34493,6 +34717,7 @@ "bs58check": { "version": "2.1.2", "bundled": true, + "extraneous": true, "requires": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -34501,19 +34726,23 @@ }, "buffer-from": { "version": "1.1.1", - "bundled": true + "bundled": true, + "extraneous": true }, "buffer-xor": { "version": "1.0.3", - "bundled": true + "bundled": true, + "extraneous": true }, "camelcase": { "version": "5.3.1", - "bundled": true + "bundled": true, + "extraneous": true }, "cipher-base": { "version": "1.0.4", "bundled": true, + "extraneous": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -34522,6 +34751,7 @@ "cliui": { "version": "5.0.0", "bundled": true, + "extraneous": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", @@ -34531,17 +34761,20 @@ "color-convert": { "version": "1.9.3", "bundled": true, + "extraneous": true, "requires": { "color-name": "1.1.3" } }, "color-name": { "version": "1.1.3", - "bundled": true + "bundled": true, + "extraneous": true }, "create-hash": { "version": "1.2.0", "bundled": true, + "extraneous": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -34553,6 +34786,7 @@ "create-hmac": { "version": "1.1.7", "bundled": true, + "extraneous": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -34565,6 +34799,7 @@ "cross-spawn": { "version": "6.0.5", "bundled": true, + "extraneous": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -34575,11 +34810,13 @@ }, "decamelize": { "version": "1.2.0", - "bundled": true + "bundled": true, + "extraneous": true }, "elliptic": { "version": "6.5.3", "bundled": true, + "extraneous": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -34592,11 +34829,13 @@ }, "emoji-regex": { "version": "7.0.3", - "bundled": true + "bundled": true, + "extraneous": true }, "end-of-stream": { "version": "1.4.4", "bundled": true, + "extraneous": true, "requires": { "once": "^1.4.0" } @@ -34604,6 +34843,7 @@ "ethereum-cryptography": { "version": "0.1.3", "bundled": true, + "extraneous": true, "requires": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", @@ -34625,6 +34865,7 @@ "ethereumjs-util": { "version": "6.2.1", "bundled": true, + "extraneous": true, "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -34638,6 +34879,7 @@ "ethjs-util": { "version": "0.1.6", "bundled": true, + "extraneous": true, "requires": { "is-hex-prefixed": "1.0.0", "strip-hex-prefix": "1.0.0" @@ -34646,6 +34888,7 @@ "evp_bytestokey": { "version": "1.0.3", "bundled": true, + "extraneous": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -34654,6 +34897,7 @@ "execa": { "version": "1.0.0", "bundled": true, + "extraneous": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -34667,17 +34911,20 @@ "find-up": { "version": "3.0.0", "bundled": true, + "extraneous": true, "requires": { "locate-path": "^3.0.0" } }, "get-caller-file": { "version": "2.0.5", - "bundled": true + "bundled": true, + "extraneous": true }, "get-stream": { "version": "4.1.0", "bundled": true, + "extraneous": true, "requires": { "pump": "^3.0.0" } @@ -34685,6 +34932,7 @@ "hash-base": { "version": "3.1.0", "bundled": true, + "extraneous": true, "requires": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -34694,6 +34942,7 @@ "hash.js": { "version": "1.1.7", "bundled": true, + "extraneous": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -34702,6 +34951,7 @@ "hmac-drbg": { "version": "1.0.1", "bundled": true, + "extraneous": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -34710,31 +34960,38 @@ }, "inherits": { "version": "2.0.4", - "bundled": true + "bundled": true, + "extraneous": true }, "invert-kv": { "version": "2.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "is-hex-prefixed": { "version": "1.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "is-stream": { "version": "1.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "isexe": { "version": "2.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "keccak": { "version": "3.0.1", "bundled": true, + "extraneous": true, "requires": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0" @@ -34743,6 +35000,7 @@ "lcid": { "version": "2.0.0", "bundled": true, + "extraneous": true, "requires": { "invert-kv": "^2.0.0" } @@ -34750,6 +35008,7 @@ "locate-path": { "version": "3.0.0", "bundled": true, + "extraneous": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -34758,6 +35017,7 @@ "map-age-cleaner": { "version": "0.1.3", "bundled": true, + "extraneous": true, "requires": { "p-defer": "^1.0.0" } @@ -34765,6 +35025,7 @@ "md5.js": { "version": "1.3.5", "bundled": true, + "extraneous": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -34774,6 +35035,7 @@ "mem": { "version": "4.3.0", "bundled": true, + "extraneous": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -34782,31 +35044,38 @@ }, "mimic-fn": { "version": "2.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "minimalistic-assert": { "version": "1.0.1", - "bundled": true + "bundled": true, + "extraneous": true }, "minimalistic-crypto-utils": { "version": "1.0.1", - "bundled": true + "bundled": true, + "extraneous": true }, "nice-try": { "version": "1.0.5", - "bundled": true + "bundled": true, + "extraneous": true }, "node-addon-api": { "version": "2.0.2", - "bundled": true + "bundled": true, + "extraneous": true }, "node-gyp-build": { "version": "4.2.3", - "bundled": true + "bundled": true, + "extraneous": true }, "npm-run-path": { "version": "2.0.2", "bundled": true, + "extraneous": true, "requires": { "path-key": "^2.0.0" } @@ -34814,6 +35083,7 @@ "once": { "version": "1.4.0", "bundled": true, + "extraneous": true, "requires": { "wrappy": "1" } @@ -34821,6 +35091,7 @@ "os-locale": { "version": "3.1.0", "bundled": true, + "extraneous": true, "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", @@ -34829,19 +35100,23 @@ }, "p-defer": { "version": "1.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "p-finally": { "version": "1.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "p-is-promise": { "version": "2.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "p-limit": { "version": "2.3.0", "bundled": true, + "extraneous": true, "requires": { "p-try": "^2.0.0" } @@ -34849,25 +35124,30 @@ "p-locate": { "version": "3.0.0", "bundled": true, + "extraneous": true, "requires": { "p-limit": "^2.0.0" } }, "p-try": { "version": "2.2.0", - "bundled": true + "bundled": true, + "extraneous": true }, "path-exists": { "version": "3.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "path-key": { "version": "2.0.1", - "bundled": true + "bundled": true, + "extraneous": true }, "pbkdf2": { "version": "3.1.1", "bundled": true, + "extraneous": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -34879,6 +35159,7 @@ "pump": { "version": "3.0.0", "bundled": true, + "extraneous": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -34887,6 +35168,7 @@ "randombytes": { "version": "2.1.0", "bundled": true, + "extraneous": true, "requires": { "safe-buffer": "^5.1.0" } @@ -34894,6 +35176,7 @@ "readable-stream": { "version": "3.6.0", "bundled": true, + "extraneous": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -34902,15 +35185,18 @@ }, "require-directory": { "version": "2.1.1", - "bundled": true + "bundled": true, + "extraneous": true }, "require-main-filename": { "version": "2.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "ripemd160": { "version": "2.0.2", "bundled": true, + "extraneous": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -34919,21 +35205,25 @@ "rlp": { "version": "2.2.6", "bundled": true, + "extraneous": true, "requires": { "bn.js": "^4.11.1" } }, "safe-buffer": { "version": "5.2.1", - "bundled": true + "bundled": true, + "extraneous": true }, "scrypt-js": { "version": "3.0.1", - "bundled": true + "bundled": true, + "extraneous": true }, "secp256k1": { "version": "4.0.2", "bundled": true, + "extraneous": true, "requires": { "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", @@ -34942,19 +35232,23 @@ }, "semver": { "version": "5.7.1", - "bundled": true + "bundled": true, + "extraneous": true }, "set-blocking": { "version": "2.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "setimmediate": { "version": "1.0.5", - "bundled": true + "bundled": true, + "extraneous": true }, "sha.js": { "version": "2.4.11", "bundled": true, + "extraneous": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -34963,25 +35257,30 @@ "shebang-command": { "version": "1.2.0", "bundled": true, + "extraneous": true, "requires": { "shebang-regex": "^1.0.0" } }, "shebang-regex": { "version": "1.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "signal-exit": { "version": "3.0.3", - "bundled": true + "bundled": true, + "extraneous": true }, "source-map": { "version": "0.6.1", - "bundled": true + "bundled": true, + "extraneous": true }, "source-map-support": { "version": "0.5.12", "bundled": true, + "extraneous": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -34990,6 +35289,7 @@ "string_decoder": { "version": "1.3.0", "bundled": true, + "extraneous": true, "requires": { "safe-buffer": "~5.2.0" } @@ -34997,6 +35297,7 @@ "string-width": { "version": "3.1.0", "bundled": true, + "extraneous": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -35006,39 +35307,46 @@ "strip-ansi": { "version": "5.2.0", "bundled": true, + "extraneous": true, "requires": { "ansi-regex": "^4.1.0" } }, "strip-eof": { "version": "1.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "strip-hex-prefix": { "version": "1.0.0", "bundled": true, + "extraneous": true, "requires": { "is-hex-prefixed": "1.0.0" } }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "bundled": true, + "extraneous": true }, "which": { "version": "1.3.1", "bundled": true, + "extraneous": true, "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "wrap-ansi": { "version": "5.1.0", "bundled": true, + "extraneous": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -35047,15 +35355,18 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "extraneous": true }, "y18n": { "version": "4.0.0", - "bundled": true + "bundled": true, + "extraneous": true }, "yargs": { "version": "13.2.4", "bundled": true, + "extraneous": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -35073,6 +35384,7 @@ "yargs-parser": { "version": "13.1.2", "bundled": true, + "extraneous": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -45354,6 +45666,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -45363,12 +45676,14 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -45377,6 +45692,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -45384,12 +45700,14 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -45516,7 +45834,8 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true }, "yaeti": { "version": "0.0.6", @@ -45538,6 +45857,7 @@ "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -45551,7 +45871,8 @@ "yargs-parser": { "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true }, "yargs-unparser": { "version": "2.0.0",