From 21c9cbbbf3ff8160da2feb965d744ed7242e5f48 Mon Sep 17 00:00:00 2001 From: mcstoer <49734282+mcstoer@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:39:05 -0800 Subject: [PATCH 01/12] Check if provisioning is possible and change the text on the login screen to indicate it. --- src/components/LoginConsent/Login/Login.js | 29 ++++++++++++++++++- .../LoginConsent/Login/Login.render.js | 3 +- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/components/LoginConsent/Login/Login.js b/src/components/LoginConsent/Login/Login.js index fcef6bc..ad12232 100644 --- a/src/components/LoginConsent/Login/Login.js +++ b/src/components/LoginConsent/Login/Login.js @@ -8,7 +8,11 @@ import { CONSENT_TO_SCOPE, EXTERNAL_ACTION, EXTERNAL_CHAIN_START, REDIRECT } fro import { checkAndUpdateIdentities, setActiveVerusId } from '../../../redux/reducers/identity/identity.actions'; import { signResponse } from '../../../rpc/calls/signResponse'; import { setError } from '../../../redux/reducers/error/error.actions'; -import { LoginConsentDecision, LoginConsentResponse } from 'verus-typescript-primitives'; +import { + ID_ADDRESS_VDXF_KEY, + LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, + LoginConsentDecision, LoginConsentResponse +} from 'verus-typescript-primitives'; import BigNumber from 'bignumber.js'; class Login extends React.Component { @@ -19,6 +23,29 @@ class Login extends React.Component { loading: false } + // Check to see if provisioning is an option. + const { request } = this.props.loginConsentRequest; + + // See if the webhook exists. + let canProvision = request.challenge.provisioning_info && request.challenge.provisioning_info.some(x => { + return ( + x.vdxfkey === LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY.vdxfid + ); + }); + + // Provisioning is not an option if the subject is specified to be one of the identities that the user owns. + if (this.props.identities.length > 0) { + const identitySubjects = + request.challenge.subject.filter(item => item.vdxfkey === ID_ADDRESS_VDXF_KEY.vdxfid).map(id => id.data); + + const identitySubjectMatches = this.props.identities.filter(id => identitySubjects.includes(id.identity.identityaddress)); + + if (identitySubjectMatches.length > 0) { + canProvision = false; + } + } + + this.canProvision = canProvision; this.tryLogin = this.tryLogin.bind(this); this.selectId = this.selectId.bind(this); this.cancel = this.cancel.bind(this); diff --git a/src/components/LoginConsent/Login/Login.render.js b/src/components/LoginConsent/Login/Login.render.js index 3c01752..b4c8ee8 100644 --- a/src/components/LoginConsent/Login/Login.render.js +++ b/src/components/LoginConsent/Login/Login.render.js @@ -44,7 +44,8 @@ export const LoginRender = function () { padding: 8, }} > - {`Select an Identity`} + {`Select an Identity` + + (this.canProvision ? " or Request an Identity" : "")}
Date: Fri, 22 Nov 2024 15:43:53 -0800 Subject: [PATCH 02/12] Add screens for each step of provisioning with navigation between them. --- src/components/LoginConsent/Login/Login.js | 13 ++- .../LoginConsent/Login/Login.render.js | 24 ++++ .../LoginConsent/LoginConsent.render.js | 26 ++++- .../ProvisionIdentityConfirm.js | 43 +++++++ .../ProvisionIdentityConfirm.render.js | 107 ++++++++++++++++++ .../ProvisionIdentityForm.js | 43 +++++++ .../ProvisionIdentityForm.render.js | 107 ++++++++++++++++++ .../ProvisionIdentityResult.js | 43 +++++++ .../ProvisionIdentityResult.render.js | 107 ++++++++++++++++++ src/utils/constants.js | 3 + 10 files changed, 514 insertions(+), 2 deletions(-) create mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js create mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js create mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js create mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js create mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js create mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js diff --git a/src/components/LoginConsent/Login/Login.js b/src/components/LoginConsent/Login/Login.js index ad12232..76baa1a 100644 --- a/src/components/LoginConsent/Login/Login.js +++ b/src/components/LoginConsent/Login/Login.js @@ -4,7 +4,13 @@ import { setExternalAction, setNavigationPath } from '../../../redux/reducers/na import { LoginRender } from './Login.render'; -import { CONSENT_TO_SCOPE, EXTERNAL_ACTION, EXTERNAL_CHAIN_START, REDIRECT } from '../../../utils/constants' +import { + CONSENT_TO_SCOPE, + EXTERNAL_ACTION, + EXTERNAL_CHAIN_START, + REDIRECT, + PROVISIONING_FORM +} from '../../../utils/constants' import { checkAndUpdateIdentities, setActiveVerusId } from '../../../redux/reducers/identity/identity.actions'; import { signResponse } from '../../../rpc/calls/signResponse'; import { setError } from '../../../redux/reducers/error/error.actions'; @@ -47,6 +53,7 @@ class Login extends React.Component { this.canProvision = canProvision; this.tryLogin = this.tryLogin.bind(this); + this.tryProvision = this.tryProvision.bind(this); this.selectId = this.selectId.bind(this); this.cancel = this.cancel.bind(this); } @@ -89,6 +96,10 @@ class Login extends React.Component { }) } + tryProvision() { + this.props.dispatch(setNavigationPath(PROVISIONING_FORM)); + } + cancel() { this.props.dispatch(setNavigationPath(CONSENT_TO_SCOPE)); } diff --git a/src/components/LoginConsent/Login/Login.render.js b/src/components/LoginConsent/Login/Login.render.js index b4c8ee8..33431b5 100644 --- a/src/components/LoginConsent/Login/Login.render.js +++ b/src/components/LoginConsent/Login/Login.render.js @@ -56,6 +56,7 @@ export const LoginRender = function () { alignItems: "flex-start", justifyContent: "center", flex: 1, + paddingTop: 2, }} > @@ -89,6 +90,29 @@ export const LoginRender = function () {
+
+ {this.canProvision ? : {}} +
), + [PROVISIONING_FORM]: ( + + ), + [PROVISIONING_CONFIRM]: ( + + ), + [PROVISIONING_RESULT]: ( + + ), [LOADING_DISPLAY]: ( ) diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js new file mode 100644 index 0000000..b314dc5 --- /dev/null +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js @@ -0,0 +1,43 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { ProvisionIdentityConfirmRender } from './ProvisionIdentityConfirm.render'; +import { PROVISIONING_FORM, PROVISIONING_RESULT } from '../../../../utils/constants'; +import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; + +class ProvisionIdentityConfirm extends React.Component { + constructor(props) { + super(props); + + this.state = { + loading: false + } + + this.submitData = this.submitData.bind(this); + this.cancel = this.cancel.bind(this); + } + + submitData() { + this.props.dispatch(setNavigationPath(PROVISIONING_RESULT)); + } + + cancel() { + this.props.dispatch(setNavigationPath(PROVISIONING_FORM)); + } + + render() { + return ProvisionIdentityConfirmRender.call(this); + } +} + +// TODO: Figure out if this should be different +const mapStateToProps = (state) => { + return { + path: state.navigation.path, + loginConsentRequest: state.rpc.loginConsentRequest, + identities: state.identity.identities, + activeIdentity: state.identity.activeIdentity, + originApp: state.origin.originApp + }; +}; + +export default connect(mapStateToProps)(ProvisionIdentityConfirm); \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js new file mode 100644 index 0000000..2899b89 --- /dev/null +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js @@ -0,0 +1,107 @@ +import React from "react"; +import Button from '@mui/material/Button'; +import { VerusIdLogo } from "../../../../images"; + +export const ProvisionIdentityConfirmRender = function () { + const { loading } = this.state + + return ( +
+
+ +
+
+ {`Provisioning Confirm`} +
+
+ +
+ +
+
+ + +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js new file mode 100644 index 0000000..4563717 --- /dev/null +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js @@ -0,0 +1,43 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { ProvisionIdentityFormRender } from './ProvisionIdentityForm.render'; +import { PROVISIONING_CONFIRM, SELECT_LOGIN_ID } from '../../../../utils/constants'; +import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; + +class ProvisionIdentityForm extends React.Component { + constructor(props) { + super(props); + + this.state = { + loading: false + } + + this.submitData = this.submitData.bind(this); + this.cancel = this.cancel.bind(this); + } + + submitData() { + this.props.dispatch(setNavigationPath(PROVISIONING_CONFIRM)); + } + + cancel() { + this.props.dispatch(setNavigationPath(SELECT_LOGIN_ID)); + } + + render() { + return ProvisionIdentityFormRender.call(this); + } +} + +// TODO: Figure out if this should be different +const mapStateToProps = (state) => { + return { + path: state.navigation.path, + loginConsentRequest: state.rpc.loginConsentRequest, + identities: state.identity.identities, + activeIdentity: state.identity.activeIdentity, + originApp: state.origin.originApp + }; +}; + +export default connect(mapStateToProps)(ProvisionIdentityForm); \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js new file mode 100644 index 0000000..e5cf08b --- /dev/null +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js @@ -0,0 +1,107 @@ +import React from "react"; +import Button from '@mui/material/Button'; +import { VerusIdLogo } from "../../../../images"; + +export const ProvisionIdentityFormRender = function () { + const { loading } = this.state + + return ( +
+
+ +
+
+ {`Provisioning Form`} +
+
+ +
+ +
+
+ + +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js new file mode 100644 index 0000000..2d852d6 --- /dev/null +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js @@ -0,0 +1,43 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { ProvisionIdentityResultRender } from './ProvisionIdentityResult.render'; +import { PROVISIONING_CONFIRM, SELECT_LOGIN_ID } from '../../../../utils/constants'; +import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; + +class ProvisionIdentityResult extends React.Component { + constructor(props) { + super(props); + + this.state = { + loading: false + } + + this.finishSend = this.finishSend.bind(this); + this.cancel = this.cancel.bind(this); + } + + finishSend() { + this.props.dispatch(setNavigationPath(SELECT_LOGIN_ID)); + } + + cancel() { + this.props.dispatch(setNavigationPath(PROVISIONING_CONFIRM)); + } + + render() { + return ProvisionIdentityResultRender.call(this); + } +} + +// TODO: Figure out if this should be different +const mapStateToProps = (state) => { + return { + path: state.navigation.path, + loginConsentRequest: state.rpc.loginConsentRequest, + identities: state.identity.identities, + activeIdentity: state.identity.activeIdentity, + originApp: state.origin.originApp + }; +}; + +export default connect(mapStateToProps)(ProvisionIdentityResult); \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js new file mode 100644 index 0000000..d494c5c --- /dev/null +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js @@ -0,0 +1,107 @@ +import React from "react"; +import Button from '@mui/material/Button'; +import { VerusIdLogo } from "../../../../images"; + +export const ProvisionIdentityResultRender = function () { + const { loading } = this.state + + return ( +
+
+ +
+
+ {`Provisioning Result`} +
+
+ +
+ +
+
+ + +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/src/utils/constants.js b/src/utils/constants.js index 41beb2a..de5275f 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -57,6 +57,9 @@ export const SELECT_LOGIN_ID = "SELECT_LOGIN_ID" export const CONSENT_TO_SCOPE = "CONSENT_TO_SCOPE" export const LOADING_DISPLAY = "LOADING_DISPLAY" export const REDIRECT = "REDIRECT" +export const PROVISIONING_FORM = "PROVISIONING_FORM" +export const PROVISIONING_CONFIRM = "PROVISIONING_CONFIRM" +export const PROVISIONING_RESULT = "PROVISIONING_RESULT" export const ZC_PARAMS = { DOWNLOADING_ZCASH_KEYS: 'Downloading Zcash keys', From a9be709743ef4b7a8cc290f1ef3244128bf9ca35 Mon Sep 17 00:00:00 2001 From: mcstoer <49734282+mcstoer@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:14:04 -0800 Subject: [PATCH 03/12] Add WIP provisioning identity form. --- .../ProvisionIdentityForm.js | 51 ++++++++++++++++++- .../ProvisionIdentityForm.render.js | 31 +++++++++-- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js index 4563717..e3e4a34 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js @@ -3,19 +3,39 @@ import { connect } from 'react-redux'; import { ProvisionIdentityFormRender } from './ProvisionIdentityForm.render'; import { PROVISIONING_CONFIRM, SELECT_LOGIN_ID } from '../../../../utils/constants'; import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; +import { + ID_ADDRESS_VDXF_KEY, + ID_SYSTEMID_VDXF_KEY, + ID_FULLYQUALIFIEDNAME_VDXF_KEY, + ID_PARENT_VDXF_KEY, + LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, +} from 'verus-typescript-primitives'; class ProvisionIdentityForm extends React.Component { constructor(props) { super(props); + const { request } = props.loginConsentRequest; + + const hasProvisioningInfo = request != null && request.challenge.provisioning_info != null; + this.state = { - loading: false - } + loading: false, + assignedIdentity: null, + hasProvisioningInfo: hasProvisioningInfo, + }; this.submitData = this.submitData.bind(this); this.cancel = this.cancel.bind(this); } + componentDidMount() { + const { request } = this.props.loginConsentRequest; + const provInfo = updateProvisioningInfoProcessedData(request); + this.setState(provInfo, () => console.log(this.state)); + const {provAddress, provSystemId, provFqn, provParent, provWebhook} = provInfo; + } + submitData() { this.props.dispatch(setNavigationPath(PROVISIONING_CONFIRM)); } @@ -29,6 +49,33 @@ class ProvisionIdentityForm extends React.Component { } } +const hasProvisioningInfo = (request) => { + return request != null && request.challenge.provisioning_info != null; +} + +const updateProvisioningInfoProcessedData = (request) => { + if (!hasProvisioningInfo(request)) return; + + const findProvisioningInfo = (key) => + request.challenge.provisioning_info.find( + (x) => x.vdxfkey === key.vdxfid + ); + + const provAddress = findProvisioningInfo(ID_ADDRESS_VDXF_KEY); + const provSystemId = findProvisioningInfo(ID_SYSTEMID_VDXF_KEY); + const provFqn = findProvisioningInfo(ID_FULLYQUALIFIEDNAME_VDXF_KEY); + const provParent = findProvisioningInfo(ID_PARENT_VDXF_KEY); + const provWebhook = findProvisioningInfo(LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY); + + return { + provAddress: provAddress, + provSystemId: provSystemId, + provFqn: provFqn, + provParent: provParent, + provWebhook: provWebhook, + }; +}; + // TODO: Figure out if this should be different const mapStateToProps = (state) => { return { diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js index e5cf08b..a9caa1f 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js @@ -1,5 +1,6 @@ -import React from "react"; +import React, { useState } from "react"; import Button from '@mui/material/Button'; +import TextField from '@mui/material/TextField'; import { VerusIdLogo } from "../../../../images"; export const ProvisionIdentityFormRender = function () { @@ -41,7 +42,7 @@ export const ProvisionIdentityFormRender = function () { padding: 8, }} > - {`Provisioning Form`} + {`Request VerusID`}
@@ -55,7 +56,31 @@ export const ProvisionIdentityFormRender = function () { flex: 1, paddingTop: 2, }} - > + > + { + const text = event.target.value + console.log("text", text); + if (this.state.assignedIdentity == null && !text.endsWith("@")) { + this.setState({ + assignedIdentity: text + }); + } + }} + > + +
Date: Fri, 29 Nov 2024 15:53:16 -0800 Subject: [PATCH 04/12] Finish implementing the provisioning form by remaking the component as a functional component and using a modified implementation of the mobile app's component. --- .../ProvisionIdentityConfirm.js | 6 +- .../ProvisionIdentityForm.js | 369 ++++++++++++++++-- .../ProvisionIdentityForm.render.js | 132 ------- .../reducers/provision/provision.actions.js | 22 ++ .../reducers/provision/provision.reducer.js | 27 ++ .../reducers/provision/provision.types.js | 2 + src/redux/rootReducer.js | 4 +- src/rpc/calls/getAddresses.js | 27 ++ src/rpc/calls/getIdentity.js | 3 +- src/utils/constants.js | 1 + 10 files changed, 429 insertions(+), 164 deletions(-) delete mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js create mode 100644 src/redux/reducers/provision/provision.actions.js create mode 100644 src/redux/reducers/provision/provision.reducer.js create mode 100644 src/redux/reducers/provision/provision.types.js create mode 100644 src/rpc/calls/getAddresses.js diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js index b314dc5..5ef6fe2 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js @@ -12,6 +12,9 @@ class ProvisionIdentityConfirm extends React.Component { loading: false } + console.log(props.loginConsentRequest) + console.log(props.provisioningInfo) + this.submitData = this.submitData.bind(this); this.cancel = this.cancel.bind(this); } @@ -36,7 +39,8 @@ const mapStateToProps = (state) => { loginConsentRequest: state.rpc.loginConsentRequest, identities: state.identity.identities, activeIdentity: state.identity.activeIdentity, - originApp: state.origin.originApp + originApp: state.origin.originApp, + provisioningInfo: state.provision.provisioningInfo }; }; diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js index e3e4a34..e58cf34 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js @@ -1,6 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { ProvisionIdentityFormRender } from './ProvisionIdentityForm.render'; +import React, { useEffect, useState } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; import { PROVISIONING_CONFIRM, SELECT_LOGIN_ID } from '../../../../utils/constants'; import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; import { @@ -9,44 +8,356 @@ import { ID_FULLYQUALIFIEDNAME_VDXF_KEY, ID_PARENT_VDXF_KEY, LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, + fromBase58Check, } from 'verus-typescript-primitives'; +import Button from '@mui/material/Button'; +import TextField from '@mui/material/TextField'; +import { VerusIdLogo } from "../../../../images"; +import { getIdentity } from '../../../../rpc/calls/getIdentity'; +import { InputAdornment } from '@mui/material'; +import { setIdentityToProvisionField, setProvisioningInfo } from '../../../../redux/reducers/provision/provision.actions'; +import { getAddresses } from '../../../../rpc/calls/getAddresses'; -class ProvisionIdentityForm extends React.Component { - constructor(props) { - super(props); +const ProvisionIdentityForm = (props) => { + const dispatch = useDispatch(); + const { request } = useSelector((state) => state.rpc.loginConsentRequest); + const identityToProvisionField = useSelector((state) => state.provision.identityToProvisionField); - const { request } = props.loginConsentRequest; + const hasProvisioningInfo = request != null && request.challenge.provisioning_info != null; - const hasProvisioningInfo = request != null && request.challenge.provisioning_info != null; + const [state, setState] = useState({ + friendlyNameMap: {}, + provisioningInfo: hasProvisioningInfo + ? request.challenge.provisioning_info + : [], + provAddress: null, + provSystemId: null, + provFqn: null, + provParent: null, + provWebhook: null, + assignedIdentity: null, + loading: false, + parentname: '', + addresses: {}, + }); - this.state = { - loading: false, - assignedIdentity: null, - hasProvisioningInfo: hasProvisioningInfo, + const [formError, setFormError] = useState({ + error: false, + description: '' + }); + + useEffect(() => { + + // Extract the provisioning info from the request. + const updateProvisioningInfoProcessedData = async () => { + if (!hasProvisioningInfo) return; + + const findProvisioningInfo = (key) => + request.challenge.provisioning_info.find( + (x) => x.vdxfkey === key.vdxfid + ); + + const provAddress = findProvisioningInfo(ID_ADDRESS_VDXF_KEY); + const provSystemId = findProvisioningInfo(ID_SYSTEMID_VDXF_KEY); + const provFqn = findProvisioningInfo(ID_FULLYQUALIFIEDNAME_VDXF_KEY); + const provParent = findProvisioningInfo(ID_PARENT_VDXF_KEY); + const provWebhook = findProvisioningInfo(LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY); + + setState((currentState) => ({ + ...currentState, + provAddress, + provSystemId, + provFqn, + provParent, + provWebhook, + })); }; - this.submitData = this.submitData.bind(this); - this.cancel = this.cancel.bind(this); - } + const initializeState = async () => { + await updateProvisioningInfoProcessedData(); - componentDidMount() { - const { request } = this.props.loginConsentRequest; - const provInfo = updateProvisioningInfoProcessedData(request); - this.setState(provInfo, () => console.log(this.state)); - const {provAddress, provSystemId, provFqn, provParent, provWebhook} = provInfo; - } + // Get the addresses of the wallet so the identity can be provisioned to one of them. + const addresses = await getAddresses(request.chainTicker, true, false); + setState((currentState) => ({ + ...currentState, + addresses + })); + + setState((currentState) => { + const provIdKey = currentState.provAddress || currentState.provFqn || null; + + const identitykeys = provIdKey == null ? [] : [provIdKey]; + if (currentState.provParent) identitykeys.push(currentState.provParent); + if (currentState.provSystemId) identitykeys.push(currentState.provSystemId); + + const fetchIdentities = async () => { + let friendlyNameMap = currentState.friendlyNameMap; + let assignedIdentity = null; + let parentname = ''; - submitData() { - this.props.dispatch(setNavigationPath(PROVISIONING_CONFIRM)); - } + for (const idKey of identitykeys) { + if (idKey != null) { + const identity = await getIdentity(request.chainTicker, idKey.data); + + if (identity) { + friendlyNameMap[identity.identity.identityaddress] = + identity.identity.name; + + if (provIdKey != null && idKey.data === provIdKey.data) { + assignedIdentity = identity.identity.identityaddress; + dispatch(setIdentityToProvisionField(identity.identity.name)); + } + if (idKey.vdxfkey === ID_PARENT_VDXF_KEY.vdxfid) { + parentname = `.${identity.fullyqualifiedname}` + } + } + } + } + + return { friendlyNameMap, assignedIdentity, parentname }; + }; + + fetchIdentities().then(({ parentname, friendlyNameMap, assignedIdentity }) => { + setState({ ...currentState, friendlyNameMap, assignedIdentity, loading: false, parentname }); + }); + + return { ...currentState, loading: true }; + }); + }; + + initializeState(); + }, []); + + const formHasError = () => { + const identity = identityToProvisionField?.trim() || ''; + + if (!identity) { + setFormError({ + error: true, + description: 'Identity is a required field.' + }); + return true; + } + + try { + fromBase58Check(identity); + if (state.parentname) { + setFormError({ + error: true, + description: 'i-Address cannot have a parent name.' + }); + return true; + } + } catch (e) { + const formattedId = state.parentname ? `${identity}${state.parentname}` : `${identity}@`; + if (!formattedId.endsWith('@')) { + setFormError({ + error: true, + description: 'Identity not a valid identity handle or iAddress.' + }); + return true; + } + } + + // Clear any old errors. + setFormError({ + error: false, + description: '' + }); + + return false; + }; + + const submitData = async () => { + if (formHasError()) return; - cancel() { - this.props.dispatch(setNavigationPath(SELECT_LOGIN_ID)); + setState((currentState) => {return { ...currentState, loading: true}}); + + const identity = identityToProvisionField; + + let formattedId; + + try { + fromBase58Check(identity); + formattedId = identity; + } catch(e) { + formattedId = state.parentname ? `${identity}${state.parentname}` : `${identity}.${request.chainName}@`; + } + + let identityError = false; + + try { + await getIdentity(request.chainTicker, formattedId); + + // If we get a result back, that means the identity must already exist. + identityError = true; + setFormError({ + error: true, + description: 'Identity name taken, please select a different name.' + }); + + } catch (e) { + // Check for an invalid identity, otherwise the identity is valid since it does not already exist + // and it is using valid characters. + if (e.message.includes("Identity parameter must be valid friendly name or identity address")) { + identityError = true; + setFormError({ + error: true, + description: 'Identity name must not include / : * ? " < > | @ .' + }); + } + } + + setState((currentState) => {return { ...currentState, loading: false}}); + + if (!identityError) { + // Find a public address to provision the identity to. + const publicAddresses = state.addresses.public.filter((address) => address.tag === "public"); + + dispatch(setProvisioningInfo({ + primaryAddress: publicAddresses[0], + provAddress: state.provAddress, + provSystemId: state.provSystemId, + provFqn: state.provFqn, + provParent: state.provParent, + provWebhook: state.provWebhook, + friendlyNameMap: state.friendlyNameMap + })); + dispatch(setNavigationPath(PROVISIONING_CONFIRM)); + } } - render() { - return ProvisionIdentityFormRender.call(this); + const cancel = () => { + dispatch(setNavigationPath(SELECT_LOGIN_ID)); } + + return ( +
+
+ +
+
+ {`Request VerusID`} +
+
+ +
+ { + const text = event.target.value; + if (state.assignedIdentity == null && !text.endsWith("@")) { + dispatch(setIdentityToProvisionField(text)); + } + }} + InputProps={{ + endAdornment: {state.parentname ? state.parentname : ``}, + }} + > + +
+ +
+
+ + +
+
+
+
+ ); } const hasProvisioningInfo = (request) => { @@ -87,4 +398,4 @@ const mapStateToProps = (state) => { }; }; -export default connect(mapStateToProps)(ProvisionIdentityForm); \ No newline at end of file +export default ProvisionIdentityForm; \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js deleted file mode 100644 index a9caa1f..0000000 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.render.js +++ /dev/null @@ -1,132 +0,0 @@ -import React, { useState } from "react"; -import Button from '@mui/material/Button'; -import TextField from '@mui/material/TextField'; -import { VerusIdLogo } from "../../../../images"; - -export const ProvisionIdentityFormRender = function () { - const { loading } = this.state - - return ( -
-
- -
-
- {`Request VerusID`} -
-
- -
- { - const text = event.target.value - console.log("text", text); - if (this.state.assignedIdentity == null && !text.endsWith("@")) { - this.setState({ - assignedIdentity: text - }); - } - }} - > - -
- -
-
- - -
-
-
-
- ); -}; \ No newline at end of file diff --git a/src/redux/reducers/provision/provision.actions.js b/src/redux/reducers/provision/provision.actions.js new file mode 100644 index 0000000..b9df906 --- /dev/null +++ b/src/redux/reducers/provision/provision.actions.js @@ -0,0 +1,22 @@ +import { + SET_IDENTITY_TO_PROVISION_FIELD, + SET_PROVISONING_INFO +} from "./provision.types" + +export const setIdentityToProvisionField = (idToProvisionField) => { + return { + type: SET_IDENTITY_TO_PROVISION_FIELD, + payload: { + idToProvisionField + } + } +} + +export const setProvisioningInfo= (provisioningInfo) => { + return { + type: SET_PROVISONING_INFO, + payload: { + provisioningInfo + } + } +} \ No newline at end of file diff --git a/src/redux/reducers/provision/provision.reducer.js b/src/redux/reducers/provision/provision.reducer.js new file mode 100644 index 0000000..ecc493b --- /dev/null +++ b/src/redux/reducers/provision/provision.reducer.js @@ -0,0 +1,27 @@ +/* + This reducer contains the information about provisioning. +*/ +import { + SET_IDENTITY_TO_PROVISION_FIELD, + SET_PROVISONING_INFO +} from "./provision.types"; + +export const provision = (state = { + identityToProvisionField: "", + provisioningInfo: {}, +}, action) => { + switch (action.type) { + case SET_IDENTITY_TO_PROVISION_FIELD: + return { + ...state, + identityToProvisionField: action.payload.idToProvisionField + } + case SET_PROVISONING_INFO: + return { + ...state, + provisioningInfo: action.payload.provisioningInfo + } + default: + return state; + } +} \ No newline at end of file diff --git a/src/redux/reducers/provision/provision.types.js b/src/redux/reducers/provision/provision.types.js new file mode 100644 index 0000000..164e22e --- /dev/null +++ b/src/redux/reducers/provision/provision.types.js @@ -0,0 +1,2 @@ +export const SET_IDENTITY_TO_PROVISION_FIELD = "SET_IDENTITY_TO_PROVISION_FIELD" +export const SET_PROVISONING_INFO = "SET_PROVISONING_INFO" \ No newline at end of file diff --git a/src/redux/rootReducer.js b/src/redux/rootReducer.js index fd41f5e..81009ad 100644 --- a/src/redux/rootReducer.js +++ b/src/redux/rootReducer.js @@ -4,13 +4,15 @@ import { rpc } from './reducers/rpc/rpc.reducer'; import { identity } from './reducers/identity/identity.reducer'; import { origin } from './reducers/origin/origin.reducer'; import { error } from './reducers/error/error.reducer'; +import { provision } from './reducers/provision/provision.reducer'; const rootReducer = combineReducers({ navigation, rpc, identity, origin, - error + error, + provision }); export default rootReducer; \ No newline at end of file diff --git a/src/rpc/calls/getAddresses.js b/src/rpc/calls/getAddresses.js new file mode 100644 index 0000000..88060ae --- /dev/null +++ b/src/rpc/calls/getAddresses.js @@ -0,0 +1,27 @@ +import { API_GET_ADDRESSES, NATIVE, POST } from "../../utils/constants" +import { getApiData } from "../callCreator" + +/** + * Gets addresses of the current wallet with the options to include private addresses + * and/or include private balances. + */ +export const getAddresses = async (chainId, includePrivateAddresses, includePrivateBalances) => { + try { + const res = await getApiData( + NATIVE, + API_GET_ADDRESSES, + { + chainTicker: chainId, + includePrivateAddresses: includePrivateAddresses, + includePrivateBalances, includePrivateBalances + }, + POST, + true + ); + if (res.msg !== "success") throw new Error(res.result); + else return res.result; + } catch (e) { + console.error(e.message); + throw new Error(e.message); + } +} \ No newline at end of file diff --git a/src/rpc/calls/getIdentity.js b/src/rpc/calls/getIdentity.js index 7172a17..d64317b 100644 --- a/src/rpc/calls/getIdentity.js +++ b/src/rpc/calls/getIdentity.js @@ -19,7 +19,8 @@ export const getIdentity = async (chainId, id) => { if (res.msg !== "success") throw new Error(res.result); else return res.result; } catch (e) { - console.error(e.message); + // Don't console log the error since the error can be used to determine if + // an identity already exists when provisioning. throw new Error(e.message); } } \ No newline at end of file diff --git a/src/utils/constants.js b/src/utils/constants.js index de5275f..aa6b6ce 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -20,6 +20,7 @@ export const API_CLOSE_PLUGIN = 'plugin/close' export const API_ACTIVATE_COIN = 'coins/activate' export const API_CHECK_ZCASH_PARAMS = 'zcashparamsexist' export const API_DL_ZCASH_PARAMS = 'zcparamsdl' +export const API_GET_ADDRESSES = "get_addresses" export const API_GET_BLOCK = 'get_block' export const API_GET_CURRENCY = 'get_currency' export const API_GET_IDENTITIES = 'get_identities' From 84d5a4d9db0b277c71bbea3b588a3c2023b83e9b Mon Sep 17 00:00:00 2001 From: mcstoer <49734282+mcstoer@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:00:12 -0800 Subject: [PATCH 05/12] Add WIP version of the confirmation screen for provisioning. --- .../ProvisionIdentityConfirm.js | 359 ++++++++++++++++-- .../ProvisionIdentityConfirm.render.js | 107 ------ .../ProvisionIdentityForm.js | 38 -- 3 files changed, 325 insertions(+), 179 deletions(-) delete mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js index 5ef6fe2..7e30a7b 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js @@ -1,47 +1,338 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { ProvisionIdentityConfirmRender } from './ProvisionIdentityConfirm.render'; +import React, { useState } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; import { PROVISIONING_FORM, PROVISIONING_RESULT } from '../../../../utils/constants'; import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; +import Button from '@mui/material/Button'; +import { VerusIdLogo } from "../../../../images"; +import Card from '@mui/material/Card'; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import ListItemText from '@mui/material/ListItemText'; +import Divider from '@mui/material/Divider'; +import Box from '@mui/material/Box' +import { + LOGIN_CONSENT_CONTEXT_VDXF_KEY, + LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, + LoginConsentProvisioningRequest, + LoginConsentProvisioningChallenge, + LoginConsentRequest +} from 'verus-typescript-primitives'; +import { getIdentity } from '../../../../rpc/calls/getIdentity'; -class ProvisionIdentityConfirm extends React.Component { - constructor(props) { - super(props); +const ProvisionIdentityConfirm = (props) => { + const dispatch = useDispatch(); + const { request } = useSelector((state) => state.rpc.loginConsentRequest); + const provisioningInfo = useSelector((state) => state.provision.provisioningInfo); + const identityToProvisionField = useSelector((state) => state.provision.identityToProvisionField); - this.state = { - loading: false - } + console.log(provisioningInfo); - console.log(props.loginConsentRequest) - console.log(props.provisioningInfo) + const { + primaryAddress, + provAddress, + provSystemId, + provFqn, + provParent, + provWebhook, + friendlyNameMap, + } = provisioningInfo; - this.submitData = this.submitData.bind(this); - this.cancel = this.cancel.bind(this); - } + const displayIdentity = provFqn + ? provFqn.data + : friendlyNameMap[ + identityToProvisionField + ] + ? `${ + friendlyNameMap[ + identityToProvisionField + ] + }@` + : identityToProvisionField; - submitData() { - this.props.dispatch(setNavigationPath(PROVISIONING_RESULT)); - } + const displayParent = provParent != null && friendlyNameMap[provParent.data] + ? friendlyNameMap[provParent.data] + : null; + + const displaySystemid = provSystemId != null && friendlyNameMap[provSystemId.data] + ? friendlyNameMap[provSystemId.data] + : null; + + const [state, setState] = useState({ + loading: false, + }); - cancel() { - this.props.dispatch(setNavigationPath(PROVISIONING_FORM)); + const cancel = () => { + dispatch(setNavigationPath(PROVISIONING_FORM)); } - render() { - return ProvisionIdentityConfirmRender.call(this); - } -} + const submitData = async () => { + setState({ loading: false}); + + const submissionSuccess = (response, requestedFqn) => { + setState({ loading: false}); + /* + this.props.navigation.navigate(SEND_MODAL_FORM_STEP_RESULT, { + response: response, + fullyQualifiedName: requestedFqn, + success: true + }); + */ + } + + const submissionError = (msg) => { + console.error('Error', msg); + + setState({ loading: false}); + } + + try { + const loginRequest = new LoginConsentRequest(request) + + const webhookSubject = loginRequest.challenge.provisioning_info ? loginRequest.challenge.provisioning_info.find(x => { + return x.vdxfkey === LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY.vdxfid + }) : null + + if (webhookSubject == null) throw new Error("No endpoint for ID provisioning") + + const webhookUrl = webhookSubject.data -// TODO: Figure out if this should be different -const mapStateToProps = (state) => { - return { - path: state.navigation.path, - loginConsentRequest: state.rpc.loginConsentRequest, - identities: state.identity.identities, - activeIdentity: state.identity.activeIdentity, - originApp: state.origin.originApp, - provisioningInfo: state.provision.provisioningInfo + const identity = + identityToProvisionField != null + ? identityToProvisionField.trim() + : ''; + + let identityName; + let isIAddress; + let parent; + let systemid; + let nameId; + let requestedFqn; + + try { + fromBase58Check(identity); + isIAddress = true; + } catch (e) { + isIAddress = false; + } + + if (isIAddress) { + const identityObj = await getIdentity(request.chainTicker, identity); + + // if (identityObj.error) throw new Error(identityObj.error.message) + + identityName = identityObj.identity.name; + parent = identityObj.identity.parent; + systemid = identityObj.identity.systemid; + nameId = identity; + requestedFqn = identityObj.fullyqualifiedname; + + } else { + identityName = identity.split("@")[0]; + parent = provParent ? provParent.data : null; + systemid = provSystemId ? provSystemId.data : null; + const parentObj = await getIdentity(request.chainTicker, parent ? parent : loginRequest.system_id); + + requestedFqn = `${identityName.split(".")[0]}.${parentObj.fullyqualifiedname}`; + // TODO: Implement getVdxfId + nameId = (await getVdxfId(coinObj.system_id, requestedFqn)).result.vdxfid; + } + + const provisionRequest = new LoginConsentProvisioningRequest({ + signing_address: primaryAddress, + + challenge: LoginConsentProvisioningChallenge({ + challenge_id: loginRequest.challenge.challenge_id, + created_at: Number((Date.now() / 1000).toFixed(0)), + name: identityName, + system_id: systemid, + parent: parent + }), + }); + + const res = provisionRequest; + console.log(res) + + /* + const signedRequest = await signIdProvisioningRequest(coinObj, provisionRequest); + + const res = await axios.post( + webhookUrl, + signedRequest + ); + + const provisioningName = (await getIdentity(coinObj.system_id, loginRequest.signing_id)).result.identity.name; + const newLoadingNotification = new LoadingNotification(); + + await handleProvisioningResponse(coinObj, res.data, loginRequest.toBuffer().toString('base64'), + this.props.sendModal.data.fromService, provisioningName, newLoadingNotification.uid, nameId, requestedFqn, async () => { + + newLoadingNotification.body = ""; + let formattedName = '' + const lastDotIndex = requestedFqn.lastIndexOf('.'); + if (lastDotIndex === -1) formattedName = requestedFqn; // return the original string if there's no dot + else formattedName = requestedFqn.substring(0, lastDotIndex); + + newLoadingNotification.title = [`${formattedName}@`, ` is being provisioned by `, `${provisioningName}@`] + newLoadingNotification.acchash = this.props.activeAccount.accountHash; + newLoadingNotification.icon = NOTIFICATION_ICON_VERUSID; + + dispatchAddNotification(newLoadingNotification); + }); + */ + submissionSuccess(res.data, requestedFqn) + } catch (e) { + submissionError(e.message) + } }; -}; + + + return ( +
+
+ +
+
+ {`Review Provisioning Request`} +
+
+ + + + + + + + {provAddress && + + + + + + + + } + + + + + + {displayParent && + + + + + + + + } + {provFqn && + + + + + + + + } + {displaySystemid && + + + + + + + + } + + + + +
+
+ + +
+
+
+
+ ); +} -export default connect(mapStateToProps)(ProvisionIdentityConfirm); \ No newline at end of file +export default ProvisionIdentityConfirm; \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js deleted file mode 100644 index 2899b89..0000000 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.render.js +++ /dev/null @@ -1,107 +0,0 @@ -import React from "react"; -import Button from '@mui/material/Button'; -import { VerusIdLogo } from "../../../../images"; - -export const ProvisionIdentityConfirmRender = function () { - const { loading } = this.state - - return ( -
-
- -
-
- {`Provisioning Confirm`} -
-
- -
- -
-
- - -
-
-
-
- ); -}; \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js index e58cf34..6eb201f 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js @@ -360,42 +360,4 @@ const ProvisionIdentityForm = (props) => { ); } -const hasProvisioningInfo = (request) => { - return request != null && request.challenge.provisioning_info != null; -} - -const updateProvisioningInfoProcessedData = (request) => { - if (!hasProvisioningInfo(request)) return; - - const findProvisioningInfo = (key) => - request.challenge.provisioning_info.find( - (x) => x.vdxfkey === key.vdxfid - ); - - const provAddress = findProvisioningInfo(ID_ADDRESS_VDXF_KEY); - const provSystemId = findProvisioningInfo(ID_SYSTEMID_VDXF_KEY); - const provFqn = findProvisioningInfo(ID_FULLYQUALIFIEDNAME_VDXF_KEY); - const provParent = findProvisioningInfo(ID_PARENT_VDXF_KEY); - const provWebhook = findProvisioningInfo(LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY); - - return { - provAddress: provAddress, - provSystemId: provSystemId, - provFqn: provFqn, - provParent: provParent, - provWebhook: provWebhook, - }; -}; - -// TODO: Figure out if this should be different -const mapStateToProps = (state) => { - return { - path: state.navigation.path, - loginConsentRequest: state.rpc.loginConsentRequest, - identities: state.identity.identities, - activeIdentity: state.identity.activeIdentity, - originApp: state.origin.originApp - }; -}; - export default ProvisionIdentityForm; \ No newline at end of file From cd1a498f657c38b8d55838ea6b85448d41a576fa Mon Sep 17 00:00:00 2001 From: mcstoer <49734282+mcstoer@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:52:25 -0800 Subject: [PATCH 06/12] Add first working version of provisioning. --- package.json | 6 + .../ProvisionIdentityConfirm.js | 203 +-- .../ProvisionIdentityForm.js | 95 +- .../ProvisionIdentityResult.js | 198 ++- src/containers/SnackbarAlert.js | 17 + src/env.js | 2 +- .../reducers/provision/provision.actions.js | 44 +- .../reducers/provision/provision.reducer.js | 49 +- .../reducers/provision/provision.types.js | 7 +- src/rpc/calls/getVdxfId.js | 26 + src/rpc/calls/signIdProvisioningRequest.js | 26 + src/rpc/calls/verifyIdProvisioningResponse.js | 21 + src/themes/main.js | 1 - src/utils/constants.js | 3 + yarn.lock | 1229 ++++++++++++++++- 15 files changed, 1737 insertions(+), 190 deletions(-) create mode 100644 src/containers/SnackbarAlert.js create mode 100644 src/rpc/calls/getVdxfId.js create mode 100644 src/rpc/calls/signIdProvisioningRequest.js create mode 100644 src/rpc/calls/verifyIdProvisioningResponse.js diff --git a/package.json b/package.json index b9a1ec7..bc7ca8e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@testing-library/jest-dom": "5.11.4", "@testing-library/react": "11.1.0", "@testing-library/user-event": "12.1.10", + "axios": "1.7.7", "base64url": "https://github.com/VerusCoin/base64url.git", "bignumber.js": "9.1.2", "blake2b": "https://github.com/VerusCoin/blake2b.git", @@ -68,8 +69,13 @@ "@babel/polyfill": "7.0.0", "@babel/preset-env": "7.0.0", "@babel/preset-react": "7.0.0", + "@eslint/js": "9.16.0", + "@stylistic/eslint-plugin-js": "2.11.0", "babel-loader": "8.3.0", "css-loader": "4.3.0", + "eslint": "9.16.0", + "eslint-plugin-react": "7.37.2", + "globals": "15.13.0", "html-webpack-plugin": "4.5.2", "mini-css-extract-plugin": "1.6.2", "node-sass": "9.0.0", diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js index 7e30a7b..e131815 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js @@ -9,24 +9,32 @@ import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; import Divider from '@mui/material/Divider'; -import Box from '@mui/material/Box' +import Box from '@mui/material/Box'; import { - LOGIN_CONSENT_CONTEXT_VDXF_KEY, LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, LoginConsentProvisioningRequest, LoginConsentProvisioningChallenge, - LoginConsentRequest + LoginConsentRequest, + fromBase58Check, + LoginConsentProvisioningResponse, + LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED, + LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL, + LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE, } from 'verus-typescript-primitives'; import { getIdentity } from '../../../../rpc/calls/getIdentity'; +import { getVdxfId } from '../../../../rpc/calls/getVdxfId'; +import { signIdProvisioningRequest } from '../../../../rpc/calls/signIdProvisioningRequest'; +import axios from 'axios'; +import { SnackbarAlert } from '../../../../containers/SnackbarAlert'; +import { verifyIdProvisioningResponse } from '../../../../rpc/calls/verifyIdProvisioningResponse'; +import { setProvisioningName, setProvisioningResponse, setRequestedFqn } from '../../../../redux/reducers/provision/provision.actions'; -const ProvisionIdentityConfirm = (props) => { +const ProvisionIdentityConfirm = () => { const dispatch = useDispatch(); const { request } = useSelector((state) => state.rpc.loginConsentRequest); const provisioningInfo = useSelector((state) => state.provision.provisioningInfo); const identityToProvisionField = useSelector((state) => state.provision.identityToProvisionField); - console.log(provisioningInfo); - const { primaryAddress, provAddress, @@ -37,64 +45,118 @@ const ProvisionIdentityConfirm = (props) => { friendlyNameMap, } = provisioningInfo; - const displayIdentity = provFqn - ? provFqn.data - : friendlyNameMap[ - identityToProvisionField - ] - ? `${ - friendlyNameMap[ - identityToProvisionField - ] - }@` - : identityToProvisionField; - - const displayParent = provParent != null && friendlyNameMap[provParent.data] - ? friendlyNameMap[provParent.data] - : null; + let displayIdentity; - const displaySystemid = provSystemId != null && friendlyNameMap[provSystemId.data] - ? friendlyNameMap[provSystemId.data] - : null; + if (provFqn) { + if (provFqn.data) { + displayIdentity = friendlyNameMap[identityToProvisionField]; + } else { + displayIdentity = `${friendlyNameMap[identityToProvisionField]}@`; + } + } else { + displayIdentity = identityToProvisionField; + } + + let displayParent; + + if (provParent != null) { + if (friendlyNameMap[provParent.data]) { + displayParent = friendlyNameMap[provParent.data]; + } else { + displayParent = provParent.data; + } + } else { + displayParent = null; + } + + let displaySystemid; + + if (provSystemId != null) { + if (friendlyNameMap[provSystemId.data]) { + displaySystemid = friendlyNameMap[provSystemId.data]; + } else { + displaySystemid = provSystemId.data; + } + } else { + displaySystemid = null; + } const [state, setState] = useState({ loading: false, }); + const [submissionError, setSubmissionError] = useState({ + showError: false, + description: '' + }); + + const handleProvisioningResponse = async (response, requestedId, requestedFqn) => { + const res = new LoginConsentProvisioningResponse(response); + + // Check the response to see if it is valid and if there are errors. + const verified = await verifyIdProvisioningResponse(res); + + if (!verified) throw new Error('Failed to verify response from service'); + + const {decision} = res; + const {result} = decision; + const { + error_desc, + state, + } = result; + + if (state === LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED.vdxfid) { + throw new Error(error_desc); + } else if (state === LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL.vdxfid || + state === LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE.vdxfid) { + + if (!result.identity_address && !result.fully_qualified_name) { + throw new Error('Provisioning response did not contain an identity or fully qualified name'); + } + + if (result.identity_address && result.identity_address !== requestedId) { + throw new Error(`Provisioning response identity [${result.identity_address}] address does not match requested identity address[${requestedId}]`); + } + + if (result.fully_qualified_name && result.fully_qualified_name.toLowerCase() !== requestedFqn.toLowerCase()) { + throw new Error(`Provisioning response fully qualified name [${result.fully_qualified_name.toLowerCase()}] does not match requested fully qualified name[${requestedFqn.toLowerCase()}]`); + } + } + }; + const cancel = () => { dispatch(setNavigationPath(PROVISIONING_FORM)); - } + }; const submitData = async () => { setState({ loading: false}); - const submissionSuccess = (response, requestedFqn) => { + const submissionSuccess = (response, requestedFqn, provisioningName) => { setState({ loading: false}); - /* - this.props.navigation.navigate(SEND_MODAL_FORM_STEP_RESULT, { - response: response, - fullyQualifiedName: requestedFqn, - success: true - }); - */ - } + dispatch(setProvisioningResponse(response)); + dispatch(setRequestedFqn(requestedFqn)); + dispatch(setProvisioningName(provisioningName)); + dispatch(setNavigationPath(PROVISIONING_RESULT)); + }; const submissionError = (msg) => { - console.error('Error', msg); - + setSubmissionError({ + showError: true, + description: msg, + }); setState({ loading: false}); - } + }; try { - const loginRequest = new LoginConsentRequest(request) + const loginRequest = new LoginConsentRequest(request); const webhookSubject = loginRequest.challenge.provisioning_info ? loginRequest.challenge.provisioning_info.find(x => { - return x.vdxfkey === LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY.vdxfid - }) : null + return x.vdxfkey === LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY.vdxfid; + }) : null; - if (webhookSubject == null) throw new Error("No endpoint for ID provisioning") + if (webhookSubject == null) throw new Error("No endpoint for ID provisioning"); - const webhookUrl = webhookSubject.data + const webhookUrl = webhookSubject.data; const identity = identityToProvisionField != null @@ -111,14 +173,12 @@ const ProvisionIdentityConfirm = (props) => { try { fromBase58Check(identity); isIAddress = true; - } catch (e) { + } catch { isIAddress = false; } if (isIAddress) { const identityObj = await getIdentity(request.chainTicker, identity); - - // if (identityObj.error) throw new Error(identityObj.error.message) identityName = identityObj.identity.name; parent = identityObj.identity.parent; @@ -133,14 +193,13 @@ const ProvisionIdentityConfirm = (props) => { const parentObj = await getIdentity(request.chainTicker, parent ? parent : loginRequest.system_id); requestedFqn = `${identityName.split(".")[0]}.${parentObj.fullyqualifiedname}`; - // TODO: Implement getVdxfId - nameId = (await getVdxfId(coinObj.system_id, requestedFqn)).result.vdxfid; + nameId = (await getVdxfId(request.chainTicker, requestedFqn)).vdxfid; } const provisionRequest = new LoginConsentProvisioningRequest({ signing_address: primaryAddress, - challenge: LoginConsentProvisioningChallenge({ + challenge: new LoginConsentProvisioningChallenge({ challenge_id: loginRequest.challenge.challenge_id, created_at: Number((Date.now() / 1000).toFixed(0)), name: identityName, @@ -148,40 +207,24 @@ const ProvisionIdentityConfirm = (props) => { parent: parent }), }); - - const res = provisionRequest; - console.log(res) - /* - const signedRequest = await signIdProvisioningRequest(coinObj, provisionRequest); - + const signedRequest = await signIdProvisioningRequest(request.chainTicker, provisionRequest, primaryAddress); + + // The responding server should include the error within the response instead of + // using an error code. const res = await axios.post( webhookUrl, signedRequest ); - const provisioningName = (await getIdentity(coinObj.system_id, loginRequest.signing_id)).result.identity.name; - const newLoadingNotification = new LoadingNotification(); - - await handleProvisioningResponse(coinObj, res.data, loginRequest.toBuffer().toString('base64'), - this.props.sendModal.data.fromService, provisioningName, newLoadingNotification.uid, nameId, requestedFqn, async () => { - - newLoadingNotification.body = ""; - let formattedName = '' - const lastDotIndex = requestedFqn.lastIndexOf('.'); - if (lastDotIndex === -1) formattedName = requestedFqn; // return the original string if there's no dot - else formattedName = requestedFqn.substring(0, lastDotIndex); - - newLoadingNotification.title = [`${formattedName}@`, ` is being provisioned by `, `${provisioningName}@`] - newLoadingNotification.acchash = this.props.activeAccount.accountHash; - newLoadingNotification.icon = NOTIFICATION_ICON_VERUSID; + const provisionResponse = res.data; + await handleProvisioningResponse(provisionResponse, nameId, requestedFqn); - dispatchAddNotification(newLoadingNotification); - }); - */ - submissionSuccess(res.data, requestedFqn) + const provisioningName = (await getIdentity(request.chainTicker, loginRequest.signing_id)).identity.name; + + submissionSuccess(res.data, requestedFqn, provisioningName); } catch (e) { - submissionError(e.message) + submissionError(e.message); } }; @@ -253,7 +296,7 @@ const ProvisionIdentityConfirm = (props) => { - + {displayParent && @@ -285,7 +328,11 @@ const ProvisionIdentityConfirm = (props) => { - + {setSubmissionError(false, '');}} + >
{
diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js index 6eb201f..7274589 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js @@ -17,8 +17,10 @@ import { getIdentity } from '../../../../rpc/calls/getIdentity'; import { InputAdornment } from '@mui/material'; import { setIdentityToProvisionField, setProvisioningInfo } from '../../../../redux/reducers/provision/provision.actions'; import { getAddresses } from '../../../../rpc/calls/getAddresses'; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; -const ProvisionIdentityForm = (props) => { +const ProvisionIdentityForm = () => { const dispatch = useDispatch(); const { request } = useSelector((state) => state.rpc.loginConsentRequest); const identityToProvisionField = useSelector((state) => state.provision.identityToProvisionField); @@ -41,7 +43,7 @@ const ProvisionIdentityForm = (props) => { addresses: {}, }); - const [formError, setFormError] = useState({ + const [formError, setFormError] = useState({ error: false, description: '' }); @@ -74,6 +76,11 @@ const ProvisionIdentityForm = (props) => { }; const initializeState = async () => { + setState((currentState) => ({ + ...currentState, + loading: true, + })); + await updateProvisioningInfoProcessedData(); // Get the addresses of the wallet so the identity can be provisioned to one of them. @@ -108,7 +115,7 @@ const ProvisionIdentityForm = (props) => { dispatch(setIdentityToProvisionField(identity.identity.name)); } if (idKey.vdxfkey === ID_PARENT_VDXF_KEY.vdxfid) { - parentname = `.${identity.fullyqualifiedname}` + parentname = `.${identity.fullyqualifiedname}`; } } } @@ -129,7 +136,7 @@ const ProvisionIdentityForm = (props) => { }, []); const formHasError = () => { - const identity = identityToProvisionField?.trim() || ''; + const identity = identityToProvisionField ? identityToProvisionField.trim() : ''; if (!identity) { setFormError({ @@ -148,7 +155,7 @@ const ProvisionIdentityForm = (props) => { }); return true; } - } catch (e) { + } catch { const formattedId = state.parentname ? `${identity}${state.parentname}` : `${identity}@`; if (!formattedId.endsWith('@')) { setFormError({ @@ -171,7 +178,7 @@ const ProvisionIdentityForm = (props) => { const submitData = async () => { if (formHasError()) return; - setState((currentState) => {return { ...currentState, loading: true}}); + setState((currentState) => {return { ...currentState, loading: true};}); const identity = identityToProvisionField; @@ -180,7 +187,7 @@ const ProvisionIdentityForm = (props) => { try { fromBase58Check(identity); formattedId = identity; - } catch(e) { + } catch { formattedId = state.parentname ? `${identity}${state.parentname}` : `${identity}.${request.chainName}@`; } @@ -208,14 +215,14 @@ const ProvisionIdentityForm = (props) => { } } - setState((currentState) => {return { ...currentState, loading: false}}); + setState((currentState) => {return { ...currentState, loading: false};}); if (!identityError) { // Find a public address to provision the identity to. const publicAddresses = state.addresses.public.filter((address) => address.tag === "public"); dispatch(setProvisioningInfo({ - primaryAddress: publicAddresses[0], + primaryAddress: publicAddresses[0].address, provAddress: state.provAddress, provSystemId: state.provSystemId, provFqn: state.provFqn, @@ -225,11 +232,11 @@ const ProvisionIdentityForm = (props) => { })); dispatch(setNavigationPath(PROVISIONING_CONFIRM)); } - } + }; const cancel = () => { dispatch(setNavigationPath(SELECT_LOGIN_ID)); - } + }; return (
{ paddingTop: 2, }} > - { - const text = event.target.value; - if (state.assignedIdentity == null && !text.endsWith("@")) { - dispatch(setIdentityToProvisionField(text)); - } - }} - InputProps={{ - endAdornment: {state.parentname ? state.parentname : ``}, - }} - > - + {state.loading ? + + + + : + { + const text = event.target.value; + if (state.assignedIdentity == null && !text.endsWith("@")) { + dispatch(setIdentityToProvisionField(text)); + } + }} + InputProps={{ + endAdornment: {state.parentname ? state.parentname : ``}, + }} + > + + }
{
); -} +}; export default ProvisionIdentityForm; \ No newline at end of file diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js index 2d852d6..84ba702 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js @@ -1,43 +1,177 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { ProvisionIdentityResultRender } from './ProvisionIdentityResult.render'; -import { PROVISIONING_CONFIRM, SELECT_LOGIN_ID } from '../../../../utils/constants'; +import React, { useEffect, useRef, useState } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { SELECT_LOGIN_ID } from '../../../../utils/constants'; import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; +import Button from '@mui/material/Button'; +import { VerusIdLogo } from "../../../../images"; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; +import { setIdentities } from '../../../../redux/reducers/identity/identity.actions'; +import CheckCircleIcon from '@mui/icons-material/CheckCircle'; +import { loadIdentities } from '../../../../rpc/calls/identities'; -class ProvisionIdentityResult extends React.Component { - constructor(props) { - super(props); +const ProvisionIdentityResult = () => { + const dispatch = useDispatch(); - this.state = { - loading: false - } + const { request } = useSelector((state) => state.rpc.loginConsentRequest); + const provisioningResponse = useSelector((state) => state.provision.provisioningResponse); + const requestedFqn = useSelector((state) => state.provision.requestedFqn); + const provisioningName = useSelector((state) => state.provision.provisioningName); + const provisioningInfo = useSelector((state) => state.provision.provisioningInfo); + const { + provParent, + } = provisioningInfo; + let intervalId = useRef(null); - this.finishSend = this.finishSend.bind(this); - this.cancel = this.cancel.bind(this); - } + let formattedName = ''; + const lastDotIndex = requestedFqn.lastIndexOf('.'); + if (lastDotIndex === -1) formattedName = requestedFqn; // return the original string if there's no dot + else formattedName = requestedFqn.substring(0, lastDotIndex); - finishSend() { - this.props.dispatch(setNavigationPath(SELECT_LOGIN_ID)); - } + // Get the name that should appear in the identities list if the provisioning was successful. + const names = requestedFqn.split('.'); + const isMainChain = + provisioningResponse.system_id === 'i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV' || + provisioningResponse.system_id === 'iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq'; - cancel() { - this.props.dispatch(setNavigationPath(PROVISIONING_CONFIRM)); + let expectedName; + // The name will consist of the base name plus the parent except + // for when the parent is VRSC or VRSCTEST. + if (names.length === 1 || (!provParent && isMainChain)) { + expectedName = names[0]; + } else { + expectedName = names[0] + '.' + names[1]; } - render() { - return ProvisionIdentityResultRender.call(this); - } -} - -// TODO: Figure out if this should be different -const mapStateToProps = (state) => { - return { - path: state.navigation.path, - loginConsentRequest: state.rpc.loginConsentRequest, - identities: state.identity.identities, - activeIdentity: state.identity.activeIdentity, - originApp: state.origin.originApp + const [checkForId, setCheckForId] = useState(true); + + useEffect(() => { + const checkForNewId = async () => { + try { + const identities = await loadIdentities(request.chainTicker); + dispatch(setIdentities(identities)); + + const found = identities.find(id => { + return id.identity.name === expectedName; + }); + + if (found) { + setCheckForId(false); + } + } catch (e) { + console.error(e); + } + }; + + const startPolling = () => { + intervalId.current = setInterval(async () => await checkForNewId(), 5000); + }; + + const stopPolling = () => { + clearInterval(intervalId.current); + }; + + if (checkForId) { + startPolling(); + } else { + stopPolling(); + } + }, [checkForId]); + + + const finishSend = () => { + dispatch(setNavigationPath(SELECT_LOGIN_ID)); }; + + return ( +
+
+ +
+
+ + {`${formattedName}@ is being provisioned by ${provisioningName}@`} + + + {`Estimated waiting time is 5 minutes`} + +
+
+ + + {checkForId ? + : + } + + +
+
+ +
+
+
+
+ ); }; -export default connect(mapStateToProps)(ProvisionIdentityResult); \ No newline at end of file +export default ProvisionIdentityResult; \ No newline at end of file diff --git a/src/containers/SnackbarAlert.js b/src/containers/SnackbarAlert.js new file mode 100644 index 0000000..09bd027 --- /dev/null +++ b/src/containers/SnackbarAlert.js @@ -0,0 +1,17 @@ +import React from 'react'; +import { Snackbar, Alert } from '@mui/material'; + +export const SnackbarAlert = ({open, text, handleClose}) => { + return ( + + + {text} + + + ); +}; \ No newline at end of file diff --git a/src/env.js b/src/env.js index cb08a24..b2d14f1 100644 --- a/src/env.js +++ b/src/env.js @@ -1,2 +1,2 @@ -export const DEVMODE = false +export const DEVMODE = true export const MOCK_IPC = false \ No newline at end of file diff --git a/src/redux/reducers/provision/provision.actions.js b/src/redux/reducers/provision/provision.actions.js index b9df906..3c870e1 100644 --- a/src/redux/reducers/provision/provision.actions.js +++ b/src/redux/reducers/provision/provision.actions.js @@ -1,7 +1,10 @@ import { SET_IDENTITY_TO_PROVISION_FIELD, - SET_PROVISONING_INFO -} from "./provision.types" + SET_PROVISONING_INFO, + SET_PROVISONING_NAME, + SET_PROVISONING_RESPONSE, + SET_REQUESTED_FQN +} from "./provision.types"; export const setIdentityToProvisionField = (idToProvisionField) => { return { @@ -9,14 +12,41 @@ export const setIdentityToProvisionField = (idToProvisionField) => { payload: { idToProvisionField } - } -} + }; +}; -export const setProvisioningInfo= (provisioningInfo) => { +export const setProvisioningInfo = (provisioningInfo) => { return { type: SET_PROVISONING_INFO, payload: { provisioningInfo } - } -} \ No newline at end of file + }; +}; + +export const setProvisioningResponse = (provisioningResponse) => { + return { + type: SET_PROVISONING_RESPONSE, + payload: { + provisioningResponse + } + }; +}; + +export const setRequestedFqn = (requestedFqn) => { + return { + type: SET_REQUESTED_FQN, + payload: { + requestedFqn + } + }; +}; + +export const setProvisioningName= (provisioningName) => { + return { + type: SET_PROVISONING_NAME, + payload: { + provisioningName + } + }; +}; \ No newline at end of file diff --git a/src/redux/reducers/provision/provision.reducer.js b/src/redux/reducers/provision/provision.reducer.js index ecc493b..952ee05 100644 --- a/src/redux/reducers/provision/provision.reducer.js +++ b/src/redux/reducers/provision/provision.reducer.js @@ -3,25 +3,46 @@ */ import { SET_IDENTITY_TO_PROVISION_FIELD, - SET_PROVISONING_INFO + SET_PROVISONING_INFO, + SET_PROVISONING_NAME, + SET_PROVISONING_RESPONSE, + SET_REQUESTED_FQN } from "./provision.types"; export const provision = (state = { identityToProvisionField: "", provisioningInfo: {}, + provisioningResponse: {}, + requestedFqn: "", + provisioningName: "", }, action) => { switch (action.type) { - case SET_IDENTITY_TO_PROVISION_FIELD: - return { - ...state, - identityToProvisionField: action.payload.idToProvisionField - } - case SET_PROVISONING_INFO: - return { - ...state, - provisioningInfo: action.payload.provisioningInfo - } - default: - return state; + case SET_IDENTITY_TO_PROVISION_FIELD: + return { + ...state, + identityToProvisionField: action.payload.idToProvisionField + }; + case SET_PROVISONING_INFO: + return { + ...state, + provisioningInfo: action.payload.provisioningInfo + }; + case SET_PROVISONING_RESPONSE: + return { + ...state, + provisioningResponse: action.payload.provisioningResponse + }; + case SET_REQUESTED_FQN: + return { + ...state, + requestedFqn: action.payload.requestedFqn + }; + case SET_PROVISONING_NAME: + return { + ...state, + provisioningName: action.payload.provisioningName + }; + default: + return state; } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/redux/reducers/provision/provision.types.js b/src/redux/reducers/provision/provision.types.js index 164e22e..93ceabe 100644 --- a/src/redux/reducers/provision/provision.types.js +++ b/src/redux/reducers/provision/provision.types.js @@ -1,2 +1,5 @@ -export const SET_IDENTITY_TO_PROVISION_FIELD = "SET_IDENTITY_TO_PROVISION_FIELD" -export const SET_PROVISONING_INFO = "SET_PROVISONING_INFO" \ No newline at end of file +export const SET_IDENTITY_TO_PROVISION_FIELD = "SET_IDENTITY_TO_PROVISION_FIELD"; +export const SET_PROVISONING_INFO = "SET_PROVISONING_INFO"; +export const SET_PROVISONING_RESPONSE = "SET_PROVISONING_RESPONSE"; +export const SET_REQUESTED_FQN = "SET_REQUESTED_FQN"; +export const SET_PROVISONING_NAME = "SET_PROVISONING_NAME"; \ No newline at end of file diff --git a/src/rpc/calls/getVdxfId.js b/src/rpc/calls/getVdxfId.js new file mode 100644 index 0000000..fad65f3 --- /dev/null +++ b/src/rpc/calls/getVdxfId.js @@ -0,0 +1,26 @@ +import { API_GET_VDXF_ID, NATIVE, POST } from "../../utils/constants"; +import { getApiData } from "../callCreator"; + +/** + * Runs getVdxfId with a given vdxfuri and optional vdxf data. + */ +export const getVdxfId = async (chainId, vdxfuri, initialvdxfdata) => { + try { + const res = await getApiData( + NATIVE, + API_GET_VDXF_ID, + { + chainTicker: chainId, + vdxfuri: vdxfuri, + initialvdxfdata: initialvdxfdata, + }, + POST, + true + ); + if (res.msg !== "success") throw new Error(res.result); + else return res.result; + } catch (e) { + console.error(e.message); + throw new Error(e.message); + } +}; \ No newline at end of file diff --git a/src/rpc/calls/signIdProvisioningRequest.js b/src/rpc/calls/signIdProvisioningRequest.js new file mode 100644 index 0000000..f70d996 --- /dev/null +++ b/src/rpc/calls/signIdProvisioningRequest.js @@ -0,0 +1,26 @@ +import { API_SIGN_ID_PROVISIONING_REQUEST, NATIVE, POST } from "../../utils/constants"; +import { getApiData } from "../callCreator"; + +/** + * Signs an identity Provisioning request with a given r-address. + */ +export const signIdProvisioningRequest = async (chainId, request, raddress) => { + try { + const res = await getApiData( + NATIVE, + API_SIGN_ID_PROVISIONING_REQUEST, + { + chainTicker: chainId, + request: request, + raddress: raddress, + }, + POST, + true + ); + if (res.msg !== "success") throw new Error(res.result); + else return res.result; + } catch (e) { + console.error(e.message); + throw new Error(e.message); + } +}; \ No newline at end of file diff --git a/src/rpc/calls/verifyIdProvisioningResponse.js b/src/rpc/calls/verifyIdProvisioningResponse.js new file mode 100644 index 0000000..e43ae87 --- /dev/null +++ b/src/rpc/calls/verifyIdProvisioningResponse.js @@ -0,0 +1,21 @@ +import { API_VERIFY_ID_PROVISIONING_RESPONSE, NATIVE, POST } from "../../utils/constants"; +import { getApiData } from "../callCreator"; + +export const verifyIdProvisioningResponse = async (response) => { + try { + const res = await getApiData( + NATIVE, + API_VERIFY_ID_PROVISIONING_RESPONSE, + { + response, + }, + POST, + true + ); + if (res.msg !== "success") throw new Error(res.result); + else return res.result; + } catch (e) { + console.error(e.message); + throw new Error(e.message); + } +}; \ No newline at end of file diff --git a/src/themes/main.js b/src/themes/main.js index fa7725b..0981c9c 100644 --- a/src/themes/main.js +++ b/src/themes/main.js @@ -18,7 +18,6 @@ export const mainTheme = createTheme({ textTransform: 'none', fontWeight: 600, }, - //fontFamily: 'Source Sans Pro', }, shape: { borderRadius: 14, diff --git a/src/utils/constants.js b/src/utils/constants.js index aa6b6ce..bf6eadb 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -26,8 +26,11 @@ export const API_GET_CURRENCY = 'get_currency' export const API_GET_IDENTITIES = 'get_identities' export const API_GET_IDENTITY = 'get_identity' export const API_GET_SIGNATURE_INFO = 'get_signature_info' +export const API_GET_VDXF_ID = 'get_vdxf_id' export const API_VERIFY_LOGIN_REQUEST = 'verusid/login/verify_request' export const API_SIGN_LOGIN_RESPONSE = 'verusid/login/sign_response' +export const API_VERIFY_ID_PROVISIONING_RESPONSE = 'verusid/provision/verify_id_provisioning_response' +export const API_SIGN_ID_PROVISIONING_REQUEST = 'verusid/provision/sign_id_provisioning_request' export const API_GET_CHAIN_INFO = 'get_info' export const API_SAVE_USERS = 'users/save' export const API_ENCRYPT_KEY = 'encryptkey' diff --git a/yarn.lock b/yarn.lock index ca0a4eb..e51027d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1124,11 +1124,97 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/config-array@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.0.tgz#3251a528998de914d59bb21ba4c11767cf1b3519" + integrity sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.0.tgz#168ee076f94b152c01ca416c3e5cf82290ab4fcd" + integrity sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg== + +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@9.16.0": + version "9.16.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" + integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8" + integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA== + dependencies: + levn "^0.4.1" + "@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== + dependencies: + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== + "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -1340,6 +1426,14 @@ resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== +"@stylistic/eslint-plugin-js@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.11.0.tgz#cc8cbec9438bdcecfa6dc9c980450f0ed3af7f57" + integrity sha512-btchD0P3iij6cIk5RR5QMdEhtCCV0+L6cNheGhGCd//jaHILZMTi/EOqgEDAf1s4ZoViyExoToM+S2Iwa3U9DA== + dependencies: + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" @@ -1432,6 +1526,11 @@ dependencies: "@types/node" "*" +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + "@types/glob@^7.1.1": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" @@ -1477,7 +1576,7 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.15", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -1815,12 +1914,17 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn@6.4.1, acorn@^6.4.1, acorn@^7.1.1, acorn@^8.0.5: +acorn@6.4.1, acorn@^6.4.1, acorn@^7.1.1, acorn@^8.0.5, acorn@^8.14.0: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -1984,6 +2088,14 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -1994,6 +2106,18 @@ array-flatten@^2.1.0: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== +array-includes@^3.1.6, array-includes@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + is-string "^1.0.7" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -2011,6 +2135,63 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +array.prototype.findlast@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.flat@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.tosorted@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" + integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-shim-unscopables "^1.0.2" + +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -2078,6 +2259,13 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2088,6 +2276,15 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== +axios@1.7.7: + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-loader@8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" @@ -2556,6 +2753,17 @@ call-bind@^1.0.0: function-bind "^1.1.1" get-intrinsic "^1.0.0" +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2809,7 +3017,7 @@ colorette@^1.2.2: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -3035,6 +3243,15 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^7.0.5: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -3160,7 +3377,34 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@2.6.9, debug@3.1.0, debug@4, debug@4.3.1, debug@^2.2.0, debug@^2.3.3, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3, debug@~4.3.1, debug@~4.3.2: +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +debug@2.6.9, debug@3.1.0, debug@4, debug@4.3.1, debug@^2.2.0, debug@^2.3.3, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@~4.3.1, debug@~4.3.2: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -3209,6 +3453,11 @@ deep-equal@^1.0.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -3227,6 +3476,15 @@ defer-to-connect@^2.0.0: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3234,6 +3492,15 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -3341,6 +3608,13 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.0.0" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + dom-accessibility-api@^0.5.6: version "0.5.10" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz#caa6d08f60388d0bb4539dd75fe458a9a1d0014c" @@ -3613,6 +3887,58 @@ es-abstract@^1.17.0-next.1: string.prototype.trimend "^1.0.1" string.prototype.trimstart "^1.0.1" +es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2, es-abstract@^1.23.3, es-abstract@^1.23.5: + version "1.23.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.5.tgz#f4599a4946d57ed467515ed10e4f157289cd52fb" + integrity sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.3" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.3" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + es-abstract@^1.18.0-next.1: version "1.18.0-next.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" @@ -3631,6 +3957,62 @@ es-abstract@^1.18.0-next.1: string.prototype.trimend "^1.0.1" string.prototype.trimstart "^1.0.1" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-iterator-helpers@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.0.tgz#2f1a3ab998b30cb2d10b195b587c6d9ebdebf152" + integrity sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + globalthis "^1.0.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + iterator.prototype "^1.1.3" + safe-array-concat "^1.1.2" + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -3695,6 +4077,30 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" +eslint-plugin-react@7.37.2: + version "7.37.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz#cd0935987876ba2900df2f58339f6d92305acc7a" + integrity sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w== + dependencies: + array-includes "^3.1.8" + array.prototype.findlast "^1.2.5" + array.prototype.flatmap "^1.3.2" + array.prototype.tosorted "^1.1.4" + doctrine "^2.1.0" + es-iterator-helpers "^1.1.0" + estraverse "^5.3.0" + hasown "^2.0.2" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.8" + object.fromentries "^2.0.8" + object.values "^1.2.0" + prop-types "^15.8.1" + resolve "^2.0.0-next.5" + semver "^6.3.1" + string.prototype.matchall "^4.0.11" + string.prototype.repeat "^1.0.0" + eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -3703,12 +4109,86 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@9.16.0: + version "9.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6" + integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.16.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.5" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + json-stable-stringify-without-jsonify "^1.0.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + +espree@^10.0.1, espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== + dependencies: + acorn "^8.14.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.0" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esrecurse@^4.1.0: +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0, esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== @@ -3720,6 +4200,11 @@ estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estraverse@^5.1.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + estraverse@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" @@ -3873,7 +4358,7 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -3883,7 +4368,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -3914,6 +4399,13 @@ figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + file-loader@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" @@ -3990,6 +4482,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" @@ -4000,6 +4500,19 @@ findup-sync@^3.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + +flatted@^3.2.9: + version "3.3.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27" + integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== + flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -4008,11 +4521,18 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@1.15.4, follow-redirects@^1.0.0: +follow-redirects@1.15.4, follow-redirects@^1.0.0, follow-redirects@^1.15.6: version "1.15.4" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -4023,6 +4543,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -4123,6 +4652,21 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gauge@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" @@ -4175,6 +4719,17 @@ get-intrinsic@^1.0.0: has "^1.0.3" has-symbols "^1.0.1" +get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -4194,6 +4749,15 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4206,7 +4770,7 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -glob-parent@5.1.2, glob-parent@^3.1.0, glob-parent@~5.1.0: +glob-parent@5.1.2, glob-parent@^3.1.0, glob-parent@^6.0.2, glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -4296,11 +4860,21 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" +globals@15.13.0: + version "15.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" + integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + globalthis@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.1.tgz#40116f5d9c071f9e8fb0037654df1ab3a83b7ef9" @@ -4308,6 +4882,14 @@ globalthis@^1.0.1: dependencies: define-properties "^1.1.3" +globalthis@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== + dependencies: + define-properties "^1.2.1" + gopd "^1.0.1" + globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -4328,6 +4910,13 @@ globule@^1.0.0: lodash "~4.17.10" minimatch "~3.0.2" +gopd@^1.0.1, gopd@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.1.0.tgz#df8f0839c2d48caefc32a025a49294d39606c912" + integrity sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA== + dependencies: + get-intrinsic "^1.2.4" + got@11.8.5: version "11.8.5" resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" @@ -4395,6 +4984,11 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-cors@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" @@ -4410,11 +5004,37 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.1.0.tgz#deb10494cbbe8809bce168a3b961f42969f5ed43" + integrity sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q== + dependencies: + call-bind "^1.0.7" + has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -4482,6 +5102,13 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -4748,12 +5375,17 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= +ignore@^5.2.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== -import-fresh@^3.1.0: +import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -4833,6 +5465,15 @@ internal-ip@^4.3.0: default-gateway "^4.2.0" ipaddr.js "^1.9.0" +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + interpret@^1.0.0, interpret@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -4902,6 +5543,14 @@ is-arguments@^1.0.4: resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -4912,6 +5561,20 @@ is-arrayish@^0.3.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== +is-async-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" + integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA== + dependencies: + has-tostringtag "^1.0.0" + +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== + dependencies: + has-bigints "^1.0.2" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -4926,6 +5589,19 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-boolean-object@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.0.tgz#9743641e80a62c094b5941c5bb791d66a88e497a" + integrity sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw== + dependencies: + call-bind "^1.0.7" + has-tostringtag "^1.0.2" + +is-callable@^1.1.3, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-callable@^1.1.4, is-callable@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" @@ -4959,11 +5635,25 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" + is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== +is-date-object@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -5004,6 +5694,13 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= +is-finalizationregistry@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz#d74a7d0c5f3578e34a20729e69202e578d495dc2" + integrity sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA== + dependencies: + call-bind "^1.0.7" + is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -5014,6 +5711,13 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-generator-function@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" @@ -5031,11 +5735,29 @@ is-lambda@^1.0.1: resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== +is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== + is-negative-zero@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + +is-number-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.0.tgz#5a867e9ecc3d294dda740d9f127835857af7eb05" + integrity sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw== + dependencies: + call-bind "^1.0.7" + has-tostringtag "^1.0.2" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -5096,11 +5818,41 @@ is-regex@^1.0.4, is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" +is-regex@^1.1.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.0.tgz#41b9d266e7eb7451312c64efc37e8a7d453077cf" + integrity sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA== + dependencies: + call-bind "^1.0.7" + gopd "^1.1.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== + +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-string@^1.0.7, is-string@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.0.tgz#8cb83c5d57311bf8058bc6c8db294711641da45d" + integrity sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g== + dependencies: + call-bind "^1.0.7" + has-tostringtag "^1.0.2" + is-svg@4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.2.tgz#a119e9932e1af53f6be1969d1790d6cc5fd947d3" @@ -5115,11 +5867,47 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-symbol@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.0.tgz#ae993830a56d4781886d39f9f0a46b3e89b7b60b" + integrity sha512-qS8KkNNXUZ/I+nX6QT8ZS1/Yx0A444yhzdTKxCzKkNjQ9sHErBxJnJAgh+f5YhusYECEcjo4XcyH87hn6+ks0A== + dependencies: + call-bind "^1.0.7" + has-symbols "^1.0.3" + safe-regex-test "^1.0.3" + +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +is-weakset@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" + integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -5142,6 +5930,11 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -5164,6 +5957,17 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= +iterator.prototype@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.3.tgz#016c2abe0be3bbdb8319852884f60908ac62bf9c" + integrity sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ== + dependencies: + define-properties "^1.2.1" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + reflect.getprototypeof "^1.0.4" + set-function-name "^2.0.1" + jest-diff@^26.0.0: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" @@ -5199,7 +6003,7 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1: +js-yaml@3.13.1, js-yaml@^4.1.0: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -5284,6 +6088,11 @@ json-schema@0.2.3, json-schema@0.4.0: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -5389,6 +6198,16 @@ jss@10.8.2, jss@^10.8.1: is-in-browser "^1.1.3" tiny-warning "^1.0.2" +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" + integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + object.assign "^4.1.4" + object.values "^1.1.6" + jszip@3.8.0: version "3.8.0" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.8.0.tgz#a2ac3c33fe96a76489765168213655850254d51b" @@ -5399,7 +6218,7 @@ jszip@3.8.0: readable-stream "~2.3.6" set-immediate-shim "~1.0.1" -keyv@^4.0.0: +keyv@^4.0.0, keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -5421,6 +6240,14 @@ klona@^2.0.4: resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -5479,11 +6306,23 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash-es@4.17.21, lodash-es@^4.2.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash@4.17.21, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.2.1, lodash@^4.7.0, lodash@~4.17.10: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -5826,7 +6665,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -minimatch@5.1.0, minimatch@^3.0.4, minimatch@^5.0.1, minimatch@~3.0.2: +minimatch@5.1.0, minimatch@^3.0.4, minimatch@^3.1.2, minimatch@^5.0.1, minimatch@~3.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== @@ -6052,6 +6891,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -6308,6 +7152,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.13.1, object-inspect@^1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" + integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== + object-inspect@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" @@ -6343,6 +7192,35 @@ object.assign@^4.1.0, object.assign@^4.1.1: has-symbols "^1.0.1" object-keys "^1.1.1" +object.assign@^4.1.4, object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" + integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + object.getownpropertydescriptors@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" @@ -6358,6 +7236,15 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +object.values@^1.1.6, object.values@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -6401,6 +7288,18 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" @@ -6458,6 +7357,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -6472,6 +7378,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" @@ -6715,6 +7628,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + postcss-modules-extract-imports@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" @@ -6769,6 +7687,11 @@ postcss@^7.0.14, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: picocolors "^0.2.1" source-map "^0.6.1" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -6832,6 +7755,15 @@ prop-types@15.7.2, prop-types@^15.5.6, prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + proxy-addr@~2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" @@ -6840,6 +7772,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -6989,7 +7926,7 @@ react-dom@17.0.1: object-assign "^4.1.1" scheduler "^0.20.1" -react-is@^16.7.0, react-is@^16.8.1, react-is@^16.9.0: +react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.9.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -7154,6 +8091,19 @@ redux@3.6.0: loose-envify "^1.1.0" symbol-observable "^1.0.2" +reflect.getprototypeof@^1.0.4, reflect.getprototypeof@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.7.tgz#04311b33a1b713ca5eb7b5aed9950a86481858e5" + integrity sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + which-builtin-type "^1.1.4" + regenerate-unicode-properties@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" @@ -7199,6 +8149,16 @@ regexp.prototype.flags@^1.2.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +regexp.prototype.flags@^1.5.2, regexp.prototype.flags@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz#b3ae40b1d2499b8350ab2c3fe6ef3845d3a96f42" + integrity sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.2" + regexpu-core@^4.7.1: version "4.7.1" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" @@ -7353,6 +8313,15 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^2.0.0-next.5: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" @@ -7404,6 +8373,16 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -7414,6 +8393,15 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -7527,7 +8515,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5", semver@6.3.1, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^6.0.0, semver@^6.3.0, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +"semver@2 || 3 || 4 || 5", semver@6.3.1, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^6.0.0, semver@^6.3.0, semver@^6.3.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -7586,6 +8574,28 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.1, set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + set-immediate-shim@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" @@ -7659,6 +8669,16 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +side-channel@^1.0.4, side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -8035,6 +9055,42 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string.prototype.matchall@^4.0.11: + version "4.0.11" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" + integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + regexp.prototype.flags "^1.5.2" + set-function-name "^2.0.2" + side-channel "^1.0.6" + +string.prototype.repeat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a" + integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" + string.prototype.trimend@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" @@ -8043,6 +9099,15 @@ string.prototype.trimend@^1.0.1: call-bind "^1.0.0" define-properties "^1.1.3" +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" @@ -8051,6 +9116,15 @@ string.prototype.trimstart@^1.0.1: call-bind "^1.0.0" define-properties "^1.1.3" +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -8105,6 +9179,11 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" +strip-json-comments@^3.1.1: + version "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== + strnum@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" @@ -8339,6 +9418,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -8369,6 +9455,51 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-byte-offset@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.3.tgz#3fa9f22567700cc86aaf86a1e7176f74b59600f2" + integrity sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + reflect.getprototypeof "^1.0.6" + +typed-array-length@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -8399,6 +9530,16 @@ uglifyjs-webpack-plugin@2.2.0: webpack-sources "^1.4.0" worker-farm "^1.7.0" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -8856,11 +9997,62 @@ whatwg-url@^8.0.0: tr46 "^2.1.0" webidl-conversions "^6.1.0" +which-boxed-primitive@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.0.tgz#2d850d6c4ac37b95441a67890e19f3fda8b6c6d9" + integrity sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng== + dependencies: + is-bigint "^1.1.0" + is-boolean-object "^1.2.0" + is-number-object "^1.1.0" + is-string "^1.1.0" + is-symbol "^1.1.0" + +which-builtin-type@^1.1.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.0.tgz#58042ac9602d78a6d117c7e811349df1268ba63c" + integrity sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA== + dependencies: + call-bind "^1.0.7" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.0.5" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.1.4" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.2" + which-typed-array "^1.1.15" + +which-collection@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== + dependencies: + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= +which-typed-array@^1.1.14, which-typed-array@^1.1.15: + version "1.1.16" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.16.tgz#db4db429c4706feca2f01677a144278e4a8c216b" + integrity sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -8882,7 +10074,7 @@ wide-align@^1.1.5: dependencies: string-width "^1.0.2 || 2 || 3 || 4" -word-wrap@1.2.4, word-wrap@~1.2.3: +word-wrap@1.2.4, word-wrap@^1.2.5, word-wrap@~1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f" integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA== @@ -9043,3 +10235,8 @@ yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 5257b25320689c1b4ef04fd1b6a1270188b663f5 Mon Sep 17 00:00:00 2001 From: mcstoer <49734282+mcstoer@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:22:48 -0800 Subject: [PATCH 07/12] Clean up the provisioning code and change the button colors and text for provisioning and login to match those of the mobile app. --- .../LoginConsent/Consent/Consent.render.js | 4 +- .../ProvisionIdentityConfirm.js | 1 - .../ProvisionIdentityResult.js | 4 +- .../ProvisionIdentityResult.render.js | 107 ------------------ .../LoginConsent/Redirect/Redirect.render.js | 2 +- 5 files changed, 5 insertions(+), 113 deletions(-) delete mode 100644 src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js diff --git a/src/components/LoginConsent/Consent/Consent.render.js b/src/components/LoginConsent/Consent/Consent.render.js index 2cc3374..b87630a 100644 --- a/src/components/LoginConsent/Consent/Consent.render.js +++ b/src/components/LoginConsent/Consent/Consent.render.js @@ -86,7 +86,7 @@ export const ConsentRender = function () { diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js index e131815..e9c91c6 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js @@ -41,7 +41,6 @@ const ProvisionIdentityConfirm = () => { provSystemId, provFqn, provParent, - provWebhook, friendlyNameMap, } = provisioningInfo; diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js index 84ba702..89698b8 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js @@ -157,7 +157,7 @@ const ProvisionIdentityResult = () => { > diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js deleted file mode 100644 index d494c5c..0000000 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.render.js +++ /dev/null @@ -1,107 +0,0 @@ -import React from "react"; -import Button from '@mui/material/Button'; -import { VerusIdLogo } from "../../../../images"; - -export const ProvisionIdentityResultRender = function () { - const { loading } = this.state - - return ( -
-
- -
-
- {`Provisioning Result`} -
-
- -
- -
-
- - -
-
-
-
- ); -}; \ No newline at end of file diff --git a/src/components/LoginConsent/Redirect/Redirect.render.js b/src/components/LoginConsent/Redirect/Redirect.render.js index b9a47d3..71fd30f 100644 --- a/src/components/LoginConsent/Redirect/Redirect.render.js +++ b/src/components/LoginConsent/Redirect/Redirect.render.js @@ -79,7 +79,7 @@ export const RedirectRender = function () { : {}} + {"Request a new VerusID"} + }
{ const dispatch = useDispatch(); @@ -47,13 +52,13 @@ const ProvisionIdentityConfirm = () => { let displayIdentity; if (provFqn) { - if (provFqn.data) { - displayIdentity = friendlyNameMap[identityToProvisionField]; - } else { + displayIdentity = provFqn.data; + } else { + if (friendlyNameMap[identityToProvisionField]) { displayIdentity = `${friendlyNameMap[identityToProvisionField]}@`; + } else { + displayIdentity = identityToProvisionField; } - } else { - displayIdentity = identityToProvisionField; } let displayParent; @@ -93,9 +98,10 @@ const ProvisionIdentityConfirm = () => { const res = new LoginConsentProvisioningResponse(response); // Check the response to see if it is valid and if there are errors. - const verified = await verifyIdProvisioningResponse(res); + const verificationCheck = await verifyIdProvisioningResponse(res); + const verified = verificationCheck.verified; - if (!verified) throw new Error('Failed to verify response from service'); + if (!verified) throw new Error('Failed to verify response from the provisioning service.'); const {decision} = res; const {result} = decision; @@ -110,15 +116,17 @@ const ProvisionIdentityConfirm = () => { state === LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE.vdxfid) { if (!result.identity_address && !result.fully_qualified_name) { - throw new Error('Provisioning response did not contain an identity or fully qualified name'); + throw new Error('Provisioning response did not contain an identity or fully qualified name.'); } if (result.identity_address && result.identity_address !== requestedId) { - throw new Error(`Provisioning response identity [${result.identity_address}] address does not match requested identity address[${requestedId}]`); + throw new Error(`Provisioning response identity [${result.identity_address}] + address does not match requested identity address[${requestedId}].`); } if (result.fully_qualified_name && result.fully_qualified_name.toLowerCase() !== requestedFqn.toLowerCase()) { - throw new Error(`Provisioning response fully qualified name [${result.fully_qualified_name.toLowerCase()}] does not match requested fully qualified name[${requestedFqn.toLowerCase()}]`); + throw new Error(`Provisioning response fully qualified name [${result.fully_qualified_name.toLowerCase()}] + does not match requested fully qualified name[${requestedFqn.toLowerCase()}].`); } } }; @@ -130,11 +138,12 @@ const ProvisionIdentityConfirm = () => { const submitData = async () => { setState({ loading: false}); - const submissionSuccess = (response, requestedFqn, provisioningName) => { + const submissionSuccess = (response, requestedFqn, provisioningName, requestedId) => { setState({ loading: false}); dispatch(setProvisioningResponse(response)); dispatch(setRequestedFqn(requestedFqn)); dispatch(setProvisioningName(provisioningName)); + dispatch(setRequestedId(requestedId)); dispatch(setNavigationPath(PROVISIONING_RESULT)); }; @@ -153,7 +162,7 @@ const ProvisionIdentityConfirm = () => { return x.vdxfkey === LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY.vdxfid; }) : null; - if (webhookSubject == null) throw new Error("No endpoint for ID provisioning"); + if (webhookSubject == null) throw new Error('No endpoint for ID provisioning'); const webhookUrl = webhookSubject.data; @@ -186,12 +195,12 @@ const ProvisionIdentityConfirm = () => { requestedFqn = identityObj.fullyqualifiedname; } else { - identityName = identity.split("@")[0]; + identityName = identity.split('@')[0]; parent = provParent ? provParent.data : null; systemid = provSystemId ? provSystemId.data : null; const parentObj = await getIdentity(request.chainTicker, parent ? parent : loginRequest.system_id); - requestedFqn = `${identityName.split(".")[0]}.${parentObj.fullyqualifiedname}`; + requestedFqn = `${identityName.split('.')[0]}.${parentObj.fullyqualifiedname}`; nameId = (await getVdxfId(request.chainTicker, requestedFqn)).vdxfid; } @@ -221,7 +230,7 @@ const ProvisionIdentityConfirm = () => { const provisioningName = (await getIdentity(request.chainTicker, loginRequest.signing_id)).identity.name; - submissionSuccess(res.data, requestedFqn, provisioningName); + submissionSuccess(res.data, requestedFqn, provisioningName, nameId); } catch (e) { submissionError(e.message); } @@ -231,40 +240,40 @@ const ProvisionIdentityConfirm = () => { return (
- {`Review Provisioning Request`} + {`Review the Provisioning Request`}
{ }}> - + {provAddress && - + } - + {displayParent && - + @@ -310,8 +319,8 @@ const ProvisionIdentityConfirm = () => { - - + + } @@ -319,7 +328,7 @@ const ProvisionIdentityConfirm = () => { - + @@ -334,25 +343,25 @@ const ProvisionIdentityConfirm = () => { >
diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js index 7274589..67dfde9 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityForm/ProvisionIdentityForm.js @@ -12,7 +12,7 @@ import { } from 'verus-typescript-primitives'; import Button from '@mui/material/Button'; import TextField from '@mui/material/TextField'; -import { VerusIdLogo } from "../../../../images"; +import { VerusIdLogo } from '../../../../images'; import { getIdentity } from '../../../../rpc/calls/getIdentity'; import { InputAdornment } from '@mui/material'; import { setIdentityToProvisionField, setProvisioningInfo } from '../../../../redux/reducers/provision/provision.actions'; @@ -104,19 +104,33 @@ const ProvisionIdentityForm = () => { for (const idKey of identitykeys) { if (idKey != null) { - const identity = await getIdentity(request.chainTicker, idKey.data); + try { + const identity = await getIdentity(request.chainTicker, idKey.data); - if (identity) { - friendlyNameMap[identity.identity.identityaddress] = - identity.identity.name; - - if (provIdKey != null && idKey.data === provIdKey.data) { - assignedIdentity = identity.identity.identityaddress; - dispatch(setIdentityToProvisionField(identity.identity.name)); + if (identity) { + // Get only the first part of the name to match the 'name' part of a getidentity call. + let name = ''; + const firstDoxIndex = identity.identity.name.indexOf('.'); + if (firstDoxIndex === -1) name = identity.identity.name; + else name = identity.identity.name.substring(0, firstDoxIndex); + + friendlyNameMap[identity.identity.identityaddress] = + name; + + if (provIdKey != null && idKey.data === provIdKey.data) { + assignedIdentity = identity.identity.identityaddress; + dispatch(setIdentityToProvisionField(name)); + } + if (idKey.vdxfkey === ID_PARENT_VDXF_KEY.vdxfid) { + parentname = `.${identity.fullyqualifiedname}`; + } + } + } catch { + // If the given fully qualified name doesn't exist, then + // it is not valid and should be ignored. + if (idKey.data === currentState.provFqn.data) { + currentState.provFqn = null; } - if (idKey.vdxfkey === ID_PARENT_VDXF_KEY.vdxfid) { - parentname = `.${identity.fullyqualifiedname}`; - } } } } @@ -197,20 +211,22 @@ const ProvisionIdentityForm = () => { await getIdentity(request.chainTicker, formattedId); // If we get a result back, that means the identity must already exist. - identityError = true; - setFormError({ - error: true, - description: 'Identity name taken, please select a different name.' - }); - + // That is expected if the identity is already assigned by the provisioning service. + if (!state.assignedIdentity) { + identityError = true; + setFormError({ + error: true, + description: 'Identity name taken, please select a different name.' + }); + } } catch (e) { // Check for an invalid identity, otherwise the identity is valid since it does not already exist // and it is using valid characters. - if (e.message.includes("Identity parameter must be valid friendly name or identity address")) { + if (e.message.includes('Identity parameter must be valid friendly name or identity address')) { identityError = true; setFormError({ error: true, - description: 'Identity name must not include / : * ? " < > | @ .' + description: `Identity name must not include / : * ? ' < > | @ .` }); } } @@ -219,7 +235,7 @@ const ProvisionIdentityForm = () => { if (!identityError) { // Find a public address to provision the identity to. - const publicAddresses = state.addresses.public.filter((address) => address.tag === "public"); + const publicAddresses = state.addresses.public.filter((address) => address.tag === 'public'); dispatch(setProvisioningInfo({ primaryAddress: publicAddresses[0].address, @@ -241,50 +257,50 @@ const ProvisionIdentityForm = () => { return (
- {`Request VerusID`} + {`Request a VerusID`}
{ @@ -301,27 +317,30 @@ const ProvisionIdentityForm = () => { { const text = event.target.value; - if (state.assignedIdentity == null && !text.endsWith("@")) { + if (state.assignedIdentity == null) { dispatch(setIdentityToProvisionField(text)); } }} InputProps={{ - endAdornment: {state.parentname ? state.parentname : ``}, + endAdornment: + + {state.parentname ? state.parentname : ``} + , }} > @@ -330,25 +349,25 @@ const ProvisionIdentityForm = () => {
diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js index 89698b8..ae874ef 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityResult/ProvisionIdentityResult.js @@ -1,14 +1,98 @@ -import React, { useEffect, useRef, useState } from 'react'; +import React, { useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { SELECT_LOGIN_ID } from '../../../../utils/constants'; +import { PROVISIONING_FORM, SELECT_LOGIN_ID } from '../../../../utils/constants'; import { setNavigationPath } from '../../../../redux/reducers/navigation/navigation.actions'; +import { setIdentities } from '../../../../redux/reducers/identity/identity.actions'; +import { VerusIdLogo } from '../../../../images'; import Button from '@mui/material/Button'; -import { VerusIdLogo } from "../../../../images"; import Box from '@mui/material/Box'; import CircularProgress from '@mui/material/CircularProgress'; -import { setIdentities } from '../../../../redux/reducers/identity/identity.actions'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; +import ErrorIcon from '@mui/icons-material/Error'; +import { useInterval } from '../../../../utils/interval'; +import axios from 'axios'; +import { + LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED, + LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN, + LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED, + LoginConsentProvisioningResponse +} from 'verus-typescript-primitives'; import { loadIdentities } from '../../../../rpc/calls/identities'; +import { verifyIdProvisioningResponse } from '../../../../rpc/calls/verifyIdProvisioningResponse'; +import { setIdentityToProvisionField } from '../../../../redux/reducers/provision/provision.actions'; + +export const checkForProvisioningStatus = async ( + infoUri, + request, + setCheckForId, + setProvisioningError, + setCheckForProvisioningStatus, +) => { + const failed = (description, allowRetry) => { + setCheckForId(false); + setCheckForProvisioningStatus(false); + setProvisioningError({ + error: true, + description: description, + allowRetry: allowRetry, + }); + }; + + if (!infoUri) { + failed('Provisioning timed out with no response from the provisioning service.', false); + return; + } + + try { + const res = await axios.get(infoUri); + const provisioningResponse = new LoginConsentProvisioningResponse(res.data); + const verificationCheck = await verifyIdProvisioningResponse(provisioningResponse); + const verified = verificationCheck.verified; + + if (provisioningResponse.signing_id !== request.signing_id || !verified) { + throw new Error('Failed to verify response from the provisioning service.'); + } + + if (provisioningResponse.decision.result.state === LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED.vdxfid) { + if (provisioningResponse.decision.result.error_key === LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN.vdxfid) { + failed('Name is already taken.', true); + } else if (provisioningResponse.decision.result.error_key === LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED.vdxfid) { + failed('Unable to register the identity.', true); + } else { + failed('Provisioning failed for unknown reasons.', true); + } + } + } catch (e) { + if (e.message === 'Network Error') { + failed('Failed to get a response from the provisioning service.', false); + } else { + failed(e.message, false); + } + } +}; + +export const checkForNewId = async ( + dispatch, + chainId, + requestedId, + setCheckForId, + setCheckForProvisioningStatus +) => { + try { + const identities = await loadIdentities(chainId); + dispatch(setIdentities(identities)); + const found = identities.find(id => { + return id.identity.identityaddress === requestedId; + }); + + if (found) { + setCheckForId(false); + setCheckForProvisioningStatus(false); + } + } catch (e) { + console.error(e); + } +}; const ProvisionIdentityResult = () => { const dispatch = useDispatch(); @@ -16,106 +100,91 @@ const ProvisionIdentityResult = () => { const { request } = useSelector((state) => state.rpc.loginConsentRequest); const provisioningResponse = useSelector((state) => state.provision.provisioningResponse); const requestedFqn = useSelector((state) => state.provision.requestedFqn); + const requestedId = useSelector((state) => state.provision.requestedId); const provisioningName = useSelector((state) => state.provision.provisioningName); - const provisioningInfo = useSelector((state) => state.provision.provisioningInfo); - const { - provParent, - } = provisioningInfo; - let intervalId = useRef(null); + const provisioningCheckDelay = 600000; // Ten minute delay. + const idCheckDelay = 5000; // 5 second delay. let formattedName = ''; const lastDotIndex = requestedFqn.lastIndexOf('.'); if (lastDotIndex === -1) formattedName = requestedFqn; // return the original string if there's no dot else formattedName = requestedFqn.substring(0, lastDotIndex); - // Get the name that should appear in the identities list if the provisioning was successful. - const names = requestedFqn.split('.'); - const isMainChain = - provisioningResponse.system_id === 'i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV' || - provisioningResponse.system_id === 'iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq'; - - let expectedName; - // The name will consist of the base name plus the parent except - // for when the parent is VRSC or VRSCTEST. - if (names.length === 1 || (!provParent && isMainChain)) { - expectedName = names[0]; - } else { - expectedName = names[0] + '.' + names[1]; - } - const [checkForId, setCheckForId] = useState(true); + const [checkProvisioningStatus, setCheckForProvisioningStatus] = useState(true); + const [provisioningError, setProvisioningError] = useState({ + error: false, + description: '', + allowRetry: false, + }); - useEffect(() => { - const checkForNewId = async () => { - try { - const identities = await loadIdentities(request.chainTicker); - dispatch(setIdentities(identities)); - - const found = identities.find(id => { - return id.identity.name === expectedName; - }); - - if (found) { - setCheckForId(false); - } - } catch (e) { - console.error(e); - } - }; - - const startPolling = () => { - intervalId.current = setInterval(async () => await checkForNewId(), 5000); - }; - - const stopPolling = () => { - clearInterval(intervalId.current); - }; + useInterval( + async () => await checkForProvisioningStatus( + provisioningResponse.decision.result.info_uri, + request, + setCheckForId, + setProvisioningError, + setCheckForProvisioningStatus, + ), + checkProvisioningStatus ? provisioningCheckDelay : null, + ); - if (checkForId) { - startPolling(); - } else { - stopPolling(); - } - }, [checkForId]); - + useInterval( + async () => await checkForNewId( + dispatch, + request.chainTicker, + requestedId, + setCheckForId, + setCheckForProvisioningStatus, + ), + checkForId ? idCheckDelay : null, + ); const finishSend = () => { + // Clear the chosen name after leaving. + dispatch(setIdentityToProvisionField('')); dispatch(setNavigationPath(SELECT_LOGIN_ID)); }; + const retry = () => { + // Clear the chosen name before choosing a new one. + dispatch(setIdentityToProvisionField('')); + dispatch(setNavigationPath(PROVISIONING_FORM)); + }; + return (
@@ -131,42 +200,81 @@ const ProvisionIdentityResult = () => { {checkForId ? : - } + provisioningError.error ? + + : + + } + {!checkForId && provisioningError.error ? provisioningError.description : ``}
- + {provisioningError.error ? + + {provisioningError.allowRetry && + + } + + + : + + }
diff --git a/src/redux/reducers/provision/provision.actions.js b/src/redux/reducers/provision/provision.actions.js index 3c870e1..91bec83 100644 --- a/src/redux/reducers/provision/provision.actions.js +++ b/src/redux/reducers/provision/provision.actions.js @@ -3,7 +3,8 @@ import { SET_PROVISONING_INFO, SET_PROVISONING_NAME, SET_PROVISONING_RESPONSE, - SET_REQUESTED_FQN + SET_REQUESTED_FQN, + SET_REQUESTED_ID } from "./provision.types"; export const setIdentityToProvisionField = (idToProvisionField) => { @@ -42,6 +43,15 @@ export const setRequestedFqn = (requestedFqn) => { }; }; +export const setRequestedId = (requestedId) => { + return { + type: SET_REQUESTED_ID, + payload: { + requestedId + } + }; +}; + export const setProvisioningName= (provisioningName) => { return { type: SET_PROVISONING_NAME, diff --git a/src/redux/reducers/provision/provision.reducer.js b/src/redux/reducers/provision/provision.reducer.js index 952ee05..011ab91 100644 --- a/src/redux/reducers/provision/provision.reducer.js +++ b/src/redux/reducers/provision/provision.reducer.js @@ -6,15 +6,17 @@ import { SET_PROVISONING_INFO, SET_PROVISONING_NAME, SET_PROVISONING_RESPONSE, - SET_REQUESTED_FQN + SET_REQUESTED_FQN, + SET_REQUESTED_ID } from "./provision.types"; export const provision = (state = { - identityToProvisionField: "", + identityToProvisionField: '', provisioningInfo: {}, provisioningResponse: {}, - requestedFqn: "", - provisioningName: "", + requestedFqn: '', + requestedId: '', + provisioningName: '', }, action) => { switch (action.type) { case SET_IDENTITY_TO_PROVISION_FIELD: @@ -37,6 +39,11 @@ export const provision = (state = { ...state, requestedFqn: action.payload.requestedFqn }; + case SET_REQUESTED_ID: + return { + ...state, + requestedId: action.payload.requestedId + }; case SET_PROVISONING_NAME: return { ...state, diff --git a/src/redux/reducers/provision/provision.types.js b/src/redux/reducers/provision/provision.types.js index 93ceabe..a392071 100644 --- a/src/redux/reducers/provision/provision.types.js +++ b/src/redux/reducers/provision/provision.types.js @@ -2,4 +2,5 @@ export const SET_IDENTITY_TO_PROVISION_FIELD = "SET_IDENTITY_TO_PROVISION_FIELD" export const SET_PROVISONING_INFO = "SET_PROVISONING_INFO"; export const SET_PROVISONING_RESPONSE = "SET_PROVISONING_RESPONSE"; export const SET_REQUESTED_FQN = "SET_REQUESTED_FQN"; +export const SET_REQUESTED_ID = "SET_REQUESTED_ID"; export const SET_PROVISONING_NAME = "SET_PROVISONING_NAME"; \ No newline at end of file diff --git a/src/utils/interval.js b/src/utils/interval.js new file mode 100644 index 0000000..52aeefb --- /dev/null +++ b/src/utils/interval.js @@ -0,0 +1,21 @@ +import { useEffect, useRef } from "react"; + +export const useInterval = (callback, delay) => { + + const savedCallback = useRef(); + + useEffect(() => { + savedCallback.current = callback; + }, [callback]); + + + useEffect(() => { + function tick() { + savedCallback.current(); + } + if (delay !== null) { + const id = setInterval(tick, delay); + return () => clearInterval(id); + } + }, [delay]); +}; From 78b749ba4861b7ccb296710b6fe83f8a006c9f3f Mon Sep 17 00:00:00 2001 From: mcstoer <49734282+mcstoer@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:40:28 -0800 Subject: [PATCH 10/12] Break state into individual hooks in provisioning to improve code quality. --- .../ProvisionIdentityConfirm.js | 14 +- .../ProvisionIdentityForm.js | 204 ++++++++---------- 2 files changed, 99 insertions(+), 119 deletions(-) diff --git a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js index 77f7135..ca606b1 100644 --- a/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js +++ b/src/components/LoginConsent/ProvisionIdentity/ProvisionIdentityConfirm/ProvisionIdentityConfirm.js @@ -85,9 +85,7 @@ const ProvisionIdentityConfirm = () => { displaySystemid = null; } - const [state, setState] = useState({ - loading: false, - }); + const [loading, setLoading] = useState(false); const [submissionError, setSubmissionError] = useState({ showError: false, @@ -136,10 +134,10 @@ const ProvisionIdentityConfirm = () => { }; const submitData = async () => { - setState({ loading: false}); + setLoading(true); const submissionSuccess = (response, requestedFqn, provisioningName, requestedId) => { - setState({ loading: false}); + setLoading(false); dispatch(setProvisioningResponse(response)); dispatch(setRequestedFqn(requestedFqn)); dispatch(setProvisioningName(provisioningName)); @@ -152,7 +150,7 @@ const ProvisionIdentityConfirm = () => { showError: true, description: msg, }); - setState({ loading: false}); + setLoading(false); }; try { @@ -360,7 +358,7 @@ const ProvisionIdentityConfirm = () => { >
@@ -362,7 +399,7 @@ const ProvisionIdentityForm = () => {