From 72ee6b795310dbb7148cc9c697c26b1fcaae5243 Mon Sep 17 00:00:00 2001 From: Nathan Mande Date: Thu, 7 Nov 2024 01:33:46 +0200 Subject: [PATCH] refactor: use `Websocket` and drop `GraphQL` --- apps/api/package.json | 5 +- apps/api/src/app.module.ts | 37 +-- .../src/players/dto/create-player.input.ts | 7 +- .../src/players/dto/update-player.input.ts | 9 +- .../api/src/players/entities/player.entity.ts | 10 - .../players/gateways/players.gateway.spec.ts | 18 ++ .../src/players/gateways/players.gateway.ts | 37 +++ apps/api/src/players/players.module.ts | 5 +- apps/api/src/players/players.resolver.spec.ts | 19 -- apps/api/src/players/players.resolver.ts | 41 --- apps/api/src/players/players.service.ts | 23 +- apps/api/src/schema.gql | 39 --- apps/web/package.json | 1 + apps/web/src/app.tsx | 12 +- apps/web/src/hooks/use-socket.hook.ts | 87 ++++++ packages/api/src/directives/index.ts | 1 - .../src/directives/upper-case.directive.ts | 32 --- packages/api/src/index.ts | 3 - packages/api/src/plugins/complexity.plugin.ts | 45 ---- packages/api/src/plugins/index.ts | 2 - packages/api/src/plugins/loggin.plugin.ts | 14 - packages/api/src/scalars/date.scalar.ts | 27 -- packages/api/src/scalars/index.ts | 1 - pnpm-lock.yaml | 255 ++++++++++++++++-- src/pub-sub/pub-sub.module.ts | 4 + 25 files changed, 423 insertions(+), 311 deletions(-) delete mode 100644 apps/api/src/players/entities/player.entity.ts create mode 100644 apps/api/src/players/gateways/players.gateway.spec.ts create mode 100644 apps/api/src/players/gateways/players.gateway.ts delete mode 100644 apps/api/src/players/players.resolver.spec.ts delete mode 100644 apps/api/src/players/players.resolver.ts delete mode 100644 apps/api/src/schema.gql create mode 100644 apps/web/src/hooks/use-socket.hook.ts delete mode 100644 packages/api/src/directives/index.ts delete mode 100644 packages/api/src/directives/upper-case.directive.ts delete mode 100644 packages/api/src/plugins/complexity.plugin.ts delete mode 100644 packages/api/src/plugins/index.ts delete mode 100644 packages/api/src/plugins/loggin.plugin.ts delete mode 100644 packages/api/src/scalars/date.scalar.ts delete mode 100644 packages/api/src/scalars/index.ts create mode 100644 src/pub-sub/pub-sub.module.ts diff --git a/apps/api/package.json b/apps/api/package.json index be59f45..7670054 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -20,14 +20,15 @@ "@nestjs/apollo": "^12.2.1", "@nestjs/common": "^10.3.10", "@nestjs/core": "^10.4.1", - "@nestjs/graphql": "^12.2.1", "@nestjs/platform-express": "^10.3.10", + "@nestjs/platform-socket.io": "^10.4.7", + "@nestjs/websockets": "^10.4.7", "apollo-server-express": "^3.13.0", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", - "graphql": "^16.9.0", "reflect-metadata": "^0.2.0", "rxjs": "^7.8.1", + "socket.io": "^4.8.1", "ts-morph": "^24.0.0" }, "devDependencies": { diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index 01f68bd..2d27c95 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -1,39 +1,9 @@ -import { join } from "path"; import { APP_PIPE } from "@nestjs/core"; import { Module, ValidationPipe } from "@nestjs/common"; -import { DirectiveLocation, GraphQLDirective } from "graphql"; -import { GraphQLModule } from "@nestjs/graphql"; -import { ApolloDriver, ApolloDriverConfig } from "@nestjs/apollo"; -import { ApolloServerPluginLandingPageLocalDefault } from "@apollo/server/plugin/landingPage/default"; -import { - ApolloComplexityPlugin, - ApolloLoggingPlugin, - DateScalar, - upperDirectiveTransformer -} from "@chess-d/api"; import { PlayersModule } from "./players/players.module"; @Module({ - imports: [ - GraphQLModule.forRootAsync({ - driver: ApolloDriver, - useFactory: () => ({ - autoSchemaFile: join(process.cwd(), "src/schema.gql"), - playground: false, - plugins: [ApolloServerPluginLandingPageLocalDefault()], - transformSchema: (schema) => upperDirectiveTransformer(schema, "upper"), - buildSchemaOptions: { - directives: [ - new GraphQLDirective({ - name: "upper", - locations: [DirectiveLocation.FIELD_DEFINITION] - }) - ] - } - }) - }), - PlayersModule - ], + imports: [PlayersModule], providers: [ { provide: APP_PIPE, @@ -45,10 +15,7 @@ import { PlayersModule } from "./players/players.module"; enableImplicitConversion: true } }) - }, - DateScalar, - ApolloLoggingPlugin, - ApolloComplexityPlugin + } ] }) export class AppModule {} diff --git a/apps/api/src/players/dto/create-player.input.ts b/apps/api/src/players/dto/create-player.input.ts index 3812d27..5abc06c 100644 --- a/apps/api/src/players/dto/create-player.input.ts +++ b/apps/api/src/players/dto/create-player.input.ts @@ -1,7 +1,4 @@ -import { InputType, Int, Field } from "@nestjs/graphql"; - -@InputType() export class CreatePlayerInput { - @Field(() => Int, { description: "Example field (placeholder)" }) - exampleField: number; + name: string; + uuid: number; } diff --git a/apps/api/src/players/dto/update-player.input.ts b/apps/api/src/players/dto/update-player.input.ts index 3216cbf..34af6e0 100644 --- a/apps/api/src/players/dto/update-player.input.ts +++ b/apps/api/src/players/dto/update-player.input.ts @@ -1,8 +1,3 @@ -import { CreatePlayerInput } from "./create-player.input"; -import { InputType, Field, Int, PartialType } from "@nestjs/graphql"; - -@InputType() -export class UpdatePlayerInput extends PartialType(CreatePlayerInput) { - @Field(() => Int) - id: number; +export class UpdatePlayerInput { + id!: number; } diff --git a/apps/api/src/players/entities/player.entity.ts b/apps/api/src/players/entities/player.entity.ts deleted file mode 100644 index 437e5fd..0000000 --- a/apps/api/src/players/entities/player.entity.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { DateScalar } from "@chess-d/api"; -import { ObjectType, Field, ID } from "@nestjs/graphql"; - -@ObjectType({ description: "Represent a connected player" }) -export class Player { - @Field(() => ID, { description: "Session user id" }) - id: number; - @Field(() => Date, { description: "The first time plyer connected" }) - connectedAt: Date; -} diff --git a/apps/api/src/players/gateways/players.gateway.spec.ts b/apps/api/src/players/gateways/players.gateway.spec.ts new file mode 100644 index 0000000..196d5e8 --- /dev/null +++ b/apps/api/src/players/gateways/players.gateway.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from "@nestjs/testing"; +import { PlayersGateway } from "./players.gateway"; + +describe("PlayersGateway", () => { + let gateway: PlayersGateway; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [PlayersGateway] + }).compile(); + + gateway = module.get(PlayersGateway); + }); + + it("should be defined", () => { + expect(gateway).toBeDefined(); + }); +}); diff --git a/apps/api/src/players/gateways/players.gateway.ts b/apps/api/src/players/gateways/players.gateway.ts new file mode 100644 index 0000000..c147fc1 --- /dev/null +++ b/apps/api/src/players/gateways/players.gateway.ts @@ -0,0 +1,37 @@ +import { + ConnectedSocket, + MessageBody, + OnGatewayConnection, + SubscribeMessage, + WebSocketGateway, + WebSocketServer +} from "@nestjs/websockets"; +import { Namespace, Server, Socket } from "socket.io"; + +@WebSocketGateway() +export class PlayersGateway implements OnGatewayConnection { + @WebSocketServer() private readonly server: Server; + + // @ts-ignore + @WebSocketServer({ namespace: "namespace" }) + private readonly namespace: Namespace; + + constructor() { + console.log("PlayersGateway created", this.server, this.namespace); + } + + handleConnection(client: Socket, ...args: any[]) { + console.log("Client connected", client.id, args); + } + + @SubscribeMessage("message") + handleMessage( + @MessageBody() data: string, + @ConnectedSocket() client: Socket, + payload: any + ): string { + console.log(data, client.connected); + + return data; + } +} diff --git a/apps/api/src/players/players.module.ts b/apps/api/src/players/players.module.ts index 25a8e6c..da8c1b7 100644 --- a/apps/api/src/players/players.module.ts +++ b/apps/api/src/players/players.module.ts @@ -1,8 +1,9 @@ import { Module } from "@nestjs/common"; + import { PlayersService } from "./players.service"; -import { PlayersResolver } from "./players.resolver"; +import { PlayersGateway } from "./gateways/players.gateway"; @Module({ - providers: [PlayersResolver, PlayersService] + providers: [PlayersService, PlayersGateway] }) export class PlayersModule {} diff --git a/apps/api/src/players/players.resolver.spec.ts b/apps/api/src/players/players.resolver.spec.ts deleted file mode 100644 index ada7e73..0000000 --- a/apps/api/src/players/players.resolver.spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Test, TestingModule } from "@nestjs/testing"; -import { PlayersResolver } from "./players.resolver"; -import { PlayersService } from "./players.service"; - -describe("PlayersResolver", () => { - let resolver: PlayersResolver; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - providers: [PlayersResolver, PlayersService] - }).compile(); - - resolver = module.get(PlayersResolver); - }); - - it("should be defined", () => { - expect(resolver).toBeDefined(); - }); -}); diff --git a/apps/api/src/players/players.resolver.ts b/apps/api/src/players/players.resolver.ts deleted file mode 100644 index debdec5..0000000 --- a/apps/api/src/players/players.resolver.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Resolver, Query, Mutation, Args, Int, ID } from "@nestjs/graphql"; - -import { PlayersService } from "./players.service"; -import { Player } from "./entities/player.entity"; -import { CreatePlayerInput } from "./dto/create-player.input"; -import { UpdatePlayerInput } from "./dto/update-player.input"; -import { ParseIntPipe } from "@nestjs/common"; - -@Resolver(() => Player) -export class PlayersResolver { - constructor(private readonly playersService: PlayersService) {} - - @Mutation(() => Player) - createPlayer( - @Args("createPlayerInput") createPlayerInput: CreatePlayerInput - ) { - return this.playersService.create(createPlayerInput); - } - - @Query(() => [Player], { name: "players" }) - findAll() { - return this.playersService.findAll(); - } - - @Query(() => Player, { name: "player" }) - findOne(@Args("id", { type: () => ID }, ParseIntPipe) id: number) { - return this.playersService.findOne(id); - } - - @Mutation(() => Player) - updatePlayer( - @Args("updatePlayerInput") updatePlayerInput: UpdatePlayerInput - ) { - return this.playersService.update(updatePlayerInput.id, updatePlayerInput); - } - - @Mutation(() => Player) - removePlayer(@Args("id", { type: () => Int }) id: number) { - return this.playersService.remove(id); - } -} diff --git a/apps/api/src/players/players.service.ts b/apps/api/src/players/players.service.ts index 62f7838..066eb09 100644 --- a/apps/api/src/players/players.service.ts +++ b/apps/api/src/players/players.service.ts @@ -2,19 +2,26 @@ import { Injectable } from "@nestjs/common"; import { CreatePlayerInput } from "./dto/create-player.input"; import { UpdatePlayerInput } from "./dto/update-player.input"; -import { Player } from "./entities/player.entity"; @Injectable() export class PlayersService { + constructor() {} + create(createPlayerInput: CreatePlayerInput) { - return "This action adds a new player"; + const newPlayer = { + ...createPlayerInput, + id: 0, + connectedAt: new Date() + }; + + return newPlayer; } - findAll(): Player[] { + findAll() { return []; } - findOne(id: number): Player { + findOne(id: number) { return { id, connectedAt: new Date() @@ -22,7 +29,13 @@ export class PlayersService { } update(id: number, updatePlayerInput: UpdatePlayerInput) { - return `This action updates a #${id} player`; + const editedPlayer = { + ...updatePlayerInput, + id, + connectedAt: new Date() + }; + + return editedPlayer; } remove(id: number) { diff --git a/apps/api/src/schema.gql b/apps/api/src/schema.gql deleted file mode 100644 index 8313e02..0000000 --- a/apps/api/src/schema.gql +++ /dev/null @@ -1,39 +0,0 @@ -# ------------------------------------------------------ -# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY) -# ------------------------------------------------------ - -directive @upper on FIELD_DEFINITION - -"""Represent a connected player""" -type Player { - """Session user id""" - id: ID! - - """The first time plyer connected""" - connectedAt: Date! -} - -"""Date custom scalar type""" -scalar Date - -type Query { - players: [Player!]! - player(id: ID!): Player! -} - -type Mutation { - createPlayer(createPlayerInput: CreatePlayerInput!): Player! - updatePlayer(updatePlayerInput: UpdatePlayerInput!): Player! - removePlayer(id: Int!): Player! -} - -input CreatePlayerInput { - """Example field (placeholder)""" - exampleField: Int! -} - -input UpdatePlayerInput { - """Example field (placeholder)""" - exampleField: Int - id: Int! -} \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json index 8abe9b5..0393b00 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,6 +19,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "rxjs": "^7.8.1", + "socket.io-client": "^4.8.1", "threads": "^1.7.0", "three": "^0.169.0" }, diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx index ab9765c..9ace7ab 100644 --- a/apps/web/src/app.tsx +++ b/apps/web/src/app.tsx @@ -3,6 +3,7 @@ import { useEffect } from "react"; import { register, RegisterModule } from "@quick-threejs/reactive"; import GUI from "three/examples/jsm/libs/lil-gui.module.min.js"; import { Move } from "chess.js"; +import { useSocket } from "./hooks/use-socket.hook"; const location = new URL( "./core/main.worker.ts", @@ -34,6 +35,8 @@ const onReady = async (app: RegisterModule) => { }; export const App = () => { + const { socket, currentPlayer, playersList } = useSocket(); + useEffect(() => { register({ location, @@ -41,9 +44,16 @@ export const App = () => { axesSizes: 5, gridSizes: 10, withMiniCamera: true, - onReady + onReady: async (app) => { + await onReady(app); + socket.connect(); + } }); }, []); + useEffect(() => { + console.log(currentPlayer, playersList); + }, [currentPlayer, playersList]); + return
; }; diff --git a/apps/web/src/hooks/use-socket.hook.ts b/apps/web/src/hooks/use-socket.hook.ts new file mode 100644 index 0000000..9c38b78 --- /dev/null +++ b/apps/web/src/hooks/use-socket.hook.ts @@ -0,0 +1,87 @@ +"use client"; + +import { useCallback, useEffect, useMemo, useState } from "react"; +import { io, Socket } from "socket.io-client"; + +export interface PlayerEntity { + id: string; +} + +export interface UseSocketContext { + socket: Socket; + currentPlayer: PlayerEntity | undefined; + playersList: PlayerEntity[]; +} + +export const useSocket: () => UseSocketContext = () => { + const socket = useMemo( + () => + io("http://192.168.1.72:3000", { + autoConnect: false + }), + [] + ); + + const [currentPlayer, setCurrentPlayer] = useState< + PlayerEntity | undefined + >(); + const [playersList, setPlayersList] = useState([]); + + const onPlayerInfo = useCallback((player: PlayerEntity) => { + setCurrentPlayer(player); + }, []); + const onPlayersInfo = useCallback((players: Record) => { + setPlayersList( + Object.keys(players).map((id) => players[id] as PlayerEntity) + ); + }, []); + const onPlayerJoined = useCallback(async (newPlayer: PlayerEntity) => { + setPlayersList((prev) => [...prev, newPlayer]); + }, []); + const onPlayerLeft = useCallback( + (playerId: string) => { + setPlayersList(playersList.filter((player) => player.id !== playerId)); + }, + [playersList] + ); + const onPlayersUpdated = useCallback( + (players: Record) => { + if (!currentPlayer?.id) return; + + setPlayersList( + Object.keys(players) + .map((id) => players[id] as PlayerEntity) + .filter((oldPlayer) => oldPlayer.id !== currentPlayer.id) + ); + }, + [currentPlayer] + ); + + useEffect(() => { + socket.on("player_info", onPlayerInfo); + socket.on("players_info", onPlayersInfo); + socket.on("player_joined", onPlayerJoined); + socket.on("player_left", onPlayerLeft); + socket.on("players_updated", onPlayersUpdated); + + return () => { + socket.off("player_info", onPlayerInfo); + socket.off("players_info", onPlayersInfo); + socket.off("player_joined", onPlayerJoined); + socket.off("player_left", onPlayerLeft); + socket.off("players_updated", onPlayersUpdated); + }; + }, [ + onPlayerInfo, + onPlayersInfo, + onPlayerJoined, + onPlayerLeft, + onPlayersUpdated + ]); + + return { + socket, + currentPlayer, + playersList + }; +}; diff --git a/packages/api/src/directives/index.ts b/packages/api/src/directives/index.ts deleted file mode 100644 index b8ac77d..0000000 --- a/packages/api/src/directives/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./upper-case.directive"; diff --git a/packages/api/src/directives/upper-case.directive.ts b/packages/api/src/directives/upper-case.directive.ts deleted file mode 100644 index 190c6b4..0000000 --- a/packages/api/src/directives/upper-case.directive.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { getDirective, MapperKind, mapSchema } from "@graphql-tools/utils"; -import { defaultFieldResolver, GraphQLSchema } from "graphql"; - -export function upperDirectiveTransformer( - schema: GraphQLSchema, - directiveName: string -) { - return mapSchema(schema, { - [MapperKind.OBJECT_FIELD]: (fieldConfig) => { - const upperDirective = getDirective( - schema, - fieldConfig, - directiveName - )?.[0]; - - if (!upperDirective) return undefined; - - const { resolve = defaultFieldResolver } = fieldConfig; - - // Replace the original resolver with a function that *first* calls - // the original resolver, then converts its result to upper case - fieldConfig.resolve = async function (source, args, context, info) { - const result = await resolve(source, args, context, info); - if (typeof result === "string") { - return result.toUpperCase(); - } - return result; - }; - return fieldConfig; - } - }); -} diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index 6ec1a94..e69de29 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -1,3 +0,0 @@ -export * from "./directives"; -export * from "./plugins"; -export * from "./scalars"; diff --git a/packages/api/src/plugins/complexity.plugin.ts b/packages/api/src/plugins/complexity.plugin.ts deleted file mode 100644 index 34afb50..0000000 --- a/packages/api/src/plugins/complexity.plugin.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { GraphQLSchemaHost } from "@nestjs/graphql"; -import { Plugin } from "@nestjs/apollo"; -import { - ApolloServerPlugin, - GraphQLRequestListener -} from "apollo-server-plugin-base"; -import { GraphQLError } from "graphql"; -import { - fieldExtensionsEstimator, - getComplexity, - simpleEstimator -} from "graphql-query-complexity"; - -@Plugin() -export class ApolloComplexityPlugin implements ApolloServerPlugin { - constructor(private gqlSchemaHost: GraphQLSchemaHost) {} - - async requestDidStart() { - // TODO: Handle schema fetching case - const maxComplexity = 400; - const { schema } = this.gqlSchemaHost; - - return { - async didResolveOperation({ request, document }) { - const complexity = getComplexity({ - schema, - operationName: request.operationName, - query: document, - variables: request.variables, - estimators: [ - fieldExtensionsEstimator(), - simpleEstimator({ defaultComplexity: 1 }) - ] - }); - - if (complexity > maxComplexity) - throw new GraphQLError( - `Query is too complex: ${complexity}. Maximum allowed complexity: ${maxComplexity}` - ); - - console.log("Query Complexity:", complexity, maxComplexity); - } - }; - } -} diff --git a/packages/api/src/plugins/index.ts b/packages/api/src/plugins/index.ts deleted file mode 100644 index 5f628b6..0000000 --- a/packages/api/src/plugins/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./complexity.plugin"; -export * from "./loggin.plugin"; diff --git a/packages/api/src/plugins/loggin.plugin.ts b/packages/api/src/plugins/loggin.plugin.ts deleted file mode 100644 index 588ae5c..0000000 --- a/packages/api/src/plugins/loggin.plugin.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ApolloServerPlugin, GraphQLRequestListener } from "@apollo/server"; -import { Plugin } from "@nestjs/apollo"; - -@Plugin() -export class ApolloLoggingPlugin implements ApolloServerPlugin { - async requestDidStart(): Promise> { - console.log("Request started"); - return { - async willSendResponse() { - console.log("Will send response"); - } - }; - } -} diff --git a/packages/api/src/scalars/date.scalar.ts b/packages/api/src/scalars/date.scalar.ts deleted file mode 100644 index 2f51fe3..0000000 --- a/packages/api/src/scalars/date.scalar.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { CustomScalar, Scalar } from "@nestjs/graphql"; -import { Kind, ValueNode } from "graphql"; - -@Scalar("Date", (type) => Date) -export class DateScalar implements CustomScalar { - description = "Date custom scalar type"; - - parseValue(value: unknown): Date { - if (typeof value === "number" || typeof value === "string") - return new Date(value); - - throw new Error("Value is not valid."); - } - - serialize(value: unknown): number { - if (value instanceof Date) return value.getTime(); - - throw new Error("Value is not an instance of Date."); - } - - parseLiteral(ast: ValueNode): Date { - if (ast.kind === Kind.INT) { - return new Date(ast.value); - } - return null; - } -} diff --git a/packages/api/src/scalars/index.ts b/packages/api/src/scalars/index.ts deleted file mode 100644 index a3542e3..0000000 --- a/packages/api/src/scalars/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./date.scalar"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb21dcb..375adbf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -116,13 +116,16 @@ importers: version: 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/core': specifier: ^10.4.1 - version: 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) - '@nestjs/graphql': - specifier: ^12.2.1 - version: 12.2.1(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(class-transformer@0.5.1)(class-validator@0.14.1)(graphql@16.9.0)(reflect-metadata@0.2.2)(ts-morph@24.0.0) + version: 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/platform-express': specifier: ^10.3.10 version: 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6) + '@nestjs/platform-socket.io': + specifier: ^10.4.7 + version: 10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/websockets@10.4.7)(rxjs@7.8.1) + '@nestjs/websockets': + specifier: ^10.4.7 + version: 10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(@nestjs/platform-socket.io@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) apollo-server-express: specifier: ^3.13.0 version: 3.13.0(express@4.21.1)(graphql@16.9.0) @@ -132,15 +135,15 @@ importers: class-validator: specifier: ^0.14.1 version: 0.14.1 - graphql: - specifier: ^16.9.0 - version: 16.9.0 reflect-metadata: specifier: ^0.2.0 version: 0.2.2 rxjs: specifier: ^7.8.1 version: 7.8.1 + socket.io: + specifier: ^4.8.1 + version: 4.8.1 ts-morph: specifier: ^24.0.0 version: 24.0.0 @@ -196,6 +199,9 @@ importers: rxjs: specifier: ^7.8.1 version: 7.8.1 + socket.io-client: + specifier: ^4.8.1 + version: 4.8.1 threads: specifier: ^1.7.0 version: 1.7.0 @@ -1346,6 +1352,13 @@ packages: '@nestjs/common': ^10.0.0 '@nestjs/core': ^10.0.0 + '@nestjs/platform-socket.io@10.4.7': + resolution: {integrity: sha512-CpmrqswpD/O4SyF/IUzKj14BUf0eTLyDja9svPCRIJX8AdF47mKCMbz5vtU6vpJtxVnq1e1Xd+xcdZ6FIf6HtQ==} + peerDependencies: + '@nestjs/common': ^10.0.0 + '@nestjs/websockets': ^10.0.0 + rxjs: ^7.1.0 + '@nestjs/schematics@10.2.3': resolution: {integrity: sha512-4e8gxaCk7DhBxVUly2PjYL4xC2ifDFexCqq1/u4TtivLGXotVk0wHdYuPYe1tHTHuR1lsOkRbfOCpkdTnigLVg==} peerDependencies: @@ -1364,6 +1377,18 @@ packages: '@nestjs/platform-express': optional: true + '@nestjs/websockets@10.4.7': + resolution: {integrity: sha512-ajuoptYLYm+l3+KtaA9Ed+cO9yB34PtBE8UObavRT8Euh/f7QfeJiKcrU3+BQSAiTWM3nF2qfuV4CfEkP9uKuw==} + peerDependencies: + '@nestjs/common': ^10.0.0 + '@nestjs/core': ^10.0.0 + '@nestjs/platform-socket.io': ^10.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + '@nestjs/platform-socket.io': + optional: true + '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} @@ -1542,6 +1567,9 @@ packages: '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@socket.io/component-emitter@3.1.2': + resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -1591,6 +1619,9 @@ packages: '@types/conventional-commits-parser@5.0.0': resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} + '@types/cookie@0.4.1': + resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} + '@types/cookiejar@2.1.5': resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==} @@ -2207,6 +2238,10 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + base64id@2.0.0: + resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} + engines: {node: ^4.5.0 || >= 5.9} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -2439,6 +2474,10 @@ packages: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + cookiejar@2.1.4: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} @@ -2686,6 +2725,17 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} + engine.io-client@6.6.2: + resolution: {integrity: sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw==} + + engine.io-parser@5.2.3: + resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} + engines: {node: '>=10.0.0'} + + engine.io@6.6.2: + resolution: {integrity: sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==} + engines: {node: '>=10.2.0'} + enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -4145,6 +4195,10 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + object-inspect@1.13.2: resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} engines: {node: '>= 0.4'} @@ -4667,6 +4721,25 @@ packages: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} + socket.io-adapter@2.5.5: + resolution: {integrity: sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==} + + socket.io-client@4.8.1: + resolution: {integrity: sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==} + engines: {node: '>=10.0.0'} + + socket.io-parser@4.2.4: + resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} + engines: {node: '>=10.0.0'} + + socket.io@4.8.0: + resolution: {integrity: sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==} + engines: {node: '>=10.2.0'} + + socket.io@4.8.1: + resolution: {integrity: sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==} + engines: {node: '>=10.2.0'} + sort-object-keys@1.1.3: resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} @@ -5347,6 +5420,18 @@ packages: utf-8-validate: optional: true + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -5366,6 +5451,10 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + xmlhttprequest-ssl@2.1.2: + resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==} + engines: {node: '>=0.4.0'} + xss@1.0.15: resolution: {integrity: sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==} engines: {node: '>= 0.10.0'} @@ -6254,7 +6343,7 @@ snapshots: dependencies: '@graphql-tools/utils': 10.5.5(graphql@16.9.0) graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.8.1 '@graphql-tools/mock@8.7.20(graphql@16.9.0)': dependencies: @@ -6269,7 +6358,7 @@ snapshots: '@graphql-tools/merge': 9.0.8(graphql@16.9.0) '@graphql-tools/utils': 10.5.5(graphql@16.9.0) graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.8.1 value-or-promise: 1.0.12 '@graphql-tools/schema@8.5.1(graphql@16.9.0)': @@ -6570,7 +6659,7 @@ snapshots: '@apollo/server': 4.11.2(graphql@16.9.0) '@apollo/server-plugin-landing-page-graphql-playground': 4.0.0(@apollo/server@4.11.2(graphql@16.9.0)) '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) - '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/graphql': 12.2.1(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(class-transformer@0.5.1)(class-validator@0.14.1)(graphql@16.9.0)(reflect-metadata@0.2.2)(ts-morph@24.0.0) graphql: 16.9.0 iterall: 1.3.0 @@ -6614,7 +6703,7 @@ snapshots: class-transformer: 0.5.1 class-validator: 0.14.1 - '@nestjs/core@10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(reflect-metadata@0.2.2)(rxjs@7.8.1)': + '@nestjs/core@10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1)': dependencies: '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nuxtjs/opencollective': 0.3.2 @@ -6627,6 +6716,7 @@ snapshots: uid: 2.0.2 optionalDependencies: '@nestjs/platform-express': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6) + '@nestjs/websockets': 10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(@nestjs/platform-socket.io@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) transitivePeerDependencies: - encoding @@ -6636,7 +6726,7 @@ snapshots: '@graphql-tools/schema': 10.0.7(graphql@16.9.0) '@graphql-tools/utils': 10.5.5(graphql@16.9.0) '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) - '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/mapped-types': 2.0.5(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2) chokidar: 4.0.1 fast-glob: 3.3.2 @@ -6669,7 +6759,7 @@ snapshots: '@nestjs/platform-express@10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)': dependencies: '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) - '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) body-parser: 1.20.3 cors: 2.8.5 express: 4.21.1 @@ -6678,6 +6768,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@nestjs/platform-socket.io@10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/websockets@10.4.7)(rxjs@7.8.1)': + dependencies: + '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/websockets': 10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(@nestjs/platform-socket.io@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) + rxjs: 7.8.1 + socket.io: 4.8.0 + tslib: 2.7.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@nestjs/schematics@10.2.3(chokidar@3.6.0)(typescript@5.3.3)': dependencies: '@angular-devkit/core': 17.3.11(chokidar@3.6.0) @@ -6703,11 +6805,23 @@ snapshots: '@nestjs/testing@10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(@nestjs/platform-express@10.4.6)': dependencies: '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) - '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) tslib: 2.7.0 optionalDependencies: '@nestjs/platform-express': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6) + '@nestjs/websockets@10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.6)(@nestjs/platform-socket.io@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1)': + dependencies: + '@nestjs/common': 10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 10.4.6(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.6)(@nestjs/websockets@10.4.7)(reflect-metadata@0.2.2)(rxjs@7.8.1) + iterare: 1.2.1 + object-hash: 3.0.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.1 + tslib: 2.7.0 + optionalDependencies: + '@nestjs/platform-socket.io': 10.4.7(@nestjs/common@10.4.6(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/websockets@10.4.7)(rxjs@7.8.1) + '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': dependencies: eslint-scope: 5.1.1 @@ -6850,6 +6964,8 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 + '@socket.io/component-emitter@3.1.2': {} + '@tootallnate/once@2.0.0': {} '@ts-morph/common@0.25.0': @@ -6911,6 +7027,8 @@ snapshots: dependencies: '@types/node': 22.8.7 + '@types/cookie@0.4.1': {} + '@types/cookiejar@2.1.5': {} '@types/cors@2.8.12': {} @@ -7741,6 +7859,8 @@ snapshots: base64-js@1.5.1: {} + base64id@2.0.0: {} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -7975,6 +8095,8 @@ snapshots: cookie@0.7.1: {} + cookie@0.7.2: {} + cookiejar@2.1.4: {} core-js-compat@3.39.0: @@ -8185,6 +8307,37 @@ snapshots: encodeurl@2.0.0: {} + engine.io-client@6.6.2: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7 + engine.io-parser: 5.2.3 + ws: 8.17.1 + xmlhttprequest-ssl: 2.1.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + engine.io-parser@5.2.3: {} + + engine.io@6.6.2: + dependencies: + '@types/cookie': 0.4.1 + '@types/cors': 2.8.12 + '@types/node': 22.8.7 + accepts: 1.3.8 + base64id: 2.0.0 + cookie: 0.7.2 + cors: 2.8.5 + debug: 4.3.7 + engine.io-parser: 5.2.3 + ws: 8.17.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 @@ -8381,23 +8534,24 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0(jiti@1.21.6)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) eslint: 9.14.0(jiti@1.21.6) + eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.14.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.14.0(jiti@1.21.6)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/parser': 7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) eslint: 9.14.0(jiti@1.21.6) - eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.14.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color @@ -8418,7 +8572,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.14.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.14.0(jiti@1.21.6)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0(jiti@1.21.6)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -8995,7 +9149,7 @@ snapshots: graphql-tag@2.12.6(graphql@16.9.0): dependencies: graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.8.1 graphql-ws@5.16.0(graphql@16.9.0): dependencies: @@ -10003,6 +10157,8 @@ snapshots: object-assign@4.1.1: {} + object-hash@3.0.0: {} + object-inspect@1.13.2: {} object-keys@1.1.1: {} @@ -10544,6 +10700,61 @@ snapshots: slash@4.0.0: {} + socket.io-adapter@2.5.5: + dependencies: + debug: 4.3.7 + ws: 8.17.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + socket.io-client@4.8.1: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7 + engine.io-client: 6.6.2 + socket.io-parser: 4.2.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + socket.io-parser@4.2.4: + dependencies: + '@socket.io/component-emitter': 3.1.2 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + socket.io@4.8.0: + dependencies: + accepts: 1.3.8 + base64id: 2.0.0 + cors: 2.8.5 + debug: 4.3.7 + engine.io: 6.6.2 + socket.io-adapter: 2.5.5 + socket.io-parser: 4.2.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + socket.io@4.8.1: + dependencies: + accepts: 1.3.8 + base64id: 2.0.0 + cors: 2.8.5 + debug: 4.3.7 + engine.io: 6.6.2 + socket.io-adapter: 2.5.5 + socket.io-parser: 4.2.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + sort-object-keys@1.1.3: {} sort-package-json@2.10.1: @@ -11254,12 +11465,16 @@ snapshots: ws@7.5.10: {} + ws@8.17.1: {} + ws@8.18.0: {} xml-name-validator@4.0.0: {} xmlchars@2.2.0: {} + xmlhttprequest-ssl@2.1.2: {} + xss@1.0.15: dependencies: commander: 2.20.3 diff --git a/src/pub-sub/pub-sub.module.ts b/src/pub-sub/pub-sub.module.ts new file mode 100644 index 0000000..1191733 --- /dev/null +++ b/src/pub-sub/pub-sub.module.ts @@ -0,0 +1,4 @@ +import { Module } from "@nestjs/common"; + +@Module({}) +export class PubSubModule {}