diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml new file mode 100644 index 0000000000..960a175b6c --- /dev/null +++ b/.github/workflows/cypress.yml @@ -0,0 +1,137 @@ +name: cypress + +on: + pull_request: + branches: [main] + paths: + - 'docker/**' + - 'packages/**' + - 'demos/**' + - 'dev/**' + - 'contracts/**' + - '.github/workflows/tests.yml' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + GH_TOKEN: ${{ github.token }} + NODE_ENV: test + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Print contexts + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + ENV_CONTEXT: ${{ toJson(env) }} + VARS_CONTEXT: ${{ toJson(vars) }} + JOB_CONTEXT: ${{ toJson(job) }} + STEPS_CONTEXT: ${{ toJson(steps) }} + RUNNER_CONTEXT: ${{ toJson(runner) }} + SECRETS_CONTEXT: ${{ toJson(secrets) }} + STRATEGY_CONTEXT: ${{ toJson(strategy) }} + MATRIX_CONTEXT: ${{ toJson(matrix) }} + NEEDS_CONTEXT: ${{ toJson(needs) }} + INPUTS_CONTEXT: ${{ toJson(inputs) }} + run: | + echo "******************************" + echo "github:" "$GITHUB_CONTEXT" + echo "******************************" + echo "env:" "$ENV_CONTEXT" + echo "******************************" + echo "vars:" "$VARS_CONTEXT" + echo "******************************" + echo "job:" "$JOB_CONTEXT" + echo "******************************" + echo "steps:" "$STEPS_CONTEXT" + echo "******************************" + echo "runner:" "$RUNNER_CONTEXT" + echo "******************************" + echo "secrets:" "$SECRETS_CONTEXT" + echo "******************************" + echo "strategy:" "$STRATEGY_CONTEXT" + echo "******************************" + echo "matrix:" "$MATRIX_CONTEXT" + echo "******************************" + echo "needs:" "$NEEDS_CONTEXT" + echo "******************************" + echo "inputs:" "$INPUTS_CONTEXT" + echo "******************************" + + - uses: actions/checkout@v3 + + - run: mkdir -p protocol/cargo-cache + - run: mkdir -p protocol/target + - run: mkdir -p node_modules + - run: mkdir -p ~/.cache/Cypress + + - name: Restore cache + uses: actions/cache/restore@v3 + with: + path: | + protocol/cargo-cache + protocol/target + node_modules + ~/.cache/Cypress + # note that restoring a cache in github is a pain. The trailing '-' matches any string after the '-', therefore 'abc-' would match a cache named 'abc-1234' or 'abc-5678', etc. + # the problem is 'abc-' will not match a cache named 'abc'! So if you're using wildcard cache name selectors like this, you need a field that changes as the suffix to become the wildcard + # here we're setting the key to an unused cache key so it falls back to the wildcard selector in `restore-keys` + key: some-unused-cache-key + restore-keys: | + project-cache-${{ runner.os }}-${{ runner.arch }}- + + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + - run: npm i -g npm@$(cat package.json | jq -r .engines.npm) + + - run: npm ci + + # build all packages in workspace + - run: npm run build:all + + - name: Setup env + run: | + cp demos/client-example-server/env.development demos/client-example-server/.env.test + cp demos/client-example/env.development demos/client-example/.env.test + cp dev/scripts/env.test .env.test + cp dev/scripts/env.test dev/scripts/.env.test + cp dev/scripts/env.test packages/cli/.env.test + cp dev/scripts/env.test packages/procaptcha-bundle/.env.test + echo NODE_ENV: $NODE_ENV + + - name: Start the docker images + run: | + docker compose --file ./docker/docker-compose.test.yml up -d + docker container ls + sleep 10s + + # deploy dapp + protocol and run setup to register, stake and load a dataset for a provider + - run: NODE_ENV=test npm run deploy_protocol + - run: NODE_ENV=test npm run setup + + # Build a test version of the procaptcha bundle and run the cypress tests on it and on the React client-example + # Running bundle:dev instead of bundle:prod means the bundle will be built with selectors that can be used + # by the cypress tests to find the elements they need to interact with + - run: NODE_ENV=test npm -w @prosopo/procaptcha-bundle run bundle:dev + + # Needs concurrently to avoid vite hanging forever https://github.com/vitejs/vite/discussions/8745 + - name: Install concurrently and cypress + run: npm i concurrently cypress + + - name: Run the cypress tests on client-example + run: | + npx concurrently "npm run start:server" "npm run start:provider" "npm run start:demo" "sleep 10s && npm -w @prosopo/cypress-shared run cypress:run:client-example" --success "first" --kill-others + + - name: Run the cypress tests on client-bundle-example + run: | + npx concurrently "npm run start:server" "npm run start:provider" "npm run start:bundle" "sleep 10s && npm -w @prosopo/cypress-shared run cypress:run:client-bundle-example" --success "first" --kill-others + + - name: Run the cypress tests on client-bundle-example explicit rendering + run: | + npx concurrently "npm run start:server" "npm run start:provider" "npm run start:bundle" "sleep 10s && npm -w @prosopo/cypress-shared run cypress:run:client-bundle-example:explicit" --success "first" --kill-others diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index be5ced2e05..ced5235593 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -115,36 +115,3 @@ jobs: # deploy protocol and run the unit tests - run: npm run deploy_protocol - run: npm run test - - # restart the docker images to drop any changes made by the unit tests to the contract(s) before running cypress tests - - name: Reset the docker containers - run: | - docker compose --file ./docker/docker-compose.test.yml down - docker compose --file ./docker/docker-compose.test.yml up -d - docker container ls - sleep 10s - - # deploy dapp + protocol and run setup to register, stake and load a dataset for a provider - - run: NODE_ENV=test npm run deploy_protocol - - run: NODE_ENV=test npm run setup - - # Build a test version of the procaptcha bundle and run the cypress tests on it and on the React client-example - # Running bundle:dev instead of bundle:prod means the bundle will be built with selectors that can be used - # by the cypress tests to find the elements they need to interact with - - run: NODE_ENV=test npm -w @prosopo/procaptcha-bundle run bundle:dev - - # Needs concurrently to avoid vite hanging forever https://github.com/vitejs/vite/discussions/8745 - - name: Install concurrently and cypress - run: npm i concurrently cypress - - - name: Run the cypress tests on client-example - run: | - npx concurrently "npm run start:server" "npm run start:provider" "npm run start:demo" "sleep 10s && npm -w @prosopo/cypress-shared run cypress:run:client-example" --success "first" --kill-others - - - name: Run the cypress tests on client-bundle-example - run: | - npx concurrently "npm run start:server" "npm run start:provider" "npm run start:bundle" "sleep 10s && npm -w @prosopo/cypress-shared run cypress:run:client-bundle-example" --success "first" --kill-others - - - name: Run the cypress tests on client-bundle-example explicit rendering - run: | - npx concurrently "npm run start:server" "npm run start:provider" "npm run start:bundle" "sleep 10s && npm -w @prosopo/cypress-shared run cypress:run:client-bundle-example:explicit" --success "first" --kill-others diff --git a/demos/client-example-server/src/app.ts b/demos/client-example-server/src/app.ts index dace9f7673..614aa3936b 100644 --- a/demos/client-example-server/src/app.ts +++ b/demos/client-example-server/src/app.ts @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. import { ProsopoEnvError, getLoggerDefault } from '@prosopo/common' -import { ProsopoServer, getServerConfig } from '@prosopo/server' -import { getPairAsync } from '@prosopo/contract' +import { getServerConfig } from '@prosopo/server' import connectionFactory from './utils/connection.js' import cors from 'cors' import dotenv from 'dotenv' @@ -82,10 +81,8 @@ async function main() { const config = getServerConfig() console.log('config', config) - const pair = await getPairAsync(config.networks[config.defaultNetwork], config.account.secret) - const prosopoServer = new ProsopoServer(config, pair) - app.use(routesFactory(mongoose, prosopoServer, verifyEndpoint, verifyType)) + app.use(routesFactory(mongoose, config, verifyEndpoint, verifyType)) app.listen(process.env.PROSOPO_SERVER_PORT) } diff --git a/demos/client-example-server/src/controllers/auth.ts b/demos/client-example-server/src/controllers/auth.ts index 32209bdf83..84700d7550 100644 --- a/demos/client-example-server/src/controllers/auth.ts +++ b/demos/client-example-server/src/controllers/auth.ts @@ -11,14 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { ApiParams, ProcaptchaOutput, ProcaptchaOutputSchema } from '@prosopo/types' +import { ApiParams, ProcaptchaToken, ProsopoServerConfigOutput } from '@prosopo/types' import { Connection } from 'mongoose' import { NextFunction, Request, Response } from 'express' import { ProcaptchaResponse } from '@prosopo/types' +import { ProsopoEnvError } from '@prosopo/common' import { ProsopoServer } from '@prosopo/server' import { UserInterface } from '../models/user.js' import { at } from '@prosopo/util' import { blake2b } from '@noble/hashes/blake2b' +import { getPairAsync } from '@prosopo/contract' import { randomAsHex } from '@polkadot/util-crypto' import { u8aToHex } from '@polkadot/util' import { z } from 'zod' @@ -39,7 +41,8 @@ const verify = async ( prosopoServer: ProsopoServer, verifyType: string, verifyEndpoint: string, - data: ProcaptchaOutput + token: ProcaptchaToken, + secret: string ) => { if (verifyType === 'api') { // verify using the API endpoint @@ -47,20 +50,20 @@ const verify = async ( const response = await fetch(verifyEndpoint, { method: 'POST', - body: JSON.stringify(data), + body: JSON.stringify({ [ApiParams.procaptchaResponse]: token, [ApiParams.secret]: secret }), }) return (await response.json()).verified } else { // verify using the TypeScript library console.log('verifying using the TypeScript library') - return await prosopoServer.isVerified(data) + return await prosopoServer.isVerified(token) } } const signup = async ( mongoose: Connection, - prosopoServer: ProsopoServer, + config: ProsopoServerConfigOutput, verifyEndpoint: string, verifyType: string, req: Request, @@ -74,18 +77,26 @@ const signup = async ( email: req.body.email, }) const payload = SubscribeBodySpec.parse(req.body) + const pair = await getPairAsync(config.networks[config.defaultNetwork], config.account.secret) + const prosopoServer = new ProsopoServer(config, pair) await prosopoServer.isReady() if (dbUser) { return res.status(409).json({ message: 'email already exists' }) } - console.log('payload', payload) + console.log('Request payload', payload) + + // get the procaptcha-response token + const token = payload[ApiParams.procaptchaResponse] - // get the contents of the procaptcha-response JSON data - const data = ProcaptchaOutputSchema.parse(payload[ApiParams.procaptchaResponse]) + console.log('Sending Procaptcha token', token) - console.log('sending data', data) + if (!config.account.secret) { + throw new ProsopoEnvError('GENERAL.MNEMONIC_UNDEFINED', { + context: { missingParams: ['PROSOPO_SITE_PRIVATE_KEY'] }, + }) + } - const verified = await verify(prosopoServer, verifyType, verifyEndpoint, data) + const verified = await verify(prosopoServer, verifyType, verifyEndpoint, token, config.account.secret) if (verified) { // salt @@ -118,13 +129,15 @@ const signup = async ( const login = async ( mongoose: Connection, - prosopoServer: ProsopoServer, + config: ProsopoServerConfigOutput, verifyEndpoint: string, verifyType: string, req: Request, res: Response ) => { const User = mongoose.model('User') + const pair = await getPairAsync(config.networks[config.defaultNetwork], config.account.secret) + const prosopoServer = new ProsopoServer(config, pair) await prosopoServer.isReady() // checks if email exists await User.findOne({ @@ -134,11 +147,17 @@ const login = async ( if (!dbUser) { res.status(404).json({ message: 'user not found' }) } else { - const payload = SubscribeBodySpec.parse(req.body) + const payload = SubscribeBodySpec.parse(req.body[ApiParams.procaptchaResponse]) - const data = ProcaptchaOutputSchema.parse(payload[ApiParams.procaptchaResponse]) + const token = payload[ApiParams.procaptchaResponse] + + if (!config.account.secret) { + throw new ProsopoEnvError('GENERAL.MNEMONIC_UNDEFINED', { + context: { missingParams: ['PROSOPO_SITE_PRIVATE_KEY'] }, + }) + } - const verified = await verify(prosopoServer, verifyType, verifyEndpoint, data) + const verified = await verify(prosopoServer, verifyType, verifyEndpoint, token, config.account.secret) if (verified) { // password hash diff --git a/demos/client-example-server/src/routes/routes.ts b/demos/client-example-server/src/routes/routes.ts index b6f383da4d..80acb977c7 100644 --- a/demos/client-example-server/src/routes/routes.ts +++ b/demos/client-example-server/src/routes/routes.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. import { Connection } from 'mongoose' -import { ProsopoServer } from '@prosopo/server' +import { ProsopoServerConfigOutput } from '@prosopo/types' import { isAuth, login, signup } from '../controllers/auth.js' import express from 'express' @@ -20,13 +20,13 @@ const router = express.Router() function getRoutes( mongoose: Connection, - prosopoServer: ProsopoServer, + config: ProsopoServerConfigOutput, verifyEndpoint: string, verifyType: string ): express.Router { - router.post('/login', login.bind(null, mongoose, prosopoServer, verifyEndpoint, verifyType)) + router.post('/login', login.bind(null, mongoose, config, verifyEndpoint, verifyType)) - router.post('/signup', signup.bind(null, mongoose, prosopoServer, verifyEndpoint, verifyType)) + router.post('/signup', signup.bind(null, mongoose, config, verifyEndpoint, verifyType)) router.get('/private', isAuth) diff --git a/demos/client-example/env.development b/demos/client-example/env.development index 50c7dd960a..eb2cf87143 100644 --- a/demos/client-example/env.development +++ b/demos/client-example/env.development @@ -7,4 +7,4 @@ PROSOPO_PORT=9230 PROSOPO_DEFAULT_NETWORK=development PROSOPO_DEFAULT_ENVIRONMENT=development PROSOPO_MONGO_EVENTS_URI=mongodb+srv:///frictionless_events -_DEV_ONLY_WATCH_EVENTS=false \ No newline at end of file +_DEV_ONLY_WATCH_EVENTS=false diff --git a/demos/client-example/src/App.tsx b/demos/client-example/src/App.tsx index 13e08cd6c0..20b0cd88bb 100644 --- a/demos/client-example/src/App.tsx +++ b/demos/client-example/src/App.tsx @@ -17,7 +17,7 @@ import { EnvironmentTypes, EnvironmentTypesSchema, ProcaptchaConfigSchema, - ProcaptchaOutput, + ProcaptchaToken, } from '@prosopo/types' import { ExtensionAccountSelect } from './components/ExtensionAccountSelect.js' import { Procaptcha } from '@prosopo/procaptcha-react' @@ -45,7 +45,7 @@ function App(props: AppProps) { // whether the form is doing a login or a signup action const [isLogin, setIsLogin] = useState(true) // the result of the captcha process. Submit this to your backend server to verify the user is human on the backend - const [procaptchaOutput, setProcaptchaOutput] = useState(undefined) + const [procaptchaToken, setProcaptchaToken] = useState(undefined) const config = ProcaptchaConfigSchema.parse({ userAccountAddress: account, @@ -93,14 +93,14 @@ function App(props: AppProps) { } const onActionHandler = () => { - if (!procaptchaOutput) { + if (!procaptchaToken) { alert('Must complete captcha') } const payload = { email, name, password, - [ApiParams.procaptchaResponse]: procaptchaOutput, + [ApiParams.procaptchaResponse]: procaptchaToken, } const url = new URL(urlPath, config.serverUrl).href console.log('posting to', url, 'with payload', payload) @@ -139,9 +139,9 @@ function App(props: AppProps) { setMessage('') } - const onHuman = async (procaptchaOutput: ProcaptchaOutput) => { - console.log('onHuman', procaptchaOutput) - setProcaptchaOutput(procaptchaOutput) + const onHuman = async (procaptchaToken: ProcaptchaToken) => { + console.log('onHuman', procaptchaToken) + setProcaptchaToken(procaptchaToken) } const getMessage = () => { @@ -233,7 +233,7 @@ function App(props: AppProps) { diff --git a/demos/provider-mock/src/api.ts b/demos/provider-mock/src/api.ts index 64325fe2e6..c80f5bac61 100644 --- a/demos/provider-mock/src/api.ts +++ b/demos/provider-mock/src/api.ts @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { ApiPaths, VerifySolutionBody } from '@prosopo/types' +import { ApiPaths, VerifySolutionBody, decodeProcaptchaOutput } from '@prosopo/types' import { ProsopoApiError } from '@prosopo/common' import { VerifySolutionBodyTypeOutput } from '@prosopo/types' import express, { Router } from 'express' @@ -30,28 +30,30 @@ export function prosopoRouter(): Router { * @param {string} userAccount - Dapp User id * @param {string} commitmentId - The captcha solution to look up */ - router.post(ApiPaths.VerifyCaptchaSolutionDapp, async (req, res, next) => { - let parsed: VerifySolutionBodyTypeOutput + router.post(ApiPaths.VerifyImageCaptchaSolutionDapp, async (req, res, next) => { + let body: VerifySolutionBodyTypeOutput try { - parsed = VerifySolutionBody.parse(req.body) + body = VerifySolutionBody.parse(req.body) } catch (err) { return next( new ProsopoApiError('CAPTCHA.PARSE_ERROR', { - context: { error: err, errorCode: 400 }, + context: { error: err, code: 400 }, logLevel: 'info', }) ) } try { + const { token } = body + const { user, dapp, commitmentId } = decodeProcaptchaOutput(token) const testCommitmentId = '0x123456789test' const testAccount = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY' const testDapp = '5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM' let statusMessage = 'API.USER_NOT_VERIFIED' let approved = false if ( - (parsed.user && parsed.user === testAccount) || - (parsed.commitmentId && parsed.commitmentId === testCommitmentId) || - (parsed.dapp && parsed.dapp === testDapp) + (user && user === testAccount) || + (commitmentId && commitmentId === testCommitmentId) || + (dapp && dapp === testDapp) ) { approved = true statusMessage = 'API.USER_VERIFIED' @@ -67,7 +69,7 @@ export function prosopoRouter(): Router { verified: false, }) } catch (err) { - return next(new ProsopoApiError('API.UNKNOWN', { context: { error: err, errorCode: 500 } })) + return next(new ProsopoApiError('API.UNKNOWN', { context: { error: err, code: 500 } })) } }) diff --git a/dev/config/src/projectInfo.ts b/dev/config/src/projectInfo.ts index aa46df0b2d..8ddf4ccad1 100644 --- a/dev/config/src/projectInfo.ts +++ b/dev/config/src/projectInfo.ts @@ -20,6 +20,8 @@ export const getContractNames = () => { }) } +// Top Level + export const getRootDir = () => new URL('../../..', import.meta.url).pathname.slice(0, -1) export const getCacheDir = () => `${getRootDir()}/.cache` @@ -30,22 +32,26 @@ export const getDevDir = () => `${getRootDir()}/dev` export const getDemosDir = () => `${getRootDir()}/demos` -export const getContractDir = () => `${getRootDir()}/packages/contract` - export const getProtocolDir = () => `${getRootDir()}/protocol` export const getPackagesDir = () => `${getRootDir()}/packages` export const getNodeModulesDir = () => `${getRootDir()}/node_modules` +// Dev + export const getConfigPkgDir = () => `${getDevDir()}/config` export const getScriptsPkgDir = () => `${getDevDir()}/scripts` +// Protocol + export const getProtocolCliDir = () => `${getProtocolDir()}/dist/cli` export const getProtocolDistDir = () => `${getProtocolDir()}/target/ink` +// Demos + export const getClientExampleDir = () => `${getDemosDir()}/client-example` export const getClientExampleServerDir = () => `${getDemosDir()}/client-example-server` @@ -54,7 +60,7 @@ export const getClientBundleExampleDir = () => `${getDemosDir()}/client-bundle-e export const getDappExampleDir = () => `${getDemosDir()}/dapp-example` -export const getCommonPkgDir = () => `${getPackagesDir()}/common` +// Packages export const getAccountPkgDir = () => `${getPackagesDir()}/account` @@ -62,7 +68,9 @@ export const getApiPkgDir = () => `${getPackagesDir()}/api` export const getCliPkgDir = () => `${getPackagesDir()}/cli` -export const getUtilPkgDir = () => `${getPackagesDir()}/util` +export const getCommonPkgDir = () => `${getPackagesDir()}/common` + +export const getContractPkgDir = () => `${getPackagesDir()}/contract` export const getDatabasePkgDir = () => `${getPackagesDir()}/database` @@ -76,26 +84,34 @@ export const getFileServerPkgDir = () => `${getPackagesDir()}/file-server` export const getProcaptchaPkgDir = () => `${getPackagesDir()}/procaptcha` -export const getProcaptchaReactPkgDir = () => `${getPackagesDir()}/procaptcha-react` - export const getProcaptchaBundlePkgDir = () => `${getPackagesDir()}/procaptcha-bundle` +export const getProcaptchaCommonPkgDir = () => `${getPackagesDir()}/procaptcha-common` + +export const getProcaptchaFrictionlessPkgDir = () => `${getPackagesDir()}/procaptcha-frictionless` + export const getProcaptchaPoWPkgDir = () => `${getPackagesDir()}/procaptcha-pow` +export const getProcaptchaReactPkgDir = () => `${getPackagesDir()}/procaptcha-react` + export const getProviderPkgDir = () => `${getPackagesDir()}/provider` export const getServerPkgDir = () => `${getPackagesDir()}/server` +export const getTxPkgDir = () => `${getPackagesDir()}/tx` + +export const getTypesPkgDir = () => `${getPackagesDir()}/types` + export const getTypesDatabasePkgDir = () => `${getPackagesDir()}/types-database` export const getTypesEnvPkgDir = () => `${getPackagesDir()}/types-env` -export const getTypesPkgDir = () => `${getPackagesDir()}/types` - -export const getTxPkgDir = () => `${getPackagesDir()}/tx` +export const getUtilPkgDir = () => `${getPackagesDir()}/util` export const getWebComponentsPkgDir = () => `${getPackagesDir()}/web-components` +// Contracts + export const getContractsDir = () => `${getRootDir()}/contracts` export const getProtocolContractsDir = () => `${getProtocolDir()}/contracts` diff --git a/dev/config/src/vite/vite.backend.config.ts b/dev/config/src/vite/vite.backend.config.ts index 0fdab62149..9901059f95 100644 --- a/dev/config/src/vite/vite.backend.config.ts +++ b/dev/config/src/vite/vite.backend.config.ts @@ -60,6 +60,7 @@ export default async function ( 'process.env.WS_NO_BUFFER_UTIL': 'true', 'process.env.WS_NO_UTF_8_VALIDATE': 'true', 'process.env.PROSOPO_PACKAGE_VERSION': JSON.stringify(packageVersion), + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || mode), ...(process.env.PROSOPO_DEFAULT_ENVIRONMENT && { 'process.env.PROSOPO_DEFAULT_ENVIRONMENT': JSON.stringify(process.env.PROSOPO_DEFAULT_ENVIRONMENT), }), diff --git a/dev/scripts/package.json b/dev/scripts/package.json index 422a7f21b0..2189f60448 100644 --- a/dev/scripts/package.json +++ b/dev/scripts/package.json @@ -31,6 +31,7 @@ "@polkadot/api": "10.13.1", "@polkadot/api-contract": "10.13.1", "@polkadot/types": "10.13.1", + "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", "@prosopo/api": "0.3.42", "@prosopo/cli": "0.3.42", @@ -44,6 +45,7 @@ "@prosopo/file-server": "0.3.42", "@prosopo/procaptcha": "0.3.42", "@prosopo/procaptcha-bundle": "0.3.42", + "@prosopo/procaptcha-common": "0.3.42", "@prosopo/procaptcha-react": "0.3.42", "@prosopo/provider": "0.3.42", "@prosopo/server": "0.3.42", diff --git a/dev/scripts/src/cli/index.ts b/dev/scripts/src/cli/index.ts index 9b85890060..32eff7b6f1 100644 --- a/dev/scripts/src/cli/index.ts +++ b/dev/scripts/src/cli/index.ts @@ -12,7 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. import { LogLevel, getLogger } from '@prosopo/common' -import { NetworkConfigSchema, NetworkNamesSchema, networks as getNetworks } from '@prosopo/types' +import { + NetworkConfigSchema, + NetworkNamesSchema, + decodeProcaptchaOutput, + networks as getNetworks, +} from '@prosopo/types' import { deployDapp, deployProtocol } from '../contract/deploy/index.js' import { exec } from '../util/index.js' import { run as fundDapps } from '../contract/fundDapps.js' @@ -22,6 +27,7 @@ import { getEnv, loadEnv } from '@prosopo/cli' import { getLogLevel } from '@prosopo/common' import { hideBin } from 'yargs/helpers' import { importContract } from '../contract/index.js' +import { isHex } from '@polkadot/util' import { setup } from '../setup/index.js' import { run as transferContract } from '../contract/transferContract.js' import { updateEnvFiles } from '../util/index.js' @@ -98,7 +104,7 @@ export async function processArgs(args: string[]) { (yargs) => yargs.option('update_env', { type: 'boolean', - demand: false, + demandOption: false, desc: 'Update env files with the new contract address', default: false, }), @@ -119,7 +125,7 @@ export async function processArgs(args: string[]) { 'create_env_files', 'Copies the env.xyz files to .env.xyz', (yargs) => yargs, - async (argv) => { + async () => { const env = getEnv() const scripts = getScriptsPkgDir() await exec(`cp -v ${scripts}/env.${env} ${scripts}/.env.${env}`) @@ -134,7 +140,7 @@ export async function processArgs(args: string[]) { builder: (yargs) => yargs.option('force', { type: 'boolean', - demand: false, + demandOption: false, desc: 'Force provider re-registration and dataset setup', }), @@ -150,12 +156,12 @@ export async function processArgs(args: string[]) { yargs .option('in', { type: 'string', - demand: true, + demandOption: true, desc: "The path to the contract's abi", }) .option('out', { type: 'string', - demand: true, + demandOption: true, desc: 'The path to the output directory', }), handler: async (argv) => { @@ -166,7 +172,7 @@ export async function processArgs(args: string[]) { command: 'import_all_contracts', describe: 'Update all contracts into the contract package.', builder: (yargs) => yargs, - handler: async (argv) => { + handler: async () => { const contracts = getContractNames() for (const contract of contracts) { const inDir = `${getProtocolDistDir()}/${contract}` @@ -180,7 +186,7 @@ export async function processArgs(args: string[]) { command: 'fund_dapps', describe: 'Fund the dapps if they are unfunded', builder: (yargs) => yargs, - handler: async (argv) => { + handler: async () => { const atlasUri = process.env._DEV_ONLY_ATLAS_URI fundDapps(atlasUri) .then((result) => { @@ -251,10 +257,27 @@ export async function processArgs(args: string[]) { .command({ command: 'version', describe: 'Set the version of packages', - builder: (yargs) => yargs.option('v', { type: 'string', demand: true }), + builder: (yargs) => yargs.option('v', { type: 'string', demandOption: true }), handler: async (argv) => { await setVersion(String(argv.v)) }, + }) + .command({ + command: 'token ', + describe: 'Decode a Procaptcha token to the JSON output format', + builder: (yargs) => + yargs.positional('tokenHex', { + describe: 'a Procaptcha token to decode', + type: 'string', + demandOption: true, + }), + handler: async (argv) => { + if (!isHex(argv.tokenHex)) { + log.error('Token must be a hex string') + process.exit(1) + } + log.info(decodeProcaptchaOutput(argv.tokenHex)) + }, }).argv } processArgs(process.argv) diff --git a/dev/scripts/src/scripts/encodeDecode.ts b/dev/scripts/src/scripts/encodeDecode.ts index 7bf22ecff0..0ee9b05f73 100644 --- a/dev/scripts/src/scripts/encodeDecode.ts +++ b/dev/scripts/src/scripts/encodeDecode.ts @@ -84,6 +84,8 @@ function main() { output.push({ name: `u8aToHex`, value: u8aToHex(padded) }) output.push({ name: `encodeAddress(_, ss58Format)`, value: encodeAddress(hex, ss58Format) }) output.push({ name: `u8aToString`, value: u8aToString(padded) }) + + output.push({ name: `stringToHex`, value: stringToHex(arg) }) } if (isBN(arg)) { diff --git a/dev/scripts/tsconfig.json b/dev/scripts/tsconfig.json index 1bdd50abcd..f46bafa6f4 100644 --- a/dev/scripts/tsconfig.json +++ b/dev/scripts/tsconfig.json @@ -49,6 +49,9 @@ { "path": "../../packages/procaptcha-bundle" }, + { + "path": "../../packages/procaptcha-common" + }, { "path": "../../packages/procaptcha-react" }, diff --git a/package-lock.json b/package-lock.json index 8d8a33a681..653f66dd43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -422,6 +422,14 @@ "npm": ">=9" } }, + "dev/config/node_modules/@types/react": { + "version": "18.3.3", + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, "dev/flux": { "name": "@prosopo/flux", "version": "0.3.42", @@ -562,14 +570,6 @@ "node": ">=12" } }, - "dev/flux/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "dev/gh-actions": { "version": "0.3.42", "license": "ISC", @@ -619,6 +619,7 @@ "@polkadot/api": "10.13.1", "@polkadot/api-contract": "10.13.1", "@polkadot/types": "10.13.1", + "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", "@prosopo/api": "0.3.42", "@prosopo/captcha-contract": "0.3.42", @@ -633,6 +634,7 @@ "@prosopo/file-server": "0.3.42", "@prosopo/procaptcha": "0.3.42", "@prosopo/procaptcha-bundle": "0.3.42", + "@prosopo/procaptcha-common": "0.3.42", "@prosopo/procaptcha-react": "0.3.42", "@prosopo/provider": "0.3.42", "@prosopo/server": "0.3.42", @@ -677,14 +679,6 @@ "node": ">=12" } }, - "dev/scripts/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "dev/ts-brand": { "name": "@prosopo/ts-brand", "version": "0.3.42", @@ -863,48 +857,48 @@ "optional": true }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.583.0.tgz", - "integrity": "sha512-FrkVjrDRsXofw1F/iJqR/DOKPbIakIB+Dr04l25Em4PTWBj29NcQyYW49qcCHF0CPkqQpin8ASXDWzGv7A0yxg==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.590.0.tgz", + "integrity": "sha512-Nfn23x7yZgp1umB+Avvsw9t8XIFWEqNQcpJ10Q8RcI9bQ0SvR4OcnnVsBA0WFL53FVzVM2FAkjNrCMRaSe6xWw==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sso-oidc": "3.583.0", - "@aws-sdk/client-sts": "3.583.0", - "@aws-sdk/core": "3.582.0", - "@aws-sdk/credential-provider-node": "3.583.0", + "@aws-sdk/client-sso-oidc": "3.590.0", + "@aws-sdk/client-sts": "3.590.0", + "@aws-sdk/core": "3.588.0", + "@aws-sdk/credential-provider-node": "3.590.0", "@aws-sdk/middleware-host-header": "3.577.0", "@aws-sdk/middleware-logger": "3.577.0", "@aws-sdk/middleware-recursion-detection": "3.577.0", - "@aws-sdk/middleware-user-agent": "3.583.0", - "@aws-sdk/region-config-resolver": "3.577.0", + "@aws-sdk/middleware-user-agent": "3.587.0", + "@aws-sdk/region-config-resolver": "3.587.0", "@aws-sdk/types": "3.577.0", - "@aws-sdk/util-endpoints": "3.583.0", + "@aws-sdk/util-endpoints": "3.587.0", "@aws-sdk/util-user-agent-browser": "3.577.0", - "@aws-sdk/util-user-agent-node": "3.577.0", - "@smithy/config-resolver": "^3.0.0", - "@smithy/core": "^2.0.1", + "@aws-sdk/util-user-agent-node": "3.587.0", + "@smithy/config-resolver": "^3.0.1", + "@smithy/core": "^2.1.1", "@smithy/fetch-http-handler": "^3.0.1", "@smithy/hash-node": "^3.0.0", "@smithy/invalid-dependency": "^3.0.0", "@smithy/middleware-content-length": "^3.0.0", - "@smithy/middleware-endpoint": "^3.0.0", - "@smithy/middleware-retry": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.1", + "@smithy/middleware-retry": "^3.0.3", "@smithy/middleware-serde": "^3.0.0", "@smithy/middleware-stack": "^3.0.0", - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/node-http-handler": "^3.0.0", "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/url-parser": "^3.0.0", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.1", - "@smithy/util-defaults-mode-node": "^3.0.1", - "@smithy/util-endpoints": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.3", + "@smithy/util-defaults-mode-node": "^3.0.3", + "@smithy/util-endpoints": "^2.0.1", "@smithy/util-middleware": "^3.0.0", "@smithy/util-retry": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -915,45 +909,45 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.583.0.tgz", - "integrity": "sha512-FNJ2MmiBtZZwgkj4+GLVrzqwmD6D8FBptrFZk7PnGkSf7v1Q8txYNI6gY938RRhYJ4lBW4cNbhPvWoDxAl90Hw==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.590.0.tgz", + "integrity": "sha512-6xbC6oQVJKBRTyXyR3C15ksUsPOyW4p+uCj7dlKYWGJvh4vGTV8KhZKS53oPG8t4f1+OMJWjr5wKuXRoaFsmhQ==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.582.0", + "@aws-sdk/core": "3.588.0", "@aws-sdk/middleware-host-header": "3.577.0", "@aws-sdk/middleware-logger": "3.577.0", "@aws-sdk/middleware-recursion-detection": "3.577.0", - "@aws-sdk/middleware-user-agent": "3.583.0", - "@aws-sdk/region-config-resolver": "3.577.0", + "@aws-sdk/middleware-user-agent": "3.587.0", + "@aws-sdk/region-config-resolver": "3.587.0", "@aws-sdk/types": "3.577.0", - "@aws-sdk/util-endpoints": "3.583.0", + "@aws-sdk/util-endpoints": "3.587.0", "@aws-sdk/util-user-agent-browser": "3.577.0", - "@aws-sdk/util-user-agent-node": "3.577.0", - "@smithy/config-resolver": "^3.0.0", - "@smithy/core": "^2.0.1", + "@aws-sdk/util-user-agent-node": "3.587.0", + "@smithy/config-resolver": "^3.0.1", + "@smithy/core": "^2.1.1", "@smithy/fetch-http-handler": "^3.0.1", "@smithy/hash-node": "^3.0.0", "@smithy/invalid-dependency": "^3.0.0", "@smithy/middleware-content-length": "^3.0.0", - "@smithy/middleware-endpoint": "^3.0.0", - "@smithy/middleware-retry": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.1", + "@smithy/middleware-retry": "^3.0.3", "@smithy/middleware-serde": "^3.0.0", "@smithy/middleware-stack": "^3.0.0", - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/node-http-handler": "^3.0.0", "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/url-parser": "^3.0.0", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.1", - "@smithy/util-defaults-mode-node": "^3.0.1", - "@smithy/util-endpoints": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.3", + "@smithy/util-defaults-mode-node": "^3.0.3", + "@smithy/util-endpoints": "^2.0.1", "@smithy/util-middleware": "^3.0.0", "@smithy/util-retry": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -964,47 +958,47 @@ } }, "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.583.0.tgz", - "integrity": "sha512-LO3wmrFXPi2kNE46lD1XATfRrvdNxXd4DlTFouoWmr7lvqoUkcbmtkV2r/XChZA2z0HiDauphC1e8b8laJVeSg==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.590.0.tgz", + "integrity": "sha512-3yCLPjq6WFfDpdUJKk/gSz4eAPDTjVknXaveMPi2QoVBCshneOnJsV16uNKlpVF1frTHrrDRfKYmbaVh6nFBvQ==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.583.0", - "@aws-sdk/core": "3.582.0", - "@aws-sdk/credential-provider-node": "3.583.0", + "@aws-sdk/client-sts": "3.590.0", + "@aws-sdk/core": "3.588.0", + "@aws-sdk/credential-provider-node": "3.590.0", "@aws-sdk/middleware-host-header": "3.577.0", "@aws-sdk/middleware-logger": "3.577.0", "@aws-sdk/middleware-recursion-detection": "3.577.0", - "@aws-sdk/middleware-user-agent": "3.583.0", - "@aws-sdk/region-config-resolver": "3.577.0", + "@aws-sdk/middleware-user-agent": "3.587.0", + "@aws-sdk/region-config-resolver": "3.587.0", "@aws-sdk/types": "3.577.0", - "@aws-sdk/util-endpoints": "3.583.0", + "@aws-sdk/util-endpoints": "3.587.0", "@aws-sdk/util-user-agent-browser": "3.577.0", - "@aws-sdk/util-user-agent-node": "3.577.0", - "@smithy/config-resolver": "^3.0.0", - "@smithy/core": "^2.0.1", + "@aws-sdk/util-user-agent-node": "3.587.0", + "@smithy/config-resolver": "^3.0.1", + "@smithy/core": "^2.1.1", "@smithy/fetch-http-handler": "^3.0.1", "@smithy/hash-node": "^3.0.0", "@smithy/invalid-dependency": "^3.0.0", "@smithy/middleware-content-length": "^3.0.0", - "@smithy/middleware-endpoint": "^3.0.0", - "@smithy/middleware-retry": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.1", + "@smithy/middleware-retry": "^3.0.3", "@smithy/middleware-serde": "^3.0.0", "@smithy/middleware-stack": "^3.0.0", - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/node-http-handler": "^3.0.0", "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/url-parser": "^3.0.0", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.1", - "@smithy/util-defaults-mode-node": "^3.0.1", - "@smithy/util-endpoints": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.3", + "@smithy/util-defaults-mode-node": "^3.0.3", + "@smithy/util-endpoints": "^2.0.1", "@smithy/util-middleware": "^3.0.0", "@smithy/util-retry": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -1015,47 +1009,47 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.583.0.tgz", - "integrity": "sha512-xDMxiemPDWr9dY2Q4AyixkRnk/hvS6fs6OWxuVCz1WO47YhaAfOsEGAgQMgDLLaOfj/oLU5D14uTNBEPGh4rBA==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.590.0.tgz", + "integrity": "sha512-f4R1v1LSn4uLYZ5qj4DyL6gp7PXXzJeJsm2seheiJX+53LSF5L7XSDnQVtX1p9Tevv0hp2YUWUTg6QYwIVSuGg==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sso-oidc": "3.583.0", - "@aws-sdk/core": "3.582.0", - "@aws-sdk/credential-provider-node": "3.583.0", + "@aws-sdk/client-sso-oidc": "3.590.0", + "@aws-sdk/core": "3.588.0", + "@aws-sdk/credential-provider-node": "3.590.0", "@aws-sdk/middleware-host-header": "3.577.0", "@aws-sdk/middleware-logger": "3.577.0", "@aws-sdk/middleware-recursion-detection": "3.577.0", - "@aws-sdk/middleware-user-agent": "3.583.0", - "@aws-sdk/region-config-resolver": "3.577.0", + "@aws-sdk/middleware-user-agent": "3.587.0", + "@aws-sdk/region-config-resolver": "3.587.0", "@aws-sdk/types": "3.577.0", - "@aws-sdk/util-endpoints": "3.583.0", + "@aws-sdk/util-endpoints": "3.587.0", "@aws-sdk/util-user-agent-browser": "3.577.0", - "@aws-sdk/util-user-agent-node": "3.577.0", - "@smithy/config-resolver": "^3.0.0", - "@smithy/core": "^2.0.1", + "@aws-sdk/util-user-agent-node": "3.587.0", + "@smithy/config-resolver": "^3.0.1", + "@smithy/core": "^2.1.1", "@smithy/fetch-http-handler": "^3.0.1", "@smithy/hash-node": "^3.0.0", "@smithy/invalid-dependency": "^3.0.0", "@smithy/middleware-content-length": "^3.0.0", - "@smithy/middleware-endpoint": "^3.0.0", - "@smithy/middleware-retry": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.1", + "@smithy/middleware-retry": "^3.0.3", "@smithy/middleware-serde": "^3.0.0", "@smithy/middleware-stack": "^3.0.0", - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/node-http-handler": "^3.0.0", "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/url-parser": "^3.0.0", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.1", - "@smithy/util-defaults-mode-node": "^3.0.1", - "@smithy/util-endpoints": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.3", + "@smithy/util-defaults-mode-node": "^3.0.3", + "@smithy/util-endpoints": "^2.0.1", "@smithy/util-middleware": "^3.0.0", "@smithy/util-retry": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -1066,15 +1060,15 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.582.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.582.0.tgz", - "integrity": "sha512-ofmD96IQc9g1dbyqlCyxu5fCG7kIl9p1NoN5+vGBUyLdbmPCV3Pdg99nRHYEJuv2MgGx5AUFGDPMHcqbJpnZIw==", + "version": "3.588.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.588.0.tgz", + "integrity": "sha512-O1c2+9ce46Z+iiid+W3iC1IvPbfIo5ev9CBi54GdNB9SaI8/3+f8MJcux0D6c9toCF0ArMersN/gp8ek57e9uQ==", "optional": true, "dependencies": { - "@smithy/core": "^2.0.1", + "@smithy/core": "^2.1.1", "@smithy/protocol-http": "^4.0.0", "@smithy/signature-v4": "^3.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "fast-xml-parser": "4.2.5", "tslib": "^2.6.2" @@ -1084,14 +1078,14 @@ } }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.583.0.tgz", - "integrity": "sha512-Z6VdDZApTxeI/n8qXBz3IkAdC0tL/mw+cz6EprqpkZG8bejHw78fVjeaVOBBkuskUikjwN4puv0SEJzoEMIqpA==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.590.0.tgz", + "integrity": "sha512-28vRC0BYaDVWU9AzGBywTRmwiwQfkixfOZGcY6e5J6cRjVoawomvHmC2mJd11SjoDcVLUQF+z4Z9z1ZCr1GcpA==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.583.0", + "@aws-sdk/client-cognito-identity": "3.590.0", "@aws-sdk/types": "3.577.0", - "@smithy/property-provider": "^3.0.0", + "@smithy/property-provider": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1100,13 +1094,13 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.577.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.577.0.tgz", - "integrity": "sha512-Jxu255j0gToMGEiqufP8ZtKI8HW90lOLjwJ3LrdlD/NLsAY0tOQf1fWc53u28hWmmNGMxmCrL2p66IOgMDhDUw==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.587.0.tgz", + "integrity": "sha512-Hyg/5KFECIk2k5o8wnVEiniV86yVkhn5kzITUydmNGCkXdBFHMHRx6hleQ1bqwJHbBskyu8nbYamzcwymmGwmw==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@smithy/property-provider": "^3.0.0", + "@smithy/property-provider": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1115,17 +1109,17 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.582.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.582.0.tgz", - "integrity": "sha512-kGOUKw5ryPkDIYB69PjK3SicVLTbWB06ouFN2W1EvqUJpkQGPAUGzYcomKtt3mJaCTf/1kfoaHwARAl6KKSP8Q==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.587.0.tgz", + "integrity": "sha512-Su1SRWVRCuR1e32oxX3C1V4c5hpPN20WYcRfdcr2wXwHqSvys5DrnmuCC+JoEnS/zt3adUJhPliTqpfKgSdMrA==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", "@smithy/fetch-http-handler": "^3.0.1", "@smithy/node-http-handler": "^3.0.0", - "@smithy/property-provider": "^3.0.0", + "@smithy/property-provider": "^3.1.0", "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/util-stream": "^3.0.1", "tslib": "^2.6.2" @@ -1135,19 +1129,20 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.583.0.tgz", - "integrity": "sha512-8I0oWNg/yps6ctjhEeL/qJ9BIa/+xXP7RPDQqFKZ2zBkWbmLLOoMWXRvl8uKUBD6qCe+DGmcu9skfVXeXSesEQ==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.590.0.tgz", + "integrity": "sha512-Y5cFciAK38VIvRgZeND7HvFNR32thGtQb8Xop6cMn33FC78uwcRIu9Hc9699XTclCZqz4+Xl1WU+dZ+rnFn2AA==", "optional": true, "dependencies": { - "@aws-sdk/credential-provider-env": "3.577.0", - "@aws-sdk/credential-provider-process": "3.577.0", - "@aws-sdk/credential-provider-sso": "3.583.0", - "@aws-sdk/credential-provider-web-identity": "3.577.0", + "@aws-sdk/credential-provider-env": "3.587.0", + "@aws-sdk/credential-provider-http": "3.587.0", + "@aws-sdk/credential-provider-process": "3.587.0", + "@aws-sdk/credential-provider-sso": "3.590.0", + "@aws-sdk/credential-provider-web-identity": "3.587.0", "@aws-sdk/types": "3.577.0", - "@smithy/credential-provider-imds": "^3.0.0", - "@smithy/property-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/credential-provider-imds": "^3.1.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1155,25 +1150,25 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.583.0" + "@aws-sdk/client-sts": "^3.590.0" } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.583.0.tgz", - "integrity": "sha512-yBNypBXny7zJH85SzxDj8s1mbLXv9c/Vbq0qR3R3POj2idZ6ywB/qlIRC1XwBuv49Wvg8kA1wKXk3K3jrpcVIw==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.590.0.tgz", + "integrity": "sha512-Ky38mNFoXobGrDQ11P3dU1e+q1nRJ7eZl8l15KUpvZCe/hOudbxQi/epQrCazD/gRYV2fTyczdLlZzB5ZZ8DhQ==", "optional": true, "dependencies": { - "@aws-sdk/credential-provider-env": "3.577.0", - "@aws-sdk/credential-provider-http": "3.582.0", - "@aws-sdk/credential-provider-ini": "3.583.0", - "@aws-sdk/credential-provider-process": "3.577.0", - "@aws-sdk/credential-provider-sso": "3.583.0", - "@aws-sdk/credential-provider-web-identity": "3.577.0", + "@aws-sdk/credential-provider-env": "3.587.0", + "@aws-sdk/credential-provider-http": "3.587.0", + "@aws-sdk/credential-provider-ini": "3.590.0", + "@aws-sdk/credential-provider-process": "3.587.0", + "@aws-sdk/credential-provider-sso": "3.590.0", + "@aws-sdk/credential-provider-web-identity": "3.587.0", "@aws-sdk/types": "3.577.0", - "@smithy/credential-provider-imds": "^3.0.0", - "@smithy/property-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/credential-provider-imds": "^3.1.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1182,14 +1177,14 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.577.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.577.0.tgz", - "integrity": "sha512-Gin6BWtOiXxIgITrJ3Nwc+Y2P1uVT6huYR4EcbA/DJUPWyO0n9y5UFLewPvVbLkRn15JeEqErBLUrHclkiOKtw==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.587.0.tgz", + "integrity": "sha512-V4xT3iCqkF8uL6QC4gqBJg/2asd/damswP1h9HCfqTllmPWzImS+8WD3VjgTLw5b0KbTy+ZdUhKc0wDnyzkzxg==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@smithy/property-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1198,16 +1193,16 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.583.0.tgz", - "integrity": "sha512-G/1EvL9tBezSiU+06tG4K/kOvFfPjnheT4JSXqjPM7+vjKzgp2jxp1J9MMd69zs4jVWon932zMeGgjrCplzMEg==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.590.0.tgz", + "integrity": "sha512-v+0j/I+je9okfwXsgmLppmwIE+TuMp5WqLz7r7PHz9KjzLyKaKTDvfllFD+8oPpBqnmOWiJ9qTGPkrfhB7a/fQ==", "optional": true, "dependencies": { - "@aws-sdk/client-sso": "3.583.0", - "@aws-sdk/token-providers": "3.577.0", + "@aws-sdk/client-sso": "3.590.0", + "@aws-sdk/token-providers": "3.587.0", "@aws-sdk/types": "3.577.0", - "@smithy/property-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1216,13 +1211,13 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.577.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.577.0.tgz", - "integrity": "sha512-ZGHGNRaCtJJmszb9UTnC7izNCtRUttdPlLdMkh41KPS32vfdrBDHs1JrpbZijItRj1xKuOXsiYSXLAaHGcLh8Q==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.587.0.tgz", + "integrity": "sha512-XqIx/I2PG7kyuw3WjAP9wKlxy8IvFJwB8asOFT1xPFoVfZYKIogjG9oLP5YiRtfvDkWIztHmg5MlVv3HdJDGRw==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@smithy/property-provider": "^3.0.0", + "@smithy/property-provider": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1230,29 +1225,29 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.577.0" + "@aws-sdk/client-sts": "^3.587.0" } }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.583.0.tgz", - "integrity": "sha512-aD/lw6LJW51f+LgdR54UxyGvXqWZs4HCT310Qf794qFItDWXqhHK4EgS1x41BgAvXPUx0+HSO8OI4eb+AklckA==", + "version": "3.590.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.590.0.tgz", + "integrity": "sha512-Z4SHk/GCoM5JEJOH3+xr2I7VvPGdeGPHL1cck/UFIN1Fap1wT3uIsTW92Rhru2AvnhQnAPpDUOHO9/hDJk1MDA==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.583.0", - "@aws-sdk/client-sso": "3.583.0", - "@aws-sdk/client-sts": "3.583.0", - "@aws-sdk/credential-provider-cognito-identity": "3.583.0", - "@aws-sdk/credential-provider-env": "3.577.0", - "@aws-sdk/credential-provider-http": "3.582.0", - "@aws-sdk/credential-provider-ini": "3.583.0", - "@aws-sdk/credential-provider-node": "3.583.0", - "@aws-sdk/credential-provider-process": "3.577.0", - "@aws-sdk/credential-provider-sso": "3.583.0", - "@aws-sdk/credential-provider-web-identity": "3.577.0", + "@aws-sdk/client-cognito-identity": "3.590.0", + "@aws-sdk/client-sso": "3.590.0", + "@aws-sdk/client-sts": "3.590.0", + "@aws-sdk/credential-provider-cognito-identity": "3.590.0", + "@aws-sdk/credential-provider-env": "3.587.0", + "@aws-sdk/credential-provider-http": "3.587.0", + "@aws-sdk/credential-provider-ini": "3.590.0", + "@aws-sdk/credential-provider-node": "3.590.0", + "@aws-sdk/credential-provider-process": "3.587.0", + "@aws-sdk/credential-provider-sso": "3.590.0", + "@aws-sdk/credential-provider-web-identity": "3.587.0", "@aws-sdk/types": "3.577.0", - "@smithy/credential-provider-imds": "^3.0.0", - "@smithy/property-provider": "^3.0.0", + "@smithy/credential-provider-imds": "^3.1.0", + "@smithy/property-provider": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1305,13 +1300,13 @@ } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.583.0.tgz", - "integrity": "sha512-xVNXXXDWvBVI/AeVtSdA9SVumqxiZaESk/JpUn9GMkmtTKfter0Cweap+1iQ9j8bRAO0vNhmIkbcvdB1S4WVUw==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.587.0.tgz", + "integrity": "sha512-SyDomN+IOrygLucziG7/nOHkjUXES5oH5T7p8AboO8oakMQJdnudNXiYWTicQWO52R51U6CR27rcMPTGeMedYA==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@aws-sdk/util-endpoints": "3.583.0", + "@aws-sdk/util-endpoints": "3.587.0", "@smithy/protocol-http": "^4.0.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" @@ -1321,13 +1316,13 @@ } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.577.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.577.0.tgz", - "integrity": "sha512-4ChCFACNwzqx/xjg3zgFcW8Ali6R9C95cFECKWT/7CUM1D0MGvkclSH2cLarmHCmJgU6onKkJroFtWp0kHhgyg==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.587.0.tgz", + "integrity": "sha512-93I7IPZtulZQoRK+O20IJ4a1syWwYPzoO2gc3v+/GNZflZPV3QJXuVbIm0pxBsu0n/mzKGUKqSOLPIaN098HcQ==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/types": "^3.0.0", "@smithy/util-config-provider": "^3.0.0", "@smithy/util-middleware": "^3.0.0", @@ -1338,14 +1333,14 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.577.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.577.0.tgz", - "integrity": "sha512-0CkIZpcC3DNQJQ1hDjm2bdSy/Xjs7Ny5YvSsacasGOkNfk+FdkiQy6N67bZX3Zbc9KIx+Nz4bu3iDeNSNplnnQ==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.587.0.tgz", + "integrity": "sha512-ULqhbnLy1hmJNRcukANBWJmum3BbjXnurLPSFXoGdV0llXYlG55SzIla2VYqdveQEEjmsBuTZdFvXAtNpmS5Zg==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@smithy/property-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -1353,7 +1348,7 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sso-oidc": "^3.577.0" + "@aws-sdk/client-sso-oidc": "^3.587.0" } }, "node_modules/@aws-sdk/types": { @@ -1370,14 +1365,14 @@ } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.583.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.583.0.tgz", - "integrity": "sha512-ZC9mb2jq6BFXPYsUsD2tmYcnlmd+9PGNwnFNn8jk4abna5Jjk2wDknN81ybktmBR5ttN9W8ugmktuKtvAMIDCQ==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.587.0.tgz", + "integrity": "sha512-8I1HG6Em8wQWqKcRW6m358mqebRVNpL8XrrEoT4In7xqkKkmYtHRNVYP6lcmiQh5pZ/c/FXu8dSchuFIWyEtqQ==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", "@smithy/types": "^3.0.0", - "@smithy/util-endpoints": "^2.0.0", + "@smithy/util-endpoints": "^2.0.1", "tslib": "^2.6.2" }, "engines": { @@ -1409,13 +1404,13 @@ } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.577.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.577.0.tgz", - "integrity": "sha512-XqvtFjbSMtycZTWVwDe8DRWovuoMbA54nhUoZwVU6rW9OSD6NZWGR512BUGHFaWzW0Wg8++Dj10FrKTG2XtqfA==", + "version": "3.587.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.587.0.tgz", + "integrity": "sha512-Pnl+DUe/bvnbEEDHP3iVJrOtE3HbFJBPgsD6vJ+ml/+IYk1Eq49jEG+EHZdNTPz3SDG0kbp2+7u41MKYJHR/iQ==", "optional": true, "dependencies": { "@aws-sdk/types": "3.577.0", - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -4085,9 +4080,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", + "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -4558,22 +4553,22 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.18", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.18.tgz", - "integrity": "sha512-/9pVk+Al8qxAjwFUADv4BRZgMpZM4m5E+2Q/20qhVPuIJWqKp4Ie4tGExac6zu93rgPTYVQGgu+1vjiT0E+cEw==", + "version": "5.15.19", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.19.tgz", + "integrity": "sha512-tCHSi/Tomez9ERynFhZRvFO6n9ATyrPs+2N80DMDzp6xDVirbBjEwhPcE+x7Lj+nwYw0SqFkOxyvMP0irnm55w==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/material": { - "version": "5.15.18", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.18.tgz", - "integrity": "sha512-n+/dsiqux74fFfcRUJjok+ieNQ7+BEk6/OwX9cLcLvriZrZb+/7Y8+Fd2HlUUbn5N0CDurgAHm0VH1DqyJ9HAw==", + "version": "5.15.19", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.19.tgz", + "integrity": "sha512-lp5xQBbcRuxNtjpWU0BWZgIrv2XLUz4RJ0RqFXBdESIsKoGCQZ6P3wwU5ZPuj5TjssNiKv9AlM+vHopRxZhvVQ==", "dependencies": { "@babel/runtime": "^7.23.9", "@mui/base": "5.0.0-beta.40", - "@mui/core-downloads-tracker": "^5.15.18", + "@mui/core-downloads-tracker": "^5.15.19", "@mui/system": "^5.15.15", "@mui/types": "^7.2.14", "@mui/utils": "^5.15.14", @@ -6022,14 +6017,6 @@ "node": ">=12" } }, - "node_modules/@polkadot/typegen/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "node_modules/@polkadot/types": { "version": "10.13.1", "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-10.13.1.tgz", @@ -6591,21 +6578,35 @@ } }, "node_modules/@prosopo/typechain-polkadot-parser/node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@prosopo/typechain-polkadot/node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", "dependencies": { "undici-types": "~5.26.4" } }, + "node_modules/@prosopo/typechain-polkadot/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@prosopo/typechain-polkadot/node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -6637,14 +6638,6 @@ "node": ">=12" } }, - "node_modules/@prosopo/typechain-polkadot/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "node_modules/@prosopo/typechain-types": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/@prosopo/typechain-types/-/typechain-types-1.1.15.tgz", @@ -6659,9 +6652,9 @@ } }, "node_modules/@prosopo/typechain-types/node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", "dependencies": { "undici-types": "~5.26.4" } @@ -6903,9 +6896,9 @@ } }, "node_modules/@rollup/plugin-replace": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.5.tgz", - "integrity": "sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.6.tgz", + "integrity": "sha512-n/Eea4MuS38M5iT+0nz7UzSbI4H4hVTKV5hOTAQzNVKT3nYxj8iaG4t9IW86Ugv/jApGY+O+SANAFqWPzZ9xkw==", "dependencies": { "@rollup/pluginutils": "^5.0.1", "magic-string": "^0.30.3" @@ -7268,12 +7261,12 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.0.tgz", - "integrity": "sha512-2GzOfADwYLQugYkKQhIyZyQlM05K+tMKvRnc6eFfZcpJGRfKoMUMYdPlBKmqHwQFXQKBrGV6cxL9oymWgDzvFw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.1.tgz", + "integrity": "sha512-hbkYJc20SBDz2qqLzttjI/EqXemtmWk0ooRznLsiXp3066KQRTvuKHa7U4jCZCJq6Dozqvy0R1/vNESC9inPJg==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/types": "^3.0.0", "@smithy/util-config-provider": "^3.0.0", "@smithy/util-middleware": "^3.0.0", @@ -7284,16 +7277,16 @@ } }, "node_modules/@smithy/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.0.1.tgz", - "integrity": "sha512-rcMkjvwxH/bER+oZUPR0yTA0ELD6m3A+d92+CFkdF6HJFCBB1bXo7P5pm21L66XwTN01B6bUhSCQ7cymWRD8zg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.2.0.tgz", + "integrity": "sha512-ygLZSSKgt9bR8HAxR9mK+U5obvAJBr6zlQuhN5soYWx/amjDoQN4dTkydTypgKe6rIbUjTILyLU+W5XFwXr4kg==", "optional": true, "dependencies": { - "@smithy/middleware-endpoint": "^3.0.0", - "@smithy/middleware-retry": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.1", + "@smithy/middleware-retry": "^3.0.3", "@smithy/middleware-serde": "^3.0.0", "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/util-middleware": "^3.0.0", "tslib": "^2.6.2" @@ -7303,13 +7296,13 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.0.0.tgz", - "integrity": "sha512-lfmBiFQcA3FsDAPxNfY0L7CawcWtbyWsBOHo34nF095728JLkBX4Y9q/VPPE2r7fqMVK+drmDigqE2/SSQeVRA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.1.0.tgz", + "integrity": "sha512-q4A4d38v8pYYmseu/jTS3Z5I3zXlEOe5Obi+EJreVKgSVyWUHOd7/yaVCinC60QG4MRyCs98tcxBH1IMC0bu7Q==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^3.0.0", - "@smithy/property-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", + "@smithy/property-provider": "^3.1.0", "@smithy/types": "^3.0.0", "@smithy/url-parser": "^3.0.0", "tslib": "^2.6.2" @@ -7383,14 +7376,14 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.0.tgz", - "integrity": "sha512-aXOAWztw/5qAfp0NcA2OWpv6ZI/E+Dh9mByif7i91D/0iyYNUcKvskmXiowKESFkuZ7PIMd3VOR4fTibZDs2OQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.1.tgz", + "integrity": "sha512-lQ/UOdGD4KM5kLZiAl0q8Qy3dPbynvAXKAdXnYlrA1OpaUwr+neSsVokDZpY6ZVb5Yx8jnus29uv6XWpM9P4SQ==", "optional": true, "dependencies": { "@smithy/middleware-serde": "^3.0.0", - "@smithy/node-config-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "@smithy/url-parser": "^3.0.0", "@smithy/util-middleware": "^3.0.0", @@ -7401,15 +7394,15 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.1.tgz", - "integrity": "sha512-hBhSEuL841FhJBK/19WpaGk5YWSzFk/P2UaVjANGKRv3eYNO8Y1lANWgqnuPWjOyCEWMPr58vELFDWpxvRKANw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.3.tgz", + "integrity": "sha512-Wve1qzJb83VEU/6q+/I0cQdAkDnuzELC6IvIBwDzUEiGpKqXgX1v10FUuZGbRS6Ov/P+HHthcAoHOJZQvZNAkA==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/protocol-http": "^4.0.0", "@smithy/service-error-classification": "^3.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "@smithy/util-middleware": "^3.0.0", "@smithy/util-retry": "^3.0.0", @@ -7460,13 +7453,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.0.0.tgz", - "integrity": "sha512-buqfaSdDh0zo62EPLf8rGDvcpKwGpO5ho4bXS2cdFhlOta7tBkWJt+O5uiaAeICfIOfPclNOndshDNSanX2X9g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.0.tgz", + "integrity": "sha512-ngfB8QItUfTFTfHMvKuc2g1W60V1urIgZHqD1JNFZC2tTWXahqf2XvKXqcBS7yZqR7GqkQQZy11y/lNOUWzq7Q==", "optional": true, "dependencies": { - "@smithy/property-provider": "^3.0.0", - "@smithy/shared-ini-file-loader": "^3.0.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/shared-ini-file-loader": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -7491,9 +7484,9 @@ } }, "node_modules/@smithy/property-provider": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.0.0.tgz", - "integrity": "sha512-LmbPgHBswdXCrkWWuUwBm9w72S2iLWyC/5jet9/Y9cGHtzqxi+GVjfCfahkvNV4KXEwgnH8EMpcrD9RUYe0eLQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.0.tgz", + "integrity": "sha512-Tj3+oVhqdZgemjCiWjFlADfhvLF4C/uKDuKo7/tlEsRQ9+3emCreR2xndj970QSRSsiCEU8hZW3/8JQu+n5w4Q==", "optional": true, "dependencies": { "@smithy/types": "^3.0.0", @@ -7556,9 +7549,9 @@ } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.0.0.tgz", - "integrity": "sha512-REVw6XauXk8xE4zo5aGL7Rz4ywA8qNMUn8RtWeTRQsgAlmlvbJ7CEPBcaXU2NDC3AYBgYAXrGyWD8XrN8UGDog==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.0.tgz", + "integrity": "sha512-dAM7wSX0NR3qTNyGVN/nwwpEDzfV9T/3AN2eABExWmda5VqZKSsjlINqomO5hjQWGv+IIkoXfs3u2vGSNz8+Rg==", "optional": true, "dependencies": { "@smithy/types": "^3.0.0", @@ -7587,12 +7580,12 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.0.1.tgz", - "integrity": "sha512-KAiFY4Y4jdHxR+4zerH/VBhaFKM8pbaVmJZ/CWJRwtM/CmwzTfXfvYwf6GoUwiHepdv+lwiOXCuOl6UBDUEINw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.1.tgz", + "integrity": "sha512-tj4Ku7MpzZR8cmVuPcSbrLFVxmptWktmJMwST/uIEq4sarabEdF8CbmQdYB7uJ/X51Qq2EYwnRsoS7hdR4B7rA==", "optional": true, "dependencies": { - "@smithy/middleware-endpoint": "^3.0.0", + "@smithy/middleware-endpoint": "^3.0.1", "@smithy/middleware-stack": "^3.0.0", "@smithy/protocol-http": "^4.0.0", "@smithy/types": "^3.0.0", @@ -7687,13 +7680,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.1.tgz", - "integrity": "sha512-nW5kEzdJn1Bn5TF+gOPHh2rcPli8JU9vSSXLbfg7uPnfR1TMRQqs9zlYRhIb87NeSxIbpdXOI94tvXSy+fvDYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.3.tgz", + "integrity": "sha512-3DFON2bvXJAukJe+qFgPV/rorG7ZD3m4gjCXHD1V5z/tgKQp5MCTCLntrd686tX6tj8Uli3lefWXJudNg5WmCA==", "optional": true, "dependencies": { - "@smithy/property-provider": "^3.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/property-provider": "^3.1.0", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "bowser": "^2.11.0", "tslib": "^2.6.2" @@ -7703,16 +7696,16 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.1.tgz", - "integrity": "sha512-TFk+Qb+elLc/MOhtSp+50fstyfZ6avQbgH2d96xUBpeScu+Al9elxv+UFAjaTHe0HQe5n+wem8ZLpXvU8lwV6Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.3.tgz", + "integrity": "sha512-D0b8GJXecT00baoSQ3Iieu3k3mZ7GY8w1zmg8pdogYrGvWJeLcIclqk2gbkG4K0DaBGWrO6v6r20iwIFfDYrmA==", "optional": true, "dependencies": { - "@smithy/config-resolver": "^3.0.0", - "@smithy/credential-provider-imds": "^3.0.0", - "@smithy/node-config-provider": "^3.0.0", - "@smithy/property-provider": "^3.0.0", - "@smithy/smithy-client": "^3.0.1", + "@smithy/config-resolver": "^3.0.1", + "@smithy/credential-provider-imds": "^3.1.0", + "@smithy/node-config-provider": "^3.1.0", + "@smithy/property-provider": "^3.1.0", + "@smithy/smithy-client": "^3.1.1", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -7721,12 +7714,12 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.0.tgz", - "integrity": "sha512-+exaXzEY3DNt2qtA2OtRNSDlVrE4p32j1JSsQkzA5AdP0YtJNjkYbYhJxkFmPYcjI1abuwopOZCwUmv682QkiQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.1.tgz", + "integrity": "sha512-ZRT0VCOnKlVohfoABMc8lWeQo/JEFuPWctfNRXgTHbyOVssMOLYFUNWukxxiHRGVAhV+n3c0kPW+zUqckjVPEA==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^3.0.0", + "@smithy/node-config-provider": "^3.1.0", "@smithy/types": "^3.0.0", "tslib": "^2.6.2" }, @@ -7899,7 +7892,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 10" } @@ -8134,9 +8127,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.1.tgz", - "integrity": "sha512-ej0phymbFLoCB26dbbq5PGScsf2JAJ4IJHjG10LalgUV36XKTmA4GdA+PVllKvRk0sEKt64X8975qFnkSi0hqA==", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -8237,9 +8230,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", - "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dependencies": { "undici-types": "~5.26.4" } @@ -8273,11 +8266,12 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "18.2.33", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.33.tgz", + "integrity": "sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==", "dependencies": { "@types/prop-types": "*", + "@types/scheduler": "*", "csstype": "^3.0.2" } }, @@ -8315,6 +8309,11 @@ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==" }, + "node_modules/@types/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==" + }, "node_modules/@types/seedrandom": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.8.tgz", @@ -9024,14 +9023,6 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "deprecated": "Use your platform's native atob() and btoa() methods instead", - "optional": true, - "peer": true - }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -9180,9 +9171,9 @@ } }, "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.14.0.tgz", - "integrity": "sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -9525,16 +9516,19 @@ } }, "node_modules/array.prototype.tosorted": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", - "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.1.0", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/arraybuffer.prototype.slice": { @@ -9673,8 +9667,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "devOptional": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/at-least-node": { "version": "1.0.0", @@ -9753,9 +9746,9 @@ } }, "node_modules/babel-loader/node_modules/ajv": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.14.0.tgz", - "integrity": "sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -9874,20 +9867,20 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/bare-events": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.2.tgz", - "integrity": "sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.3.1.tgz", + "integrity": "sha512-sJnSOTVESURZ61XgEleqmP255T6zTYwHPwE4r6SssIh0U9/uDvfpdoJYpVUerJJZH2fueO+CdT8ZT+OC/7aZDA==", "optional": true }, "node_modules/bare-fs": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.0.tgz", - "integrity": "sha512-TNFqa1B4N99pds2a5NYHR15o0ZpdNKbAeKTE/+G6ED/UeOavv8RY3dr/Fu99HW3zU3pXpo2kDNO8Sjsm2esfOw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.1.tgz", + "integrity": "sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==", "optional": true, "dependencies": { "bare-events": "^2.0.0", "bare-path": "^2.0.0", - "bare-stream": "^1.0.0" + "bare-stream": "^2.0.0" } }, "node_modules/bare-os": { @@ -9906,12 +9899,12 @@ } }, "node_modules/bare-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-1.0.0.tgz", - "integrity": "sha512-KhNUoDL40iP4gFaLSsoGE479t0jHijfYdIcxRn/XtezA2BaUD0NRf/JGRpsMq6dMNM+SrCrB0YSSo/5wBY4rOQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.0.1.tgz", + "integrity": "sha512-ubLyoDqPnUf5o0kSFp709HC0WRZuxVuh4pbte5eY95Xvx5bdvz07c2JFmXBfqqe60q+9PJ8S4X5GRvmcNSKMxg==", "optional": true, "dependencies": { - "streamx": "^2.16.1" + "streamx": "^2.18.0" } }, "node_modules/base64-js": { @@ -10435,11 +10428,14 @@ } }, "node_modules/bson": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", - "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", + "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", + "dependencies": { + "buffer": "^5.6.0" + }, "engines": { - "node": ">=14.20.1" + "node": ">=6.9.0" } }, "node_modules/btoa-lite": { @@ -10625,15 +10621,6 @@ "node": ">=12" } }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -10828,9 +10815,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001624", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001624.tgz", - "integrity": "sha512-0dWnQG87UevOCPYaOR49CBcLBwoZLpws+k6W37nLjWUhumP1Isusj0p2u+3KhjNloRWK9OKMgjBBzPujQHw4nA==", + "version": "1.0.30001628", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001628.tgz", + "integrity": "sha512-S3BnR4Kh26TBxbi5t5kpbcUlLJb9lhtDXISDPwOfI+JoC+ik0QksvkZtUVyikw3hjnkgkMPSJ8oIM9yMm9vflA==", "funding": [ { "type": "opencollective", @@ -10951,9 +10938,9 @@ } }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "engines": { "node": ">=6.0" } @@ -11131,6 +11118,15 @@ "node": ">=12" } }, + "node_modules/clone": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz", + "integrity": "sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -11247,7 +11243,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "devOptional": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -11616,6 +11611,14 @@ "node": ">=12.0.0" } }, + "node_modules/cron/node_modules/luxon": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", + "integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==", + "engines": { + "node": ">=12" + } + }, "node_modules/cross-fetch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", @@ -11849,27 +11852,30 @@ } }, "node_modules/cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", - "optional": true, - "peer": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", "dependencies": { "rrweb-cssom": "^0.6.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, + "node_modules/cssstyle/node_modules/rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==" + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cypress": { - "version": "13.10.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.10.0.tgz", - "integrity": "sha512-tOhwRlurVOQbMduX+KonoMeQILs2cwR3yHGGENoFvvSoLUBHmJ8b9/n21gFSDqjlOJ+SRVcwuh+fG/JDsHsT6Q==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.11.0.tgz", + "integrity": "sha512-NXXogbAxVlVje4XHX+Cx5eMFZv4Dho/2rIcdBHg9CNPFUGZdM4cRdgIgM7USmNYsC12XY0bZENEQ+KBk72fl+A==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -12035,6 +12041,21 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/cypress/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/cypress/node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -12128,6 +12149,12 @@ "node": ">=10" } }, + "node_modules/cypress/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/cypress/node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -12179,55 +12206,46 @@ } }, "node_modules/data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", - "optional": true, - "peer": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/data-urls/node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "optional": true, - "peer": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dependencies": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/data-urls/node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "optional": true, - "peer": true, "engines": { "node": ">=12" } }, "node_modules/data-urls/node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", - "optional": true, - "peer": true, + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dependencies": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/data-view-buffer": { @@ -12294,9 +12312,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -12317,9 +12335,7 @@ "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "optional": true, - "peer": true + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" }, "node_modules/decompress-response": { "version": "6.0.0", @@ -12478,6 +12494,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/default-gateway/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/default-gateway/node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -12547,7 +12568,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "devOptional": true, "engines": { "node": ">=0.4.0" } @@ -12856,30 +12876,6 @@ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", "dev": true }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "deprecated": "Use your platform's native DOMException instead", - "optional": true, - "peer": true, - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, "node_modules/domhandler": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", @@ -12986,14 +12982,14 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.783", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.783.tgz", - "integrity": "sha512-bT0jEz/Xz1fahQpbZ1D7LgmPYZ3iHVY39NcWWro1+hA2IvjiPeaXtfSqrQ+nXjApMvQRE2ASt1itSLRrebHMRQ==" + "version": "1.4.790", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.790.tgz", + "integrity": "sha512-eVGeQxpaBYbomDBa/Mehrs28MdvCXfJmEFzaMFsv8jH/MJDLIylJN81eTJ5kvx7B7p18OiPK0BkC06lydEy63A==" }, "node_modules/electron/node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", "dependencies": { "undici-types": "~5.26.4" } @@ -13108,9 +13104,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", - "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", + "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -13136,7 +13132,6 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "devOptional": true, "engines": { "node": ">=0.12" }, @@ -13678,15 +13673,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-import/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-plugin-import/node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -14212,17 +14198,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/execa/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/executable": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", @@ -14625,9 +14600,9 @@ } }, "node_modules/find-workspaces/node_modules/yaml": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", - "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.3.tgz", + "integrity": "sha512-sntgmxj8o7DE7g/Qi60cqpLBA3HG3STcDA0kO+WfB05jEKhZMbY7umNm2rBpQvsmZ16/lPXCJGW2672dgOUkrg==", "dev": true, "bin": { "yaml": "bin.mjs" @@ -14725,17 +14700,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -14815,17 +14779,17 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, "dependencies": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/fs-minipass": { @@ -14944,6 +14908,11 @@ "node": ">=10" } }, + "node_modules/gauge/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -15573,16 +15542,14 @@ } }, "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "optional": true, - "peer": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dependencies": { - "whatwg-encoding": "^2.0.0" + "whatwg-encoding": "^3.1.1" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/html-entities": { @@ -15739,7 +15706,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "devOptional": true, + "dev": true, "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -16176,6 +16143,14 @@ "node": ">= 0.4" } }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -16631,9 +16606,7 @@ "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "optional": true, - "peer": true + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/is-reference": { "version": "1.2.1", @@ -16980,9 +16953,9 @@ } }, "node_modules/jackspeak": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz", - "integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.3.0.tgz", + "integrity": "sha512-glPiBfKguqA7v8JsXO3iLjJWZ9FV1vNpoI0I9hI9Mnk5yetO9uPLSpiCEmiVijAssv2f54HpvtzvAHfhPieiDQ==", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -17092,41 +17065,37 @@ } }, "node_modules/jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", - "optional": true, - "peer": true, + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.0.tgz", + "integrity": "sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==", "dependencies": { - "abab": "^2.0.6", - "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", + "cssstyle": "^4.0.1", + "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "domexception": "^4.0.0", "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.4", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", + "nwsapi": "^2.2.10", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", + "tough-cookie": "^4.1.4", + "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.17.0", + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "peerDependencies": { - "canvas": "^2.5.0" + "canvas": "^2.11.2" }, "peerDependenciesMeta": { "canvas": { @@ -17134,12 +17103,21 @@ } } }, + "node_modules/jsdom/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/jsdom/node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "optional": true, - "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -17149,41 +17127,59 @@ "node": ">= 6" } }, + "node_modules/jsdom/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/jsdom/node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/jsdom/node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "optional": true, - "peer": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dependencies": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/jsdom/node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "optional": true, - "peer": true, "engines": { "node": ">=12" } }, "node_modules/jsdom/node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", - "optional": true, - "peer": true, + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dependencies": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/jsesc": { @@ -17595,15 +17591,6 @@ "xtend": "~2.0.4" } }, - "node_modules/level-sublevel/node_modules/clone": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz", - "integrity": "sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/level-sublevel/node_modules/level-fix-range": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz", @@ -18086,9 +18073,9 @@ "dev": true }, "node_modules/luxon": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", - "integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", + "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", "engines": { "node": ">=12" } @@ -18394,9 +18381,9 @@ } }, "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.14.0.tgz", - "integrity": "sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -18685,43 +18672,20 @@ } }, "node_modules/mongodb": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.8.0.tgz", - "integrity": "sha512-xx4CXmxcj3bNe7iGBlhntVrUqrNARYhUZteXaz4epEESv4oXD/FONAovcyoCaEffdYlw25Yz284OxMfpnPLlgQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz", + "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==", "dependencies": { - "bson": "^5.4.0", + "bson": "^4.7.2", "mongodb-connection-string-url": "^2.6.0", "socks": "^2.7.1" }, "engines": { - "node": ">=14.20.1" + "node": ">=12.9.0" }, "optionalDependencies": { + "@aws-sdk/credential-providers": "^3.186.0", "@mongodb-js/saslprep": "^1.1.0" - }, - "peerDependencies": { - "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.0.0", - "kerberos": "^1.0.0 || ^2.0.0", - "mongodb-client-encryption": ">=2.3.0 <3", - "snappy": "^7.2.2" - }, - "peerDependenciesMeta": { - "@aws-sdk/credential-providers": { - "optional": true - }, - "@mongodb-js/zstd": { - "optional": true - }, - "kerberos": { - "optional": true - }, - "mongodb-client-encryption": { - "optional": true - }, - "snappy": { - "optional": true - } } }, "node_modules/mongodb-connection-string-url": { @@ -18802,17 +18766,6 @@ "node": ">=12.22.0" } }, - "node_modules/mongodb-memory-server-core/node_modules/bson": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", - "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", - "dependencies": { - "buffer": "^5.6.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/mongodb-memory-server-core/node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -18852,23 +18805,6 @@ "node": ">=8" } }, - "node_modules/mongodb-memory-server-core/node_modules/mongodb": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz", - "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==", - "dependencies": { - "bson": "^4.7.2", - "mongodb-connection-string-url": "^2.6.0", - "socks": "^2.7.1" - }, - "engines": { - "node": ">=12.9.0" - }, - "optionalDependencies": { - "@aws-sdk/credential-providers": "^3.186.0", - "@mongodb-js/saslprep": "^1.1.0" - } - }, "node_modules/mongodb-memory-server-core/node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -18985,6 +18921,14 @@ "url": "https://opencollective.com/mongoose" } }, + "node_modules/mongoose/node_modules/bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "engines": { + "node": ">=14.20.1" + } + }, "node_modules/mongoose/node_modules/mongodb": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.6.0.tgz", @@ -19263,9 +19207,9 @@ } }, "node_modules/node-abi": { - "version": "3.62.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.62.0.tgz", - "integrity": "sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==", + "version": "3.63.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.63.0.tgz", + "integrity": "sha512-vAszCsOUrUxjGAmdnM/pq7gUgie0IRteCQMX6d4A534fQCR93EJU5qgzBvU6EkFfK27s0T3HEV3BOyJIr7OMYw==", "dependencies": { "semver": "^7.3.5" }, @@ -19480,6 +19424,12 @@ "node": ">=10" } }, + "node_modules/node-gyp/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/node-gyp/node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -19597,9 +19547,9 @@ } }, "node_modules/node-polyfill-webpack-plugin/node_modules/type-fest": { - "version": "4.18.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.18.3.tgz", - "integrity": "sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.19.0.tgz", + "integrity": "sha512-CN2l+hWACRiejlnr68vY0/7734Kzu+9+TOslUXbSCQ1ruY9XIHDBSceVXCcHm/oXrdzhtLMMdJEKfemf1yXiZQ==", "engines": { "node": ">=16" }, @@ -19717,9 +19667,9 @@ } }, "node_modules/nodemon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.1.tgz", - "integrity": "sha512-k43xGaDtaDIcufn0Fc6fTtsdKSkV/hQzoQFigNH//GaKta28yoKVYXCnV+KXRqfT/YzsFaQU9VdeEG+HEyxr6A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.3.tgz", + "integrity": "sha512-m4Vqs+APdKzDFpuaL9F9EVOF85+h070FnkHVEoU4+rmT6Vw0bmNl7s61VEkY/cJkL7RCv1p4urnUDUMrS5rk2w==", "dev": true, "dependencies": { "chokidar": "^3.5.2", @@ -19926,9 +19876,9 @@ } }, "node_modules/npm-check-updates/node_modules/yaml": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", - "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.3.tgz", + "integrity": "sha512-sntgmxj8o7DE7g/Qi60cqpLBA3HG3STcDA0kO+WfB05jEKhZMbY7umNm2rBpQvsmZ16/lPXCJGW2672dgOUkrg==", "dev": true, "bin": { "yaml": "bin.mjs" @@ -20191,9 +20141,7 @@ "node_modules/nwsapi": { "version": "2.2.10", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", - "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==", - "optional": true, - "peer": true + "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==" }, "node_modules/object-assign": { "version": "4.1.1", @@ -20743,8 +20691,6 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "optional": true, - "peer": true, "dependencies": { "entities": "^4.4.0" }, @@ -21412,8 +21358,7 @@ "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "devOptional": true + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "node_modules/pstree.remy": { "version": "1.1.8", @@ -21496,8 +21441,7 @@ "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "devOptional": true + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/queue-lit": { "version": "1.5.2", @@ -21820,6 +21764,17 @@ "node": ">=8.10.0" } }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/refa": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/refa/-/refa-0.11.0.tgz", @@ -22236,6 +22191,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -22446,14 +22407,6 @@ "node": ">=12" } }, - "node_modules/rollup-plugin-visualizer/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -22468,11 +22421,9 @@ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==" }, "node_modules/rrweb-cssom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", - "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", - "optional": true, - "peer": true + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.0.tgz", + "integrity": "sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==" }, "node_modules/run-applescript": { "version": "7.0.0", @@ -22596,8 +22547,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "optional": true, - "peer": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -23046,9 +22995,15 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/simple-concat": { "version": "1.0.1", @@ -23630,12 +23585,13 @@ } }, "node_modules/streamx": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz", - "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", + "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" @@ -23790,6 +23746,14 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "engines": { + "node": ">=4" + } + }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -23897,9 +23861,7 @@ "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "optional": true, - "peer": true + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/tapable": { "version": "2.2.1", @@ -24046,6 +24008,14 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/text-decoder": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.0.tgz", + "integrity": "sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw==", + "dependencies": { + "b4a": "^1.6.4" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -24178,7 +24148,6 @@ "version": "4.1.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "devOptional": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -24193,7 +24162,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "devOptional": true, "engines": { "node": ">= 4.0.0" } @@ -24297,9 +24265,9 @@ } }, "node_modules/tsconfck": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.0.3.tgz", - "integrity": "sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.0.tgz", + "integrity": "sha512-CMjc5zMnyAjcS9sPLytrbFmj89st2g+JYtY/c02ug4Q+CZaAtCgbyviI0n1YvjZE/pzoc6FbNsINS13DOL1B9w==", "bin": { "tsconfck": "bin/tsconfck.js" }, @@ -24332,23 +24300,15 @@ "node": ">=6" } }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "engines": { - "node": ">=4" - } - }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.0.tgz", - "integrity": "sha512-vzGGELOgAupsNVssAmZjbUDfdm/pWP4R+Kg8TVdsonxbXk0bEpE1qh0yV6/QxUVXaVlNemgcPajGdJJ82n3stg==", + "version": "4.11.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.2.tgz", + "integrity": "sha512-V5DL5v1BuItjsQ2FN9+4OjR7n5cr8hSgN+VGmm/fd2/0cgQdBIWHcQ3bFYm/5ZTmyxkTDBUIaRuW2divgfPe0A==", "dev": true, "dependencies": { "esbuild": "~0.20.2", @@ -24546,9 +24506,9 @@ } }, "node_modules/typedoc-plugin-mdn-links": { - "version": "3.1.27", - "resolved": "https://registry.npmjs.org/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.27.tgz", - "integrity": "sha512-fpAAvu0LrYc9JPMaab0YcmToaF2NsGCkFhSsNPB1O82VEqwk8MHIytUxQXrY6cn+bgyr2xRqA1Fo2D9mA60Gyw==", + "version": "3.1.28", + "resolved": "https://registry.npmjs.org/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.28.tgz", + "integrity": "sha512-ADOSEMfEGZfyLFq8qNzS66zguPqIrrKFgspJmrXZGaGiUoHLqV8VY5V/MP2sMFnMY90uaVgeYwcVKKoutWekzw==", "dev": true, "peerDependencies": { "typedoc": ">= 0.23.14 || 0.24.x || 0.25.x" @@ -24878,7 +24838,6 @@ "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "devOptional": true, "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -25027,9 +24986,9 @@ "dev": true }, "node_modules/vite": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", - "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", + "version": "5.2.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz", + "integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==", "dependencies": { "esbuild": "^0.20.1", "postcss": "^8.4.38", @@ -25420,16 +25379,14 @@ "dev": true }, "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "optional": true, - "peer": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dependencies": { - "xml-name-validator": "^4.0.0" + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/watchpack": { @@ -25568,25 +25525,6 @@ "node": ">=14" } }, - "node_modules/webpack-cli/node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack-cli/node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, "node_modules/webpack-dev-middleware": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.2.1.tgz", @@ -25616,9 +25554,9 @@ } }, "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.14.0.tgz", - "integrity": "sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -25723,9 +25661,9 @@ } }, "node_modules/webpack-dev-server/node_modules/ajv": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.14.0.tgz", - "integrity": "sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -25901,24 +25839,20 @@ } }, "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "optional": true, - "peer": true, + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dependencies": { "iconv-lite": "0.6.3" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-encoding/node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "optional": true, - "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -25927,13 +25861,11 @@ } }, "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "optional": true, - "peer": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-url": { @@ -26259,6 +26191,12 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/ws": { "version": "8.17.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", @@ -26292,21 +26230,17 @@ } }, "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "optional": true, - "peer": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "optional": true, - "peer": true + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, "node_modules/xmlhttprequest-ssl": { "version": "2.0.0", @@ -26365,12 +26299,11 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs/node_modules/cliui": { @@ -26384,6 +26317,15 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", @@ -26521,14 +26463,6 @@ "node": ">=12" } }, - "packages/cli/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "packages/common": { "name": "@prosopo/common", "version": "0.3.42", @@ -26610,6 +26544,53 @@ "npm": ">=9" } }, + "packages/database/node_modules/bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "engines": { + "node": ">=14.20.1" + } + }, + "packages/database/node_modules/mongodb": { + "version": "5.8.0", + "license": "Apache-2.0", + "dependencies": { + "bson": "^5.4.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "optionalDependencies": { + "@mongodb-js/saslprep": "^1.1.0" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.0.0", + "kerberos": "^1.0.0 || ^2.0.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, "packages/datasets": { "name": "@prosopo/datasets", "version": "0.3.42", @@ -26689,14 +26670,6 @@ "node": ">=12" } }, - "packages/datasets-fs/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "packages/env": { "name": "@prosopo/env", "version": "0.3.42", @@ -26766,7 +26739,8 @@ "@prosopo/datasets": "0.3.42", "@prosopo/procaptcha-common": "0.3.42", "@prosopo/types": "0.3.42", - "@prosopo/util": "0.3.42" + "@prosopo/util": "0.3.42", + "jsdom": "^24.1.0" }, "devDependencies": { "dotenv": "^16.0.1", @@ -26949,25 +26923,11 @@ } }, "packages/provider/node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "packages/provider/node_modules/fs-extra": { - "version": "10.1.0", + "version": "18.19.34", "dev": true, "license": "MIT", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" + "undici-types": "~5.26.4" } }, "packages/server": { @@ -27060,6 +27020,53 @@ "npm": ">=9" } }, + "packages/types-database/node_modules/bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "engines": { + "node": ">=14.20.1" + } + }, + "packages/types-database/node_modules/mongodb": { + "version": "5.8.0", + "license": "Apache-2.0", + "dependencies": { + "bson": "^5.4.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "optionalDependencies": { + "@mongodb-js/saslprep": "^1.1.0" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.0.0", + "kerberos": "^1.0.0 || ^2.0.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, "packages/types-env": { "name": "@prosopo/types-env", "version": "0.3.42", @@ -27083,10 +27090,9 @@ } }, "packages/types/node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } @@ -27191,14 +27197,6 @@ "node": ">=12" } }, - "protocol/dev/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, "provider-gui": { "name": "@prosopo/provider-gui", "version": "0.3.42", @@ -27248,16 +27246,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "provider-gui/node_modules/@types/react": { - "version": "18.2.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, "provider-gui/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", diff --git a/packages/api/src/api/ProviderApi.ts b/packages/api/src/api/ProviderApi.ts index 00a55ea91a..f4a4d9a5cb 100644 --- a/packages/api/src/api/ProviderApi.ts +++ b/packages/api/src/api/ProviderApi.ts @@ -25,6 +25,7 @@ import { ImageVerificationResponse, NetworkConfig, PowCaptchaSolutionResponse, + ProcaptchaToken, ProviderRegistered, ServerPowCaptchaVerifyRequestBodyType, StoredEvents, @@ -51,9 +52,9 @@ export default class ProviderApi extends HttpClientBase implements ProviderApi { public getCaptchaChallenge(userAccount: AccountId, randomProvider: RandomProvider): Promise { const { provider, blockNumber } = randomProvider const dappAccount = this.account - const url = `${ApiPaths.GetCaptchaChallenge}/${provider.datasetId}/${userAccount}/${dappAccount}/${blockNumber - .toString() - .replace(/,/g, '')}` + const url = `${ApiPaths.GetImageCaptchaChallenge}/${ + provider.datasetId + }/${userAccount}/${dappAccount}/${blockNumber.toString().replace(/,/g, '')}` return this.fetch(url) } @@ -72,51 +73,37 @@ export default class ProviderApi extends HttpClientBase implements ProviderApi { salt, signature, }) - return this.post(ApiPaths.SubmitCaptchaSolution, captchaSolutionBody) + return this.post(ApiPaths.SubmitImageCaptchaSolution, captchaSolutionBody) } public verifyDappUser( - dapp: AccountId, - userAccount: AccountId, - blockNumber: number, + token: ProcaptchaToken, dappUserSignature: string, - commitmentId?: string, maxVerifiedTime?: number ): Promise { const payload: VerifySolutionBodyTypeInput = { - [ApiParams.dapp]: dapp.toString(), - [ApiParams.user]: userAccount.toString(), - [ApiParams.blockNumber]: blockNumber, + [ApiParams.token]: token, [ApiParams.dappUserSignature]: dappUserSignature, } - if (commitmentId) { - payload[ApiParams.commitmentId] = commitmentId - } if (maxVerifiedTime) { payload[ApiParams.maxVerifiedTime] = maxVerifiedTime } - return this.post(ApiPaths.VerifyCaptchaSolutionDapp, payload) + return this.post(ApiPaths.VerifyImageCaptchaSolutionDapp, payload) } public verifyUser( - dapp: AccountId, - userAccount: AccountId, - blockNumber: number, + token: ProcaptchaToken, dappUserSignature: string, - commitmentId?: string, maxVerifiedTime?: number ): Promise { const payload: VerifySolutionBodyTypeInput = { - [ApiParams.dapp]: dapp.toString(), - [ApiParams.user]: userAccount.toString(), - [ApiParams.blockNumber]: blockNumber, + [ApiParams.token]: token, [ApiParams.dappUserSignature]: dappUserSignature, - ...(commitmentId && { [ApiParams.commitmentId]: commitmentId }), ...(maxVerifiedTime && { [ApiParams.maxVerifiedTime]: maxVerifiedTime }), } - return this.post(ApiPaths.VerifyCaptchaSolutionUser, payload) + return this.post(ApiPaths.VerifyImageCaptchaSolutionUser, payload) } public getPowCaptchaChallenge(user: AccountId, dapp: AccountId): Promise { @@ -163,21 +150,15 @@ export default class ProviderApi extends HttpClientBase implements ProviderApi { } public submitPowCaptchaVerify( - challenge: string, - dapp: string, + token: string, signatureHex: string, - blockNumber: number, recencyLimit: number ): Promise { const body: ServerPowCaptchaVerifyRequestBodyType = { - [ApiParams.challenge]: challenge, - [ApiParams.dapp]: dapp, - [ApiParams.dappUserSignature]: signatureHex, - [ApiParams.blockNumber]: blockNumber, + [ApiParams.token]: token, + [ApiParams.dappSignature]: signatureHex, [ApiParams.verifiedTimeout]: recencyLimit, } - return this.post(ApiPaths.ServerPowCaptchaVerify, { - body, - }) + return this.post(ApiPaths.VerifyPowCaptchaSolution, body) } } diff --git a/packages/common/src/error.ts b/packages/common/src/error.ts index a10ffc3502..b6400802b9 100644 --- a/packages/common/src/error.ts +++ b/packages/common/src/error.ts @@ -128,9 +128,9 @@ export class ProsopoApiError extends ProsopoBaseError { constructor(error: Error | TranslationKey, options?: BaseErrorOptions) { const errorName = options?.name || 'ProsopoApiError' - const errorCode = options?.context?.code || 500 - options = { ...options, name: errorName, context: { ...options?.context, errorCode } } + const code = options?.context?.code || 500 + options = { ...options, name: errorName, context: { ...options?.context, code } } super(error, options) - this.code = errorCode + this.code = code } } diff --git a/packages/common/src/locales/en.json b/packages/common/src/locales/en.json index b8f66d1eeb..2de3f4b4a3 100644 --- a/packages/common/src/locales/en.json +++ b/packages/common/src/locales/en.json @@ -117,7 +117,8 @@ "INVALID_DATASET_CONTENT_ID": "Invalid dataset content id", "DAPP_USER_SOLUTION_NOT_FOUND": "Dapp user solution not found", "INVALID_PROVIDER_URL": "Invalid provider url", - "NO_CAPTCHA": "No captcha found" + "NO_CAPTCHA": "No captcha found", + "INVALID_TOKEN": "Invalid token" }, "API": { "BODY_UNDEFINED": "Body must be defined in API POST call", diff --git a/packages/contract/src/accounts/mnemonic.ts b/packages/contract/src/accounts/mnemonic.ts index be42c8c971..f728579563 100644 --- a/packages/contract/src/accounts/mnemonic.ts +++ b/packages/contract/src/accounts/mnemonic.ts @@ -34,7 +34,7 @@ export async function generateMnemonic(keyring?: Keyring, pairType?: KeypairType * @param keyring * @param pairType */ -export async function generateSecret(keyring?: Keyring, pairType?: KeypairType): Promise<[Uint8Array, string]> { +export async function generateMiniSecret(keyring?: Keyring, pairType?: KeypairType): Promise<[Uint8Array, string]> { const [mnemonic, address] = await generateMnemonic(keyring, pairType) return [mnemonicToMiniSecret(mnemonic), address] } diff --git a/packages/procaptcha-bundle/src/index.tsx b/packages/procaptcha-bundle/src/index.tsx index 0c96643582..f815291d38 100644 --- a/packages/procaptcha-bundle/src/index.tsx +++ b/packages/procaptcha-bundle/src/index.tsx @@ -20,7 +20,7 @@ import { ProcaptchaClientConfigInput, ProcaptchaClientConfigOutput, ProcaptchaConfigSchema, - ProcaptchaOutput, + ProcaptchaToken, } from '@prosopo/types' import { Procaptcha } from '@prosopo/procaptcha-react' import { ProcaptchaFrictionless } from '@prosopo/procaptcha-frictionless' @@ -32,7 +32,7 @@ interface ProcaptchaRenderOptions { siteKey: string theme?: 'light' | 'dark' captchaType?: Features - callback?: string | ((payload: ProcaptchaOutput) => void) + callback?: string | ((token: ProcaptchaToken) => void) 'challenge-valid-length'?: string // seconds for successful challenge to be valid 'chalexpired-callback'?: string | (() => void) 'expired-callback'?: string | (() => void) @@ -88,7 +88,7 @@ const getWindowCallback = (callbackName: string) => { return fn } -const handleOnHuman = (element: Element, payload: ProcaptchaOutput) => { +const handleOnHuman = (element: Element, token: ProcaptchaToken) => { const form = getParentForm(element) if (!form) { @@ -99,7 +99,7 @@ const handleOnHuman = (element: Element, payload: ProcaptchaOutput) => { const input = document.createElement('input') input.type = 'hidden' input.name = ApiParams.procaptchaResponse - input.value = JSON.stringify(payload) + input.value = token form.appendChild(input) } @@ -128,7 +128,7 @@ const setValidChallengeLength = ( } const getDefaultCallbacks = (element: Element) => ({ - onHuman: (payload: ProcaptchaOutput) => handleOnHuman(element, payload), + onHuman: (token: ProcaptchaToken) => handleOnHuman(element, token), onChallengeExpired: () => { console.log('Challenge expired') }, @@ -158,7 +158,7 @@ const setTheme = ( function setUserCallbacks( renderOptions: ProcaptchaRenderOptions | undefined, callbacks: { - onHuman: (payload: ProcaptchaOutput) => void + onHuman: (token: ProcaptchaToken) => void onChallengeExpired: () => void onExpired: () => void onError: (error: Error) => void diff --git a/packages/procaptcha-pow/src/Services/Manager.ts b/packages/procaptcha-pow/src/Services/Manager.ts index 2b343ade70..15e1844a0e 100644 --- a/packages/procaptcha-pow/src/Services/Manager.ts +++ b/packages/procaptcha-pow/src/Services/Manager.ts @@ -20,6 +20,7 @@ import { ProcaptchaConfigSchema, ProcaptchaState, ProcaptchaStateUpdateFn, + encodeProcaptchaOutput, } from '@prosopo/types' import { ApiPromise } from '@polkadot/api/promise/Api' import { ExtensionWeb2 } from '@prosopo/account' @@ -214,13 +215,16 @@ export const Manager = ( isHuman: true, loading: false, }) - events.onHuman({ - providerUrl, - [ApiParams.user]: getAccount().account.address, - [ApiParams.dapp]: getDappAccount(), - [ApiParams.challenge]: challenge.challenge, - [ApiParams.blockNumber]: getRandomProviderResponse.blockNumber, - }) + events.onHuman( + encodeProcaptchaOutput({ + [ApiParams.providerUrl]: providerUrl, + [ApiParams.user]: getAccount().account.address, + [ApiParams.dapp]: getDappAccount(), + [ApiParams.challenge]: challenge.challenge, + [ApiParams.blockNumber]: getRandomProviderResponse.blockNumber, + [ApiParams.nonce]: solution, + }) + ) setValidChallengeTimeout() } } diff --git a/packages/procaptcha/package.json b/packages/procaptcha/package.json index 28c778863f..d73de6d0a9 100644 --- a/packages/procaptcha/package.json +++ b/packages/procaptcha/package.json @@ -49,7 +49,8 @@ "@prosopo/datasets": "0.3.42", "@prosopo/procaptcha-common": "0.3.42", "@prosopo/types": "0.3.42", - "@prosopo/util": "0.3.42" + "@prosopo/util": "0.3.42", + "jsdom": "^24.1.0" }, "overrides": { "@polkadot/extension-inject": { diff --git a/packages/procaptcha/src/modules/Manager.ts b/packages/procaptcha/src/modules/Manager.ts index bd951b5ac4..d97e6acef1 100644 --- a/packages/procaptcha/src/modules/Manager.ts +++ b/packages/procaptcha/src/modules/Manager.ts @@ -21,11 +21,11 @@ import { ProcaptchaClientConfigInput, ProcaptchaClientConfigOutput, ProcaptchaConfigSchema, - ProcaptchaOutput, ProcaptchaState, ProcaptchaStateUpdateFn, StoredEvents, TCaptchaSubmitResult, + encodeProcaptchaOutput, } from '@prosopo/types' import { ApiPromise } from '@polkadot/api/promise/Api' import { ExtensionWeb2, ExtensionWeb3 } from '@prosopo/account' @@ -169,10 +169,13 @@ export function Manager( if (contractIsHuman) { updateState({ isHuman: true, loading: false }) - events.onHuman({ - user: account.account.address, - dapp: getDappAccount(), - }) + events.onHuman( + encodeProcaptchaOutput({ + [ApiParams.user]: account.account.address, + [ApiParams.dapp]: getDappAccount(), + [ApiParams.blockNumber]: getBlockNumber(), + }) + ) setValidChallengeTimeout() return } @@ -197,25 +200,26 @@ export function Manager( data: procaptchaStorage.blockNumber.toString(), type: 'bytes', }) - + const token = encodeProcaptchaOutput({ + [ApiParams.user]: account.account.address, + [ApiParams.dapp]: getDappAccount(), + [ApiParams.blockNumber]: procaptchaStorage.blockNumber, + }) const verifyDappUserResponse = await providerApi.verifyUser( - getDappAccount(), - account.account.address, - procaptchaStorage.blockNumber, + token, signature, - undefined, configOptional.captchas.image.cachedTimeout ) if (verifyDappUserResponse.verified) { updateState({ isHuman: true, loading: false }) - const output: ProcaptchaOutput = { + const output = { [ApiParams.providerUrl]: procaptchaStorage.providerUrl, [ApiParams.user]: account.account.address, [ApiParams.dapp]: getDappAccount(), [ApiParams.commitmentId]: hashToHex(verifyDappUserResponse.commitmentId), [ApiParams.blockNumber]: verifyDappUserResponse.blockNumber, } - events.onHuman(output) + events.onHuman(encodeProcaptchaOutput(output)) setValidChallengeTimeout() return } @@ -340,13 +344,15 @@ export function Manager( const providerUrl = trimProviderUrl(captchaApi.provider.provider.url.toString()) // cache this provider for future use storage.setProcaptchaStorage({ ...storage.getProcaptchaStorage(), providerUrl, blockNumber }) - events.onHuman({ - providerUrl, - user: account.account.address, - dapp: getDappAccount(), - commitmentId: hashToHex(submission[1]), - blockNumber, - }) + events.onHuman( + encodeProcaptchaOutput({ + [ApiParams.providerUrl]: providerUrl, + [ApiParams.user]: account.account.address, + [ApiParams.dapp]: getDappAccount(), + [ApiParams.commitmentId]: hashToHex(submission[1]), + [ApiParams.blockNumber]: blockNumber, + }) + ) setValidChallengeTimeout() } }) diff --git a/packages/provider/src/api/captcha.ts b/packages/provider/src/api/captcha.ts index 7ca310b264..f7e90b6185 100644 --- a/packages/provider/src/api/captcha.ts +++ b/packages/provider/src/api/captcha.ts @@ -53,7 +53,7 @@ export function prosopoRouter(env: ProviderEnvironment): Router { * @return {Captcha} - The Captcha data */ router.get( - `${ApiPaths.GetCaptchaChallenge}/:${ApiParams.datasetId}/:${ApiParams.user}/:${ApiParams.dapp}/:${ApiParams.blockNumber}`, + `${ApiPaths.GetImageCaptchaChallenge}/:${ApiParams.datasetId}/:${ApiParams.user}/:${ApiParams.dapp}/:${ApiParams.blockNumber}`, async (req, res, next) => { try { const { blockNumber, datasetId, user, dapp } = CaptchaRequestBody.parse(req.params) @@ -95,7 +95,7 @@ export function prosopoRouter(env: ProviderEnvironment): Router { * @param {Captcha[]} captchas - The Captcha solutions * @return {DappUserSolutionResult} - The Captcha solution result and proof */ - router.post(ApiPaths.SubmitCaptchaSolution, async (req, res, next) => { + router.post(ApiPaths.SubmitImageCaptchaSolution, async (req, res, next) => { let parsed: CaptchaSolutionBodyType try { parsed = CaptchaSolutionBody.parse(req.body) diff --git a/packages/provider/src/api/errorHandler.ts b/packages/provider/src/api/errorHandler.ts index 5128dfe5a1..555963159c 100644 --- a/packages/provider/src/api/errorHandler.ts +++ b/packages/provider/src/api/errorHandler.ts @@ -14,9 +14,10 @@ // We need the unused params to make express recognise this function as an error handler import { NextFunction, Request, Response } from 'express' import { ProsopoApiError, ProsopoBaseError } from '@prosopo/common' +import { ZodError } from 'zod' export const handleErrors = ( - err: ProsopoApiError | SyntaxError, + err: ProsopoApiError | SyntaxError | ZodError, request: Request, response: Response, next: NextFunction @@ -26,11 +27,7 @@ export const handleErrors = ( while (err instanceof ProsopoBaseError && err.context && err.context.error) { err = err.context.error } - let message = err.message - try { - message = JSON.parse(err.message) - } catch { - console.error(err) - } - response.writeHead(code, message, { 'content-type': 'application/json' }).end() + const message = err.message + + response.writeHead(code, JSON.stringify(message), { 'content-type': 'application/json' }).end() } diff --git a/packages/provider/src/api/verify.ts b/packages/provider/src/api/verify.ts index ae83cc7a14..f2d4a8056b 100644 --- a/packages/provider/src/api/verify.ts +++ b/packages/provider/src/api/verify.ts @@ -23,7 +23,9 @@ import { CaptchaStatus } from '@prosopo/captcha-contract/types-returns' import { ProsopoApiError } from '@prosopo/common' import { ProviderEnvironment } from '@prosopo/types-env' import { Tasks } from '../tasks/tasks.js' +import { decodeProcaptchaOutput } from '@prosopo/types' import { getBlockTimeMs, getCurrentBlockNumber } from '@prosopo/contract' +import { handleErrors } from './errorHandler.js' import { verifySignature } from './authMiddleware.js' import express, { NextFunction, Request, Response, Router } from 'express' @@ -44,10 +46,11 @@ export function prosopoVerifyRouter(env: ProviderEnvironment): Router { * @param {NextFunction} next - Express next function. * @param {boolean} isDapp - Indicates whether the verification is for a dapp (true) or user (false). */ - async function verifySolution(res: Response, req: Request, next: NextFunction, isDapp: boolean) { + async function verifyImageSolution(res: Response, req: Request, next: NextFunction, isDapp: boolean) { const parsed = VerifySolutionBody.parse(req.body) try { - const { dappUserSignature, blockNumber, user, dapp } = parsed + const { dappUserSignature, token } = parsed + const { user, dapp, blockNumber, commitmentId } = decodeProcaptchaOutput(token) // Verify using the appropriate pair based on isDapp flag const keyPair = isDapp ? env.keyring.addFromAddress(dapp) : env.keyring.addFromAddress(user) @@ -55,9 +58,9 @@ export function prosopoVerifyRouter(env: ProviderEnvironment): Router { // Will throw an error if the signature is invalid verifySignature(dappUserSignature, blockNumber.toString(), keyPair) - const solution = await (parsed.commitmentId - ? tasks.getDappUserCommitmentById(parsed.commitmentId) - : tasks.getDappUserCommitmentByAccount(parsed.user)) + const solution = await (commitmentId + ? tasks.getDappUserCommitmentById(commitmentId) + : tasks.getDappUserCommitmentByAccount(user)) // No solution exists if (!solution) { @@ -117,9 +120,9 @@ export function prosopoVerifyRouter(env: ProviderEnvironment): Router { * @param {string} commitmentId - The captcha solution to look up * @param {number} maxVerifiedTime - The maximum time in milliseconds since the blockNumber */ - router.post(ApiPaths.VerifyCaptchaSolutionDapp, async (req, res, next) => { + router.post(ApiPaths.VerifyImageCaptchaSolutionDapp, async (req, res, next) => { try { - await verifySolution(res, req, next, true) + await verifyImageSolution(res, req, next, true) } catch (err) { return next(new ProsopoApiError('CAPTCHA.PARSE_ERROR', { context: { code: 400, error: err } })) } @@ -135,9 +138,9 @@ export function prosopoVerifyRouter(env: ProviderEnvironment): Router { * @param {string} commitmentId - The captcha solution to look up * @param {number} maxVerifiedTime - The maximum time in milliseconds since the blockNumber */ - router.post(ApiPaths.VerifyCaptchaSolutionUser, async (req, res, next) => { + router.post(ApiPaths.VerifyImageCaptchaSolutionUser, async (req, res, next) => { try { - await verifySolution(res, req, next, false) + await verifyImageSolution(res, req, next, false) } catch (err) { return next(new ProsopoApiError('CAPTCHA.PARSE_ERROR', { context: { code: 400, error: err } })) } @@ -149,16 +152,25 @@ export function prosopoVerifyRouter(env: ProviderEnvironment): Router { * @param {string} dappAccount - Dapp User id * @param {string} challenge - The captcha solution to look up */ - router.post(ApiPaths.ServerPowCaptchaVerify, async (req, res, next) => { + router.post(ApiPaths.VerifyPowCaptchaSolution, async (req, res, next) => { try { - const { challenge, dapp, dappUserSignature, blockNumber, verifiedTimeout } = - ServerPowCaptchaVerifyRequestBody.parse(req.body) + const { token, dappSignature, verifiedTimeout } = ServerPowCaptchaVerifyRequestBody.parse(req.body) + + const { dapp, blockNumber, challenge } = decodeProcaptchaOutput(token) + + if (!challenge) { + const unverifiedResponse: VerificationResponse = { + status: req.t('API.USER_NOT_VERIFIED'), + [ApiParams.verified]: false, + } + return res.json(unverifiedResponse) + } // Verify using the dapp pair passed in the request const dappPair = env.keyring.addFromAddress(dapp) // Will throw an error if the signature is invalid - verifySignature(dappUserSignature, blockNumber.toString(), dappPair) + verifySignature(dappSignature, blockNumber.toString(), dappPair) const approved = await tasks.serverVerifyPowCaptchaSolution(dapp, challenge, verifiedTimeout) @@ -170,9 +182,14 @@ export function prosopoVerifyRouter(env: ProviderEnvironment): Router { return res.json(verificationResponse) } catch (err) { tasks.logger.error(err) - return next(new ProsopoApiError('API.BAD_REQUEST', { context: { errorCode: 400, error: err } })) + return next(new ProsopoApiError('API.BAD_REQUEST', { context: { code: 400, error: err } })) } }) + // Your error handler should always be at the end of your application stack. Apparently it means not only after all + // app.use() but also after all your app.get() and app.post() calls. + // https://stackoverflow.com/a/62358794/1178971 + router.use(handleErrors) + return router } diff --git a/packages/server/src/server.ts b/packages/server/src/server.ts index a8c6ebc410..4bef6ce71d 100644 --- a/packages/server/src/server.ts +++ b/packages/server/src/server.ts @@ -17,7 +17,8 @@ import { ContractAbi, NetworkConfig, NetworkNamesSchema, - ProcaptchaOutput, + ProcaptchaOutputSchema, + ProcaptchaToken, ProsopoServerConfigOutput, } from '@prosopo/types' import { Keyring } from '@polkadot/keyring' @@ -28,8 +29,9 @@ import { ProviderApi } from '@prosopo/api' import { RandomProvider } from '@prosopo/captcha-contract/types-returns' import { WsProvider } from '@polkadot/rpc-provider/ws' import { ContractAbi as abiJson } from '@prosopo/captcha-contract/contract-info' +import { decodeProcaptchaOutput } from '@prosopo/types' import { get } from '@prosopo/util' -import { u8aToHex } from '@polkadot/util' +import { isHex, u8aToHex } from '@polkadot/util' export class ProsopoServer { config: ProsopoServerConfigOutput @@ -179,22 +181,18 @@ export class ProsopoServer { /** * Verify the user with the provider URL passed in. If a challenge is provided, we use the challenge to verify the * user. If not, we use the user, dapp, and optionally the commitmentID, to verify the user. - * @param providerUrl - * @param dapp - * @param user + * @param token * @param blockNumber * @param timeouts + * @param providerUrl * @param challenge - * @param commitmentId */ public async verifyProvider( - providerUrl: string, - dapp: string, - user: string, + token: string, blockNumber: number, timeouts: CaptchaTimeoutOutput, - challenge?: string, - commitmentId?: string + providerUrl: string, + challenge?: string ) { this.logger.info('Verifying with provider.') const blockNumberString = blockNumber.toString() @@ -206,13 +204,7 @@ export class ProsopoServer { const providerApi = await this.getProviderApi(providerUrl) if (challenge) { - const result = await providerApi.submitPowCaptchaVerify( - challenge, - dapp, - signatureHex, - blockNumber, - timeouts.pow.cachedTimeout - ) + const result = await providerApi.submitPowCaptchaVerify(token, signatureHex, timeouts.pow.cachedTimeout) // We don't care about recency with PoW challenges as they are single use, so just return the verified result return result.verified } @@ -222,26 +214,25 @@ export class ProsopoServer { // bail early if the block is too old. This saves us calling the Provider. return false } - const result = await providerApi.verifyDappUser( - dapp, - user, - blockNumber, - signatureHex, - commitmentId, - - timeouts.image.cachedTimeout - ) + const result = await providerApi.verifyDappUser(token, signatureHex, timeouts.image.cachedTimeout) return result.verified } /** * - * @param payload Info output by procaptcha on completion of the captcha process * @returns + * @param token */ - public async isVerified(payload: ProcaptchaOutput): Promise { - const { user, dapp, providerUrl, commitmentId, blockNumber, challenge } = payload + public async isVerified(token: ProcaptchaToken): Promise { + if (!isHex(token)) { + this.logger.error('Invalid token - not hex', token) + return false + } + + const payload = decodeProcaptchaOutput(token) + + const { user, providerUrl, blockNumber, challenge } = ProcaptchaOutputSchema.parse(payload) if (providerUrl && blockNumber) { // By requiring block number, we load balance requests to the providers by requiring that the random @@ -257,15 +248,7 @@ export class ProsopoServer { // If we have a providerURL and a blockNumber, we verify with the provider - return await this.verifyProvider( - providerUrl, - dapp, - user, - blockNumber, - this.config.timeouts, - challenge, - commitmentId - ) + return await this.verifyProvider(token, blockNumber, this.config.timeouts, providerUrl, challenge) } else { // If we don't have a providerURL, we verify with the contract return await this.verifyContract(user, this.config.timeouts.contract.maxVerifiedTime) diff --git a/packages/types/src/api/index.ts b/packages/types/src/api/index.ts index 5e08adfedf..452d63662f 100644 --- a/packages/types/src/api/index.ts +++ b/packages/types/src/api/index.ts @@ -12,3 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. export * from './api.js' +export * from './params.js' diff --git a/packages/types/src/api/params.ts b/packages/types/src/api/params.ts new file mode 100644 index 0000000000..05fb96562a --- /dev/null +++ b/packages/types/src/api/params.ts @@ -0,0 +1,39 @@ +// Copyright 2021-2024 Prosopo (UK) Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +export enum ApiParams { + datasetId = 'datasetId', + user = 'user', + dapp = 'dapp', + provider = 'provider', + blockNumber = 'blockNumber', + signature = 'signature', + requestHash = 'requestHash', + captchas = 'captchas', + commitmentId = 'commitmentId', + proof = 'proof', + dappSignature = 'dappSignature', + dappUserSignature = 'dappUserSignature', + providerUrl = 'providerUrl', + procaptchaResponse = 'procaptcha-response', + verifiedTimeout = 'verifiedTimeout', + maxVerifiedTime = 'maxVerifiedTime', + verified = 'verified', + status = 'status', + challenge = 'challenge', + difficulty = 'difficulty', + nonce = 'nonce', + timeouts = 'timeouts', + token = 'token', + secret = 'secret', +} diff --git a/packages/types/src/procaptcha/index.ts b/packages/types/src/procaptcha/index.ts index 124ddcbb56..fe9fe8d1ef 100644 --- a/packages/types/src/procaptcha/index.ts +++ b/packages/types/src/procaptcha/index.ts @@ -17,4 +17,5 @@ export * from './collector.js' export * from './manager.js' export * from './props.js' export * from './storage.js' +export * from './token.js' export * from './utils.js' diff --git a/packages/types/src/procaptcha/manager.ts b/packages/types/src/procaptcha/manager.ts index 3aefba5934..8778d97c8a 100644 --- a/packages/types/src/procaptcha/manager.ts +++ b/packages/types/src/procaptcha/manager.ts @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { ApiParams, CaptchaResponseBody } from '../provider/index.js' +import { ApiParams } from '../api/index.js' +import { CaptchaResponseBody } from '../provider/index.js' import { InjectedAccount, InjectedExtension } from '@polkadot/extension-inject/types' +import { ProcaptchaToken, ProcaptchaTokenSpec } from './token.js' import { ProsopoCaptchaApiInterface } from './api.js' import { TCaptchaSubmitResult } from './client.js' -import { number, object, string, infer as zInfer } from 'zod' - +import { object } from 'zod' /** * House the account and associated extension. */ @@ -25,24 +26,8 @@ export interface Account { extension?: InjectedExtension } -export const ProcaptchaOutputSchema = object({ - [ApiParams.commitmentId]: string().optional(), - [ApiParams.providerUrl]: string().optional(), - [ApiParams.dapp]: string(), - [ApiParams.user]: string(), - [ApiParams.blockNumber]: number().optional(), - [ApiParams.challenge]: string().optional(), -}) - -/** - * The information produced by procaptcha on completion of the captcha process, - * whether verified by smart contract, a pending commitment in the cache of a - * provider or a captcha challenge. - */ -export type ProcaptchaOutput = zInfer - export const ProcaptchaResponse = object({ - [ApiParams.procaptchaResponse]: ProcaptchaOutputSchema, + [ApiParams.procaptchaResponse]: ProcaptchaTokenSpec, }) /** @@ -56,7 +41,7 @@ export type ProcaptchaCallbacks = Partial */ export interface ProcaptchaEvents { onError: (error: Error) => void - onHuman: (output: ProcaptchaOutput) => void + onHuman: (output: ProcaptchaToken) => void onExtensionNotFound: () => void onChallengeExpired: () => void onExpired: () => void diff --git a/packages/types/src/procaptcha/token.ts b/packages/types/src/procaptcha/token.ts new file mode 100644 index 0000000000..27c2251dab --- /dev/null +++ b/packages/types/src/procaptcha/token.ts @@ -0,0 +1,67 @@ +// Copyright 2021-2024 Prosopo (UK) Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +import { ApiParams } from '../api/params.js' +import { Option, Struct, str, u32 } from 'scale-ts' +import { hexToU8a, u8aToHex } from '@polkadot/util' +import { number, object, string, infer as zInfer } from 'zod' + +export const ProcaptchaOutputSchema = object({ + [ApiParams.commitmentId]: string().optional(), + [ApiParams.providerUrl]: string().optional(), + [ApiParams.dapp]: string(), + [ApiParams.user]: string(), + [ApiParams.blockNumber]: number(), + [ApiParams.challenge]: string().optional(), + [ApiParams.nonce]: number().optional(), +}) + +/** + * The information produced by procaptcha on completion of the captcha process, + * whether verified by smart contract, a pending commitment in the cache of a + * provider or a captcha challenge. + */ +export type ProcaptchaOutput = zInfer + +/** + * The codec for encoding and decoding the procaptcha output to a hex string. + */ +export const ProcaptchaTokenCodec = Struct({ + [ApiParams.commitmentId]: Option(str), + [ApiParams.providerUrl]: Option(str), + [ApiParams.dapp]: str, + [ApiParams.user]: str, + [ApiParams.blockNumber]: u32, + [ApiParams.challenge]: Option(str), + [ApiParams.nonce]: Option(u32), +}) + +export const ProcaptchaTokenSpec = string().startsWith('0x') +export type ProcaptchaToken = zInfer + +export const encodeProcaptchaOutput = (procaptchaOutput: ProcaptchaOutput): ProcaptchaToken => { + return u8aToHex( + ProcaptchaTokenCodec.enc({ + [ApiParams.commitmentId]: undefined, + [ApiParams.providerUrl]: undefined, + [ApiParams.challenge]: undefined, + [ApiParams.nonce]: undefined, + // override any optional fields by spreading the procaptchaOutput + ...procaptchaOutput, + }) + ) +} + +export const decodeProcaptchaOutput = (procaptchaToken: ProcaptchaToken): ProcaptchaOutput => { + return ProcaptchaOutputSchema.parse(ProcaptchaTokenCodec.dec(hexToU8a(procaptchaToken))) +} diff --git a/packages/types/src/provider/api.ts b/packages/types/src/provider/api.ts index 0aca72c85a..2e67bbd4d1 100644 --- a/packages/types/src/provider/api.ts +++ b/packages/types/src/provider/api.ts @@ -11,19 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +import { ApiParams } from '../api/params.js' import { CaptchaSolutionSchema, CaptchaWithProof } from '../datasets/index.js' import { DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT } from '../config/index.js' import { Hash, Provider } from '@prosopo/captcha-contract/types-returns' +import { ProcaptchaTokenSpec } from '../procaptcha/index.js' import { array, input, number, object, output, string, infer as zInfer } from 'zod' export enum ApiPaths { - GetCaptchaChallenge = '/v1/prosopo/provider/captcha', + GetImageCaptchaChallenge = '/v1/prosopo/provider/captcha/image', GetPowCaptchaChallenge = '/v1/prosopo/provider/captcha/pow', - SubmitCaptchaSolution = '/v1/prosopo/provider/solution', + SubmitImageCaptchaSolution = '/v1/prosopo/provider/solution', SubmitPowCaptchaSolution = '/v1/prosopo/provider/pow/solution', - ServerPowCaptchaVerify = '/v1/prosopo/provider/pow/server-verify', - VerifyCaptchaSolutionDapp = '/v1/prosopo/provider/dapp-verify', - VerifyCaptchaSolutionUser = '/v1/prosopo/provider/user-verify', + VerifyPowCaptchaSolution = '/v1/prosopo/provider/pow/verify', + VerifyImageCaptchaSolutionDapp = `/v1/prosopo/provider/image/${ApiParams.dapp}/verify`, + VerifyImageCaptchaSolutionUser = `/v1/prosopo/provider/image/${ApiParams.user}/verify`, GetProviderStatus = '/v1/prosopo/provider/status', GetProviderDetails = '/v1/prosopo/provider/details', SubmitUserEvents = '/v1/prosopo/provider/events', @@ -36,29 +38,6 @@ export enum AdminApiPaths { ProviderUpdate = '/v1/prosopo/provider/admin/update', } -export enum ApiParams { - datasetId = 'datasetId', - user = 'user', - dapp = 'dapp', - provider = 'provider', - blockNumber = 'blockNumber', - signature = 'signature', - requestHash = 'requestHash', - captchas = 'captchas', - commitmentId = 'commitmentId', - proof = 'proof', - dappUserSignature = 'dappUserSignature', - providerUrl = 'providerUrl', - procaptchaResponse = 'procaptcha-response', - verifiedTimeout = 'verifiedTimeout', - maxVerifiedTime = 'maxVerifiedTime', - verified = 'verified', - status = 'status', - challenge = 'challenge', - difficulty = 'difficulty', - nonce = 'nonce', -} - export interface DappUserSolutionResult { [ApiParams.captchas]: CaptchaIdAndProof[] partialFee?: string @@ -99,11 +78,8 @@ export const CaptchaSolutionBody = object({ export type CaptchaSolutionBodyType = zInfer export const VerifySolutionBody = object({ - [ApiParams.dapp]: string(), - [ApiParams.user]: string(), - [ApiParams.blockNumber]: number(), + [ApiParams.token]: ProcaptchaTokenSpec, [ApiParams.dappUserSignature]: string(), - [ApiParams.commitmentId]: string().optional(), [ApiParams.maxVerifiedTime]: number().optional().default(DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED), }) @@ -151,16 +127,14 @@ export interface PowCaptchaSolutionResponse { /** * Request body for the server to verify a PoW captcha solution - * @param {string} challenge - The challenge string - * @param {string} dapp - The dapp account (site key) - * @param {number} timeout - The maximum time in milliseconds since the Provider was selected at `blockNumber` + * @param {string} token - The Procaptcha token + * @param {string} dappUserSignature - The signature proving ownership of the site key + * @param {number} verifiedTimeout - The maximum time in milliseconds since the Provider was selected at `blockNumber` */ export const ServerPowCaptchaVerifyRequestBody = object({ - [ApiParams.challenge]: string(), - [ApiParams.dapp]: string(), + [ApiParams.token]: ProcaptchaTokenSpec, + [ApiParams.dappSignature]: string(), [ApiParams.verifiedTimeout]: number().optional().default(DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT), - [ApiParams.dappUserSignature]: string(), - [ApiParams.blockNumber]: number(), }) export const GetPowCaptchaChallengeRequestBody = object({