diff --git a/.gitignore b/.gitignore index bfd4d79ca5a2cf3d2e031bc388bd2dff17976984..b65387fb9dcf28c94397c33772ea351a91cf4795 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ Thumbs.db #compose compose/data +compose/dist diff --git a/apps/agent/src/app/app.module.ts b/apps/agent/src/app/app.module.ts index 02ff8779769fd14c5a46232ca7903d0109f331b8..23d0bdb17340f5dd49270e9585eaa27d91164d82 100644 --- a/apps/agent/src/app/app.module.ts +++ b/apps/agent/src/app/app.module.ts @@ -2,18 +2,31 @@ import { Module } from "@nestjs/common"; import { AskerDynamicModule } from "@ocm-engine/asker"; import { ConfigModule } from "@nestjs/config"; +import { + agentConfig, + agentSchema, + gatewayConfig, + gatewaySchema, + ledgersConfig, + ledgersSchema, + natsConfig, + natsSchema, +} from "@ocm-engine/config"; +import Joi from "joi"; -import agentConfig from "../config/agent.config"; -import ledgersConfig from "../config/ledgers.config"; -import validationSchema from "../config/validation"; -import NatsConfig from "../config/nats.config"; +const validationSchema = Joi.object({ + agent: agentSchema, + ledgers: ledgersSchema, + nats: natsSchema, + gateway: gatewaySchema, +}); @Module({ imports: [ AskerDynamicModule.forRootAsync(), ConfigModule.forRoot({ isGlobal: true, - load: [agentConfig, ledgersConfig, NatsConfig], + load: [agentConfig, ledgersConfig, natsConfig, gatewayConfig], validationSchema, }), ], diff --git a/apps/agent/src/config/agent.config.ts b/apps/agent/src/config/agent.config.ts deleted file mode 100644 index 4e07aafe8c8bf20ee60b1f472b2b9e1434a86358..0000000000000000000000000000000000000000 --- a/apps/agent/src/config/agent.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { registerAs } from "@nestjs/config"; -import { IConfAgent } from "@ocm-engine/asker"; -import * as process from "process"; - -export default registerAs( - "agent", - (): IConfAgent => ({ - agentPeerPort: parseInt(process.env.AGENT_PEER_URL.split(":")[2]), - agentPeerAddress: process.env.AGENT_PEER_URL, - agentName: process.env.AGENT_NAME, - agentKey: process.env.AGENT_KEY, - agentDidSeed: process.env.AGENT_DID_SEED, - agentDbHost: process.env.AGENT_DB_HOST, - agentDbUser: process.env.AGENT_DB_USER, - agentDbPass: process.env.AGENT_DB_PASS, - agentIsRest: process.env.AGENT_IS_REST === "true", - agentConsumerName: process.env.AGENT_CONSUMER_NAME, - agentConsumerMaxMessagess: parseInt(process.env.AGENT_MAX_MESSAGES), - agentConsumerRateLimit: parseInt(process.env.AGENT_RETE_LIMIT), - }), -); diff --git a/apps/agent/src/config/ledgers.config.ts b/apps/agent/src/config/ledgers.config.ts deleted file mode 100644 index ac39e98f2c106e18261de49dab8a71f32ef2d5cd..0000000000000000000000000000000000000000 --- a/apps/agent/src/config/ledgers.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { registerAs } from "@nestjs/config"; -import * as process from "process"; -import { ILedgers } from "@ocm-engine/ledgers"; - -export default registerAs( - "ledgers", - (): ILedgers => ({ - ledgers: process.env.LEDGERS.split(","), - idUnionApiKey: process.env.IDUNION_KEY, - }), -); diff --git a/apps/agent/src/config/nats.config.ts b/apps/agent/src/config/nats.config.ts deleted file mode 100644 index 19d9c53ddc6abca96f89f75ff9bd155f26c798d3..0000000000000000000000000000000000000000 --- a/apps/agent/src/config/nats.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { registerAs } from "@nestjs/config"; -import * as process from "process"; -import { IConfNats } from "@ocm-engine/nats"; - -export default registerAs( - "nats", - (): IConfNats => ({ - servers: process.env.NATS_SERVERS.split(","), - streamName: process.env.NATS_STREAM_NAME, - subjects: process.env.NATS_SUBJECTS.split(","), - }), -); diff --git a/apps/agent/src/main.ts b/apps/agent/src/main.ts index 00d324490653b01af68441d0547c772cbd44373f..14dc11a62a8c8da3150c947027aa3f45b1f692bf 100644 --- a/apps/agent/src/main.ts +++ b/apps/agent/src/main.ts @@ -13,7 +13,7 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); const globalPrefix = "api"; app.setGlobalPrefix(globalPrefix); - const port = process.env.PORT || 3001; + const port = process.env.AGENT_PORT || 3001; app.enableShutdownHooks(); const config = new DocumentBuilder() diff --git a/apps/connection-manager/.eslintrc.json b/apps/connection-manager/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..9d9c0db55bb1e91c5f2e7b64a02bc6bf69fc7cb5 --- /dev/null +++ b/apps/connection-manager/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/apps/connection-manager/deployment/Dockerfile b/apps/connection-manager/deployment/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ed4f65ec7b4f474233e58d7a968696c01d8e998e --- /dev/null +++ b/apps/connection-manager/deployment/Dockerfile @@ -0,0 +1,15 @@ +FROM node:18.16.0-buster-slim + +RUN apt update -y && apt install python3 git make build-essential -y + +WORKDIR app + +COPY ./dist/apps/connection-manager . +COPY package.json yarn.lock ./ + +RUN yarn install + + +EXPOSE 8882 + +CMD ["node", "main.js"] diff --git a/apps/connection-manager/jest.config.ts b/apps/connection-manager/jest.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..60f58d104662261d55879e940d26f77a5b260242 --- /dev/null +++ b/apps/connection-manager/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: "connection-manager", + preset: "../../jest.preset.js", + testEnvironment: "node", + transform: { + "^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }], + }, + moduleFileExtensions: ["ts", "js", "html"], + coverageDirectory: "../../coverage/apps/connection-manager", +}; diff --git a/apps/connection-manager/project.json b/apps/connection-manager/project.json new file mode 100644 index 0000000000000000000000000000000000000000..55b568a4e2510b0726a8f1d6c71bcf5390d91765 --- /dev/null +++ b/apps/connection-manager/project.json @@ -0,0 +1,63 @@ +{ + "name": "connection-manager", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/connection-manager/src", + "projectType": "application", + "targets": { + "build": { + "executor": "@nx/webpack:webpack", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "target": "node", + "compiler": "tsc", + "outputPath": "dist/apps/connection-manager", + "main": "apps/connection-manager/src/main.ts", + "tsConfig": "apps/connection-manager/tsconfig.app.json", + "isolatedConfig": true, + "webpackConfig": "apps/connection-manager/webpack.config.js" + }, + "configurations": { + "development": {}, + "production": {} + } + }, + "serve": { + "executor": "@nx/js:node", + "defaultConfiguration": "development", + "options": { + "buildTarget": "connection-manager:build" + }, + "configurations": { + "development": { + "buildTarget": "connection-manager:build:development" + }, + "production": { + "buildTarget": "connection-manager:build:production" + } + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/connection-manager/**/*.ts"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "apps/connection-manager/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + } + }, + "tags": [] +} diff --git a/apps/connection-manager/src/app/app.controller.ts b/apps/connection-manager/src/app/app.controller.ts new file mode 100644 index 0000000000000000000000000000000000000000..5ae534df4ca00a903f41388bfdd326287754e861 --- /dev/null +++ b/apps/connection-manager/src/app/app.controller.ts @@ -0,0 +1,50 @@ +import { Body, Controller, Logger } from "@nestjs/common"; + +import { ProducerService } from "@ocm-engine/nats"; +import { MessagePattern, RpcException } from "@nestjs/microservices"; +import { AppService } from "./app.service"; +import { + ConnectionEvent, + CreateInvitationResponseDto, + GetConnectionRequestDto, +} from "@ocm-engine/dtos"; + +@Controller() +export class AppController { + private readonly logger: Logger = new Logger(AppController.name); + + constructor( + private readonly producerService: ProducerService, + private readonly appService: AppService, + ) {} + + @MessagePattern("connections") + async create( + @Body() + payload: { + data: null | CreateInvitationResponseDto | GetConnectionRequestDto; + type: ConnectionEvent; + source: string; + }, + ): Promise<{ id: string }> { + this.logger.debug(JSON.stringify(payload, null, 2)); + + try { + const event = this.appService.toEvent(payload); + this.logger.debug(JSON.stringify(event, null, 2)); + await this.producerService.publish<typeof payload.data>( + payload.type, + event, + ); + + return { id: event.id }; + } catch (e) { + this.logger.debug(JSON.stringify(e, null, 2)); + if (e instanceof Error) { + throw new RpcException(e.message); + } + + throw new RpcException("Internal server error"); + } + } +} diff --git a/apps/connection-manager/src/app/app.module.ts b/apps/connection-manager/src/app/app.module.ts new file mode 100644 index 0000000000000000000000000000000000000000..0dcb44fbf478df8ec6a6c56d11f17bb180d38e15 --- /dev/null +++ b/apps/connection-manager/src/app/app.module.ts @@ -0,0 +1,26 @@ +import { Module } from "@nestjs/common"; + +import { AppController } from "./app.controller"; +import { ProducerService } from "@ocm-engine/nats"; +import { ConfigModule } from "@nestjs/config"; +import { cmConfig, cmSchema, natsConfig, natsSchema } from "@ocm-engine/config"; +import Joi from "joi"; +import { AppService } from "./app.service"; + +const validationSchema = Joi.object({ + nats: natsSchema, + cm: cmSchema, +}); + +@Module({ + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + load: [natsConfig, cmConfig], + validationSchema, + }), + ], + controllers: [AppController], + providers: [ProducerService, AppService], +}) +export class AppModule {} diff --git a/apps/connection-manager/src/app/app.service.ts b/apps/connection-manager/src/app/app.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..d649854d330228a5f82be7c449c3e869a9cf16e7 --- /dev/null +++ b/apps/connection-manager/src/app/app.service.ts @@ -0,0 +1,30 @@ +import { Injectable } from "@nestjs/common"; +import { + CloudEventDto, + CONNECTION_EVENTS, + ConnectionEvent, + ConnectionUnsupportedTypeError, + CreateInvitationResponseDto, + GetConnectionRequestDto, +} from "@ocm-engine/dtos"; + +@Injectable() +export class AppService { + toEvent = (payload: { + data: null | CreateInvitationResponseDto | GetConnectionRequestDto; + type: ConnectionEvent; + source: string; + }) => { + if (!CONNECTION_EVENTS.includes(payload.type)) { + throw new ConnectionUnsupportedTypeError(); + } + + const event = new CloudEventDto<typeof payload.data>(); + event.subject = payload.type; + event.source = payload.source; + event.type = payload.type; + event.data = payload.data; + + return event; + }; +} diff --git a/apps/connection-manager/src/main.ts b/apps/connection-manager/src/main.ts new file mode 100644 index 0000000000000000000000000000000000000000..58d5133a4b4cc97a9208e1df050f3a4a01d85798 --- /dev/null +++ b/apps/connection-manager/src/main.ts @@ -0,0 +1,37 @@ +/** + * This is not a production server yet! + * This is only a minimal backend to get started. + */ + +import { Logger } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +import { AppModule } from "./app/app.module"; +import { MicroserviceOptions, Transport } from "@nestjs/microservices"; +import { ConfigService } from "@nestjs/config"; +import { IConnectionManager, IGateway } from "@ocm-engine/config"; +import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; +async function bootstrap() { + const app = await NestFactory.create(AppModule); + + const configService = app.get(ConfigService); + const gatewayConfig = configService.get<IConnectionManager>("cm")!; + + app.enableShutdownHooks(); + + const microservice = app.connectMicroservice<MicroserviceOptions>({ + transport: Transport.TCP, + options: { + host: gatewayConfig.host, + port: gatewayConfig.port, + }, + }); + + await app.startAllMicroservices(); + + app.enableShutdownHooks(); + + Logger.log("Application is running"); +} + +bootstrap(); diff --git a/apps/connection-manager/tsconfig.app.json b/apps/connection-manager/tsconfig.app.json new file mode 100644 index 0000000000000000000000000000000000000000..954f3ad1c11170724606b4b020297567c518a86b --- /dev/null +++ b/apps/connection-manager/tsconfig.app.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["node"], + "emitDecoratorMetadata": true, + "target": "es2015" + }, + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/apps/connection-manager/tsconfig.json b/apps/connection-manager/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..c1e2dd4e8be6f4fe3dca35d044fd912ff41b1c18 --- /dev/null +++ b/apps/connection-manager/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "compilerOptions": { + "esModuleInterop": true + } +} diff --git a/apps/connection-manager/tsconfig.spec.json b/apps/connection-manager/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..9b2a121d114b68dcdb5b834ebca032814b499a74 --- /dev/null +++ b/apps/connection-manager/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/apps/connection-manager/webpack.config.js b/apps/connection-manager/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..0ab513e830c33d6687ae9e14f62f69df7c0df36b --- /dev/null +++ b/apps/connection-manager/webpack.config.js @@ -0,0 +1,8 @@ +const { composePlugins, withNx } = require("@nx/webpack"); + +// Nx plugins for webpack. +module.exports = composePlugins(withNx(), (config) => { + // Update the webpack config as needed here. + // e.g. `config.plugins.push(new MyPlugin())` + return config; +}); diff --git a/apps/gateway/.eslintrc.json b/apps/gateway/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..9d9c0db55bb1e91c5f2e7b64a02bc6bf69fc7cb5 --- /dev/null +++ b/apps/gateway/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/apps/gateway/deployment/Dockerfile b/apps/gateway/deployment/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7fd2b527b187305e6c390355bc084de13cddc5ab --- /dev/null +++ b/apps/gateway/deployment/Dockerfile @@ -0,0 +1,16 @@ +FROM node:18.16.0-buster-slim + +RUN apt update -y && apt install python3 git make build-essential -y + +WORKDIR app + +COPY ./dist/apps/gateway . +COPY package.json yarn.lock ./ + +RUN yarn install + + +EXPOSE 8081 +EXPOSE 8881 + +CMD ["node", "main.js"] diff --git a/apps/gateway/jest.config.ts b/apps/gateway/jest.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..bfabc3f23ed5784a81f45f670f860a0b2f5ede61 --- /dev/null +++ b/apps/gateway/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: "gateway", + preset: "../../jest.preset.js", + testEnvironment: "node", + transform: { + "^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }], + }, + moduleFileExtensions: ["ts", "js", "html"], + coverageDirectory: "../../coverage/apps/gateway", +}; diff --git a/apps/gateway/project.json b/apps/gateway/project.json new file mode 100644 index 0000000000000000000000000000000000000000..4ffc547b09128b9d62ccd0ce6bbdeeca43973c38 --- /dev/null +++ b/apps/gateway/project.json @@ -0,0 +1,71 @@ +{ + "name": "gateway", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/gateway/src", + "projectType": "application", + "targets": { + "build": { + "executor": "@nx/webpack:webpack", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "target": "node", + "compiler": "tsc", + "outputPath": "dist/apps/gateway", + "main": "apps/gateway/src/main.ts", + "tsConfig": "apps/gateway/tsconfig.app.json", + "isolatedConfig": true, + "webpackConfig": "apps/gateway/webpack.config.js", + "transformers": [ + { + "name": "@nestjs/swagger/plugin", + "options": { + "introspectComments": true + } + } + ] + }, + "configurations": { + "development": {}, + "production": {} + } + }, + "serve": { + "executor": "@nx/js:node", + "defaultConfiguration": "development", + "options": { + "buildTarget": "gateway:build" + }, + "configurations": { + "development": { + "buildTarget": "gateway:build:development" + }, + "production": { + "buildTarget": "gateway:build:production" + } + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/gateway/**/*.ts"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "apps/gateway/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + } + }, + "tags": [] +} diff --git a/apps/gateway/src/app/app.controller.ts b/apps/gateway/src/app/app.controller.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2d312392fc51038e407b09e65b08926aad0a00e --- /dev/null +++ b/apps/gateway/src/app/app.controller.ts @@ -0,0 +1,32 @@ +import { Controller, Body, Logger } from "@nestjs/common"; +import { EventsGateway } from "./events.gateway"; +import { MessagePattern } from "@nestjs/microservices"; +import { CloudEventDto } from "@ocm-engine/dtos"; +import { ConfigService } from "@nestjs/config"; +import { IGateway } from "@ocm-engine/config"; + +@Controller() +export class AppController { + private gatewayConfig: IGateway; + private readonly logger: Logger = new Logger(AppController.name); + + constructor( + private eventsGateway: EventsGateway, + private readonly configService: ConfigService, + ) { + this.gatewayConfig = configService.get<IGateway>("gateway"); + } + + @MessagePattern(process.env["GATEWAY_MESSAGE_PATTERN"]) + create<T>(@Body() dto: CloudEventDto<T>): string { + this.logger.debug( + `received event from agent, sending to web socket ${JSON.stringify( + dto, + null, + 2, + )}`, + ); + this.eventsGateway.server.emit(this.gatewayConfig.socketEventName, dto); + return "ok"; + } +} diff --git a/apps/gateway/src/app/app.module.ts b/apps/gateway/src/app/app.module.ts new file mode 100644 index 0000000000000000000000000000000000000000..5c54c0585730b619541655f16e5067d00dbb906e --- /dev/null +++ b/apps/gateway/src/app/app.module.ts @@ -0,0 +1,42 @@ +import { Module, ValidationPipe } from "@nestjs/common"; + +import { EventsGateway } from "./events.gateway"; +import { ConfigModule } from "@nestjs/config"; +import { AppController } from "./app.controller"; +import { + cmConfig, + cmSchema, + gatewayConfig, + gatewaySchema, +} from "@ocm-engine/config"; +import { ConnectionManagerClient } from "@ocm-engine/clients"; +import Joi from "joi"; +import { ConnectionController } from "./connection.controller"; +import { APP_PIPE } from "@nestjs/core"; + +const validationSchema = Joi.object({ + gateway: gatewaySchema, + cm: cmSchema, +}); + +@Module({ + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + load: [gatewayConfig, cmConfig], + validationSchema, + }), + ], + controllers: [AppController, ConnectionController], + providers: [ + EventsGateway, + ConnectionManagerClient, + { + provide: APP_PIPE, + useValue: new ValidationPipe({ + transform: true, + }), + }, + ], +}) +export class AppModule {} diff --git a/apps/gateway/src/app/connection.controller.ts b/apps/gateway/src/app/connection.controller.ts new file mode 100644 index 0000000000000000000000000000000000000000..47c866f5abfa38362d6a326da8867a751753ca01 --- /dev/null +++ b/apps/gateway/src/app/connection.controller.ts @@ -0,0 +1,179 @@ +import { + Controller, + Body, + Post, + Get, + Param, + BadRequestException, + UseFilters, +} from "@nestjs/common"; +import { ConnectionManagerClient } from "@ocm-engine/clients"; +import { + CONNECTION_ACCEPT, + CONNECTION_CREATE, + CONNECTION_GET, + CONNECTION_LIST, + CreateInvitationResponseDto, + GatewayAcceptedResponseDto, + GetConnectionRequestDto, +} from "@ocm-engine/dtos"; +import { AllExceptionsHandler } from "./exception.handler"; +import { + ApiBadRequestResponse, + ApiBody, + ApiInternalServerErrorResponse, + ApiOperation, + ApiResponse, + ApiTags, +} from "@nestjs/swagger"; + +@UseFilters(AllExceptionsHandler) +@Controller("v1") +export class ConnectionController { + constructor(private readonly cmClient: ConnectionManagerClient) {} + + @Post("/invitation") + @ApiResponse({ + status: 201, + description: + "Request is accepted for execution, the response id will match the event id received from the web socket", + type: GatewayAcceptedResponseDto, + }) + @ApiBadRequestResponse({ + status: 400, + description: + "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", + type: BadRequestException, + }) + @ApiInternalServerErrorResponse({ + status: 500, + description: "Unknown error", + }) + @ApiOperation({ + summary: "Create invitation for connection", + description: + "Method will create invitation url. The id of the response will be matched when you receive event from the websocket", + tags: ["Connections"], + }) + createInvitation(): Promise<GatewayAcceptedResponseDto> { + return this.cmClient.sendPayload<null>({ + pattern: "connections", + payload: { + source: "/invitation", + data: null, + type: CONNECTION_CREATE, + }, + }); + } + + @Post("/invitation/accept") + @ApiResponse({ + status: 201, + description: + "Request is accepted for execution, the response id will match the event id received from the web socket", + type: GatewayAcceptedResponseDto, + }) + @ApiBadRequestResponse({ + status: 400, + description: + "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", + type: BadRequestException, + }) + @ApiInternalServerErrorResponse({ + status: 500, + description: "Unknown error", + }) + @ApiOperation({ + summary: "Accept invitation for connection", + description: + "Method will accept the invitation and will return connection thought the websocket. The id of the response will be matched when you receive event from the websocket", + tags: ["Connections"], + }) + async acceptInvitation( + @Body() createInvitationDto: CreateInvitationResponseDto, + ) { + try { + return this.cmClient.sendPayload<CreateInvitationResponseDto>({ + pattern: "connections", + payload: { + source: "/invitation/accept", + data: createInvitationDto, + type: CONNECTION_ACCEPT, + }, + }); + } catch (e) { + throw new BadRequestException(e); + } + } + + @Get("/connections") + @ApiResponse({ + status: 200, + description: + "Request is accepted for execution, the response id will match the event id received from the web socket", + type: GatewayAcceptedResponseDto, + }) + @ApiBadRequestResponse({ + status: 400, + description: + "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", + type: BadRequestException, + }) + @ApiInternalServerErrorResponse({ + status: 500, + description: "Unknown error", + }) + @ApiOperation({ + summary: "List all connections", + description: + "The id of the response will be matched when you receive event from the websocket", + tags: ["Connections"], + }) + async list() { + return this.cmClient.sendPayload<null>({ + pattern: "connections", + payload: { + source: "/connections", + data: null, + type: CONNECTION_LIST, + }, + }); + } + + @Get("/connections/:id") + @ApiResponse({ + status: 200, + description: + "Request is accepted for execution, the response id will match the event id received from the web socket", + type: GatewayAcceptedResponseDto, + }) + @ApiBadRequestResponse({ + status: 400, + description: + "Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.", + type: BadRequestException, + }) + @ApiInternalServerErrorResponse({ + status: 500, + description: "Unknown error", + }) + @ApiOperation({ + summary: "Get connection by id", + description: + "The method will search for connection id, if not found null will be returned. The id of the response will be matched when you receive event from the websocket", + tags: ["Connections"], + }) + async getById(@Param("id") id: string) { + const request = new GetConnectionRequestDto(); + request.connectionId = id; + + return this.cmClient.sendPayload<GetConnectionRequestDto>({ + pattern: "connections", + payload: { + source: "/connections/:id", + data: request, + type: CONNECTION_GET, + }, + }); + } +} diff --git a/apps/gateway/src/app/events.gateway.ts b/apps/gateway/src/app/events.gateway.ts new file mode 100644 index 0000000000000000000000000000000000000000..4855a2d9d9441fb27cb20b649cd09f5a5d467c8b --- /dev/null +++ b/apps/gateway/src/app/events.gateway.ts @@ -0,0 +1,8 @@ +import { WebSocketGateway, WebSocketServer } from "@nestjs/websockets"; +import { Server } from "socket.io"; + +@WebSocketGateway() +export class EventsGateway { + @WebSocketServer() + server: Server; +} diff --git a/apps/gateway/src/app/exception.handler.ts b/apps/gateway/src/app/exception.handler.ts new file mode 100644 index 0000000000000000000000000000000000000000..7223c23620c705bc04bb435046e78c6ad5be4dc0 --- /dev/null +++ b/apps/gateway/src/app/exception.handler.ts @@ -0,0 +1,39 @@ +import { + ExceptionFilter, + Catch, + ArgumentsHost, + HttpException, + HttpStatus, + BadRequestException, +} from "@nestjs/common"; + +@Catch() +export class AllExceptionsHandler implements ExceptionFilter { + catch(exception: unknown, host: ArgumentsHost) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + + const status = + exception instanceof HttpException + ? exception.getStatus() + : HttpStatus.INTERNAL_SERVER_ERROR; + + let message: string | string[] = "Internal server error"; + + if (exception instanceof Error) { + message = exception.message; + } + + if (exception instanceof BadRequestException) { + message = exception.getResponse() as string[]; + + response.status(status).json(message); + return; + } + + response.status(status).json({ + statusCode: status, + message, + }); + } +} diff --git a/apps/gateway/src/main.ts b/apps/gateway/src/main.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f732fa024757a5d85ed1e44173fa822b3f37774 --- /dev/null +++ b/apps/gateway/src/main.ts @@ -0,0 +1,59 @@ +/** + * This is not a production server yet! + * This is only a minimal backend to get started. + */ + +import { Logger } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +import { AppModule } from "./app/app.module"; + +import { MicroserviceOptions, Transport } from "@nestjs/microservices"; +import { ConfigService } from "@nestjs/config"; +import { IGateway } from "@ocm-engine/config"; +import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; +import * as fs from "fs"; + +async function bootstrap() { + const app = await NestFactory.create(AppModule); + + const configService = app.get(ConfigService); + const gatewayConfig = configService.get<IGateway>("gateway")!; + + const globalPrefix = "api"; + app.setGlobalPrefix(globalPrefix); + app.enableShutdownHooks(); + + const microservice = app.connectMicroservice<MicroserviceOptions>({ + transport: Transport.TCP, + options: { + host: gatewayConfig.host, + port: gatewayConfig.tcpPort, + }, + }); + + await app.startAllMicroservices(); + + app.enableShutdownHooks(); + + const config = new DocumentBuilder() + .setTitle("Gateway") + .setDescription("OCM ENGINE GATEWAY API") + .setVersion("1.0") + .addServer(`http://${gatewayConfig.host}:${gatewayConfig.httpPort}`) + .build(); + + const document = SwaggerModule.createDocument(app, config); + fs.writeFileSync("./gateway-swagger.json", JSON.stringify(document)); + SwaggerModule.setup("api", app, document); + + const port = gatewayConfig.httpPort || 3000; + + await app.listen(port, gatewayConfig.host); + + Logger.log( + `🚀 Application is running on: http://${gatewayConfig.host}:${port}/${globalPrefix}`, + ); +} + +bootstrap(); diff --git a/apps/gateway/tsconfig.app.json b/apps/gateway/tsconfig.app.json new file mode 100644 index 0000000000000000000000000000000000000000..954f3ad1c11170724606b4b020297567c518a86b --- /dev/null +++ b/apps/gateway/tsconfig.app.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["node"], + "emitDecoratorMetadata": true, + "target": "es2015" + }, + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/apps/gateway/tsconfig.json b/apps/gateway/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..c1e2dd4e8be6f4fe3dca35d044fd912ff41b1c18 --- /dev/null +++ b/apps/gateway/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "compilerOptions": { + "esModuleInterop": true + } +} diff --git a/apps/gateway/tsconfig.spec.json b/apps/gateway/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..9b2a121d114b68dcdb5b834ebca032814b499a74 --- /dev/null +++ b/apps/gateway/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/apps/gateway/webpack.config.js b/apps/gateway/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..0ab513e830c33d6687ae9e14f62f69df7c0df36b --- /dev/null +++ b/apps/gateway/webpack.config.js @@ -0,0 +1,8 @@ +const { composePlugins, withNx } = require("@nx/webpack"); + +// Nx plugins for webpack. +module.exports = composePlugins(withNx(), (config) => { + // Update the webpack config as needed here. + // e.g. `config.plugins.push(new MyPlugin())` + return config; +}); diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 98645859e64366cb2d6db4ad27d952576af4fb81..145594f59efdbdbf91121906e54552db86dd54d6 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -1,36 +1,48 @@ version: '3.8' services: -# issuer: -# container_name: issuer -# build: -# context: "../" -# dockerfile: "./apps/agent/deployment/Dockerfile" -# env_file: -# - ./env/issuer.env -# ports: -# - "3001:3001" -# - "4000:4000" -# depends_on: -# pg_db: -# condition: service_started -# broker: -# condition: service_started + agent-issuer: + container_name: agent-issuer + build: + context: "../" + dockerfile: "./apps/agent/deployment/Dockerfile" + env_file: + - ./env/issuer.env + ports: + - "8080:8080" + - "8001:8001" + depends_on: + pg_db: + condition: service_started + broker: + condition: service_started + + gateway-issuer: + container_name: gateway-issuer + build: + context: "../" + dockerfile: "./apps/gateway/deployment/Dockerfile" + env_file: + - ./env/issuer.env + ports: + - "8081:8081" + - "8881:8881" + depends_on: + cm-issuer: + condition: service_started -#TODO: holder should have separate db,nats to make it as real as possible -# holder: -# container_name: holder -# build: -# context: ".." -# dockerfile: "./apps/agent/deployment/Dockerfile" -# env_file: -# - ./env/holder.env -# ports: -# - "5001:5001" -# - "6000:6000" -# depends_on: -# pg_db: -# condition: service_started + cm-issuer: + container_name: cm-issuer + build: + context: "../" + dockerfile: "./apps/connection-manager/deployment/Dockerfile" + env_file: + - ./env/issuer.env + ports: + - "8882" + depends_on: + broker: + condition: service_started pg_db: image: 'postgres:latest' diff --git a/compose/env/issuer.env b/compose/env/issuer.env index cf99ba835474cee35249b946efa6457c04f1e508..813e39d527cdfcb9f1edeb617670fd4ac6d9fbff 100644 --- a/compose/env/issuer.env +++ b/compose/env/issuer.env @@ -1,12 +1,28 @@ -AGENT_PEER_URL="http://issuer:4000" -AGENT_NAME=ISSUER_LOCAL -AGENT_KEY=HwNJroKHTSSj3XvE7ZAnukiTn2C4QkFvxEqfm5rzhNrh -AGENT_DID_SEED=300000000000000000000000TCustE21 - LEDGERS="BCOVRIN_TEST" -IDUNION_KEY="a" +IDUNION_KEY= +AGENT_PEER_URL="http://0.0.0.0:8001" +AGENT_NAME=DExcVasd_AGENT_45 +AGENT_KEY=HwNJroKHTSSj3XvE7ZAnuKiTn2C4QkFvxEqfm5rzhNrh +AGENT_DID_SEED=200000000000000000000000TCuste21 AGENT_DB_HOST=pg_db:5432 AGENT_DB_USER=postgres AGENT_DB_PASS=postgres -PORT=3001 +AGENT_PORT=8081 +AGENT_CONSUMER_NAME=agent_1 +AGENT_IS_REST=false +AGENT_MAX_MESSAGES=10 +AGENT_RETE_LIMIT=5 + +NATS_SERVERS=broker:4222 +NATS_STREAM_NAME=ssi_12 +NATS_SUBJECTS="connections.*,proofs.*,credentials.*,schemas.*" + +GATEWAY_HTTP_PORT=8081 +GATEWAY_TCP_PORT=8881 +GATEWAY_SOCKET_EVENT_NAME=message +GATEWAY_MESSAGE_PATTERN=webhook +GATEWAY_HOST=gateway-issuer + +CONNECTION_SERVICE_TCP_PORT=8882 +CONNECTION_SERVICE_HOST=cm-issuer diff --git a/gateway-swagger.json b/gateway-swagger.json new file mode 100644 index 0000000000000000000000000000000000000000..0b4ba37b7148b7f7927696fe6212187ebe1d2827 --- /dev/null +++ b/gateway-swagger.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","paths":{"/api/v1/invitation":{"post":{"operationId":"ConnectionController_createInvitation","summary":"Create invitation for connection","description":"Method will create invitation url. The id of the response will be matched when you receive event from the websocket","tags":["Connections"],"parameters":[],"responses":{"201":{"description":"Request is accepted for execution, the response id will match the event id received from the web socket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAcceptedResponseDto"}}}},"400":{"description":"Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestException"}}}},"500":{"description":"Unknown error"}}}},"/api/v1/invitation/accept":{"post":{"operationId":"ConnectionController_acceptInvitation","summary":"Accept invitation for connection","description":"Method will accept the invitation and will return connection thought the websocket. The id of the response will be matched when you receive event from the websocket","tags":["Connections"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationResponseDto"}}}},"responses":{"201":{"description":"Request is accepted for execution, the response id will match the event id received from the web socket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAcceptedResponseDto"}}}},"400":{"description":"Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestException"}}}},"500":{"description":"Unknown error"}}}},"/api/v1/connections":{"get":{"operationId":"ConnectionController_list","summary":"List all connections","description":"The id of the response will be matched when you receive event from the websocket","tags":["Connections"],"parameters":[],"responses":{"200":{"description":"Request is accepted for execution, the response id will match the event id received from the web socket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAcceptedResponseDto"}}}},"400":{"description":"Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestException"}}}},"500":{"description":"Unknown error"}}}},"/api/v1/connections/{id}":{"get":{"operationId":"ConnectionController_getById","summary":"Get connection by id","description":"The method will search for connection id, if not found null will be returned. The id of the response will be matched when you receive event from the websocket","tags":["Connections"],"parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Request is accepted for execution, the response id will match the event id received from the web socket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAcceptedResponseDto"}}}},"400":{"description":"Error in sending data to connection manager. This error shows that connection manager could not convert request to event or connection manager could not send the event to the broker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestException"}}}},"500":{"description":"Unknown error"}}}}},"info":{"title":"Gateway","description":"OCM ENGINE GATEWAY API","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"http://0.0.0.0:8081"}],"components":{"schemas":{"CloudEventDto":{"type":"object","properties":{}},"GatewayAcceptedResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"80633e6d-c606-4539-a3df-287fedd09253"}},"required":["id"]},"BadRequestException":{"type":"object","properties":{}},"CreateInvitationResponseDto":{"type":"object","properties":{"invitationUrl":{"type":"string","description":"A list of user's roles","example":"http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ"}},"required":["invitationUrl"]}}}} \ No newline at end of file diff --git a/libs/asker/src/asker-nats/agent.consumer.service.ts b/libs/asker/src/asker-nats/agent.consumer.service.ts index f712b51bc536d00bcc5c3bd54b218da4aa7dca82..751211a02ab6f56f815c3cb5e29cc61db094f3c5 100644 --- a/libs/asker/src/asker-nats/agent.consumer.service.ts +++ b/libs/asker/src/asker-nats/agent.consumer.service.ts @@ -5,9 +5,18 @@ import { OnModuleInit, } from "@nestjs/common"; import { AgentService } from "../asker/agent.service"; -import { IConfAgent } from "../agent.config"; import { ConsumerService } from "@ocm-engine/nats"; import { ConfigService } from "@nestjs/config"; +import { IConfAgent } from "@ocm-engine/config"; +import { GatewayClient } from "@ocm-engine/clients"; +import { + CONNECTION_ACCEPT, + CONNECTION_CREATE, + CONNECTION_GET, + CONNECTION_LIST, + CreateInvitationResponseDto, + GetConnectionRequestDto, +} from "@ocm-engine/dtos"; @Injectable() export class AgentConsumerService implements OnModuleInit, OnModuleDestroy { @@ -16,6 +25,7 @@ export class AgentConsumerService implements OnModuleInit, OnModuleDestroy { private readonly agentService: AgentService, private readonly consumerService: ConsumerService, private readonly configService: ConfigService, + private readonly gatewayClient: GatewayClient, ) {} async onModuleInit(): Promise<void> { @@ -27,11 +37,35 @@ export class AgentConsumerService implements OnModuleInit, OnModuleDestroy { ); return; } + await this.consumerService.subscribe(async (event) => { this.logger.debug(JSON.stringify(event, null, 2)); - //TODO: transform the event dto to event<DTO> type - //call the service methods - //call the gateway webhook + let data; + + switch (event.type) { + case CONNECTION_CREATE: + data = await this.agentService.createInvitation(); + break; + case CONNECTION_ACCEPT: + // eslint-disable-next-line no-case-declarations + const c = event.data as CreateInvitationResponseDto; + data = await this.agentService.acceptInvitation(c.invitationUrl); + break; + + case CONNECTION_LIST: + data = await this.agentService.fetchConnections(); + break; + + case CONNECTION_GET: + // eslint-disable-next-line no-case-declarations + const g = event.data as GetConnectionRequestDto; + data = await this.agentService.getConnectionById(g.connectionId); + } + + event.data = data; + this.logger.debug(`before sending ${JSON.stringify(event, null, 2)}`); + this.gatewayClient.sendPayload(event); + return; }); } diff --git a/libs/asker/src/asker-nats/asker.nats.module.ts b/libs/asker/src/asker-nats/asker.nats.module.ts index 0c426f152b6a1742691333890fc1c8814c11ed48..ce0b12d9c1155cd2d99ff0938d1f6c24cd41c1b7 100644 --- a/libs/asker/src/asker-nats/asker.nats.module.ts +++ b/libs/asker/src/asker-nats/asker.nats.module.ts @@ -5,6 +5,7 @@ import { APP_PIPE } from "@nestjs/core"; import { AgentConsumerService } from "./agent.consumer.service"; import { AgentService } from "../asker/agent.service"; import { ConsumerService } from "@ocm-engine/nats"; +import { GatewayClient } from "@ocm-engine/clients"; @Module({ imports: [ConfigModule, LedgersModule], @@ -12,6 +13,7 @@ import { ConsumerService } from "@ocm-engine/nats"; ConsumerService, AgentConsumerService, AgentService, + GatewayClient, { provide: APP_PIPE, useValue: new ValidationPipe({ diff --git a/libs/asker/src/asker/agent.service.ts b/libs/asker/src/asker/agent.service.ts index 21cc7174e05ac13f806450de61985d244161a29f..88013bdbc91c76abbeec755f5bee2c867e204890 100644 --- a/libs/asker/src/asker/agent.service.ts +++ b/libs/asker/src/asker/agent.service.ts @@ -15,7 +15,11 @@ import { IssueProofResponseDto, SchemaNotCreatedError, } from "@ocm-engine/dtos"; -import { CredentialState, ProofState } from "@aries-framework/core"; +import { + CredentialState, + ProofExchangeRecord, + ProofState, +} from "@aries-framework/core"; import { AnonCredsRequestedAttribute } from "@aries-framework/anoncreds"; @Injectable() @@ -55,6 +59,10 @@ export class AgentService { return this.asker.agent.connections.getAll(); } + getConnectionById = (id: string) => { + return this.asker.agent.connections.findById(id); + }; + createSchema = async (schema: CreateSchemaRequestDto) => { const dids = await this.asker.agent.dids.getCreatedDids({ method: "indy" }); @@ -196,6 +204,7 @@ export class AgentService { }; issueProof = async (issueProofDto: IssueProofRequestDto) => { + let exchangeRecord: ProofExchangeRecord; const requestedAttributes: Record<string, AnonCredsRequestedAttribute> = {}; for (const attr of issueProofDto.attributes) { @@ -210,17 +219,32 @@ export class AgentService { }; } - const exchangeRecord = await this.asker.agent.proofs.requestProof({ - protocolVersion: "v2", - connectionId: issueProofDto.connectionId, - proofFormats: { - anoncreds: { - name: "proof-request", - version: "1.0", - requested_attributes: requestedAttributes, + if (!issueProofDto.connectionId) { + const { proofRecord } = await this.asker.agent.proofs.createRequest({ + protocolVersion: "v2", + proofFormats: { + anoncreds: { + name: "proof-request", + version: "1.0", + requested_attributes: requestedAttributes, + }, }, - }, - }); + }); + + exchangeRecord = proofRecord; + } else { + exchangeRecord = await this.asker.agent.proofs.requestProof({ + protocolVersion: "v2", + connectionId: issueProofDto.connectionId, + proofFormats: { + anoncreds: { + name: "proof-request", + version: "1.0", + requested_attributes: requestedAttributes, + }, + }, + }); + } const response = new IssueProofResponseDto(); response.proofId = exchangeRecord.id; diff --git a/libs/asker/src/asker/asker.service.ts b/libs/asker/src/asker/asker.service.ts index 4c48b8849c8a286c18fd68c43d16686018c015b3..6e37b3fa4055d24bf65e2ad065be3d209fd08a8b 100644 --- a/libs/asker/src/asker/asker.service.ts +++ b/libs/asker/src/asker/asker.service.ts @@ -13,17 +13,18 @@ import { KeyDerivationMethod, LogLevel, TypedArrayEncoder, + WsOutboundTransport, } from "@aries-framework/core"; import { agentDependencies, HttpInboundTransport } from "@aries-framework/node"; import { ConfigService } from "@nestjs/config"; import { LedgersService } from "@ocm-engine/ledgers"; -import { IConfAgent } from "../agent.config"; import { generateDidFromKey, generateKey, getAskarAnonCredsIndyModules, importDidsToWallet, } from "../agent.utils"; +import { IConfAgent } from "@ocm-engine/config"; @Injectable() export class AskerService implements OnModuleInit, OnModuleDestroy { @@ -71,7 +72,9 @@ export class AskerService implements OnModuleInit, OnModuleDestroy { new HttpInboundTransport({ port: this.agentConfig.agentPeerPort }), ); + this.agent.registerOutboundTransport(new WsOutboundTransport()); this.agent.registerOutboundTransport(new HttpOutboundTransport()); + this.logger.log("Agent setup completed"); } diff --git a/libs/asker/src/index.ts b/libs/asker/src/index.ts index 66196ee6b204d59136d48aa7176713fff5d9692f..a6cf6c3829fdbf75995e2dd83b3717f1225ed5c6 100644 --- a/libs/asker/src/index.ts +++ b/libs/asker/src/index.ts @@ -1,6 +1,5 @@ export * from "./asker/asker.module"; export * from "./asker/agent.service"; export * from "./asker/asker.service"; -export * from "./agent.config"; export * from "./asker.dynamic.module"; export * from "./asker-rest/asker.rest.module"; diff --git a/libs/clients/.eslintrc.json b/libs/clients/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..9d9c0db55bb1e91c5f2e7b64a02bc6bf69fc7cb5 --- /dev/null +++ b/libs/clients/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/clients/README.md b/libs/clients/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e828de2f211599e01c571f60ed84adabea3c9ffd --- /dev/null +++ b/libs/clients/README.md @@ -0,0 +1,11 @@ +# clients + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build clients` to build the library. + +## Running unit tests + +Run `nx test clients` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/clients/jest.config.ts b/libs/clients/jest.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..78a4feabad8f12410db9ff9a9ecd0b03fbac8b1e --- /dev/null +++ b/libs/clients/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: "clients", + preset: "../../jest.preset.js", + testEnvironment: "node", + transform: { + "^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }], + }, + moduleFileExtensions: ["ts", "js", "html"], + coverageDirectory: "../../coverage/libs/clients", +}; diff --git a/libs/clients/package.json b/libs/clients/package.json new file mode 100644 index 0000000000000000000000000000000000000000..45760fd028a7649fe1e939a1870a75339d91166a --- /dev/null +++ b/libs/clients/package.json @@ -0,0 +1,5 @@ +{ + "name": "@ocm-engine/clients", + "version": "0.0.1", + "type": "commonjs" +} diff --git a/libs/clients/project.json b/libs/clients/project.json new file mode 100644 index 0000000000000000000000000000000000000000..ee70f779ac7cd4aaffc4c07d9805c7fb9d1009f3 --- /dev/null +++ b/libs/clients/project.json @@ -0,0 +1,41 @@ +{ + "name": "clients", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/clients/src", + "projectType": "library", + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/clients", + "tsConfig": "libs/clients/tsconfig.lib.json", + "packageJson": "libs/clients/package.json", + "main": "libs/clients/src/index.ts", + "assets": ["libs/clients/*.md"] + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/clients/**/*.ts"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/clients/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + } + }, + "tags": [] +} diff --git a/libs/clients/src/index.ts b/libs/clients/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..8191daf640fdfb1a5726344f7023277e2696f268 --- /dev/null +++ b/libs/clients/src/index.ts @@ -0,0 +1,2 @@ +export * from "./lib/gateway.client"; +export * from "./lib/connection.manager.client"; diff --git a/libs/clients/src/lib/connection.manager.client.ts b/libs/clients/src/lib/connection.manager.client.ts new file mode 100644 index 0000000000000000000000000000000000000000..04183ed7e8764a701b7f36546b8bf60acdd7d52a --- /dev/null +++ b/libs/clients/src/lib/connection.manager.client.ts @@ -0,0 +1,63 @@ +import { + BadRequestException, + Injectable, + InternalServerErrorException, + Logger, +} from "@nestjs/common"; +import { + ClientProxy, + ClientProxyFactory, + Transport, +} from "@nestjs/microservices"; +import { ConfigService } from "@nestjs/config"; +import { IConnectionManager } from "@ocm-engine/config"; +import { lastValueFrom } from "rxjs"; + +@Injectable() +export class ConnectionManagerClient { + private client: ClientProxy; + private cmConfig: IConnectionManager; + private readonly logger: Logger = new Logger(ConnectionManagerClient.name); + + constructor(configService: ConfigService) { + this.cmConfig = configService.get<IConnectionManager>("cm")!; + + this.client = ClientProxyFactory.create({ + transport: Transport.TCP, + options: { + host: this.cmConfig.host, + port: this.cmConfig.port, + }, + }); + } + + async sendPayload<T>({ + pattern, + payload, + }: { + pattern: string; + payload: { + data: T; + type: string; + source: string; + }; + }): Promise<{ + id: string; + }> { + this.logger.debug( + `sending payload to connection manager ${JSON.stringify( + payload, + null, + 2, + )}`, + ); + + return lastValueFrom(this.client.send(pattern, payload)).catch((e) => { + if (e.message === "Internal server error") { + throw new InternalServerErrorException(); + } + + throw new BadRequestException(e.message); + }); + } +} diff --git a/libs/clients/src/lib/gateway.client.ts b/libs/clients/src/lib/gateway.client.ts new file mode 100644 index 0000000000000000000000000000000000000000..c32b0b768da442603a69f406412e6ad0a62b5a3e --- /dev/null +++ b/libs/clients/src/lib/gateway.client.ts @@ -0,0 +1,37 @@ +import { Injectable, Logger } from "@nestjs/common"; +import { + ClientProxy, + ClientProxyFactory, + Transport, +} from "@nestjs/microservices"; +import { ConfigService } from "@nestjs/config"; +import { CloudEventDto } from "@ocm-engine/dtos"; +import { IGateway } from "@ocm-engine/config"; + +@Injectable() +export class GatewayClient { + private client: ClientProxy; + private gatewayConf: IGateway; + private readonly logger: Logger = new Logger(GatewayClient.name); + + constructor(configService: ConfigService) { + this.gatewayConf = configService.get<IGateway>("gateway")!; + console.log(this.gatewayConf); + + this.client = ClientProxyFactory.create({ + transport: Transport.TCP, + options: { + host: this.gatewayConf.host, + port: this.gatewayConf.tcpPort, + }, + }); + } + + sendPayload<T>(payload: CloudEventDto<T>) { + this.logger.debug( + `sending payload to gateway ${JSON.stringify(payload, null, 2)}`, + ); + + return this.client.emit(this.gatewayConf.messagePattern, payload); + } +} diff --git a/libs/clients/tsconfig.json b/libs/clients/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..f5b85657a88323b3f9173ca094e873053bfe211b --- /dev/null +++ b/libs/clients/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/clients/tsconfig.lib.json b/libs/clients/tsconfig.lib.json new file mode 100644 index 0000000000000000000000000000000000000000..1eb40b581ffe6ed9f523128b99fd29247f997fed --- /dev/null +++ b/libs/clients/tsconfig.lib.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"], + "target": "es6", + "strictNullChecks": true, + "noImplicitAny": true, + "strictBindCallApply": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/libs/clients/tsconfig.spec.json b/libs/clients/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..9b2a121d114b68dcdb5b834ebca032814b499a74 --- /dev/null +++ b/libs/clients/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/libs/config/.eslintrc.json b/libs/config/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..9d9c0db55bb1e91c5f2e7b64a02bc6bf69fc7cb5 --- /dev/null +++ b/libs/config/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/config/README.md b/libs/config/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fb0e33f51e1cdb25fab37609657a1500df1db289 --- /dev/null +++ b/libs/config/README.md @@ -0,0 +1,11 @@ +# config + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build config` to build the library. + +## Running unit tests + +Run `nx test config` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/config/jest.config.ts b/libs/config/jest.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..ddf7fb2755e1771262938c940460957b613bff26 --- /dev/null +++ b/libs/config/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: "config", + preset: "../../jest.preset.js", + testEnvironment: "node", + transform: { + "^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }], + }, + moduleFileExtensions: ["ts", "js", "html"], + coverageDirectory: "../../coverage/libs/config", +}; diff --git a/libs/config/package.json b/libs/config/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f6548ceca7fe4219e67d5f4b1e4b9c8eb80db93a --- /dev/null +++ b/libs/config/package.json @@ -0,0 +1,5 @@ +{ + "name": "@ocm-engine/config", + "version": "0.0.1", + "type": "commonjs" +} diff --git a/libs/config/project.json b/libs/config/project.json new file mode 100644 index 0000000000000000000000000000000000000000..5a7687752008c38805555a2632fed34be833ed7c --- /dev/null +++ b/libs/config/project.json @@ -0,0 +1,41 @@ +{ + "name": "config", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/config/src", + "projectType": "library", + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/config", + "tsConfig": "libs/config/tsconfig.lib.json", + "packageJson": "libs/config/package.json", + "main": "libs/config/src/index.ts", + "assets": ["libs/config/*.md"] + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/config/**/*.ts"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/config/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + } + }, + "tags": [] +} diff --git a/libs/config/src/config/agent.config.ts b/libs/config/src/config/agent.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..d71fa86ec0b107a39cfcc8fb60bdb28c8d62c893 --- /dev/null +++ b/libs/config/src/config/agent.config.ts @@ -0,0 +1,22 @@ +import { registerAs } from "@nestjs/config"; +import * as process from "process"; +import { IConfAgent } from "../interfaces/agent.config.interface"; + +export const agentConfig = registerAs( + "agent", + (): IConfAgent => ({ + agentPeerPort: parseInt(process.env["AGENT_PEER_URL"]!.split(":")[2]), + agentPeerAddress: process.env["AGENT_PEER_URL"]!, + agentName: process.env["AGENT_NAME"]!, + agentKey: process.env["AGENT_KEY"]!, + agentDidSeed: process.env["AGENT_DID_SEED"]!, + agentDbHost: process.env["AGENT_DB_HOST"]!, + agentDbUser: process.env["AGENT_DB_USER"]!, + agentDbPass: process.env["AGENT_DB_PASS"]!, + agentIsRest: process.env["AGENT_IS_REST"] === "true", + agentConsumerName: process.env["AGENT_CONSUMER_NAME"]!, + agentConsumerMaxMessagess: parseInt(process.env["AGENT_MAX_MESSAGES"]!), + agentConsumerRateLimit: parseInt(process.env["AGENT_RETE_LIMIT"]!), + agentPort: parseInt(process.env["AGENT_PORT"]!), + }), +); diff --git a/libs/config/src/config/connection.manager.config.ts b/libs/config/src/config/connection.manager.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea3c981b395d7098571f89f2952d2b0a104c2d3a --- /dev/null +++ b/libs/config/src/config/connection.manager.config.ts @@ -0,0 +1,11 @@ +import { registerAs } from "@nestjs/config"; +import * as process from "process"; +import { IConnectionManager } from "../interfaces/connection.manager.interface"; + +export const cmConfig = registerAs( + "cm", + (): IConnectionManager => ({ + host: process.env["CONNECTION_SERVICE_HOST"]!, + port: parseInt(process.env["CONNECTION_SERVICE_TCP_PORT"]!), + }), +); diff --git a/libs/config/src/config/gateway.config.ts b/libs/config/src/config/gateway.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1e7e6a61a34d737d17f303c8a1b4976b652115f --- /dev/null +++ b/libs/config/src/config/gateway.config.ts @@ -0,0 +1,14 @@ +import { registerAs } from "@nestjs/config"; +import process from "process"; +import { IGateway } from "../interfaces/gateway.config.interface"; + +export const gatewayConfig = registerAs( + "gateway", + (): IGateway => ({ + httpPort: parseInt(process.env["GATEWAY_HTTP_PORT"]!), + tcpPort: parseInt(process.env["GATEWAY_TCP_PORT"]!), + socketEventName: process.env["GATEWAY_SOCKET_EVENT_NAME"]!, + messagePattern: process.env["GATEWAY_MESSAGE_PATTERN"]!, + host: process.env["GATEWAY_HOST"]!, + }), +); diff --git a/libs/config/src/config/ledgers.config.ts b/libs/config/src/config/ledgers.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..de79f8a9af7f5173ada50f3bb31f16f2e2f9efe6 --- /dev/null +++ b/libs/config/src/config/ledgers.config.ts @@ -0,0 +1,11 @@ +import { registerAs } from "@nestjs/config"; +import * as process from "process"; +import { ILedgers } from "../interfaces/ledgers.config.interface"; + +export const ledgersConfig = registerAs( + "ledgers", + (): ILedgers => ({ + ledgers: process.env["LEDGERS"]!.split(","), + idUnionApiKey: process.env["IDUNION_KEY"]!, + }), +); diff --git a/libs/config/src/config/nats.config.ts b/libs/config/src/config/nats.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ff40b173b1de373707531728475f46fe3a372cf --- /dev/null +++ b/libs/config/src/config/nats.config.ts @@ -0,0 +1,12 @@ +import { registerAs } from "@nestjs/config"; +import * as process from "process"; +import { IConfNats } from "../interfaces/nats.config.interface"; + +export const natsConfig = registerAs( + "nats", + (): IConfNats => ({ + servers: process.env["NATS_SERVERS"]!.split(","), + streamName: process.env["NATS_STREAM_NAME"]!, + subjects: process.env["NATS_SUBJECTS"]!.split(","), + }), +); diff --git a/libs/config/src/index.ts b/libs/config/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..7bd3b78d59f22078020dd10873f83bd434a3e91e --- /dev/null +++ b/libs/config/src/index.ts @@ -0,0 +1,17 @@ +export * from "./config/nats.config"; +export * from "./config/agent.config"; +export * from "./config/ledgers.config"; +export * from "./config/gateway.config"; +export * from "./config/connection.manager.config"; + +export * from "./interfaces/nats.config.interface"; +export * from "./interfaces/agent.config.interface"; +export * from "./interfaces/ledgers.config.interface"; +export * from "./interfaces/gateway.config.interface"; +export * from "./interfaces/connection.manager.interface"; + +export * from "./schemas/nats.schema"; +export * from "./schemas/agent.schema"; +export * from "./schemas/ledgers.schema"; +export * from "./schemas/gateway.schema"; +export * from "./schemas/connection.manager.schema"; diff --git a/libs/asker/src/agent.config.ts b/libs/config/src/interfaces/agent.config.interface.ts similarity index 94% rename from libs/asker/src/agent.config.ts rename to libs/config/src/interfaces/agent.config.interface.ts index eaed737de62b6d8cabb0fb38495c980bf1a74a34..1f0e7a85caa94710dd23ede1d6ff0d5042870a86 100644 --- a/libs/asker/src/agent.config.ts +++ b/libs/config/src/interfaces/agent.config.interface.ts @@ -11,4 +11,5 @@ export interface IConfAgent { agentConsumerName: string; agentConsumerMaxMessagess: number; agentConsumerRateLimit: number; + agentPort: number; } diff --git a/libs/config/src/interfaces/connection.manager.interface.ts b/libs/config/src/interfaces/connection.manager.interface.ts new file mode 100644 index 0000000000000000000000000000000000000000..80092b731d2d06aa5699f11f8c5a5d620e53052f --- /dev/null +++ b/libs/config/src/interfaces/connection.manager.interface.ts @@ -0,0 +1,4 @@ +export interface IConnectionManager { + host: string; + port: number; +} diff --git a/libs/config/src/interfaces/gateway.config.interface.ts b/libs/config/src/interfaces/gateway.config.interface.ts new file mode 100644 index 0000000000000000000000000000000000000000..0c9e3b89230ce24807ed31c9d739cb586e1fcb79 --- /dev/null +++ b/libs/config/src/interfaces/gateway.config.interface.ts @@ -0,0 +1,7 @@ +export interface IGateway { + httpPort: number; + tcpPort: number; + socketEventName: string; + messagePattern: string; + host: string; +} diff --git a/libs/ledgers/src/ledgers.config.ts b/libs/config/src/interfaces/ledgers.config.interface.ts similarity index 100% rename from libs/ledgers/src/ledgers.config.ts rename to libs/config/src/interfaces/ledgers.config.interface.ts diff --git a/libs/nats/src/nats.config.ts b/libs/config/src/interfaces/nats.config.interface.ts similarity index 100% rename from libs/nats/src/nats.config.ts rename to libs/config/src/interfaces/nats.config.interface.ts diff --git a/apps/agent/src/config/validation.ts b/libs/config/src/schemas/agent.schema.ts similarity index 83% rename from apps/agent/src/config/validation.ts rename to libs/config/src/schemas/agent.schema.ts index be35a2cb7f98edfe2f4bbe22261b76670902b084..9cf569159b843b261c55387a444a11a52c39d2e6 100644 --- a/apps/agent/src/config/validation.ts +++ b/libs/config/src/schemas/agent.schema.ts @@ -1,20 +1,16 @@ import Joi from "joi"; -export default Joi.object({ +export const agentSchema = Joi.object({ AGENT_PEER_URL: Joi.string().required(), AGENT_NAME: Joi.string().required(), AGENT_KEY: Joi.string().required(), AGENT_DID_SEED: Joi.string().required(), - - LEDGERS: Joi.string().required(), - IDUNION_KEY: Joi.string(), - AGENT_DB_HOST: Joi.string().required(), AGENT_DB_USER: Joi.string().required(), AGENT_DB_PASS: Joi.string().required(), AGENT_CONSUMER_NAME: Joi.string(), AGENT_IS_REST: Joi.string().required(), - AGENT_MAX_MESSAGES: Joi.string().required(), AGENT_RETE_LIMIT: Joi.string().required(), + AGENT_PORT: Joi.string().required(), }); diff --git a/libs/config/src/schemas/connection.manager.schema.ts b/libs/config/src/schemas/connection.manager.schema.ts new file mode 100644 index 0000000000000000000000000000000000000000..7eef0df3dd0d00048bd9f8af59ddf18a244e7156 --- /dev/null +++ b/libs/config/src/schemas/connection.manager.schema.ts @@ -0,0 +1,6 @@ +import Joi from "joi"; + +export const cmSchema = Joi.object({ + CONNECTION_SERVICE_TCP_PORT: Joi.string().required(), + CONNECTION_SERVICE_HOST: Joi.string().required(), +}); diff --git a/libs/config/src/schemas/gateway.schema.ts b/libs/config/src/schemas/gateway.schema.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b9b750febc845e699321c6d5f11db1aa187bfc1 --- /dev/null +++ b/libs/config/src/schemas/gateway.schema.ts @@ -0,0 +1,9 @@ +import Joi from "joi"; + +export const gatewaySchema = Joi.object({ + GATEWAY_HTTP_PORT: Joi.string().required(), + GATEWAY_TCP_PORT: Joi.string().required(), + GATEWAY_SOCKET_EVENT_NAME: Joi.string().required(), + GATEWAY_MESSAGE_PATTERN: Joi.string().required(), + GATEWAY_HOST: Joi.string().required(), +}); diff --git a/libs/config/src/schemas/ledgers.schema.ts b/libs/config/src/schemas/ledgers.schema.ts new file mode 100644 index 0000000000000000000000000000000000000000..d305f72862825e6b7f89dd6dccc1972fcd9e2637 --- /dev/null +++ b/libs/config/src/schemas/ledgers.schema.ts @@ -0,0 +1,6 @@ +import Joi from "joi"; + +export const ledgersSchema = Joi.object({ + LEDGERS: Joi.string().required(), + IDUNION_KEY: Joi.string(), +}); diff --git a/libs/config/src/schemas/nats.schema.ts b/libs/config/src/schemas/nats.schema.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d0d3d39a7a034a49ac4dcceb0e7bb81d84d6b5c --- /dev/null +++ b/libs/config/src/schemas/nats.schema.ts @@ -0,0 +1,7 @@ +import Joi from "joi"; + +export const natsSchema = Joi.object({ + NATS_SERVERS: Joi.string().required(), + NATS_STREAM_NAME: Joi.string().required(), + NATS_SUBJECTS: Joi.string().required(), +}); diff --git a/libs/config/tsconfig.json b/libs/config/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..f5b85657a88323b3f9173ca094e873053bfe211b --- /dev/null +++ b/libs/config/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/config/tsconfig.lib.json b/libs/config/tsconfig.lib.json new file mode 100644 index 0000000000000000000000000000000000000000..1eb40b581ffe6ed9f523128b99fd29247f997fed --- /dev/null +++ b/libs/config/tsconfig.lib.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"], + "target": "es6", + "strictNullChecks": true, + "noImplicitAny": true, + "strictBindCallApply": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/libs/config/tsconfig.spec.json b/libs/config/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..9b2a121d114b68dcdb5b834ebca032814b499a74 --- /dev/null +++ b/libs/config/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/libs/dtos/src/dtos/requests/get.connection.request.dto.ts b/libs/dtos/src/dtos/requests/get.connection.request.dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..7c1b528f2ae52296e7ca002422160b5ca6d54399 --- /dev/null +++ b/libs/dtos/src/dtos/requests/get.connection.request.dto.ts @@ -0,0 +1,7 @@ +import { IsNotEmpty, IsString } from "class-validator"; + +export class GetConnectionRequestDto { + @IsNotEmpty() + @IsString() + connectionId: string; +} diff --git a/libs/dtos/src/dtos/requests/issue.proof.request.dto.ts b/libs/dtos/src/dtos/requests/issue.proof.request.dto.ts index c23dcab08a6716f216842c29d10d33ef557464bc..c9469f41322eb58cd5bde145e72f21b883526f89 100644 --- a/libs/dtos/src/dtos/requests/issue.proof.request.dto.ts +++ b/libs/dtos/src/dtos/requests/issue.proof.request.dto.ts @@ -2,6 +2,7 @@ import { ArrayMinSize, IsArray, IsNotEmpty, + IsOptional, IsString, ValidateNested, } from "class-validator"; @@ -24,7 +25,8 @@ export class IssueProofAttribute { export class IssueProofRequestDto { @IsString() @IsNotEmpty() - connectionId: string; + @IsOptional() + connectionId?: string; @IsArray() @ArrayMinSize(1) diff --git a/libs/dtos/src/dtos/responses/create.invitation.response.dto.ts b/libs/dtos/src/dtos/responses/create.invitation.response.dto.ts index 4b9a95c2fbfc8f79c634c0389a484a85cdfb649d..bf9db3b0b1f55c3b23e4b8a1bd0cd8d7d27b19f3 100644 --- a/libs/dtos/src/dtos/responses/create.invitation.response.dto.ts +++ b/libs/dtos/src/dtos/responses/create.invitation.response.dto.ts @@ -1,7 +1,7 @@ export class CreateInvitationResponseDto { /** * A list of user's roles - * @example "localhost:5000" + * @example "http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ" */ public invitationUrl: string; } diff --git a/libs/dtos/src/dtos/responses/gateway.accepted.response.dto.ts b/libs/dtos/src/dtos/responses/gateway.accepted.response.dto.ts new file mode 100644 index 0000000000000000000000000000000000000000..535c4cb1f24a5b2851a4209c9861f69f55a6fac6 --- /dev/null +++ b/libs/dtos/src/dtos/responses/gateway.accepted.response.dto.ts @@ -0,0 +1,8 @@ +import { IsUUID } from "class-validator"; + +export class GatewayAcceptedResponseDto { + //@example 80633e6d-c606-4539-a3df-287fedd09253 + //@description test mest + @IsUUID() + id: string; +} diff --git a/libs/dtos/src/errors/connection.unsupported.type.error.ts b/libs/dtos/src/errors/connection.unsupported.type.error.ts new file mode 100644 index 0000000000000000000000000000000000000000..69551efbde07d366a96d31e46cc50412d0f5188d --- /dev/null +++ b/libs/dtos/src/errors/connection.unsupported.type.error.ts @@ -0,0 +1,10 @@ +export class ConnectionUnsupportedTypeError extends Error { + constructor(message = "Unsupported connection event type") { + super(message); + this.name = "ConnectionUnsupportedTypeError"; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ConnectionUnsupportedTypeError); + } + } +} diff --git a/libs/dtos/src/events/event.ts b/libs/dtos/src/events/event.ts index 0629c60742b4247a270d0c9ec44664781f463376..134715ebabf06f618ad2e9feb96f23aece592de7 100644 --- a/libs/dtos/src/events/event.ts +++ b/libs/dtos/src/events/event.ts @@ -3,17 +3,19 @@ import { IsNotEmpty, IsOptional, ValidateNested, + IsUUID, } from "class-validator"; import { CloudEventV1 } from "cloudevents"; +import { uuid } from "@aries-framework/core/build/utils/uuid"; export class CloudEventDto<T> implements CloudEventV1<T> { - @IsString() @IsNotEmpty() - id: string; + @IsUUID() + id: string = uuid(); @IsString() @IsNotEmpty() - specversion: string; + specversion = "V1"; @IsString() @IsNotEmpty() @@ -29,7 +31,7 @@ export class CloudEventDto<T> implements CloudEventV1<T> { @IsString() @IsOptional() - datacontenttype?: string; + datacontenttype?: string = "application/json"; @IsOptional() @ValidateNested() diff --git a/libs/dtos/src/events/types.ts b/libs/dtos/src/events/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..748a1aad40589f956aa91ad1c599849db62f5190 --- /dev/null +++ b/libs/dtos/src/events/types.ts @@ -0,0 +1,17 @@ +export type ConnectionEvent = + | "connections.create" + | "connections.accept" + | "connections.list" + | "connections.get"; + +export const CONNECTION_CREATE: ConnectionEvent = "connections.create"; +export const CONNECTION_ACCEPT: ConnectionEvent = "connections.accept"; +export const CONNECTION_LIST: ConnectionEvent = "connections.list"; +export const CONNECTION_GET: ConnectionEvent = "connections.get"; + +export const CONNECTION_EVENTS: ConnectionEvent[] = [ + CONNECTION_CREATE, + CONNECTION_ACCEPT, + CONNECTION_LIST, + CONNECTION_GET, +]; diff --git a/libs/dtos/src/index.ts b/libs/dtos/src/index.ts index 7ae4af9b2eedb50e1113ea2bf4addb1f1a879dcc..8ed6a97500170a5be088ed6c304ead573c514e8d 100644 --- a/libs/dtos/src/index.ts +++ b/libs/dtos/src/index.ts @@ -3,6 +3,7 @@ export * from "./dtos/requests/create.schema.request.dto"; export * from "./dtos/requests/create.credential.definition.requset.dto"; export * from "./dtos/requests/issue.credential.request.dto"; export * from "./dtos/requests/issue.proof.request.dto"; +export * from "./dtos/requests/get.connection.request.dto"; export * from "./dtos/responses/create.invitation.response.dto"; export * from "./dtos/responses/accept.invitation.response.dto"; @@ -10,10 +11,13 @@ export * from "./dtos/responses/create.schema.response.dto"; export * from "./dtos/responses/create.credential.definition.response.dto"; export * from "./dtos/responses/issue.credential.response.dto"; export * from "./dtos/responses/issue.proof.response.dto"; +export * from "./dtos/responses/gateway.accepted.response.dto"; export * from "./errors/connection.not.found.error"; export * from "./errors/schema.not.created.error"; export * from "./errors/credential.not.created.error"; export * from "./errors/ledger.provider.fail.registration.error"; +export * from "./errors/connection.unsupported.type.error"; export * from "./events/event"; +export * from "./events/types"; diff --git a/libs/ledgers/src/idunion/idunion.provider.ts b/libs/ledgers/src/idunion/idunion.provider.ts index 71a72040bcc92838d7fb7441340688babd3d1570..5c6dcf4654797c7f773a59b9c9e9f318773441f5 100644 --- a/libs/ledgers/src/idunion/idunion.provider.ts +++ b/libs/ledgers/src/idunion/idunion.provider.ts @@ -4,8 +4,8 @@ import { IndyVdrPoolConfig } from "@aries-framework/indy-vdr"; import genesisFile from "./genesis-file"; import axios, { AxiosError } from "axios"; import { ConfigService } from "@nestjs/config"; -import { ILedgers } from "../ledgers.config"; import { LedgerProviderFailRegistrationError } from "@ocm-engine/dtos"; +import { ILedgers } from "@ocm-engine/config"; const NAME = "IDUNION"; const URL = "https://endorser.idunion.org/api/dids"; diff --git a/libs/ledgers/src/index.ts b/libs/ledgers/src/index.ts index 1df8c512ca55d5e5ceac68b2974c4b97dc83fdee..82c00003f6e47752940d92b9340411360bb522cb 100644 --- a/libs/ledgers/src/index.ts +++ b/libs/ledgers/src/index.ts @@ -1,3 +1,2 @@ export * from "./ledgers.module"; export * from "./ledgers.service"; -export * from "./ledgers.config"; diff --git a/libs/ledgers/src/ledgers.service.spec.ts b/libs/ledgers/src/ledgers.service.spec.ts deleted file mode 100644 index 979d3082fd003e42d2d2a4b2a1fe8756e1927b92..0000000000000000000000000000000000000000 --- a/libs/ledgers/src/ledgers.service.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Test, TestingModule } from "@nestjs/testing"; -import { LedgersService } from "./ledgers.service"; - -describe("LedgersService", () => { - let service: LedgersService; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - providers: [LedgersService], - }).compile(); - - service = module.get<LedgersService>(LedgersService); - }); - - it("should be defined", () => { - expect(service).toBeDefined(); - }); -}); diff --git a/libs/ledgers/src/ledgers.service.ts b/libs/ledgers/src/ledgers.service.ts index c77bd27d9673503e7e7ed50d7e51188cf06254e6..8debe072e9612412522d2bd02d67c8bfaaa80f9b 100644 --- a/libs/ledgers/src/ledgers.service.ts +++ b/libs/ledgers/src/ledgers.service.ts @@ -4,7 +4,7 @@ import { IdunionProvider } from "./idunion/idunion.provider"; import { IRegistrator } from "./IRegistrator"; import { IndyVdrPoolConfig } from "@aries-framework/indy-vdr"; import { ConfigService } from "@nestjs/config"; -import { ILedgers } from "./ledgers.config"; +import { ILedgers } from "@ocm-engine/config"; @Injectable() export class LedgersService { diff --git a/libs/nats/src/base.nats.service.ts b/libs/nats/src/base.nats.service.ts index 455f53ba8abe8a35199facf7ac1eb41a1268108f..b57c48c50090d332066446bb5ad64ab9eda40a48 100644 --- a/libs/nats/src/base.nats.service.ts +++ b/libs/nats/src/base.nats.service.ts @@ -1,7 +1,6 @@ import { Injectable, Logger } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; import { - AckPolicy, connect, DiscardPolicy, JetStreamClient, @@ -13,7 +12,7 @@ import { StreamConfig, } from "nats"; import asyncRetry from "async-retry"; -import { IConfNats } from "./nats.config"; +import { IConfAgent, IConfNats } from "@ocm-engine/config"; @Injectable() export class NatsBaseService { @@ -26,7 +25,7 @@ export class NatsBaseService { protected streamConfig: StreamConfig; constructor(private configService: ConfigService) { - const agentConfig = this.configService.get("agent"); + const agentConfig = this.configService.get<IConfAgent>("agent"); if (agentConfig?.agentIsRest) { return; } @@ -67,11 +66,12 @@ export class NatsBaseService { this.jsClient = this.client.jetstream(); this.jsm = await this.client.jetstreamManager(); - this.jsm.streams.add(this.streamConfig); + await this.jsm.streams.add(this.streamConfig); }, { retries: 5, onRetry: (error) => { + this.logger.log(JSON.stringify(error, null, 2)); this.logger.error( `Failed to connect to NATS, retrying...${error.message}`, ); diff --git a/libs/nats/src/consumer.nats.service.ts b/libs/nats/src/consumer.nats.service.ts index 518b2560cc22cbd787cdcb41d1f403b61a483f46..8f1545c3c574a5ec2bdcf0386ea657a6a179f06b 100644 --- a/libs/nats/src/consumer.nats.service.ts +++ b/libs/nats/src/consumer.nats.service.ts @@ -10,17 +10,18 @@ import { NatsBaseService } from "./base.nats.service"; import { ConfigService } from "@nestjs/config"; import { CloudEventDto } from "@ocm-engine/dtos"; import { SimpleMutex } from "nats/lib/nats-base-client/util"; +import { IConfAgent } from "@ocm-engine/config"; @Injectable() export class ConsumerService extends NatsBaseService { //eslint-disable-next-line - private readonly agentConfig: any; + private readonly agentConfig: IConfAgent; constructor(configService: ConfigService) { super(configService); //TODO: no like ! move config, interfaces to seperate lib // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.agentConfig = configService.get("agent")!; + this.agentConfig = configService.get<IConfAgent>("agent")!; } private registerConsumer = (stream: string) => { diff --git a/libs/nats/src/index.d.ts b/libs/nats/src/index.d.ts deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/libs/nats/src/index.ts b/libs/nats/src/index.ts index e840479ece92c61bbebe6fe9aa5805a7a6c8e960..f84ed630d0147e5718b1842f3c1839cb7a7e7672 100644 --- a/libs/nats/src/index.ts +++ b/libs/nats/src/index.ts @@ -1,4 +1,3 @@ export * from "./nats.module"; export * from "./consumer.nats.service"; export * from "./producer.nats.service"; -export * from "./nats.config"; diff --git a/libs/nats/src/nats.module.d.ts b/libs/nats/src/nats.module.d.ts deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/libs/nats/src/producer.nats.service.ts b/libs/nats/src/producer.nats.service.ts index 26d1f0d8034dd934a52ee138ba97c5f0b6f81810..7f9e250932e5e6510a9d41a1d4fa0f37c41577a8 100644 --- a/libs/nats/src/producer.nats.service.ts +++ b/libs/nats/src/producer.nats.service.ts @@ -2,7 +2,7 @@ import { Injectable } from "@nestjs/common"; import { PubAck, JetStreamPublishOptions } from "nats"; import { NatsBaseService } from "./base.nats.service"; import { ConfigService } from "@nestjs/config"; -import { CloudEvent } from "cloudevents"; +import { CloudEventDto } from "@ocm-engine/dtos"; @Injectable() export class ProducerService extends NatsBaseService { @@ -12,7 +12,7 @@ export class ProducerService extends NatsBaseService { async publish<T>( subject: string, - event: CloudEvent<T>, + event: CloudEventDto<T>, opts?: JetStreamPublishOptions, ): Promise<PubAck> { const payload = this.jsonCodec.encode(event); diff --git a/package.json b/package.json index cb696b2e1f82e2126480083423280a11a8b72c98..64b865808a8ece2b1c15acaf67bcdb22df0b52c7 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,10 @@ "@nestjs/common": "^9.0.0", "@nestjs/config": "^2.3.1", "@nestjs/core": "^9.0.0", + "@nestjs/microservices": "^9.4.2", "@nestjs/platform-express": "^9.0.0", + "@nestjs/platform-socket.io": "^9.4.2", + "@nestjs/websockets": "^9.4.2", "async-retry": "^1.3.3", "axios": "^1.0.0", "class-transformer": "^0.5.1", diff --git a/tsconfig.base.json b/tsconfig.base.json index fce8dc7907c4a88294a04be1c06f8c00c0cb047b..335749b1ca62759f966401bf464219890e3935cd 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -20,6 +20,8 @@ "baseUrl": ".", "paths": { "@ocm-engine/asker": ["libs/asker/src/index.ts"], + "@ocm-engine/clients": ["libs/clients/src/index.ts"], + "@ocm-engine/config": ["libs/config/src/index.ts"], "@ocm-engine/dtos": ["libs/dtos/src/index.ts"], "@ocm-engine/ledgers": ["libs/ledgers/src/index.ts"], "@ocm-engine/nats": ["libs/nats/src/index.ts"] diff --git a/yarn.lock b/yarn.lock index a0d399311c8483b211efb5921065b5977b75c8a0..281a5c16601be3312293b605bff199a7c245a706 100644 --- a/yarn.lock +++ b/yarn.lock @@ -414,9 +414,9 @@ "@babel/plugin-syntax-decorators" "^7.22.3" "@babel/plugin-proposal-private-property-in-object@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" - integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== + version "7.21.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz#69d597086b6760c4126525cfa154f34631ff272c" + integrity sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-create-class-features-plugin" "^7.21.0" @@ -1289,11 +1289,11 @@ integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== "@hyperledger/anoncreds-nodejs@^0.1.0-dev.15": - version "0.1.0-dev.19" - resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-nodejs/-/anoncreds-nodejs-0.1.0-dev.19.tgz#6c508a1d95b3955787d0bfef6418dab67db9a187" - integrity sha512-CvYNaLh5LZoDjZ6AgCbBzIu2CpqoltUgHUSXS6wu0ImcaxkepfBhbyB7d52MMVvhabMKP1vfqwFmXRzNisOxaA== + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-nodejs/-/anoncreds-nodejs-0.1.0.tgz#925f4004af85e772a3ee55f240b281148cbfb6e6" + integrity sha512-5Z0+nRQow7mcaRim4HncB8GzZr9KZl4a1snUfA/0mrK+eVncFCj13vcr9HnIwAfEOWn7OdHsK44Jy7tHRbYJww== dependencies: - "@hyperledger/anoncreds-shared" "0.1.0-dev.19" + "@hyperledger/anoncreds-shared" "0.1.0" "@mapbox/node-pre-gyp" "^1.0.10" ffi-napi "4.0.3" node-cache "5.1.2" @@ -1301,17 +1301,17 @@ ref-napi "3.0.3" ref-struct-di "1.1.1" -"@hyperledger/anoncreds-shared@0.1.0-dev.19", "@hyperledger/anoncreds-shared@^0.1.0-dev.15": - version "0.1.0-dev.19" - resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.1.0-dev.19.tgz#afdba5d8f387b55ed8d5294416b844ebaab23d56" - integrity sha512-C72gWNKizROvgb5oxkw0DoPSp2VdOTzvfXkhz774DmKU7DcW2Uf6C+Qt/BURH8/EtDG4rHK1ROY8Qm49hrVPCg== +"@hyperledger/anoncreds-shared@0.1.0", "@hyperledger/anoncreds-shared@^0.1.0-dev.15": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.1.0.tgz#947c602c385bfa79b63849c9e48b51cc9d41d820" + integrity sha512-DisZFY4YbrugRCCv7AtYFUTsrGigHF1dVaiA36WrhRUgetwDzKgMiYGkxFQmCe0IJ0mDw4M7sbTJBXxfxij/+A== "@hyperledger/aries-askar-nodejs@^0.1.0-dev.12": - version "0.1.0-dev.12" - resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-nodejs/-/aries-askar-nodejs-0.1.0-dev.12.tgz#8c609e2dce3638ff81d904ee4bfec86c0cd768c8" - integrity sha512-kzJq8m5ymA0Ggi0dqkTOUS+EIb7VRUOszjwhWnvcCmMD2jZ8OzCERPlo3Xg3VEv+rDqVpg5/KVtKQZVB3Pwtqw== + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-nodejs/-/aries-askar-nodejs-0.1.0.tgz#2bb8f19d3f44b67e8aa92e4d45da9ab47ddb0539" + integrity sha512-5jc8lNZg9Qxd4BoUWCknJ2YH7iqgO5/kl6KMfry5z9MTXQ5u30ysqPQCtWwryAKt+q55jnlw+pgISsis+zDfgA== dependencies: - "@hyperledger/aries-askar-shared" "0.1.0-dev.12" + "@hyperledger/aries-askar-shared" "0.1.0" "@mapbox/node-pre-gyp" "^1.0.10" ffi-napi "^4.0.3" node-cache "^5.1.2" @@ -1319,19 +1319,19 @@ ref-napi "^3.0.3" ref-struct-di "^1.1.1" -"@hyperledger/aries-askar-shared@0.1.0-dev.12", "@hyperledger/aries-askar-shared@^0.1.0-dev.12", "@hyperledger/aries-askar-shared@^0.1.0-dev.8": - version "0.1.0-dev.12" - resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-shared/-/aries-askar-shared-0.1.0-dev.12.tgz#1398dbbd8ee1953ac2edc08618d7494a34d6217d" - integrity sha512-wUJdkylGeooYP7Rl+X6EqKaNgjckHVbDWcctH5UlID/qC7TO5YMo850b+VhETBOhJkFZxkCwkXfHk00IdfE5ZA== +"@hyperledger/aries-askar-shared@0.1.0", "@hyperledger/aries-askar-shared@^0.1.0-dev.12", "@hyperledger/aries-askar-shared@^0.1.0-dev.8": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-shared/-/aries-askar-shared-0.1.0.tgz#a2517efb0829cdf6dc08ca6809dbd6daa497e116" + integrity sha512-eTq3pQ7qNoEqS3KJOB5OcsKmYJ01aPF4GSOMmNKc44xyifwNi53lBod5fDVyjo401hk/FpVHZ3nRik1BXw1PWA== dependencies: fast-text-encoding "^1.0.3" "@hyperledger/indy-vdr-nodejs@^0.1.0-dev.14": - version "0.1.0-dev.16" - resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-nodejs/-/indy-vdr-nodejs-0.1.0-dev.16.tgz#c085164a26185d32af5e09c301ec5fe58143b5b1" - integrity sha512-yERBkitqeLXBeqINcIvAA/CjCed4tCnFknbdPWDmRDvUmxCnXY/yIptbbSlHfjGkM8x5c264+XmCVQIfwnvGVg== + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-nodejs/-/indy-vdr-nodejs-0.1.0.tgz#a006393e3ecb1a4661bbd52299b796247e8bde47" + integrity sha512-XNPy4fygp3vf4cLK36n2Ap8BnIsR5Ic+9sbtHrtQA6tAhrL9Zq8foaYPW8XDeZ6OlEWdViNRYIKGkR1w0zuLJw== dependencies: - "@hyperledger/indy-vdr-shared" "0.1.0-dev.16" + "@hyperledger/indy-vdr-shared" "0.1.0" "@mapbox/node-pre-gyp" "^1.0.10" "@types/ref-array-di" "^1.2.5" ffi-napi "^4.0.3" @@ -1339,10 +1339,10 @@ ref-napi "^3.0.3" ref-struct-di "^1.1.1" -"@hyperledger/indy-vdr-shared@0.1.0-dev.16", "@hyperledger/indy-vdr-shared@^0.1.0-dev.14": - version "0.1.0-dev.16" - resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-shared/-/indy-vdr-shared-0.1.0-dev.16.tgz#8dbc8f3400b8c22247130fd4c4837359f7ec818b" - integrity sha512-Q28YzDaOVe9ENrlmPy6SH7mHD2XgihhhlpQwWbNCGTprG4cexSgZ2bx67YzpbWDfJYiCkXEjutUKdqSsra8Vpw== +"@hyperledger/indy-vdr-shared@0.1.0", "@hyperledger/indy-vdr-shared@^0.1.0-dev.14": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-shared/-/indy-vdr-shared-0.1.0.tgz#f8023a2d25ca9395ec2fd0e6a0dfbda6459fab03" + integrity sha512-VfGraHX6RMmNcF4WYD5F1anjJzPN7KSrj5GP3g0hCrdXMDXEtO8t1lHQLVfrBgdjhR7gE82Nx+ZAYlGnTxoE+A== "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -1693,6 +1693,14 @@ resolved "https://registry.yarnpkg.com/@nestjs/mapped-types/-/mapped-types-1.2.2.tgz#d9ddb143776e309dbc1a518ac1607fddac1e140e" integrity sha512-3dHxLXs3M0GPiriAcCFFJQHoDFUuzTD5w6JDhE7TyfT89YKpe6tcCCIqOZWdXmt9AZjjK30RkHRSFF+QEnWFQg== +"@nestjs/microservices@^9.4.2": + version "9.4.2" + resolved "https://registry.yarnpkg.com/@nestjs/microservices/-/microservices-9.4.2.tgz#fa318e88fa1dadcbd64fdad7a182f00a963edf0b" + integrity sha512-06VlJJS+QyyF5rS6WnMi6POdlGoEHEyvaOuySUm7QKfRILVUOqxcB6ANsKNNv2VPmRSLab/pYTpaQiEGazzRYA== + dependencies: + iterare "1.2.1" + tslib "2.5.2" + "@nestjs/platform-express@^9.0.0": version "9.4.2" resolved "https://registry.yarnpkg.com/@nestjs/platform-express/-/platform-express-9.4.2.tgz#5d1bcb5035d2172b5f144f60d3e037cd64d5318c" @@ -1704,6 +1712,14 @@ multer "1.4.4-lts.1" tslib "2.5.2" +"@nestjs/platform-socket.io@^9.4.2": + version "9.4.2" + resolved "https://registry.yarnpkg.com/@nestjs/platform-socket.io/-/platform-socket.io-9.4.2.tgz#7457fb946a17cc2781274369a1352e6366e37baa" + integrity sha512-Y6b1a3Stn4U6pVWwJGqlZchzX6NinsO0JkSwaERw8xhuJ1bLloK50HkHiQtZR7OevLXaXoou8FAcl0VWj1r8nw== + dependencies: + socket.io "4.6.1" + tslib "2.5.2" + "@nestjs/schematics@^9.0.0": version "9.2.0" resolved "https://registry.yarnpkg.com/@nestjs/schematics/-/schematics-9.2.0.tgz#f840054b5ae4b0b4e70aa9f72c09c3cf388f2512" @@ -1732,6 +1748,15 @@ dependencies: tslib "2.5.2" +"@nestjs/websockets@^9.4.2": + version "9.4.2" + resolved "https://registry.yarnpkg.com/@nestjs/websockets/-/websockets-9.4.2.tgz#c0eee363b5a28221c99b2281f8ba642deb90a1ba" + integrity sha512-u1Txsb+rHWOG0mHxTfNt/64eyYSCGg6t/k736P2bdYP1fP4ETo/Z/F4Othau8q0MsWvKi3ZgYRQbhcefaudQww== + dependencies: + iterare "1.2.1" + object-hash "3.0.0" + tslib "2.5.2" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1827,10 +1852,10 @@ dependencies: semver "^7.3.5" -"@npmcli/git@^4.0.0", "@npmcli/git@^4.0.1": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-4.0.4.tgz#cdf74f21b1d440c0756fb28159d935129d9daa33" - integrity sha512-5yZghx+u5M47LghaybLCkdSyFzV/w4OuH12d96HO389Ik9CDsLaDZJVynSGGVJOLn6gy/k7Dz5XYcplM3uxXRg== +"@npmcli/git@^4.0.0", "@npmcli/git@^4.0.1", "@npmcli/git@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-4.1.0.tgz#ab0ad3fd82bc4d8c1351b6c62f0fa56e8fe6afa6" + integrity sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ== dependencies: "@npmcli/promise-spawn" "^6.0.0" lru-cache "^7.4.4" @@ -1888,14 +1913,16 @@ integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== "@npmcli/package-json@^3.0.0", "@npmcli/package-json@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-3.1.0.tgz#d9eb34083be4275520f3844d17fc74926d47cae1" - integrity sha512-qNPy6Yf9ruFST99xcrl5EWAvrb7qFrwgVbwdzcTJlIgxbArKOq5e/bgZ6rTL1X9hDgAdPbvL8RWx/OTLSB0ToA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-3.1.1.tgz#5628332aac90fa1b4d6f98e03988c5958b35e0c5" + integrity sha512-+UW0UWOYFKCkvszLoTwrYGrjNrT8tI5Ckeb/h+Z1y1fsNJEctl7HmerA5j2FgmoqFaLI2gsA1X9KgMFqx/bRmA== dependencies: + "@npmcli/git" "^4.1.0" glob "^10.2.2" json-parse-even-better-errors "^3.0.0" normalize-package-data "^5.0.0" npm-normalize-package-bin "^3.0.1" + proc-log "^3.0.0" "@npmcli/promise-spawn@^6.0.0", "@npmcli/promise-spawn@^6.0.1": version "6.0.2" @@ -2232,11 +2259,9 @@ yargs-parser "21.1.1" "@octokit/auth-token@^3.0.0": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.3.tgz#ce7e48a3166731f26068d7a7a7996b5da58cbe0c" - integrity sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA== - dependencies: - "@octokit/types" "^9.0.0" + version "3.0.4" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.4.tgz#70e941ba742bdd2b49bdb7393e821dea8520a3db" + integrity sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ== "@octokit/core@^4.2.1": version "4.2.1" @@ -2274,26 +2299,26 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-17.2.0.tgz#f1800b5f9652b8e1b85cc6dfb1e0dc888810bdb5" integrity sha512-MazrFNx4plbLsGl+LFesMo96eIXkFgEtaKbnNpdh4aQ0VM10aoylFsTYP1AEjkeoRNZiiPe3T6Gl2Hr8dJWdlQ== -"@octokit/plugin-paginate-rest@^6.1.2": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8" - integrity sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ== +"@octokit/plugin-paginate-rest@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-7.0.0.tgz#c3bf44cb7ef5b495137b4f0adab28637696d7029" + integrity sha512-NNm6DlYBEyKs9OZvy2Ax9YKn7e0/G7js+/I80icBTHUf6kB/nfaZkdXOF1Z32OaB+LDH6GIYpdYC3Bm3vwX5Ow== dependencies: "@octokit/tsconfig" "^1.0.2" "@octokit/types" "^9.2.3" -"@octokit/plugin-retry@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@octokit/plugin-retry/-/plugin-retry-4.1.4.tgz#51a111d5b45e7c32df5e87a54cd3e5b796fb3c8f" - integrity sha512-JuBB3r04fHmvGe56wwzkBx9UQeikiZTwnsD79Y9Y4i+4OpBc23yi23z/952hBkQveeE7oqorFYf3aUY/S0Z22g== +"@octokit/plugin-retry@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-retry/-/plugin-retry-5.0.1.tgz#d176208d477828fe790cc1f67342f9aca62f0356" + integrity sha512-bb2L6kMNmYGzt07YJfm920ZJaNo7J4AhxgXQtIhTXX8sRixsH7v3QwSHE7lX9sjNbZjKRvD1LAskUPwYhNGH/w== dependencies: "@octokit/types" "^9.0.0" bottleneck "^2.15.3" -"@octokit/plugin-throttling@^5.2.3": - version "5.2.3" - resolved "https://registry.yarnpkg.com/@octokit/plugin-throttling/-/plugin-throttling-5.2.3.tgz#9f552a14dcee5c7326dd9dee64a71ea76b108814" - integrity sha512-C9CFg9mrf6cugneKiaI841iG8DOv6P5XXkjmiNNut+swePxQ7RWEdAZRp5rJoE1hjsIqiYcKa/ZkOQ+ujPI39Q== +"@octokit/plugin-throttling@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-throttling/-/plugin-throttling-6.0.0.tgz#1ab19a9fe17e57a6eabd817022df4329eeba8295" + integrity sha512-RdKkzD8X/T17KJmEHTsZ5Ztj7WGNpxsJAIyR1bgvkoyar+cDrIRZMsP15r8JRB1QI/LN2F/stUs5/kMVaYXS9g== dependencies: "@octokit/types" "^9.0.0" bottleneck "^2.15.3" @@ -2409,6 +2434,19 @@ fs-extra "^11.0.0" lodash "^4.17.4" +"@semantic-release/commit-analyzer@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-10.0.0.tgz#e9c1fc01faaa5ad9011e0507cafe72e87511eafc" + integrity sha512-/Uolz2+G+VRjP0eudAn0ldnC/VkSHzlctUdeEXL7ys7E6mLSFZdwdsR5pKDlTIgDJq4eYlshOZpwBNrmqrNajg== + dependencies: + conventional-changelog-angular "^5.0.0" + conventional-commits-filter "^2.0.0" + conventional-commits-parser "^3.2.3" + debug "^4.0.0" + import-from "^4.0.0" + lodash-es "^4.17.21" + micromatch "^4.0.2" + "@semantic-release/commit-analyzer@^9.0.2": version "9.0.2" resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-9.0.2.tgz#a78e54f9834193b55f1073fa6258eecc9a545e03" @@ -2441,33 +2479,32 @@ micromatch "^4.0.0" p-reduce "^2.0.0" -"@semantic-release/github@^8.0.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-8.1.0.tgz#c31fc5852d32975648445804d1984cd96e72c4d0" - integrity sha512-erR9E5rpdsz0dW1I7785JtndQuMWN/iDcemcptf67tBNOmBUN0b2YNOgcjYUnBpgRpZ5ozfBHrK7Bz+2ets/Dg== +"@semantic-release/github@^9.0.0": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-9.0.2.tgz#2e1c7cbaa15ba2009ae0607e55354aa5e4cacc77" + integrity sha512-FDwR9Tkz14MR/HF6srbHDuqLPUI0GmPgn4tkjfPi45/1oZedqEXC3TqSHK3+ykJmWj1sXgs94zwGI10VR5o6kg== dependencies: "@octokit/core" "^4.2.1" - "@octokit/plugin-paginate-rest" "^6.1.2" - "@octokit/plugin-retry" "^4.1.3" - "@octokit/plugin-throttling" "^5.2.3" + "@octokit/plugin-paginate-rest" "^7.0.0" + "@octokit/plugin-retry" "^5.0.0" + "@octokit/plugin-throttling" "^6.0.0" "@semantic-release/error" "^3.0.0" - aggregate-error "^3.0.0" - debug "^4.0.0" - dir-glob "^3.0.0" - fs-extra "^11.0.0" - globby "^11.0.0" + aggregate-error "^4.0.1" + debug "^4.3.4" + dir-glob "^3.0.1" + globby "^13.1.4" http-proxy-agent "^7.0.0" https-proxy-agent "^7.0.0" issue-parser "^6.0.0" - lodash "^4.17.4" + lodash-es "^4.17.21" mime "^3.0.0" - p-filter "^2.0.0" - url-join "^4.0.0" + p-filter "^3.0.0" + url-join "^5.0.0" "@semantic-release/gitlab@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@semantic-release/gitlab/-/gitlab-12.0.1.tgz#fa97ffd4cb30aa310771a945b1f54e35cac663da" - integrity sha512-UbvCzBu/I37+PLQYG/X1/wk7ZIs2Tom2BwaWxo4thHfkqtUMpzVapaoxCYyDLSpJFHQOT95/yapHW+ZKFZxNcQ== + version "12.0.2" + resolved "https://registry.yarnpkg.com/@semantic-release/gitlab/-/gitlab-12.0.2.tgz#00865aebbc96f8aa335b3a9d70ee3e42194ccae6" + integrity sha512-RCSG1QXFRsgzm4j2GfLbgCNKPGDCmhJUbeE6iD8kLUPTobt+8vF5q7Ep3mTZSkOSL4z3dnFNz4YE3JZ65r6ycA== dependencies: "@semantic-release/error" "^3.0.0" aggregate-error "^4.0.0" @@ -2477,7 +2514,7 @@ form-data "^4.0.0" fs-extra "^11.0.0" globby "^11.0.0" - got "^12.5.3" + got "^13.0.0" hpagent "^1.0.0" lodash-es "^4.17.21" parse-url "^8.0.0" @@ -2540,15 +2577,24 @@ resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.1.0.tgz#957cb64ea2f5ce527cc9cf02a096baeb0d2b99b4" integrity sha512-a31EnjuIDSX8IXBUib3cYLDRlPMU36AWX4xS8ysLaNu4ZzUesDiPt83pgrW2X1YLMe5L2HbDyaKK5BrL4cNKaQ== +"@sigstore/tuf@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.0.tgz#13b69323e7bf8de458cd6c952c57acd1169772a5" + integrity sha512-bLzi9GeZgMCvjJeLUIfs8LJYCxrPRA8IXQkzUtaFKKVPTz0mucRyqFcV2U20yg9K+kYAD0YSitzGfRZCFLjdHQ== + dependencies: + "@sigstore/protobuf-specs" "^0.1.0" + make-fetch-happen "^11.0.1" + tuf-js "^1.1.3" + "@sinclair/typebox@^0.25.16": version "0.25.24" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.24.tgz#8c7688559979f7079aacaf31aa881c3aa410b718" integrity sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ== "@sindresorhus/is@^5.2.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.4.0.tgz#b1bfbd6024311ade045093b424536cefcc8e3a42" - integrity sha512-Ggh6E9AnMpiNXlbXfFUcWE9qm408rL8jDi7+PMBBx7TMbwEmiqAiSmZ+zydYwxcJLqPGNDoLc9mXDuMDBZg0sA== + version "5.4.1" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.4.1.tgz#c4383ce702fb90531c3d310506bab89e70427c53" + integrity sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw== "@sinonjs/commons@^3.0.0": version "3.0.0" @@ -2564,6 +2610,11 @@ dependencies: "@sinonjs/commons" "^3.0.0" +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + "@sovpro/delimited-stream@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@sovpro/delimited-stream/-/delimited-stream-1.1.0.tgz#4334bba7ee241036e580fdd99c019377630d26b4" @@ -2746,6 +2797,18 @@ dependencies: "@types/node" "*" +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.13" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" + integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + dependencies: + "@types/node" "*" + "@types/eslint-scope@^3.7.3": version "3.7.4" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" @@ -2853,7 +2916,7 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/node@*": +"@types/node@*", "@types/node@>=10.0.0": version "20.2.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.5.tgz#26d295f3570323b2837d322180dfbf1ba156fefb" integrity sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ== @@ -2977,14 +3040,14 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.58.0": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz#1e7a3e5318ece22251dfbc5c9c6feeb4793cc509" - integrity sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ== + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz#2604cfaf2b306e120044f901e20c8ed926debf15" + integrity sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.59.8" - "@typescript-eslint/type-utils" "5.59.8" - "@typescript-eslint/utils" "5.59.8" + "@typescript-eslint/scope-manager" "5.59.9" + "@typescript-eslint/type-utils" "5.59.9" + "@typescript-eslint/utils" "5.59.9" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -2993,71 +3056,71 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5.58.0": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.8.tgz#60cbb00671d86cf746044ab797900b1448188567" - integrity sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw== + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.9.tgz#a85c47ccdd7e285697463da15200f9a8561dd5fa" + integrity sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ== dependencies: - "@typescript-eslint/scope-manager" "5.59.8" - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/typescript-estree" "5.59.8" + "@typescript-eslint/scope-manager" "5.59.9" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/typescript-estree" "5.59.9" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.8.tgz#ff4ad4fec6433647b817c4a7d4b4165d18ea2fa8" - integrity sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig== +"@typescript-eslint/scope-manager@5.59.9": + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.9.tgz#eadce1f2733389cdb58c49770192c0f95470d2f4" + integrity sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ== dependencies: - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/visitor-keys" "5.59.8" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/visitor-keys" "5.59.9" -"@typescript-eslint/type-utils@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.8.tgz#aa6c029a9d7706d26bbd25eb4666398781df6ea2" - integrity sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA== +"@typescript-eslint/type-utils@5.59.9": + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.9.tgz#53bfaae2e901e6ac637ab0536d1754dfef4dafc2" + integrity sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q== dependencies: - "@typescript-eslint/typescript-estree" "5.59.8" - "@typescript-eslint/utils" "5.59.8" + "@typescript-eslint/typescript-estree" "5.59.9" + "@typescript-eslint/utils" "5.59.9" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.8.tgz#212e54414733618f5d0fd50b2da2717f630aebf8" - integrity sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w== +"@typescript-eslint/types@5.59.9": + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.9.tgz#3b4e7ae63718ce1b966e0ae620adc4099a6dcc52" + integrity sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw== -"@typescript-eslint/typescript-estree@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.8.tgz#801a7b1766481629481b3b0878148bd7a1f345d7" - integrity sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg== +"@typescript-eslint/typescript-estree@5.59.9": + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.9.tgz#6bfea844e468427b5e72034d33c9fffc9557392b" + integrity sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA== dependencies: - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/visitor-keys" "5.59.8" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/visitor-keys" "5.59.9" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.59.8", "@typescript-eslint/utils@^5.58.0": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.8.tgz#34d129f35a2134c67fdaf024941e8f96050dca2b" - integrity sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg== +"@typescript-eslint/utils@5.59.9", "@typescript-eslint/utils@^5.58.0": + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.9.tgz#adee890107b5ffe02cd46fdaa6c2125fb3c6c7c4" + integrity sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.59.8" - "@typescript-eslint/types" "5.59.8" - "@typescript-eslint/typescript-estree" "5.59.8" + "@typescript-eslint/scope-manager" "5.59.9" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/typescript-estree" "5.59.9" eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.59.8": - version "5.59.8" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.8.tgz#aa6a7ef862add919401470c09e1609392ef3cc40" - integrity sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ== +"@typescript-eslint/visitor-keys@5.59.9": + version "5.59.9" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.9.tgz#9f86ef8e95aca30fb5a705bb7430f95fc58b146d" + integrity sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q== dependencies: - "@typescript-eslint/types" "5.59.8" + "@typescript-eslint/types" "5.59.9" eslint-visitor-keys "^3.3.0" "@unimodules/core@*": @@ -3750,6 +3813,11 @@ base64-js@*, base64-js@^1.3.0, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" @@ -4062,9 +4130,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001489: - version "1.0.30001492" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz#4a06861788a52b4c81fd3344573b68cc87fe062b" - integrity sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw== + version "1.0.30001495" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001495.tgz#64a0ccef1911a9dcff647115b4430f8eff1ef2d9" + integrity sha512-F6x5IEuigtUfU5ZMQK2jsy5JqUUlEFRVZq8bO2a+ysq5K7jD6PPc9YXZj78xDNS3uNchesp1Jw47YXEqr+Viyg== canonicalize@^1.0.1: version "1.0.8" @@ -4517,6 +4585,11 @@ cookie@0.5.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + copy-anything@^2.0.1: version "2.0.6" resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480" @@ -4548,7 +4621,7 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cors@2.8.5: +cors@2.8.5, cors@~2.8.5: version "2.8.5" resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== @@ -4579,9 +4652,9 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: yaml "^1.10.0" cosmiconfig@^8.0.0: - version "8.1.3" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" - integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== + version "8.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" + integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== dependencies: import-fresh "^3.2.1" js-yaml "^4.1.0" @@ -4776,7 +4849,7 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -5039,9 +5112,9 @@ ejs@^3.1.7: jake "^10.8.5" electron-to-chromium@^1.4.411: - version "1.4.417" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.417.tgz#a0c7eb992e68287fa50c8da5a5238b01f20b9a82" - integrity sha512-8rY8HdCxuSVY8wku3i/eDac4g1b4cSbruzocenrqBlzqruAZYHjQCHIjC66dLR9DXhEHTojsC4EjhZ8KmzwXqA== + version "1.4.423" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.423.tgz#99567f3a0563fe0d1d0931e9ce851bca239f6658" + integrity sha512-y4A7YfQcDGPAeSWM1IuoWzXpg9RY1nwHzHSwRtCSQFp9FgAVDgdWlFf0RbdWfLWQ2WUI+bddUgk5RgTjqRE6FQ== emittery@^0.13.1: version "0.13.1" @@ -5082,6 +5155,27 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" +engine.io-parser@~5.0.3: + version "5.0.7" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.7.tgz#ed5eae76c71f398284c578ab6deafd3ba7e4e4f6" + integrity sha512-P+jDFbvK6lE3n1OL+q9KuzdOFWkkZ/cMV9gol/SbVfpyqfvrfrFTOFJ6fQm2VC3PZHlU3QPhVwmbsCnauHF2MQ== + +engine.io@~6.4.1: + version "6.4.2" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.4.2.tgz#ffeaf68f69b1364b0286badddf15ff633476473f" + integrity sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.11.0" + enhanced-resolve@^5.0.0, enhanced-resolve@^5.14.1, enhanced-resolve@^5.7.0: version "5.14.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz#de684b6803724477a4af5d74ccae5de52c25f6b3" @@ -5473,7 +5567,7 @@ fast-glob@3.2.7: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@^3.2.12, fast-glob@^3.2.5, fast-glob@^3.2.7, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.5, fast-glob@^3.2.7, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -6013,9 +6107,9 @@ glob@7.1.4: path-is-absolute "^1.0.0" glob@^10.2.2, glob@^10.2.4: - version "10.2.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.6.tgz#1e27edbb3bbac055cb97113e27a066c100a4e5e1" - integrity sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA== + version "10.2.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.7.tgz#9dd2828cd5bc7bd861e7738d91e7113dda41d7d8" + integrity sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA== dependencies: foreground-child "^3.1.0" jackspeak "^2.0.3" @@ -6082,6 +6176,17 @@ globby@^12.0.2: merge2 "^1.4.1" slash "^4.0.0" +globby@^13.1.4: + version "13.1.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317" + integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -6089,10 +6194,10 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@^12.5.3: - version "12.6.1" - resolved "https://registry.yarnpkg.com/got/-/got-12.6.1.tgz#8869560d1383353204b5a9435f782df9c091f549" - integrity sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ== +got@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/got/-/got-13.0.0.tgz#a2402862cef27a5d0d1b07c0fb25d12b58175422" + integrity sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA== dependencies: "@sindresorhus/is" "^5.2.0" "@szmarczak/http-timer" "^5.0.1" @@ -6227,9 +6332,9 @@ hpagent@^1.0.0: integrity sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA== html-entities@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== + version "2.3.5" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.5.tgz#9f117bf6a5962efc31e094f6c6dad3cf3b95e33e" + integrity sha512-72TJlcMkYsEJASa/3HnX7VT59htM7iSHbH59NSZbtc+22Ap0Txnlx91sfeB+/A7wNZg7UxtZdhAW4y+/jimrdg== html-escaper@^2.0.0: version "2.0.2" @@ -7492,9 +7597,9 @@ libnpmversion@^4.0.2: semver "^7.3.7" libphonenumber-js@^1.10.14: - version "1.10.31" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.31.tgz#aab580894c263093a3085a02afcda7a742faeff1" - integrity sha512-qYTzElLePmz3X/6I0JPX5n87tu7jVIMtR/yRLi5PGVPvMCMSVTCR+079KmdNK005i4dBjFxY/bMYceI9IBp47w== + version "1.10.34" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.34.tgz#63374bb988688ac28b03ed6c4b344d412199d56c" + integrity sha512-p6g4NaQH4gK1gre32+kV14Mk6GPo2EDcPDvjbi+D2ycsPFsN4gVWNbs0itdHLZqByg6YEK8mE7OeP200I/ScTQ== license-webpack-plugin@^4.0.2: version "4.0.2" @@ -7800,9 +7905,9 @@ media-typer@0.3.0: integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== memfs@^3.4.1, memfs@^3.4.3: - version "3.5.1" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.5.1.tgz#f0cd1e2bfaef58f6fe09bfb9c2288f07fea099ec" - integrity sha512-UWbFJKvj5k+nETdteFndTpYxdeTMox/ULeqX5k/dpaQJCCFmj5EeKv3dBcyO2xmkRAx2vppRu5dVG7SOtsGOzA== + version "3.5.2" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.5.2.tgz#3367cb58940e45224a7e377015b37f55a831b3ac" + integrity sha512-4kbWXbVZ+LU4XFDS2CuA7frnwz2HxCMB/0yOXc86q7aCQrfWKkL11t6al1e2CsVC7uhnBNTQ1TfUsAxVauO9IQ== dependencies: fs-monkey "^1.0.3" @@ -8564,6 +8669,11 @@ object-assign@^4, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +object-hash@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + object-inspect@^1.10.3, object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" @@ -8653,12 +8763,12 @@ p-each-series@^3.0.0: resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-3.0.0.tgz#d1aed5e96ef29864c897367a7d2a628fdc960806" integrity sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw== -p-filter@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c" - integrity sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw== +p-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-3.0.0.tgz#ce50e03b24b23930e11679ab8694bd09a2d7ed35" + integrity sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg== dependencies: - p-map "^2.0.0" + p-map "^5.1.0" p-is-promise@^3.0.0: version "3.0.0" @@ -8721,11 +8831,6 @@ p-locate@^6.0.0: dependencies: p-limit "^4.0.0" -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -8733,6 +8838,13 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" +p-map@^5.1.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-5.5.0.tgz#054ca8ca778dfa4cf3f8db6638ccb5b937266715" + integrity sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg== + dependencies: + aggregate-error "^4.0.0" + p-reduce@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" @@ -9888,13 +10000,13 @@ selfsigned@^2.1.1: node-forge "^1" semantic-release@^21.0.2: - version "21.0.2" - resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-21.0.2.tgz#c8610c25864c761f3a3acc2eb39c166f4e0200e4" - integrity sha512-Hl6lyJdZ0pAYD07Z1FIUmg06UzSC3fEjHS7U31YppNQ8jOwjjt7pVzW9OfpoO0vbmqD3Tc+b/iZh5fqvKt01OA== + version "21.0.3" + resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-21.0.3.tgz#e1c584dd045024a1372a5bf51b60d23fe5e26893" + integrity sha512-DS/0P1DrL8cKpkhN7JCzhkbOge9sURSRqUlmEAjeXTzK0lOSWhp+oJJcji0bLFEIyu3DuYEeQrWCdJNwRHrFdw== dependencies: - "@semantic-release/commit-analyzer" "^9.0.2" + "@semantic-release/commit-analyzer" "^10.0.0" "@semantic-release/error" "^3.0.0" - "@semantic-release/github" "^8.0.0" + "@semantic-release/github" "^9.0.0" "@semantic-release/npm" "^10.0.2" "@semantic-release/release-notes-generator" "^11.0.0" aggregate-error "^4.0.1" @@ -10074,11 +10186,12 @@ signale@^1.2.1: pkg-conf "^2.1.0" sigstore@^1.3.0, sigstore@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.5.2.tgz#8d4c2a549341211cb08c687999843edc48c1a94c" - integrity sha512-X95v6xAAooVpn7PaB94TDmFeSO5SBfCtB1R23fvzr36WTfjtkiiyOeei979nbTjc8nzh6FSLeltQZuODsm1EjQ== + version "1.6.0" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.6.0.tgz#887a4007c6ee83f3ef3fd844be1a0840e849c301" + integrity sha512-QODKff/qW/TXOZI6V/Clqu74xnInAS6it05mufj4/fSewexLtfEntgLZZcBtUK44CDQyUE5TUXYy1ARYzlfG9g== dependencies: "@sigstore/protobuf-specs" "^0.1.0" + "@sigstore/tuf" "^1.0.0" make-fetch-happen "^11.0.1" tuf-js "^1.1.3" @@ -10102,6 +10215,33 @@ smart-buffer@^4.2.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== +socket.io-adapter@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" + integrity sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA== + dependencies: + ws "~8.11.0" + +socket.io-parser@~4.2.1: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.6.1.tgz#62ec117e5fce0692fa50498da9347cfb52c3bc70" + integrity sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + debug "~4.3.2" + engine.io "~6.4.1" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.1" + sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -10774,7 +10914,7 @@ tsconfig-paths@^4.0.0, tsconfig-paths@^4.1.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.5.2, tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.5.0: +tslib@2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== @@ -10784,6 +10924,11 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.5.0: + version "2.5.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" + integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -11002,6 +11147,11 @@ url-join@^4.0.0: resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== +url-join@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1" + integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA== + util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -11215,9 +11365,9 @@ webpack-subresource-integrity@^5.1.0: typed-assert "^1.0.8" webpack@^5.75.0: - version "5.85.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.85.0.tgz#c14a6a3a91f84d67c450225661fda8da36bc7f49" - integrity sha512-7gazTiYqwo5OSqwH1tigLDL2r3qDeP2dOKYgd+LlXpsUMqDTklg6tOghexqky0/+6QY38kb/R/uRPUleuL43zg== + version "5.85.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.85.1.tgz#d77406352f8f14ec847c54e4dcfb80b28c776b3f" + integrity sha512-xTb7MRf4LY8Z5rzn7aIx4TDrwYJrjcHnIfU1TqtyZOoObyuGSpAUwIvVuqq5wPnv7WEgQr8UvO1q/dgoGG4HjA== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.0" @@ -11353,6 +11503,11 @@ ws@^8.13.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"